@fingerly/web-js 0.0.0-stage → 0.1.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/LICENSE +202 -0
- package/README.md +112 -2
- package/dist/browser.global.js +1 -0
- package/dist/index.cjs +1806 -0
- package/dist/index.d.cts +83 -0
- package/dist/index.d.ts +83 -0
- package/dist/index.js +1783 -0
- package/package.json +42 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,113 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @fingerly/web-js
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The Fingerly browser SDK. It reads the signals a browser exposes, sends them to
|
|
4
|
+
Fingerly, and returns a stable visitor ID with a suspect score, so you can
|
|
5
|
+
recognise returning visitors and spot automation, tampering and abuse.
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
npm install @fingerly/web-js
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Using a framework? The bindings wrap this package:
|
|
12
|
+
[`@fingerly/react`](https://www.npmjs.com/package/@fingerly/react),
|
|
13
|
+
[`@fingerly/vue`](https://www.npmjs.com/package/@fingerly/vue),
|
|
14
|
+
[`@fingerly/next`](https://www.npmjs.com/package/@fingerly/next),
|
|
15
|
+
[`@fingerly/nuxt`](https://www.npmjs.com/package/@fingerly/nuxt),
|
|
16
|
+
[`@fingerly/svelte`](https://www.npmjs.com/package/@fingerly/svelte) and
|
|
17
|
+
[`@fingerly/angular`](https://www.npmjs.com/package/@fingerly/angular).
|
|
18
|
+
|
|
19
|
+
## Load once, identify when it matters
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import { load } from '@fingerly/web-js'
|
|
23
|
+
|
|
24
|
+
// A public SDK key from the dashboard. It is scoped to the origins you list,
|
|
25
|
+
// which is what makes it safe to ship in the page.
|
|
26
|
+
const fingerly = await load({ apiKey: 'fly_pk_production_…' })
|
|
27
|
+
|
|
28
|
+
// Later, from your consent tool, or pass consent: 'granted' to load() if you
|
|
29
|
+
// already have consent or another lawful basis.
|
|
30
|
+
fingerly.setConsent('granted')
|
|
31
|
+
|
|
32
|
+
// When the visitor does something worth protecting: sign-up, login, checkout.
|
|
33
|
+
const { requestId, visitorId, suspectLevel } = await fingerly.identify({ tag: 'login' })
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Loading collects nothing and sends nothing. Consent defaults to `pending`, and
|
|
37
|
+
`identify()` rejects with a `ConsentError` until it is `granted`.
|
|
38
|
+
|
|
39
|
+
This package collects and sends. Everything about the score is decided on the
|
|
40
|
+
server, under the weights you set: `suspectLevel` is the band, and it is `null`
|
|
41
|
+
when absent (unscored, or hidden by the SDK key), which is not a clean result.
|
|
42
|
+
Send `requestId` to your server and read the signals and the full result there
|
|
43
|
+
with a secret key (see the server SDKs), rather than trusting what the page
|
|
44
|
+
reports: the page runs code the visitor controls and is no longer told which
|
|
45
|
+
signals fired.
|
|
46
|
+
|
|
47
|
+
## Serve it from your own site
|
|
48
|
+
|
|
49
|
+
Content blockers refuse requests to third-party hosts and to paths they know.
|
|
50
|
+
Create a proxy in the dashboard (**Integration > Proxy keys**), mount it at the
|
|
51
|
+
path it issued with one of the server SDKs or proxy templates, and point the
|
|
52
|
+
SDK at that path:
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
const fingerly = await load({
|
|
56
|
+
apiKey: 'fly_pk_production_…',
|
|
57
|
+
endpoints: '/k7x2qm4a',
|
|
58
|
+
consent: 'granted',
|
|
59
|
+
})
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The path is used exactly as given, with nothing appended. An array of paths
|
|
63
|
+
or URLs is tried in order when one does not answer.
|
|
64
|
+
|
|
65
|
+
## Content Security Policy
|
|
66
|
+
|
|
67
|
+
With a first-party proxy the SDK needs nothing beyond what your page already
|
|
68
|
+
allows: `connect-src 'self'` covers the proxy path, and the script itself is
|
|
69
|
+
your own bundle or `script-src 'self'` for the script-tag build. Under a policy
|
|
70
|
+
without `'unsafe-eval'`, one check that compiles a string is refused by the
|
|
71
|
+
browser, once per page load; the SDK skips it and its sibling and carries on.
|
|
72
|
+
That refusal is reported to your `report-uri` or `report-to` endpoint if you
|
|
73
|
+
have one, as one `script-src` (`eval`) violation per page view.
|
|
74
|
+
|
|
75
|
+
Firefox prints two deprecation warnings while the SDK reads the graphics
|
|
76
|
+
renderer and the motion sensor. They come from the browser, change nothing
|
|
77
|
+
for the visitor, and are not errors.
|
|
78
|
+
|
|
79
|
+
## Errors
|
|
80
|
+
|
|
81
|
+
- `load()` rejects for a configuration mistake, such as a missing `apiKey`.
|
|
82
|
+
It never throws synchronously, so a misconfigured key cannot take the page
|
|
83
|
+
down with it.
|
|
84
|
+
- `identify()` rejects with a `ConsentError` while consent is not `granted`,
|
|
85
|
+
and with a `TransportError` when the request cannot be completed. Branch on
|
|
86
|
+
its `status` and `retryable`. When the server asks for patience (`429` or
|
|
87
|
+
`503` with `Retry-After`), `retryAfterMs` says how long; a wait of up to two
|
|
88
|
+
seconds is taken care of before the error would be raised. A retry reuses
|
|
89
|
+
the first attempt's idempotency key, so it is never counted twice.
|
|
90
|
+
|
|
91
|
+
## Without a bundler
|
|
92
|
+
|
|
93
|
+
The package includes a minified script-tag build, `dist/browser.global.js`,
|
|
94
|
+
which defines a global `Fingerly`. Serve it from your own site under a neutral
|
|
95
|
+
name and load it before your code:
|
|
96
|
+
|
|
97
|
+
```html
|
|
98
|
+
<script src="/assets/app-core.js"></script>
|
|
99
|
+
<script>
|
|
100
|
+
Fingerly.load({ apiKey: 'fly_pk_production_…', consent: 'granted' })
|
|
101
|
+
.then((fingerly) => fingerly.identify({ tag: 'login' }))
|
|
102
|
+
.then((result) => console.log(result.requestId))
|
|
103
|
+
</script>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Documentation
|
|
107
|
+
|
|
108
|
+
The full guide, including consent tools, first-party proxies and the server
|
|
109
|
+
side, is at [docs.fingerly.io](https://docs.fingerly.io/docs/sdks/javascript).
|
|
110
|
+
|
|
111
|
+
## Licence
|
|
112
|
+
|
|
113
|
+
Apache-2.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var Fingerly=(()=>{var G=Object.defineProperty;var vt=Object.getOwnPropertyDescriptor;var wt=Object.getOwnPropertyNames;var bt=Object.prototype.hasOwnProperty;var _t=(e,t)=>{for(var n in t)G(e,n,{get:t[n],enumerable:!0})},Et=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of wt(t))!bt.call(e,o)&&o!==n&&G(e,o,{get:()=>t[o],enumerable:!(r=vt(t,o))||r.enumerable});return e};var xt=e=>Et(G({},"__esModule",{value:!0}),e);var In={};_t(In,{ConsentError:()=>N,FingerlyClient:()=>P,SOURCE:()=>d,TransportError:()=>h,browserSources:()=>B,inspectIntegrity:()=>I,load:()=>St});var le=e=>{throw TypeError(e)},fe=(e,t,n)=>t.has(e)||le("Cannot "+n),x=(e,t,n)=>(fe(e,t,"read from private field"),n?n.call(e):t.get(e)),me=(e,t,n)=>t.has(e)?le("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),pe=(e,t,n,r)=>(fe(e,t,"write to private field"),t.set(e,n),n),Tt=["granted","pending","denied"];function J(e){if(!Tt.includes(e))throw new TypeError(`Fingerly consent must be 'granted', 'pending' or 'denied' (received ${JSON.stringify(e)})`)}var N=class extends Error{constructor(e){super(`Fingerly needs consent before it can identify this visitor (consent is ${e})`),this.state=e,this.name="ConsentError",this.code="consent_required"}},l=class extends Error{constructor(e){super(e??"unsupported"),this.reason=e,this.name="UnsupportedSignal"}},w=class extends Error{constructor(e){super(e??"blocked"),this.reason=e,this.name="BlockedSignal"}},R=class extends Error{constructor(e){super(e??"timeout"),this.reason=e,this.name="TimedOutSignal"}};function Mt(e){if(e instanceof l||e instanceof w||e instanceof R)return e.reason;if(e instanceof Error&&typeof e.name=="string"&&e.name!=="Error")return e.name}var T=typeof globalThis.performance?.now=="function"?()=>globalThis.performance.now():()=>Date.now(),H={budgetMs:1200,defaultSourceTimeoutMs:300,concurrency:6};function U(e){return Math.max(0,Math.round(e))}function kt(e){return e instanceof l?"unsupported":e instanceof w?"blocked":e instanceof R?"timeout":"error"}async function At(e,t,n,r,o){let i=T(),a=t-i;if(a<=0)return{status:"timeout",ms:0,reason:"budget-exhausted"};let c=Math.min(e.timeoutMs??n,a),u=new AbortController,m=()=>u.abort(new R("aborted"));r?.addEventListener("abort",m,{once:!0});let p=setTimeout(()=>u.abort(new R("source-timeout")),c),b={signal:u.signal,budgetRemainingMs:()=>Math.max(0,t-T()),completed:y=>o[y]};try{let y=await Promise.race([(async()=>e.run(b))(),new Promise((_,E)=>{u.signal.addEventListener("abort",()=>E(u.signal.reason??new R("source-timeout")),{once:!0})})]);return{status:"ok",ms:U(T()-i),value:y}}catch(y){let _=kt(y),E=Mt(y);return E===void 0?{status:_,ms:U(T()-i)}:{status:_,ms:U(T()-i),reason:E}}finally{clearTimeout(p),r?.removeEventListener("abort",m)}}async function Ct(e,t={}){let n=t.budgetMs??H.budgetMs,r=t.defaultSourceTimeoutMs??H.defaultSourceTimeoutMs,o=Math.max(1,t.concurrency??H.concurrency),i=t.tiers??["fast","deferred"],a=T(),c=a+n,u={},m={...t.completed??{}},p=!1;for(let b of i){let y=e.filter(M=>M.tier===b);if(y.length===0)continue;let _=0,E=async()=>{for(;_<y.length;){let M=y[_++];if(!M)continue;if(T()>=c||t.signal?.aborted){p=!0,u[M.id]={status:"timeout",ms:0,reason:"budget-exhausted"};continue}let V=await At(M,c,r,t.signal,m);V.status==="timeout"&&(p=!0),u[M.id]=V,m[M.id]=V}};await Promise.all(Array.from({length:Math.min(o,y.length)},E))}return{outcomes:u,elapsedMs:U(T()-a),truncated:p}}function Dt(e="v1"){if(!/^v[1-9]\d*$/.test(e)||e.trim()!==e)throw new TypeError('apiVersion must be a version such as "v1" or "v2"');return e}var Rt="https://api.fingerly.io",Y="x-api-key",ge="[redacted]",he=Symbol.for("nodejs.util.inspect.custom"),Ot="Idempotency-Key",h=class extends Error{constructor(e,t,n=!1,r,o){super(e),this.status=t,this.retryable=n,this.code=r,this.retryAfterMs=o,this.name="TransportError"}},Z=4*1024*1024,Nt=2e3;function Pt(e){let t=e.headers.get("retry-after")?.trim();if(!t)return;if(/^\d+$/.test(t))return Number(t)*1e3;let n=Date.parse(t);return Number.isFinite(n)?Math.max(0,n-Date.now()):void 0}async function ee(e){try{let n=(await e.json())?.error?.code;return typeof n=="string"&&n!==""?n:void 0}catch{return}}function te(e,t){return new h(`The server refused the submission (${e.status})`,e.status,Bt(e.status),t,Pt(e))}async function It(e){let t=()=>new h("The server answered with a response this SDK cannot read",e.status,!1);if(Number(e.headers.get("content-length"))>Z)throw e.body?.cancel().catch(()=>{}),t();let n=await e.text();if(n.length>Z)throw t();try{let r=JSON.parse(n);if(r===null||typeof r!="object")throw t();return r}catch{throw t()}}function Lt(e,t){let n=Wt(t,Math.random);return e.retryAfterMs===void 0?n:e.retryAfterMs>Nt?null:e.retryAfterMs+n}function Bt(e){return e===408||e===429||e>=500&&e<=599}function Ft(e){return e.status===404||e.status===405}function ye(e,t){return`${e}/api/${t}/ingest`}function $(e){return ye(Rt,e)}function Ut(e,t){let n=e.trim().replace(/\/+$/,"");if(n===""||n.includes("?")||n.includes("#"))throw new TypeError("A Fingerly endpoint must be a non-empty URL or path without a query or fragment");if(!(n.startsWith("/")||/^https?:\/\//i.test(n)))throw new TypeError("A Fingerly endpoint must be an absolute URL or a root-relative browser path");return/^https?:\/\/[^/]+$/i.test(n)?ye(n,t):n}function Wt(e,t){let n=Math.min(2e3,100*2**(e-1));return Math.floor(t()*n)}function ne(e,t){return new Promise(n=>{if(t?.aborted)return n();let r=()=>{clearTimeout(o),t?.removeEventListener("abort",r),n()},o=setTimeout(r,e);t?.addEventListener("abort",r,{once:!0})})}function qt(){let e=globalThis.crypto;if(typeof e?.randomUUID=="function")return e.randomUUID();if(typeof e?.getRandomValues=="function"){let t=e.getRandomValues(new Uint8Array(16));t[6]=(t[6]??0)&15|64,t[8]=(t[8]??0)&63|128;let n=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}return`fingerly-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}-${Math.random().toString(36).slice(2)}`}var D,re=class{constructor(e){if(me(this,D),!e.apiKey)throw new h("An SDK key is required to submit a fingerprint");if(e.endpoint!==void 0&&e.endpoints!==void 0)throw new TypeError("Pass endpoints or the deprecated endpoint option, not both");pe(this,D,e.apiKey);let t=Dt(e.apiVersion),n=e.endpoints??e.endpoint,r=n===void 0?[$(t)]:Array.isArray(n)?[...n]:[n];if(r.length===0)throw new TypeError("The endpoints array must not be empty");let o=r.map(a=>Ut(a,t));n!==void 0&&e.fallbackToDefaultEndpoint&&(o.includes($(t))||o.push($(t))),this.urls=o,this.maxAttempts=Math.max(1,this.urls.length,e.maxAttempts??3),this.requestTimeoutMs=e.requestTimeoutMs??5e3;let i=e.fetchImpl??globalThis.fetch;if(typeof i!="function")throw new h("No fetch implementation is available; pass one as fetchImpl");this.fetchImpl=i.bind(globalThis)}toJSON(){return{apiKey:ge,urls:[...this.urls],maxAttempts:this.maxAttempts,requestTimeoutMs:this.requestTimeoutMs}}[he](){return this.toJSON()}async submit(e,t){let n,r=JSON.stringify(e),o=qt(),i=0;for(let a=1;a<=this.maxAttempts;a++){if(t?.aborted)throw new h("The submission was cancelled");try{return await this.attempt(this.urls[i],r,o,t)}catch(c){let u=c instanceof h?c:new h(c instanceof Error?c.message:"The submission could not be sent",void 0,!0),m=this.nextAttempt(u,a,i);if(m===null)throw u;n=u,i=Math.min(i+1,this.urls.length-1),await ne(m,t)}}throw n??new h("The submission could not be sent")}async submitSupplement(e,t,n){let r=JSON.stringify(t),o,i=0;for(let a=1;a<=this.maxAttempts;a++){if(n?.aborted)throw new h("The supplement was cancelled");try{await this.postJSON(this.urls[i],r,n);return}catch(c){let u=c instanceof h?c:new h(c instanceof Error?c.message:"The supplement could not be sent",void 0,!0),m=this.nextAttempt(u,a,i);if(m===null)throw u;o=u,i=Math.min(i+1,this.urls.length-1),await ne(m,n)}}throw o??new h("The supplement could not be sent")}nextAttempt(e,t,n){return t===this.maxAttempts?null:e.retryable?Lt(e,t):Ft(e)&&n<this.urls.length-1?0:null}async postJSON(e,t,n){let r=new AbortController,o=()=>r.abort();n?.addEventListener("abort",o,{once:!0});let i=setTimeout(o,this.requestTimeoutMs);try{let a=await this.fetchImpl(e,{method:"POST",headers:{"content-type":"application/json",[Y]:x(this,D)},body:t,credentials:"omit",signal:r.signal});if(!a.ok)throw te(a,await ee(a));return await a.arrayBuffer().catch(()=>{}),a}finally{clearTimeout(i),n?.removeEventListener("abort",o)}}async attempt(e,t,n,r){let o=new AbortController,i=()=>o.abort();r?.addEventListener("abort",i,{once:!0});let a=setTimeout(i,this.requestTimeoutMs);try{let c=await this.fetchImpl(e,{method:"POST",headers:{"content-type":"application/json",[Y]:x(this,D),[Ot]:n},body:t,credentials:"omit",signal:o.signal});if(!c.ok)throw te(c,await ee(c));let u=await It(c);if(typeof u?.request_id!="string"||u.request_id==="")throw new h("The server accepted the submission but returned no request_id");return u}finally{clearTimeout(a),r?.removeEventListener("abort",i)}}};D=new WeakMap;var oe="0.1.1",Vt=1;function ie(e){return e instanceof h&&e.code==="consent_required"?new N("pending"):e}var ae={patched_natives:[],lies:[],engine:{}},v,P=class{constructor(e){me(this,v),this.consentListeners=new Set;let t=e.consent??"pending";J(t),this.consentState=t,pe(this,v,e),this.platform=e.platform??"web",this.transport=e.transport??new re({...e.apiVersion===void 0?{}:{apiVersion:e.apiVersion},apiKey:e.apiKey,...e.endpoint===void 0?{}:{endpoint:e.endpoint},...e.endpoints===void 0?{}:{endpoints:e.endpoints},...e.fallbackToDefaultEndpoint===void 0?{}:{fallbackToDefaultEndpoint:e.fallbackToDefaultEndpoint}})}toJSON(){return{apiKey:ge,platform:this.platform,consent:this.consentState,transport:this.transport instanceof re?this.transport:"custom"}}[he](){return this.toJSON()}get consent(){return this.consentState}setConsent(e){if(J(e),e!==this.consentState){this.consentState=e;for(let t of[...this.consentListeners])try{t(e)}catch(n){setTimeout(()=>{throw n},0)}}}onConsentChange(e){return this.consentListeners.add(e),()=>{this.consentListeners.delete(e)}}requireConsent(){if(this.consentState!=="granted")throw new N(this.consentState)}consentScope(e){let t=new AbortController,n=()=>t.abort();e?.aborted?n():e?.addEventListener("abort",n,{once:!0});let r=this.onConsentChange(o=>{o!=="granted"&&n()});return{signal:t.signal,close:()=>{r(),e?.removeEventListener("abort",n)}}}async identify(e={}){this.requireConsent();let t=this.consentScope(e.signal);try{return await this.identifyWithConsent(e,t.signal)}finally{t.close()}}async identifyWithConsent(e,t){let n=e.submit!==!1&&e.tiers===void 0,r=await this.collectReport(n?["fast"]:e.tiers??["fast","deferred"],t,n?300:void 0);if(this.requireConsent(),e.submit===!1)return{requestId:"",visitorId:"",visitorIsNew:!1,visitorConfidence:0,identifiable:!1,duplicate:!1,state:"",suspectScore:null,suspectLevel:null,report:r,deferred:Promise.resolve({status:"skipped",reason:"not-submitted"})};let o={sdk:{platform:this.platform,version:oe},consent:this.consentState,signals:r,...e.tag===void 0?{}:{tag:e.tag}},i;try{i=await this.transport.submit(o,t)}catch(c){throw this.requireConsent(),ie(c)}let a={requestId:i.request_id,visitorId:i.visitor_id??"",visitorIsNew:i.visitor_is_new??!1,visitorConfidence:i.visitor_confidence??0,identifiable:i.identifiable??!1,duplicate:i.duplicate??!1,state:i.state??"",suspectScore:typeof i.suspect_score=="number"&&Number.isFinite(i.suspect_score)?i.suspect_score:null,suspectLevel:typeof i.suspect_level=="string"&&i.suspect_level!==""?i.suspect_level:null,report:r,deferred:Promise.resolve({status:"skipped",reason:"explicit-tiers"})};return n?i.duplicate||!i.deferred_token?(a.deferred=Promise.resolve({status:"skipped",reason:i.duplicate?"duplicate":"unsupported-transport"}),a):typeof this.transport.submitSupplement!="function"?(a.deferred=Promise.resolve({status:"skipped",reason:"unsupported-transport"}),a):(a.deferred=this.finishDeferred(r,i.request_id,i.deferred_token,e.signal),a):a}async finishDeferred(e,t,n,r){let o={status:"skipped",reason:"consent-withdrawn"};if(this.consentState!=="granted")return o;let i=this.consentScope(r),a,c;try{if(a=await this.collectReport(["deferred"],i.signal,1200,e.sources),this.consentState!=="granted")return o;c={schema:e.schema,budget_ms:e.budget_ms+a.budget_ms,elapsed_ms:e.elapsed_ms+a.elapsed_ms,tiers:["fast","deferred"],sources:{...e.sources,...a.sources},integrity:x(this,v).integrity?x(this,v).integrity({sources:{...e.sources,...a.sources}}):ae};let u={sdk:{platform:this.platform,version:oe},consent:this.consentState,signals:a,token:n};return await this.transport.submitSupplement(t,u,i.signal),{status:"submitted",report:a,combinedReport:c}}catch(u){if(this.consentState!=="granted")return o;let m=ie(u);return{status:"failed",error:m instanceof Error?m:new Error(String(m)),...a===void 0?{}:{report:a},...c===void 0?{}:{combinedReport:c}}}finally{i.close()}}async collect(e={}){this.requireConsent();let t=e.tiers??["fast","deferred"],n=this.consentScope(e.signal);try{let r=await this.collectReport(t,n.signal);return this.requireConsent(),r}finally{n.close()}}async collectReport(e,t,n,r){let o=x(this,v).sources??[],i={...x(this,v).schedule,tiers:e,...n===void 0?{}:{budgetMs:n},...t===void 0?{}:{signal:t},...r===void 0?{}:{completed:r}},a=await Ct(o,i),c=x(this,v).integrity?x(this,v).integrity({sources:a.outcomes}):ae;return{schema:Vt,budget_ms:i.budgetMs??1200,elapsed_ms:a.elapsedMs,tiers:e,sources:a.outcomes,integrity:c}}};v=new WeakMap;var O=2654435761,W=2246822519,se=3266489917,Gt=668265263,ce=374761393;function k(e,t){return e<<t|e>>>32-t}function F(e,t){return Math.imul(k(e+Math.imul(t,W)|0,13),O)}function C(e,t){return((e[t]??0)|(e[t+1]??0)<<8|(e[t+2]??0)<<16|(e[t+3]??0)<<24)>>>0}function Ht(e){if(typeof TextEncoder<"u")return new TextEncoder().encode(e);let t=[];for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(r>=55296&&r<=56319&&n+1<e.length){let o=e.charCodeAt(n+1);o>=56320&&o<=57343&&(r=(r-55296)*1024+(o-56320)+65536,n++)}r<128?t.push(r):r<2048?t.push(192|r>>6,128|r&63):r<65536?t.push(224|r>>12,128|r>>6&63,128|r&63):t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|r&63)}return new Uint8Array(t)}function ue(e,t){let n=e.length,r=0,o;if(n>=16){let i=t+O+W|0,a=t+W|0,c=t|0,u=t-O|0,m=n-16;do i=F(i,C(e,r)),a=F(a,C(e,r+4)),c=F(c,C(e,r+8)),u=F(u,C(e,r+12)),r+=16;while(r<=m);o=k(i,1)+k(a,7)+k(c,12)+k(u,18)|0}else o=t+ce|0;for(o=o+n|0;r+4<=n;)o=Math.imul(k(o+Math.imul(C(e,r),se)|0,17),Gt),r+=4;for(;r<n;)o=Math.imul(k(o+Math.imul(e[r]??0,ce)|0,11),O),r++;return o^=o>>>15,o=Math.imul(o,W),o^=o>>>13,o=Math.imul(o,se),o^=o>>>16,o>>>0}function de(e){return e.toString(16).padStart(8,"0")}function A(e){let t=typeof e=="string"?Ht(e):e;return de(ue(t,0))+de(ue(t,O))}var d={navigator:"navigator",userAgentData:"user_agent_data",languages:"languages",plugins:"plugins",vendor:"vendor",engine:"engine",math:"math",errors:"errors",screen:"screen",screenFrame:"screen_frame",colorGamut:"color_gamut",mediaQueries:"media_queries",canvas:"canvas",webgl:"webgl",webglExtensions:"webgl_extensions",audio:"audio",audioLatency:"audio_latency",fonts:"fonts",fontPreferences:"font_preferences",intl:"intl",timezone:"timezone",storage:"storage",storageQuota:"storage_quota",storageDurability:"storage_durability",hardware:"hardware",touch:"touch",sensors:"sensors",battery:"battery",mediaDevices:"media_devices",network:"network",speech:"speech",timing:"timing",permissions:"permissions",automation:"automation",shields:"shields",domBlockers:"dom_blockers"};function Se(e,t){let n=e.sources[t];return n?.status==="ok"?n.value:void 0}function f(e){let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t}function s(e){try{return e()}catch{return}}function j(){return typeof window>"u"?void 0:window}function g(){let e=j();if(!e)throw new l("no-window");return e}function ve(e){throw e instanceof Error&&(e.name==="SecurityError"||e.name==="NotAllowedError"||e.name==="NotSupportedError")?new w(e.name):e}var $t=/\{\s*\[native code\]\s*\}\s*$/,jt=[["navigator","webdriver"],["navigator","userAgent"],["navigator","platform"],["navigator","plugins"],["navigator","mimeTypes"],["navigator","languages"],["navigator","language"],["navigator","hardwareConcurrency"],["navigator","deviceMemory"],["navigator","maxTouchPoints"],["navigator","vendor"],["navigator","appVersion"],["navigator","productSub"],["screen","width"],["screen","height"],["screen","availWidth"],["screen","availHeight"],["screen","colorDepth"]];function we(e){let t=[];for(let[o,i]of jt){let a=o==="navigator"?e.navigator:e.screen;if(!a)continue;if(s(()=>Object.getOwnPropertyDescriptor(a,i))){t.push({id:`${o}.${i}`,kind:"descriptor",detail:"own-property-shadows-prototype"});continue}let u=s(()=>Object.getPrototypeOf(a));if(!u)continue;let m=s(()=>Object.getOwnPropertyDescriptor(u,i));if(!m?.get)continue;let p=s(()=>Function.prototype.toString.call(m.get));p!==void 0&&!$t.test(p)&&t.push({id:`${o}.${i}.getter`,kind:"descriptor",detail:"getter-is-not-native"})}let n=s(()=>Object.getPrototypeOf(e.navigator));e.Navigator&&n!==void 0&&n!==e.Navigator.prototype&&t.push({id:"navigator",kind:"prototype",detail:"not-Navigator.prototype"});let r=s(()=>Object.getPrototypeOf(e.screen));return e.Screen&&r!==void 0&&r!==e.Screen.prototype&&t.push({id:"screen",kind:"prototype",detail:"not-Screen.prototype"}),t}var be=/\{\s*\[native code\]\s*\}\s*$/,Xt=[["Function.prototype.toString",()=>Function.prototype.toString],["Function.prototype.bind",()=>Function.prototype.bind],["Object.getOwnPropertyDescriptor",()=>Object.getOwnPropertyDescriptor],["Object.defineProperty",()=>Object.defineProperty],["Date.prototype.getTimezoneOffset",()=>Date.prototype.getTimezoneOffset],["Number.prototype.toFixed",()=>Number.prototype.toFixed],["Error.prototype.toString",()=>Error.prototype.toString],["Intl.DateTimeFormat",()=>Intl?.DateTimeFormat],["Navigator.prototype.javaEnabled",e=>e.Navigator?.prototype?.javaEnabled],["Permissions.prototype.query",e=>e.Permissions?.prototype?.query],["MediaDevices.prototype.enumerateDevices",e=>e.MediaDevices?.prototype?.enumerateDevices],["HTMLCanvasElement.prototype.toDataURL",e=>e.HTMLCanvasElement?.prototype?.toDataURL],["CanvasRenderingContext2D.prototype.getImageData",e=>e.CanvasRenderingContext2D?.prototype?.getImageData],["WebGLRenderingContext.prototype.getParameter",e=>e.WebGLRenderingContext?.prototype?.getParameter],["WebGLRenderingContext.prototype.getExtension",e=>e.WebGLRenderingContext?.prototype?.getExtension],["AudioBuffer.prototype.getChannelData",e=>e.AudioBuffer?.prototype?.getChannelData],["Element.prototype.getBoundingClientRect",e=>e.Element?.prototype?.getBoundingClientRect],["Performance.prototype.now",e=>e.Performance?.prototype?.now],["Screen.prototype.constructor",e=>e.Screen]];function Kt(){let e=Function.prototype.toString;if(typeof document>"u"||!document.body)return{fn:e,clean:!1};let t=s(()=>{let n=document.createElement("iframe");return n.setAttribute("sandbox","allow-same-origin"),n.style.display="none",document.body.appendChild(n),n});if(!t)return{fn:e,clean:!1};try{let n=s(()=>t.contentWindow?.Function?.prototype?.toString);return n?{fn:n,clean:!0}:{fn:e,clean:!1}}finally{t.remove()}}function _e(e){let t=[],n=[],{fn:r,clean:o}=Kt(),i=a=>s(()=>r.call(a));for(let[a,c]of Xt){let u=s(()=>c(e));if(u==null){n.push({id:a,kind:"missing"});continue}if(typeof u!="function")continue;let m=i(u);m!==void 0&&(be.test(m)||(t.push(a),n.push({id:a,kind:"not-native"})))}if(o){let a=Function.prototype.toString,c=i(a);c!==void 0&&!be.test(c)&&(t.includes("Function.prototype.toString")||t.push("Function.prototype.toString"),n.push({id:"Function.prototype.toString",kind:"not-native",detail:"caught-via-fresh-realm"}))}return{patched:t,lies:n}}function I(e){let t=j(),n=Se({schema:1,budget_ms:0,elapsed_ms:0,tiers:[],sources:e,integrity:{patched_natives:[],lies:[],engine:{}}},d.engine),r={...n?.claimed===void 0?{}:{claimed:n.claimed},...n?.observed===void 0?{}:{observed:n.observed}};if(!t)return{patched_natives:[],lies:[],engine:r};let o=_e(t),i=we(t);return{patched_natives:o.patched,lies:[...o.lies,...i],engine:r}}function zt(){let e=globalThis,t=e.OfflineAudioContext??e.webkitOfflineAudioContext;if(!t)throw new l("no-offline-audio-context");return t}async function Ee(e){let t=zt(),n=new t(1,5e3,44100),r=n.createOscillator();r.type="triangle",r.frequency.value=1e4;let o=n.createDynamicsCompressor();o.threshold.value=-50,o.knee.value=40,o.ratio.value=12,o.attack.value=0,o.release.value=.25,r.connect(o),o.connect(n.destination),r.start(0);let a=(await new Promise((u,m)=>{e.signal.addEventListener("abort",()=>m(e.signal.reason),{once:!0}),n.oncomplete=p=>u(p.renderedBuffer);try{let p=n.startRendering();p&&typeof p.then=="function"&&p.then(u,m)}catch(p){m(p)}})).getChannelData(0),c=0;for(let u=4500;u<a.length;u++)c+=Math.abs(a[u]??0);return c}var xe={id:d.audio,tier:"deferred",timeoutMs:500,async run(e){let t=await Ee(e);if(t===0)throw new w("audio-silent");let n=await Ee(e);return f({value:t,unstable:t!==n,sample_rate:44100})}},Te={id:d.audioLatency,tier:"deferred",timeoutMs:200,run(){let e=globalThis,t=e.AudioContext??e.webkitAudioContext;if(!t)throw new l("no-audio-context");let n=new t;try{return f({base_latency:s(()=>n.baseLatency),sample_rate:s(()=>n.sampleRate),state:s(()=>n.state)})}finally{s(()=>{n.close()})}}};var Me={id:d.hardware,tier:"fast",run(){if(typeof navigator>"u")throw new l("no-navigator");let e=navigator;return f({hardware_concurrency:s(()=>e.hardwareConcurrency),device_memory:s(()=>e.deviceMemory)})}},ke={id:d.touch,tier:"fast",run(){let e=g();return f({max_touch_points:s(()=>navigator.maxTouchPoints),touch_event:s(()=>"ontouchstart"in e),touch_start:s(()=>(document.createEvent("TouchEvent"),!0)),pointer_coarse:s(()=>e.matchMedia?.("(pointer: coarse)").matches),any_hover:s(()=>e.matchMedia?.("(any-hover: hover)").matches),device_motion:s(()=>"DeviceMotionEvent"in e),device_orientation:s(()=>"DeviceOrientationEvent"in e)})}},Ae={id:d.sensors,tier:"deferred",timeoutMs:150,async run(e){let t=g(),n="DeviceMotionEvent"in t,r="DeviceOrientationEvent"in t;if(!n&&!r)return f({device_motion:!1,device_orientation:!1});if(typeof document<"u"&&document.visibilityState==="hidden")return f({device_motion:n,device_orientation:r});let o=await new Promise(i=>{let a=!1,c=p=>{a||(a=!0,t.removeEventListener("devicemotion",u),clearTimeout(m),i(p))},u=()=>c(!0),m=setTimeout(()=>c(!1),100);e.signal.addEventListener("abort",()=>c(!1),{once:!0}),t.addEventListener("devicemotion",u,{once:!0})});return f({device_motion:n,device_orientation:r,motion_observed:o})}},Ce={id:d.mediaDevices,tier:"fast",timeoutMs:120,async run(){if(typeof navigator>"u")throw new l("no-navigator");if(typeof navigator.mediaDevices?.enumerateDevices!="function")throw new l("no-media-devices");let e=await navigator.mediaDevices.enumerateDevices();return f({audio_input:e.filter(t=>t.kind==="audioinput").length,audio_output:e.filter(t=>t.kind==="audiooutput").length,video_input:e.filter(t=>t.kind==="videoinput").length,labels_hidden:e.length>0&&e.every(t=>t.label==="")})}},De={id:d.network,tier:"fast",run(){let e=navigator.connection;if(!e)throw new l("no-network-information");return f({effective_type:s(()=>e.effectiveType),downlink:s(()=>e.downlink),rtt:s(()=>e.rtt),save_data:s(()=>e.saveData)})}},Re={id:d.intl,tier:"fast",run(){if(typeof Intl>"u")throw new l("no-intl");let e=s(()=>new Intl.DateTimeFormat().resolvedOptions());return f({timezone:e?.timeZone,timezone_offset:s(()=>new Date().getTimezoneOffset()),locale:e?.locale,calendar:e?.calendar,numbering_system:e?.numberingSystem,formatted:s(()=>new Intl.DateTimeFormat(void 0,{dateStyle:"full",timeStyle:"full"}).format(new Date(0)))})}},Oe={id:d.timezone,tier:"fast",run(){if(typeof Intl>"u")throw new l("no-intl");return f({name:s(()=>new Intl.DateTimeFormat().resolvedOptions().timeZone),offset:s(()=>new Date().getTimezoneOffset())})}},Ne={id:d.battery,tier:"deferred",timeoutMs:250,async run(){if(typeof navigator>"u")throw new l("no-navigator");let e=navigator.getBattery;if(typeof e!="function")throw new l("no-battery-api");let t=await e.call(navigator),n=r=>r===void 0?void 0:Number.isFinite(r)?r:null;return f({charging:t.charging,charging_time:n(t.chargingTime),discharging_time:n(t.dischargingTime),level:t.level})}},Pe={id:d.speech,tier:"deferred",timeoutMs:250,async run(e){if(typeof speechSynthesis>"u")throw new l("no-speech-synthesis");let t=speechSynthesis.getVoices();return t.length===0&&(t=await new Promise(n=>{let r=()=>{speechSynthesis.removeEventListener("voiceschanged",o),e.signal.removeEventListener("abort",i),n(speechSynthesis.getVoices())},o=()=>r(),i=()=>r();speechSynthesis.addEventListener("voiceschanged",o,{once:!0}),e.signal.addEventListener("abort",i,{once:!0}),setTimeout(r,Math.min(100,e.budgetRemainingMs()))})),{voices:t.map(n=>({name:n.name,language:n.lang,local_service:n.localService,default:n.default,uri:n.voiceURI}))}}};var Ie={id:d.screen,tier:"fast",run(){let e=g(),t=e.screen;return f({width:s(()=>t.width),height:s(()=>t.height),avail_width:s(()=>t.availWidth),avail_height:s(()=>t.availHeight),color_depth:s(()=>t.colorDepth),pixel_depth:s(()=>t.pixelDepth),device_pixel_ratio:s(()=>e.devicePixelRatio),orientation:s(()=>t.orientation?.type),inner_width:s(()=>e.innerWidth),inner_height:s(()=>e.innerHeight),frame:s(()=>[t.availTop??null,(t.width??0)-(t.availWidth??0)-(t.availLeft??0),(t.height??0)-(t.availHeight??0)-(t.availTop??0),t.availLeft??null])})}},X;function Qt(e){let t=e.screen;return[t.availTop??null,(t.width??0)-(t.availWidth??0)-(t.availLeft??0),(t.height??0)-(t.availHeight??0)-(t.availTop??0),t.availLeft??null]}var Le={id:d.screenFrame,tier:"fast",run(){let e=g(),t=Qt(e),n=e.document?.fullscreenElement!=null,r=t.every(o=>o===0||o===null);return!n&&!r&&(X=t),{frame:n&&X?[...X]:t}}};function Jt(e,t,n){if(typeof e.matchMedia=="function"){for(let r=0;r<=n;r++)if(e.matchMedia(`(${t}: ${r})`).matches)return r}}function K(e,t){if(typeof e.matchMedia=="function")return t.find(n=>e.matchMedia(n).matches)}var Be={id:d.mediaQueries,tier:"fast",run(){let e=g();if(typeof e.matchMedia!="function")throw new l("no-match-media");let t=K(e,["(color-gamut: rec2020)","(color-gamut: p3)","(color-gamut: srgb)"]),n=K(e,["(prefers-contrast: more)","(prefers-contrast: less)","(prefers-contrast: custom)","(prefers-contrast: no-preference)"]);return f({color_gamut:t?.match(/color-gamut:\s*(\w+)/)?.[1],inverted_colors:s(()=>e.matchMedia("(inverted-colors: inverted)").matches),forced_colors:s(()=>e.matchMedia("(forced-colors: active)").matches),monochrome:Jt(e,"monochrome",10),contrast:n?.match(/prefers-contrast:\s*([\w-]+)/)?.[1],reduced_motion:s(()=>e.matchMedia("(prefers-reduced-motion: reduce)").matches),reduced_transparency:s(()=>e.matchMedia("(prefers-reduced-transparency: reduce)").matches),hdr:s(()=>e.matchMedia("(dynamic-range: high)").matches)})}},Fe={id:d.colorGamut,tier:"fast",run(){let e=g();if(typeof e.matchMedia!="function")throw new l("no-match-media");let n=K(e,["(color-gamut: rec2020)","(color-gamut: p3)","(color-gamut: srgb)"])?.match(/color-gamut:\s*(\w+)/)?.[1];return n==="srgb"||n==="p3"||n==="rec2020"?{gamut:n}:{}}};var Yt=16384,Zt=15,en=9;var tn=250,Ue=600;function nn(e){return new Promise((t,n)=>{let r=indexedDB.open(e,1);r.onupgradeneeded=()=>r.result.createObjectStore("s"),r.onsuccess=()=>t(r.result),r.onerror=()=>n(r.error??new Error("indexeddb-open-failed")),r.onblocked=()=>n(new Error("indexeddb-open-blocked"))})}function rn(e){try{let t=e.transaction("s","readwrite",{durability:"strict"}),n=t.durability==="strict";return t.abort(),n}catch{return!1}}function q(e,t,n){return new Promise((r,o)=>{let i=performance.now(),a=0,c=()=>{if(a===Zt){r(performance.now()-i);return}let u=e.transaction("s","readwrite",{durability:t});u.objectStore("s").put(n,a),a+=1,u.oncomplete=c,u.onerror=u.onabort=()=>o(u.error??new Error("indexeddb-write-failed"))};c()})}var We={id:d.storageDurability,tier:"deferred",timeoutMs:Ue+400,async run(e){if(g(),typeof indexedDB!="object"||indexedDB===null)throw new l("no-indexeddb");let t=e.completed(d.engine);if((t?.status==="ok"?t.value.observed:void 0)!=="chromium")throw new l("not-chromium");let r=`__fingerly_durability_${Math.random().toString(36).slice(2)}`,o=new Uint8Array(Yt),i;try{if(i=await nn(r),!rn(i))return{honored:!1};await q(i,"relaxed",o),await q(i,"strict",o);let a=performance.now(),c=a+Math.min(Ue,Math.max(0,e.budgetRemainingMs()-tn)),u=[];for(;u.length<en&&!e.signal.aborted;){if(u.length>0){let b=(performance.now()-a)/u.length;if(performance.now()+b>c)break}let m=await q(i,"relaxed",o),p=await q(i,"strict",o);if(m>0)u.push(p/m);else break}return u.length===0?{honored:!0,rounds:0}:(u.sort((m,p)=>m-p),f({ratio:u[u.length>>1],rounds:u.length,honored:!0}))}finally{try{i?.close(),indexedDB.deleteDatabase(r)}catch{}}}};var qe=[["easylist",".ad_300x250",".textads"],["easylist_germany",".werbung1",".werbeblock"],["easylist_italy",".pubbl",".banner_pubblicita"],["easylist_dutch",".advertentie-container",".reclame"],["easyprivacy",".trackingpixel","#tracking-pixel"],["fanboy_annoyances","#newsletter-signup-modal",".cookie-consent-banner"],["fanboy_social",".social-share-buttons",".facebook-like-box"],["adguard_base","#adsense_widget",".adsbygoogle-container"],["adguard_annoyances",".push-notification-prompt","#app-install-banner"],["listekr","#ad_wrapper_top",".ad_zone"],["liste_fr",".pub_300x250","#pubfooter"],["ro_list",".reclama-mare","#reclama"]],on=60;function an(){return new Promise(e=>{let t=!1,n=()=>{t||(t=!0,e())};setTimeout(n,on),typeof requestAnimationFrame=="function"&&requestAnimationFrame(()=>setTimeout(n,0))})}function Ve(e){if(e.offsetParent===null||e.offsetHeight===0||e.offsetWidth===0)return!0;let t=getComputedStyle(e);return t.display==="none"||t.visibility==="hidden"}function Ge(e,t){let n=e.createElement("div");return t.startsWith("#")?n.id=t.slice(1):n.className=t.slice(1),n.style.position="absolute",n.style.top="-9999px",n.style.left="-9999px",n.style.width="1px",n.style.height="1px",n}var He={id:d.domBlockers,tier:"deferred",timeoutMs:300,async run(){if(g(),typeof document>"u"||!document.body)throw new l("no-document-body");let e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",e.style.width="1px",e.style.height="1px";let t=Ge(document,".fingerly-control-element");e.appendChild(t);let n=qe.map(([r,...o])=>({name:r,nodes:o.map(i=>{let a=Ge(document,i);return e.appendChild(a),a})}));document.body.appendChild(e);try{if(await an(),Ve(t))return{};let r=n.filter(({nodes:o})=>o.some(Ve)).map(({name:o})=>o);return f({blocked:r,probed:qe.length})}finally{e.remove()}}};function sn(){return s(()=>{try{(-1).toFixed(-1)}catch(e){return e instanceof Error?e.message.length:void 0}})}function cn(){return s(()=>eval.toString().length)}function un(){return s(()=>{let e=new Error("probe").stack;if(!(typeof e!="string"||e===""))return e.includes(" at ")?"v8":/^@|\n@|^\w*@/m.test(e)?e.includes("global code")?"javascriptcore":"spidermonkey":"unknown"})}function dn(e,t,n){let r=[];if(e===51?r.push("chromium"):e===43||e===44?r.push("webkit"):e===25&&r.push("gecko"),t===33&&r.push("chromium"),n==="v8"?r.push("chromium"):n==="javascriptcore"?r.push("webkit"):n==="spidermonkey"&&r.push("gecko"),r.length===0)return;let o=new Map;for(let c of r)o.set(c,(o.get(c)??0)+1);let i,a=0;for(let[c,u]of o)u>a&&(a=u,i=c);return i}function ln(e){if(e){if(/Firefox\//.test(e))return"gecko";if(/Edg\/|OPR\/|Chrome\/|Chromium\//.test(e))return"chromium";if(/Safari\//.test(e))return"webkit"}}var $e={id:d.engine,tier:"fast",run(){let e=sn(),t=cn(),n=un(),r=dn(e,t,n),o=ln(typeof navigator>"u"?void 0:navigator.userAgent);return f({to_fixed_error_length:e,eval_length:t,stack_style:n,observed:r,claimed:o})}},fn=[["acos",()=>Math.acos(.12312423423423424)],["acosh",()=>Math.acosh(1e308)],["asin",()=>Math.asin(.12312423423423424)],["asinh",()=>Math.asinh(1)],["atan",()=>Math.atan(.5)],["atanh",()=>Math.atanh(.5)],["cbrt",()=>Math.cbrt(100)],["cos",()=>Math.cos(10.000000000123)],["cosh",()=>Math.cosh(1)],["exp",()=>Math.exp(1)],["expm1",()=>Math.expm1(1)],["log",()=>Math.log(10)],["log1p",()=>Math.log1p(10)],["pow",()=>Math.pow(Math.PI,-100)],["sin",()=>Math.sin(1e300)],["sinh",()=>Math.sinh(1)],["sqrt",()=>Math.sqrt(2)],["tan",()=>Math.tan(-1e300)],["tanh",()=>Math.tanh(1)]];function mn(){return Object.is(Math.sin(0),0)&&Math.cos(0)===1&&Math.sqrt(4)===2&&Math.log(1)===0&&Math.pow(2,10)===1024}var je={id:d.math,tier:"fast",timeoutMs:50,run(){let e=[],t=0,n=new Map;for(let[r,o]of fn){let i=s(o);typeof i=="number"&&Number.isFinite(i)?(t+=1,n.set(r,i),e.push(`${r}:${i}`)):e.push(`${r}:`)}return f({hash:A(e.join("|")),probed:t,atanh_half:n.get("atanh"),expm1_1:n.get("expm1"),identities_hold:s(mn)})}};function L(e){return s(()=>{try{e()}catch(t){return t instanceof EvalError?void 0:t instanceof Error?t.message.length:void 0}})}function pn(){try{return new Function(""),!0}catch{return!1}}function gn(e){let t=[],n=e.own_properties;if(n!==void 0&&(n.includes("sourceURL")?t.push("webkit","webkit"):n.includes("lineNumber")?t.push("gecko","gecko"):n==="message,stack"&&t.push("chromium","chromium")),e.null_property_length===44?t.push("chromium"):e.null_property_length===33&&t.push("gecko"),e.syntax_length===20?t.push("chromium"):e.syntax_length===28&&t.push("gecko"),t.length===0)return;let r=new Map;for(let c of t)r.set(c,(r.get(c)??0)+1);let o,i=0,a=!1;for(let[c,u]of r)u>i?(i=u,o=c,a=!1):u===i&&(a=!0);return a?void 0:o}function hn(){return s(()=>{try{throw new Error("probe")}catch(e){return Object.getOwnPropertyNames(e).sort().join(",")}})}var Xe={id:d.errors,tier:"fast",timeoutMs:50,run(){let e=pn(),t=f({null_property_length:L(()=>null.x),syntax_length:e?L(()=>new Function("!")):void 0,json_parse_length:L(()=>JSON.parse("{")),invalid_array_length:L(()=>{let n=[];n.length=-1}),const_assign_length:e?L(()=>{new Function("const c = 1; c = 2")()}):void 0,own_properties:hn(),capture_stack_trace:s(()=>typeof Error.captureStackTrace=="function"),stack_trace_limit:s(()=>"stackTraceLimit"in Error)});return f({...t,observed:gn(t)})}};var Ke={id:d.navigator,tier:"fast",run(){if(typeof navigator>"u")throw new l("no-navigator");let e=navigator;return f({user_agent:s(()=>e.userAgent),platform:s(()=>e.platform),vendor:s(()=>e.vendor),product_sub:s(()=>e.productSub),app_version:s(()=>e.appVersion),hardware_concurrency:s(()=>e.hardwareConcurrency),device_memory:s(()=>e.deviceMemory),max_touch_points:s(()=>e.maxTouchPoints),webdriver:s(()=>e.webdriver),cookie_enabled:s(()=>e.cookieEnabled),pdf_viewer_enabled:s(()=>e.pdfViewerEnabled),do_not_track:s(()=>e.doNotTrack),plugin_count:s(()=>e.plugins?.length),mime_type_count:s(()=>e.mimeTypes?.length),language:s(()=>e.language),languages:s(()=>e.languages?[...e.languages]:void 0)})}},ze={id:d.languages,tier:"fast",run(){if(typeof navigator>"u")throw new l("no-navigator");return f({primary:s(()=>navigator.language),accepted:s(()=>navigator.languages?[...navigator.languages]:void 0)})}},Qe={id:d.vendor,tier:"fast",run(){if(typeof navigator>"u")throw new l("no-navigator");return f({vendor:s(()=>navigator.vendor)})}},Je={id:d.plugins,tier:"fast",run(){if(typeof navigator>"u")throw new l("no-navigator");let e=navigator.plugins;if(!e)throw new l("no-plugins");return{plugins:Array.from(e,t=>({name:t.name,filename:t.filename,description:t.description,mime_types:Array.from(t,n=>({type:n.type,suffixes:n.suffixes,description:n.description}))}))}}},Ye={id:d.userAgentData,tier:"deferred",timeoutMs:200,async run(){if(typeof navigator>"u")throw new l("no-navigator");let e=navigator.userAgentData;if(!e)throw new l("no-user-agent-data");let t=f({brands:e.brands,mobile:e.mobile,platform:e.platform});if(typeof e.getHighEntropyValues!="function")return t;let n=await e.getHighEntropyValues(["architecture","bitness","model","platformVersion","fullVersionList","wow64"]);return{...t,...n}}};function z(e,t){let n=document.createElement("canvas");n.width=e,n.height=t;let r=n.getContext("2d");if(!r)throw new l("no-2d-context");return[n,r]}function Ze(){let[e,t]=z(240,60);t.globalCompositeOperation="multiply";for(let[n,r,o]of[["#f2f",40,40],["#2ff",80,40],["#ff2",60,80]])t.fillStyle=n,t.beginPath(),t.arc(r,o,40,0,Math.PI*2,!0),t.closePath(),t.fill();return t.fillStyle="#f9c",t.arc(100,50,50,0,Math.PI*2,!0),t.arc(100,50,20,0,Math.PI*2,!0),t.fill("evenodd"),e.toDataURL()}function et(){let[e,t]=z(300,60);return t.textBaseline="alphabetic",t.fillStyle="#f60",t.fillRect(100,1,62,20),t.fillStyle="#069",t.font='11pt "Times New Roman"',t.fillText("Fingerly <canvas> 1.0 \u{1F512}\u0416\u4E2D",2,15),t.font="18pt Arial",t.fillStyle="rgba(102, 204, 0, 0.7)",t.fillText("Fingerly <canvas> 1.0",4,45),e.toDataURL()}function yn(){let[,e]=z(1,1);return e.rect(0,0,10,10),e.rect(2,2,6,6),e.isPointInPath(5,5,"evenodd")===!1}function Sn(e){let t=e.completed(d.timing);if(t?.status!=="ok")return!1;let n=t.value?.now_resolution;return typeof n=="number"&&n>=16}var tt={id:d.canvas,tier:"deferred",timeoutMs:400,run(e){if(g(),typeof document>"u")throw new l("no-document");if(Sn(e))throw new w("rfp-canvas-prompt-avoided");try{let t=Ze(),n=Ze(),r=et(),o=et(),i=t!==n||r!==o;return f({geometry:A(t),text:A(r),winding:s(yn),unstable:i})}catch(t){ve(t)}}};function nt(){if(typeof document>"u")throw new l("no-document");let e=document.createElement("canvas"),t=e.getContext("webgl")??e.getContext("experimental-webgl");if(!t)throw new l("no-webgl-context");return t}var rt={id:d.webgl,tier:"fast",timeoutMs:400,run(){let e=nt(),t=s(()=>e.getExtension("WEBGL_debug_renderer_info")),n={};for(let o of["MAX_TEXTURE_SIZE","MAX_VIEWPORT_DIMS","MAX_VERTEX_ATTRIBS","MAX_VARYING_VECTORS","MAX_COMBINED_TEXTURE_IMAGE_UNITS","MAX_CUBE_MAP_TEXTURE_SIZE","MAX_FRAGMENT_UNIFORM_VECTORS","MAX_RENDERBUFFER_SIZE","MAX_TEXTURE_IMAGE_UNITS","MAX_VERTEX_TEXTURE_IMAGE_UNITS","MAX_VERTEX_UNIFORM_VECTORS","ALIASED_LINE_WIDTH_RANGE","ALIASED_POINT_SIZE_RANGE","RED_BITS","GREEN_BITS","BLUE_BITS","ALPHA_BITS","DEPTH_BITS","STENCIL_BITS"]){let i=e[o];if(typeof i!="number")continue;let a=s(()=>e.getParameter(i));a!=null&&(n[o]=ArrayBuffer.isView(a)?Array.from(a):a)}let r=[];for(let o of[e.VERTEX_SHADER,e.FRAGMENT_SHADER])for(let i of[e.LOW_FLOAT,e.MEDIUM_FLOAT,e.HIGH_FLOAT]){let a=s(()=>e.getShaderPrecisionFormat(o,i));a&&r.push(a.rangeMin,a.rangeMax,a.precision)}return f({vendor:s(()=>e.getParameter(e.VENDOR)),renderer:s(()=>e.getParameter(e.RENDERER)),unmasked_vendor:t?s(()=>e.getParameter(t.UNMASKED_VENDOR_WEBGL)):void 0,unmasked_renderer:t?s(()=>e.getParameter(t.UNMASKED_RENDERER_WEBGL)):void 0,version:s(()=>e.getParameter(e.VERSION)),shading_language_version:s(()=>e.getParameter(e.SHADING_LANGUAGE_VERSION)),max_texture_size:s(()=>e.getParameter(e.MAX_TEXTURE_SIZE)),max_render_buffer_size:s(()=>e.getParameter(e.MAX_RENDERBUFFER_SIZE)),parameters_hash:Object.keys(n).length>0?A(JSON.stringify(n)):void 0,shader_precision_hash:r.length>0?A(r.join(",")):void 0})}},ot={id:d.webglExtensions,tier:"deferred",timeoutMs:200,run(){let t=nt().getSupportedExtensions();if(!t)throw new w("extensions-withheld");return[...t].sort()}};function vn(e){let t=[],n=Date.now()+12;for(;t.length<25&&Date.now()<n;){let r=e(),o=e(),i=0;for(;o===r&&i++<1e5&&Date.now()<n;)o=e();o!==r&&t.push(o-r)}return t.length===0?100:Math.round(Math.min(...t)*1e6)/1e6}var at={id:d.timing,tier:"fast",timeoutMs:150,run(){let t=g().performance;return typeof t?.now!="function"?f({has_performance:!1}):f({has_performance:!0,now_resolution:vn(()=>t.now())})}},it=new WeakMap;function wn(e,t){let n=it.get(e.navigator);n||(n=new Map,it.set(e.navigator,n));let r=n.get(t);return r||(r=e.navigator.permissions.query({name:t}),n.set(t,r)),r}var st={id:d.permissions,tier:"fast",timeoutMs:200,async run(){let e=g();if(!e.navigator.permissions?.query)throw new l("no-permissions-api");let t=async o=>{try{return(await wn(e,o)).state}catch{return}},n=await t("notifications"),r=s(()=>e.Notification?.permission);return f({notification:n,notification_legacy:r,geolocation:await t("geolocation")})}},bn=["__nightmare","_phantom","callPhantom","__phantomas","Buffer","emit","spawn","__selenium_evaluate","__selenium_unwrapped","__webdriver_evaluate","__webdriver_script_fn","__webdriver_script_func","__webdriver_unwrapped","__fxdriver_evaluate","__fxdriver_unwrapped","__driver_evaluate","__driver_unwrapped","_Selenium_IDE_Recorder","domAutomation","domAutomationController","__lastWatirAlert","__playwright","__puppeteer","__pw_manual"],ct={id:d.automation,tier:"fast",run(){let e=g(),t=bn.filter(r=>s(()=>r in e)===!0),n=s(()=>Object.getOwnPropertyNames(e).filter(r=>/^cdc_|^\$cdc_/.test(r)));return f({webdriver:s(()=>navigator.webdriver),cdp_artifacts:n&&n.length>0?n:void 0,distinctive_properties:t.length>0?[...t]:void 0,chrome_object:s(()=>"chrome"in e),window_external:s(()=>{let r=e.external;return r?String(r):void 0})})}};var _n=50,ut=Symbol("timed-out");async function En(e){if(typeof e.brave?.isBrave=="function")try{let t=await Promise.race([e.brave.isBrave(),new Promise(n=>setTimeout(()=>n(ut),_n))]);return t===ut?void 0:t===!0}catch{return}}function xn(e){let t=e.userAgentData?.brands;if(Array.isArray(t))return t.some(n=>n?.brand==="Brave")}var dt=[[30,60,90],[210,180,140]],S=8;function Tn(){if(!(typeof document>"u"))try{let e=document.createElement("canvas");e.width=S,e.height=S;let t=e.getContext("2d",{willReadFrequently:!0});if(!t)return;for(let r=0;r<S;r++)for(let o=0;o<S;o++){let[i,a,c]=dt[(o+r)%2];t.fillStyle=`rgb(${i}, ${a}, ${c})`,t.fillRect(o,r,1,1)}let n=t.getImageData(0,0,S,S).data;for(let r=0;r<S*S;r++){let o=r%S,i=Math.floor(r/S),[a,c,u]=dt[(o+i)%2],m=r*4;if(n[m]!==a||n[m+1]!==c||n[m+2]!==u||n[m+3]!==255)return!0}return!1}catch{return}}var lt={id:d.shields,tier:"fast",timeoutMs:100,async run(){if(typeof navigator>"u")throw new l("no-navigator");let e=navigator;return f({brave:await En(e),brave_claimed:xn(e),canvas_noise:Tn()})}};function ft(e){try{let t=window[e];if(!t)return!1;let n="__fingerly_probe__";return t.setItem(n,"1"),t.removeItem(n),!0}catch{return!1}}function Mn(){try{return typeof window.indexedDB=="object"&&window.indexedDB!==null}catch{return!1}}function kn(e){let t=e instanceof Error?e.name:"",n=e instanceof Error?e.message:String(e);return n.includes("unknown transient reason")?"transient":t==="SecurityError"||n.includes("Security error")?"refused":"failed"}var An=200;async function Cn(){let e=navigator.storage;if(typeof e?.getDirectory=="function")return Promise.race([e.getDirectory().then(()=>"ok",t=>kn(t)),new Promise(t=>setTimeout(t,An))])}var Dn=150;function Rn(){let e=navigator.webkitTemporaryStorage;return typeof e?.queryUsageAndQuota!="function"?Promise.resolve(void 0):new Promise(t=>{let n=!1,r=o=>{n||(n=!0,t(o))};setTimeout(()=>r(void 0),Dn);try{e.queryUsageAndQuota((o,i)=>r(typeof i=="number"?i:void 0),()=>r(void 0))}catch{r(void 0)}})}function On(){if(window.isSecureContext)return"serviceWorker"in navigator}var mt={id:d.storage,tier:"fast",timeoutMs:250,async run(){g();let e=s(async()=>{if(typeof navigator.storage?.estimate!="function")return;let u=await navigator.storage.estimate();return{quota:u.quota,usage:u.usage}}),t=Rn(),n=Cn(),[r,o,i]=await Promise.all([e,t,n]),a=r?.quota,c=navigator.deviceMemory;return f({local_storage:ft("localStorage"),session_storage:ft("sessionStorage"),indexed_db:Mn(),quota:a,usage:r?.usage,legacy_quota:o,quota_ratio:typeof a=="number"&&typeof c=="number"&&c>0?a/(c*1024*1024*1024):void 0,origin_filesystem:i,service_worker:On()})}},pt={id:d.storageQuota,tier:"fast",run(){if(g(),typeof document>"u")throw new l("no-document");return{partitioned:typeof document.hasStorageAccess=="function"}}};var gt=["monospace","sans-serif","serif"],Nn="72px",Pn="mmmmmmmmmmlli WwMmIi 0123",Q=["Arial","Arial Black","Calibri","Cambria","Candara","Comic Sans MS","Consolas","Constantia","Corbel","Courier New","Ebrima","Franklin Gothic","Gabriola","Georgia","Impact","Lucida Console","Lucida Sans Unicode","Malgun Gothic","Marlett","Microsoft Himalaya","MS Gothic","MV Boli","Nirmala UI","Palatino Linotype","Segoe UI","Segoe UI Emoji","Sylfaen","Tahoma","Times New Roman","Trebuchet MS","Verdana","Webdings","Wingdings","American Typewriter","Andale Mono","Apple Chancery","Arial Hebrew","Avenir","Avenir Next","Baskerville","Big Caslon","Bodoni 72","Chalkboard","Cochin","Copperplate","Didot","Futura","Geneva","Gill Sans","Helvetica","Helvetica Neue","Herculanum","Hoefler Text","Lucida Grande","Luminari","Menlo","Monaco","Optima","Papyrus","Phosphate","Rockwell","SF Pro","Skia","Snell Roundhand","Trattatello","Zapfino","Cantarell","DejaVu Sans","DejaVu Serif","FreeSans","Liberation Sans","Liberation Serif","Nimbus Sans","Noto Sans","Ubuntu","Ubuntu Mono","Droid Sans","Roboto","Roboto Condensed","Bahnschrift","Bookshelf Symbol 7","Cascadia Code","Fira Code","HoloLens MDL2 Assets","Inter","JetBrains Mono","MT Extra","Source Code Pro","Wingdings 2","Wingdings 3"],ht={id:d.fonts,tier:"deferred",timeoutMs:700,run(){if(typeof document>"u")throw new l("no-document");let e=document.createElement("div");e.style.cssText="position:absolute;left:-9999px;top:-9999px;visibility:hidden;width:auto;height:auto;margin:0;padding:0;white-space:nowrap;";let t=o=>{let i=document.createElement("span");return i.style.cssText=`position:absolute;font-size:${Nn};margin:0;padding:0;font-family:${o};`,i.textContent=Pn,e.appendChild(i),i},n=gt.map(o=>t(o)),r=Q.map(o=>gt.map(i=>t(`'${o}',${i}`)));document.body.appendChild(e);try{let o=n.map(c=>c.offsetWidth),i=n.map(c=>c.offsetHeight),a=[];return Q.forEach((c,u)=>{let m=r[u];if(!m)return;m.every((b,y)=>{let _=o[y],E=i[y];return b.offsetWidth!==_||b.offsetHeight!==E})&&a.push(c)}),f({available:a,probed:Q.length})}finally{e.remove()}}},yt={id:d.fontPreferences,tier:"deferred",timeoutMs:250,run(){if(typeof document>"u"||!document.body)throw new l("no-document-body");let e=document.createElement("iframe");e.setAttribute("aria-hidden","true"),e.style.cssText="position:absolute;left:-9999px;width:1px;height:1px;border:0",document.body.appendChild(e);try{let t=e.contentDocument;if(!t?.body)throw new l("no-frame-document");let n="mmMwWLliI0O&1",r={default:"",serif:"serif",sans:"sans-serif",mono:"monospace",system:"system-ui",apple:"-apple-system",min:"Arial, sans-serif"},o={};for(let[i,a]of Object.entries(r)){let c=t.createElement("span");c.textContent=n,c.style.cssText=`font:72px ${a||"initial"};white-space:nowrap;position:absolute`,t.body.appendChild(c),o[i]=Math.round(c.getBoundingClientRect().width*1e3)/1e3}return{widths:o}}finally{e.remove()}}};var B=[$e,Xe,je,Ke,ze,Je,Qe,Ie,Le,Be,Fe,Me,ke,De,Re,Oe,mt,pt,lt,at,st,ct,rt,Ce,tt,ot,xe,Te,ht,yt,Ne,Pe,Ae,Ye,He,We];function St(e){return new Promise(t=>t(new P({...e,platform:"web",sources:e.sources??B,integrity:n=>I(n.sources)})))}return xt(In);})();
|