@optable/web-sdk 0.44.6 → 0.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -19
- package/browser/dist/sdk.js +1 -1
- package/lib/dist/addons/gpt.js +35 -12
- package/lib/dist/addons/prebid/analytics.d.ts +106 -0
- package/lib/dist/addons/prebid/analytics.js +474 -0
- package/lib/dist/addons/prototypes/analytics.d.ts +1 -0
- package/lib/dist/addons/prototypes/analytics.js +19 -6
- package/lib/dist/addons/try-identify.js +1 -1
- package/lib/dist/build.json +1 -1
- package/lib/dist/config.d.ts +4 -1
- package/lib/dist/core/context.d.ts +32 -0
- package/lib/dist/core/context.js +146 -0
- package/lib/dist/edge/profile.d.ts +1 -1
- package/lib/dist/edge/profile.js +2 -4
- package/lib/dist/edge/targeting.js +3 -0
- package/lib/dist/edge/witness.d.ts +5 -2
- package/lib/dist/edge/witness.js +4 -1
- package/lib/dist/sdk.d.ts +7 -2
- package/lib/dist/sdk.js +17 -5
- package/package.json +9 -6
package/README.md
CHANGED
|
@@ -5,12 +5,12 @@ JavaScript SDK for integrating with an [Optable Data Connectivity Node (DCN)](ht
|
|
|
5
5
|
## Contents
|
|
6
6
|
|
|
7
7
|
- [Installing](#installing)
|
|
8
|
-
- [
|
|
9
|
-
- [
|
|
8
|
+
- [NPM module](#npm-module)
|
|
9
|
+
- [Script tag](#script-tag)
|
|
10
10
|
- [Versioning](#versioning)
|
|
11
11
|
- [Domains and Cookies](#domains-and-cookies)
|
|
12
12
|
- [LocalStorage](#localstorage)
|
|
13
|
-
- [Using the
|
|
13
|
+
- [Using the NPM module](#using-the-npm-module)
|
|
14
14
|
- [Identify API](#identify-api)
|
|
15
15
|
- [Profile API](#profile-api)
|
|
16
16
|
- [Targeting API](#targeting-api)
|
|
@@ -32,22 +32,25 @@ JavaScript SDK for integrating with an [Optable Data Connectivity Node (DCN)](ht
|
|
|
32
32
|
|
|
33
33
|
## Installing
|
|
34
34
|
|
|
35
|
-
The [Optable](https://optable.co/) web SDK can be installed as a ES6 compatible [npm](https://www.npmjs.com/) module paired with module bundlers such as [webpack](https://webpack.js.org/) or [browserify](http://browserify.org/), or can be loaded on a webpage directly by referencing a release build from the page HTML via a `<script>` tag.
|
|
35
|
+
The [Optable](https://optable.co/) web SDK can be installed as a ES6 compatible [npm](https://www.npmjs.com/) module using package managers such as [pnpm](https://pnpm.io/), paired with module bundlers such as [webpack](https://webpack.js.org/) or [browserify](http://browserify.org/), or can be loaded on a webpage directly by referencing a release build from the page HTML via a `<script>` tag.
|
|
36
36
|
|
|
37
37
|
> :warning: **CORS Configuration**: Regardless of how you install the SDK, make sure that the _Allowed HTTP Origins_ setting in the Optable DCN that you are integrating with contains the URL(s) of any web site(s) where the SDK is being used, otherwise your browser may block communication with the DCN.
|
|
38
38
|
|
|
39
|
-
###
|
|
39
|
+
### NPM module
|
|
40
40
|
|
|
41
|
-
If you're building a web application or want to bundle the SDK functionality with your own JavaScript, then [npm](https://www.npmjs.com/) is the recommended installation method. It pairs nicely with module bundlers such as [webpack](https://webpack.js.org/) or [browserify](http://browserify.org/) and exports types for applications using the [typescript](https://www.typescriptlang.org/) language and type checker. To use it simply install the package:
|
|
41
|
+
If you're building a web application or want to bundle the SDK functionality with your own JavaScript, then using a package manager like [pnpm](https://pnpm.io/) or [npm](https://www.npmjs.com/) is the recommended installation method. It pairs nicely with module bundlers such as [webpack](https://webpack.js.org/) or [browserify](http://browserify.org/) and exports types for applications using the [typescript](https://www.typescriptlang.org/) language and type checker. To use it simply install the package:
|
|
42
42
|
|
|
43
43
|
```shell
|
|
44
|
-
# latest stable release:
|
|
45
|
-
|
|
44
|
+
# latest stable release (using pnpm):
|
|
45
|
+
pnpm install @optable/web-sdk
|
|
46
|
+
|
|
47
|
+
# or using npm:
|
|
48
|
+
npm install @optable/web-sdk
|
|
46
49
|
```
|
|
47
50
|
|
|
48
51
|
And then simply `import` and use the `OptableSDK` class as shown in the _Usage_ section below.
|
|
49
52
|
|
|
50
|
-
###
|
|
53
|
+
### Script tag
|
|
51
54
|
|
|
52
55
|
For simple integrations from your web site, you can load the SDK built for the browser from Optable's CDN via a HTML `script` tag. In production it's advised to lock your SDK bundle to a specific major version identified by `vX` or a specific minor version with `vX.Y`, while in development you may want to experiment with `latest`.
|
|
53
56
|
|
|
@@ -92,7 +95,7 @@ const sdk = new OptableSDK({ host: "dcn.customer.com", site: "my-site", cookies:
|
|
|
92
95
|
|
|
93
96
|
Note that the default is `cookies: true` and will be inferred if you do not specify the `cookies` parameter at all.
|
|
94
97
|
|
|
95
|
-
|
|
98
|
+
## Using the NPM module
|
|
96
99
|
|
|
97
100
|
## Initialization Configuration (`InitConfig`)
|
|
98
101
|
|
|
@@ -125,6 +128,7 @@ When creating an instance of `OptableSDK`, you can pass an `InitConfig` object t
|
|
|
125
128
|
|
|
126
129
|
- **`readOnly` (boolean, default: `false`)**
|
|
127
130
|
When set to `true`, puts the SDK in a read-only mode, preventing any data modifications while still allowing API queries.
|
|
131
|
+
|
|
128
132
|
- **`optableCacheTargeting` (string, defaults: `optable-cache:targeting`)**
|
|
129
133
|
Local storage cache key used to store latest targeting response.
|
|
130
134
|
|
|
@@ -201,6 +205,28 @@ type ProfileTraits = {
|
|
|
201
205
|
};
|
|
202
206
|
```
|
|
203
207
|
|
|
208
|
+
You can also override the main identifier (replacing the Optable Visitor ID) as the second argument of the function.
|
|
209
|
+
The third argument is to provide additional identifier(s) that you want to associate to that profile.
|
|
210
|
+
|
|
211
|
+
```javascript
|
|
212
|
+
const onSuccess = () => console.log("Profile API success!");
|
|
213
|
+
const onFailure = (err) => console.warn("Profile API error: ${err.message}");
|
|
214
|
+
|
|
215
|
+
const visitorTraits = {
|
|
216
|
+
gender: "M",
|
|
217
|
+
age: 44,
|
|
218
|
+
favColor: "blue",
|
|
219
|
+
hasAccount: true,
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
const emailID = OptableSDK.eid("some.email@address.com");
|
|
223
|
+
const additionalIDs = [];
|
|
224
|
+
additionalIDs.push(OptableSDK.cid("id1"));
|
|
225
|
+
additionalIDs.push(OptableSDK.cid("id2", "c2"));
|
|
226
|
+
|
|
227
|
+
sdk.profile(visitorTraits, emailID, additionalIDs).then(onSuccess).catch(onFailure);
|
|
228
|
+
```
|
|
229
|
+
|
|
204
230
|
### Targeting API
|
|
205
231
|
|
|
206
232
|
To get the targeting information associated by the configured DCN with the user's browser in real-time, you can call the targeting API as follows:
|
|
@@ -305,7 +331,7 @@ type WitnessProperties = {
|
|
|
305
331
|
|
|
306
332
|
## Using a script tag
|
|
307
333
|
|
|
308
|
-
For each [SDK release](https://github.com/Optable/optable-web-sdk/releases), a webpack-generated browser bundle targeting the browsers list described by `
|
|
334
|
+
For each [SDK release](https://github.com/Optable/optable-web-sdk/releases), a webpack-generated browser bundle targeting the browsers list described by `pnpm dlx browserslist "> 0.25%, not dead"` can be loaded on a website via a `script` tag.
|
|
309
335
|
|
|
310
336
|
As described in the **Installation** section above, the recommended way to load the SDK via `script` tag is asynchronously using the `async` attribute, to avoid blocking page rendering.
|
|
311
337
|
|
|
@@ -519,7 +545,24 @@ To automatically capture GPT [SlotRenderEndedEvent](https://developers.google.co
|
|
|
519
545
|
</script>
|
|
520
546
|
```
|
|
521
547
|
|
|
522
|
-
|
|
548
|
+
Advanced usage:
|
|
549
|
+
You can customize which GPT events are registered and which event properties to include, per event type, by passing an options object:
|
|
550
|
+
|
|
551
|
+
```js
|
|
552
|
+
// Only listen to impressionViewable and emit only `slot_element_id`
|
|
553
|
+
optable.instance.installGPTEventListeners({ impressionViewable: ["slot_element_id"] });
|
|
554
|
+
|
|
555
|
+
// For slotRenderEnded, emit all properties. For impressionViewable, emit only the listed properties.
|
|
556
|
+
optable.instance.installGPTEventListeners({
|
|
557
|
+
slotRenderEnded: "all",
|
|
558
|
+
impressionViewable: ["slot_element_id", "is_empty"],
|
|
559
|
+
});
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
The value for each event key can be "all" (to include all witness properties) or an array of property names from the set below (as mapped by the SDK):
|
|
563
|
+
|
|
564
|
+
`advertiser_id`, `campaign_id`, `creative_id`, `is_empty`, `line_item_id`, `service_name`, `size`, `slot_element_id`, `source_agnostic_creative_id`, `source_agnostic_line_item_id`.
|
|
565
|
+
If no argument is provided, the default behavior is unchanged and both slotRenderEnded and impressionViewable are captured with all properties.
|
|
523
566
|
|
|
524
567
|
Note that you can call `installGPTEventListeners()` as many times as you like on an SDK instance, there will only be one set of registered event listeners per instance. Each SDK instance can register its own GPT event listeners.
|
|
525
568
|
|
|
@@ -774,7 +817,7 @@ If you send Email newsletters that contain links to your website, then you may w
|
|
|
774
817
|
|
|
775
818
|
To enable automatic identification of visitors originating from your Email newsletter, you first need to include an **oeid** parameter in the query string of all links to your website in your Email newsletter template. The value of the **oeid** parameter should be set to the SHA256 hash of the lowercased Email address of the recipient. For example, if you are using [Braze](https://www.braze.com/) to send your newsletters, you can easily encode the SHA256 hash value of the recipient's Email address by setting the **oeid** parameter in the query string of any links to your website as follows:
|
|
776
819
|
|
|
777
|
-
```
|
|
820
|
+
```javascript
|
|
778
821
|
oeid={{${email_address} | downcase | sha2}}
|
|
779
822
|
```
|
|
780
823
|
|
|
@@ -833,16 +876,16 @@ It is recommended to call this method before making ad calls to ensure that the
|
|
|
833
876
|
|
|
834
877
|
The demo pages are working examples of both `identify` and `targeting` APIs, as well as an integration with the [Google Ad Manager 360](https://admanager.google.com/home/) ad server, enabling the targeting of ads served by GAM360 to audiences activated in the [Optable](https://optable.co/) DCN.
|
|
835
878
|
|
|
836
|
-
You can browse a recent (but not necessarily the latest) released version of the demo pages at [https://demo.optable.co/](https://demo.optable.co/). The source code to the demos can be found [
|
|
879
|
+
You can browse a recent (but not necessarily the latest) released version of the demo pages at [https://demo.optable.co/](https://demo.optable.co/). The source code to the demos can be found in the [demos directory](https://github.com/Optable/optable-web-sdk/tree/master/demos). The demo pages will connect to the [Optable](https://optable.co/) demo DCN at `sandbox.optable.co` and reference the web site slug `web-sdk-demo`. The GAM360 targeting demo loads ads from a GAM360 account operated by [Optable](https://optable.co/).
|
|
837
880
|
|
|
838
|
-
Note that the demo pages at [https://demo.optable.co/](https://demo.optable.co/) will by default rely on secure HTTP first-party cookies as described [
|
|
881
|
+
Note that the demo pages at [https://demo.optable.co/](https://demo.optable.co/) will by default rely on secure HTTP first-party cookies as described in [this section](https://github.com/Optable/optable-web-sdk#domains-and-cookies). To see an example based on [LocalStorage](https://github.com/Optable/optable-web-sdk#localstorage), see the [index-nocookies variant here](https://demo.optable.co/index-nocookies.html).
|
|
839
882
|
|
|
840
883
|
To build and run the demos locally, you will need [Docker](https://www.docker.com/), `docker-compose` and `make`:
|
|
841
884
|
|
|
842
|
-
```
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
885
|
+
```shell
|
|
886
|
+
cd path/to/optable-web-sdk
|
|
887
|
+
make
|
|
888
|
+
docker-compose up
|
|
846
889
|
```
|
|
847
890
|
|
|
848
891
|
Then head to [https://localhost:8180/](localhost:8180) to see the demo pages. You can modify the code in each demo, then run `make build` and finally refresh the demo pages to see your changes take effect. If you want to test the demos with your own DCN, make sure to update the configuration (hostname and site slug) given to the OptableSDK (see `webpack.config.js` for the react example).
|
package/browser/dist/sdk.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see sdk.js.LICENSE.txt */
|
|
2
|
-
(()=>{var e={312:(e,t,r)=>{var i;!function(){"use strict";var t="input is invalid type",n="object"==typeof window,s=n?window:{};s.JS_SHA256_NO_WINDOW&&(n=!1);var o=!n&&"object"==typeof self,a=!s.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;a?s=r.g:o&&(s=self);var c=!s.JS_SHA256_NO_COMMON_JS&&e.exports,d=r.amdO,u=!s.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,l="0123456789abcdef".split(""),p=[-2147483648,8388608,32768,128],h=[24,16,8,0],f=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],g=["hex","array","digest","arrayBuffer"],v=[];!s.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!u||!s.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var y=function(e,t){return function(r){return new S(t,!0).update(r)[e]()}},m=function(e){var t=y("hex",e);a&&(t=w(t,e)),t.create=function(){return new S(e)},t.update=function(e){return t.create().update(e)};for(var r=0;r<g.length;++r){var i=g[r];t[i]=y(i,e)}return t},w=function(e,i){var n,o=r(394),a=r(903).Buffer,c=i?"sha224":"sha256";return n=a.from&&!s.JS_SHA256_NO_BUFFER_FROM?a.from:function(e){return new a(e)},function(r){if("string"==typeof r)return o.createHash(c).update(r,"utf8").digest("hex");if(null==r)throw new Error(t);return r.constructor===ArrayBuffer&&(r=new Uint8Array(r)),Array.isArray(r)||ArrayBuffer.isView(r)||r.constructor===a?o.createHash(c).update(n(r)).digest("hex"):e(r)}},b=function(e,t){return function(r,i){return new _(r,t,!0).update(i)[e]()}},A=function(e){var t=b("hex",e);t.create=function(t){return new _(t,e)},t.update=function(e,r){return t.create(e).update(r)};for(var r=0;r<g.length;++r){var i=g[r];t[i]=b(i,e)}return t};function S(e,t){t?(v[0]=v[16]=v[1]=v[2]=v[3]=v[4]=v[5]=v[6]=v[7]=v[8]=v[9]=v[10]=v[11]=v[12]=v[13]=v[14]=v[15]=0,this.blocks=v):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}function _(e,r,i){var n,s=typeof e;if("string"===s){var o,a=[],c=e.length,d=0;for(n=0;n<c;++n)(o=e.charCodeAt(n))<128?a[d++]=o:o<2048?(a[d++]=192|o>>>6,a[d++]=128|63&o):o<55296||o>=57344?(a[d++]=224|o>>>12,a[d++]=128|o>>>6&63,a[d++]=128|63&o):(o=65536+((1023&o)<<10|1023&e.charCodeAt(++n)),a[d++]=240|o>>>18,a[d++]=128|o>>>12&63,a[d++]=128|o>>>6&63,a[d++]=128|63&o);e=a}else{if("object"!==s)throw new Error(t);if(null===e)throw new Error(t);if(u&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||u&&ArrayBuffer.isView(e)))throw new Error(t)}e.length>64&&(e=new S(r,!0).update(e).array());var l=[],p=[];for(n=0;n<64;++n){var h=e[n]||0;l[n]=92^h,p[n]=54^h}S.call(this,r,i),this.update(p),this.oKeyPad=l,this.inner=!0,this.sharedMemory=i}S.prototype.update=function(e){if(!this.finalized){var r,i=typeof e;if("string"!==i){if("object"!==i)throw new Error(t);if(null===e)throw new Error(t);if(u&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||u&&ArrayBuffer.isView(e)))throw new Error(t);r=!0}for(var n,s,o=0,a=e.length,c=this.blocks;o<a;){if(this.hashed&&(this.hashed=!1,c[0]=this.block,this.block=c[16]=c[1]=c[2]=c[3]=c[4]=c[5]=c[6]=c[7]=c[8]=c[9]=c[10]=c[11]=c[12]=c[13]=c[14]=c[15]=0),r)for(s=this.start;o<a&&s<64;++o)c[s>>>2]|=e[o]<<h[3&s++];else for(s=this.start;o<a&&s<64;++o)(n=e.charCodeAt(o))<128?c[s>>>2]|=n<<h[3&s++]:n<2048?(c[s>>>2]|=(192|n>>>6)<<h[3&s++],c[s>>>2]|=(128|63&n)<<h[3&s++]):n<55296||n>=57344?(c[s>>>2]|=(224|n>>>12)<<h[3&s++],c[s>>>2]|=(128|n>>>6&63)<<h[3&s++],c[s>>>2]|=(128|63&n)<<h[3&s++]):(n=65536+((1023&n)<<10|1023&e.charCodeAt(++o)),c[s>>>2]|=(240|n>>>18)<<h[3&s++],c[s>>>2]|=(128|n>>>12&63)<<h[3&s++],c[s>>>2]|=(128|n>>>6&63)<<h[3&s++],c[s>>>2]|=(128|63&n)<<h[3&s++]);this.lastByteIndex=s,this.bytes+=s-this.start,s>=64?(this.block=c[16],this.start=s-64,this.hash(),this.hashed=!0):this.start=s}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this}},S.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>>2]|=p[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},S.prototype.hash=function(){var e,t,r,i,n,s,o,a,c,d=this.h0,u=this.h1,l=this.h2,p=this.h3,h=this.h4,g=this.h5,v=this.h6,y=this.h7,m=this.blocks;for(e=16;e<64;++e)t=((n=m[e-15])>>>7|n<<25)^(n>>>18|n<<14)^n>>>3,r=((n=m[e-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,m[e]=m[e-16]+t+m[e-7]+r|0;for(c=u&l,e=0;e<64;e+=4)this.first?(this.is224?(s=300032,y=(n=m[0]-1413257819)-150054599|0,p=n+24177077|0):(s=704751109,y=(n=m[0]-210244248)-1521486534|0,p=n+143694565|0),this.first=!1):(t=(d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),i=(s=d&u)^d&l^c,y=p+(n=y+(r=(h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&g^~h&v)+f[e]+m[e])|0,p=n+(t+i)|0),t=(p>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10),i=(o=p&d)^p&u^s,v=l+(n=v+(r=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&h^~y&g)+f[e+1]+m[e+1])|0,t=((l=n+(t+i)|0)>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),i=(a=l&p)^l&d^o,g=u+(n=g+(r=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+(v&y^~v&h)+f[e+2]+m[e+2])|0,t=((u=n+(t+i)|0)>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),i=(c=u&l)^u&p^a,h=d+(n=h+(r=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&v^~g&y)+f[e+3]+m[e+3])|0,d=n+(t+i)|0,this.chromeBugWorkAround=!0;this.h0=this.h0+d|0,this.h1=this.h1+u|0,this.h2=this.h2+l|0,this.h3=this.h3+p|0,this.h4=this.h4+h|0,this.h5=this.h5+g|0,this.h6=this.h6+v|0,this.h7=this.h7+y|0},S.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,i=this.h3,n=this.h4,s=this.h5,o=this.h6,a=this.h7,c=l[e>>>28&15]+l[e>>>24&15]+l[e>>>20&15]+l[e>>>16&15]+l[e>>>12&15]+l[e>>>8&15]+l[e>>>4&15]+l[15&e]+l[t>>>28&15]+l[t>>>24&15]+l[t>>>20&15]+l[t>>>16&15]+l[t>>>12&15]+l[t>>>8&15]+l[t>>>4&15]+l[15&t]+l[r>>>28&15]+l[r>>>24&15]+l[r>>>20&15]+l[r>>>16&15]+l[r>>>12&15]+l[r>>>8&15]+l[r>>>4&15]+l[15&r]+l[i>>>28&15]+l[i>>>24&15]+l[i>>>20&15]+l[i>>>16&15]+l[i>>>12&15]+l[i>>>8&15]+l[i>>>4&15]+l[15&i]+l[n>>>28&15]+l[n>>>24&15]+l[n>>>20&15]+l[n>>>16&15]+l[n>>>12&15]+l[n>>>8&15]+l[n>>>4&15]+l[15&n]+l[s>>>28&15]+l[s>>>24&15]+l[s>>>20&15]+l[s>>>16&15]+l[s>>>12&15]+l[s>>>8&15]+l[s>>>4&15]+l[15&s]+l[o>>>28&15]+l[o>>>24&15]+l[o>>>20&15]+l[o>>>16&15]+l[o>>>12&15]+l[o>>>8&15]+l[o>>>4&15]+l[15&o];return this.is224||(c+=l[a>>>28&15]+l[a>>>24&15]+l[a>>>20&15]+l[a>>>16&15]+l[a>>>12&15]+l[a>>>8&15]+l[a>>>4&15]+l[15&a]),c},S.prototype.toString=S.prototype.hex,S.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,i=this.h3,n=this.h4,s=this.h5,o=this.h6,a=this.h7,c=[e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,r>>>24&255,r>>>16&255,r>>>8&255,255&r,i>>>24&255,i>>>16&255,i>>>8&255,255&i,n>>>24&255,n>>>16&255,n>>>8&255,255&n,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o>>>24&255,o>>>16&255,o>>>8&255,255&o];return this.is224||c.push(a>>>24&255,a>>>16&255,a>>>8&255,255&a),c},S.prototype.array=S.prototype.digest,S.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e},_.prototype=new S,_.prototype.finalize=function(){if(S.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();S.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),S.prototype.finalize.call(this)}};var P=m();P.sha256=P,P.sha224=m(!0),P.sha256.hmac=A(),P.sha224.hmac=A(!0),c?e.exports=P:(s.sha256=P.sha256,s.sha224=P.sha224,d&&(void 0===(i=function(){return P}.call(P,r,P,e))||(e.exports=i)))}()},903:()=>{},394:()=>{}},t={};function r(i){var n=t[i];if(void 0!==n)return n.exports;var s=t[i]={exports:{}};return e[i](s,s.exports,r),s.exports}r.amdO={},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),(()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,r,i){return(r=function(t){var r=function(t){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,"string");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(r)?r:r+""}(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}const i={r:"v0.44.6"};async function n(e){const t=await S("/config",e,{method:"GET",headers:{Accept:"application/json"}});return new b(e).setSite(t),t}const s={"Europe/Vienna":"gdpr","Europe/Brussels":"gdpr","Europe/Sofia":"gdpr","Europe/Zagreb":"gdpr","Asia/Nicosia":"gdpr","Europe/Nicosia":"gdpr","Europe/Prague":"gdpr","Europe/Copenhagen":"gdpr","Europe/Tallinn":"gdpr","Europe/Helsinki":"gdpr","Europe/Paris":"gdpr","Europe/Berlin":"gdpr","Europe/Athens":"gdpr","Europe/Budapest":"gdpr","Atlantic/Reykjavik":"gdpr","Europe/Dublin":"gdpr","Europe/Rome":"gdpr","Europe/Riga":"gdpr","Europe/Vaduz":"gdpr","Europe/Vilnius":"gdpr","Europe/Luxembourg":"gdpr","Europe/Malta":"gdpr","Europe/Oslo":"gdpr","Europe/Warsaw":"gdpr","Europe/Lisbon":"gdpr","Europe/Bucharest":"gdpr","Europe/Bratislava":"gdpr","Europe/Ljubljana":"gdpr","Europe/Madrid":"gdpr","Europe/Stockholm":"gdpr","Europe/Amsterdam":"gdpr","Atlantic/Azores":"gdpr","Atlantic/Canary":"gdpr","America/Cayenne":"gdpr","America/Guadeloupe":"gdpr","Atlantic/Madeira":"gdpr","America/Martinique":"gdpr","Indian/Mayotte":"gdpr","Indian/Reunion":"gdpr","America/Marigot":"gdpr","Europe/Zurich":"gdpr","Europe/London":"gdpr","America/Toronto":"can","America/Adak":"us","America/Anchorage":"us","America/Atka":"us","America/Boise":"us","America/Chicago":"us","America/Denver":"us","America/Detroit":"us","America/Indiana/Indianapolis":"us","America/Indiana/Knox":"us","America/Indiana/Marengo":"us","America/Indiana/Petersburg":"us","America/Indiana/Tell_City":"us","America/Indiana/Vevay":"us","America/Indiana/Vincennes":"us","America/Indiana/Winamac":"us","America/Indianapolis":"us","America/Juneau":"us","America/Kentucky/Louisville":"us","America/Kentucky/Monticello":"us","America/Knox_IN":"us","America/Los_Angeles":"us","America/Louisville":"us","America/Menominee":"us","America/Metlakatla":"us","America/New_York":"us","America/Nome":"us","America/North_Dakota/Beulah":"us","America/North_Dakota/Center":"us","America/North_Dakota/New_Salem":"us","America/Phoenix":"us","America/Shiprock":"us","America/Sitka":"us","America/Yakutat":"us","Pacific/Honolulu":"us"},o="tcfcav1",a="tcfeuv2",c=[2],d=[5],u=[7,8,10,12,17,13,18,14,19,20,21,15,22,16,11,9];function l(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=function(e,t){const{gdprApplies:r,gppSectionIDs:i,gdprData:n}=t;if(void 0!==r)return r?"gdpr":"gdpr"===e?null:e;if(void 0!==n&&"gdpr"===e)return"gdpr";if(void 0===i||1===i.length&&0===i[0])return e;if(1===i.length&&-1===i[0])return null;if(i.some((e=>c.includes(e))))return"gdpr";if(i.some((e=>d.includes(e))))return"can";if(i.some((e=>u.includes(e))))return"us";switch(e){case"gdpr":if(!i.some((e=>c.includes(e))))return null;break;case"can":if(!i.some((e=>d.includes(e))))return null;break;case"us":if(!i.some((e=>u.includes(e))))return null}return e}(e,t),n={reg:i,gpp:t.gppString,gppSectionIDs:t.gppSectionIDs,gdpr:t.gdprString,gdprApplies:t.gdprApplies,deviceAccess:!1,createProfilesForAdvertising:!1,useProfilesForAdvertising:!1,measureAdvertisingPerformance:!1};switch(i){case"gdpr":t.gdprData?(n.deviceAccess=h(t.gdprData,1,r.tcfeuVendorID),n.createProfilesForAdvertising=h(t.gdprData,3,r.tcfeuVendorID),n.useProfilesForAdvertising=h(t.gdprData,4,r.tcfeuVendorID),n.measureAdvertisingPerformance=h(t.gdprData,7,r.tcfeuVendorID)):t.gppData&&(n.deviceAccess=g(t.gppData,1,r.tcfeuVendorID),n.createProfilesForAdvertising=g(t.gppData,3,r.tcfeuVendorID),n.useProfilesForAdvertising=g(t.gppData,4,r.tcfeuVendorID),n.measureAdvertisingPerformance=g(t.gppData,7,r.tcfeuVendorID));break;case"can":n.deviceAccess=!0,t.gppData&&(n.createProfilesForAdvertising=f(t.gppData,3,r.tcfcaVendorID),n.useProfilesForAdvertising=f(t.gppData,4,r.tcfcaVendorID),n.measureAdvertisingPerformance=f(t.gppData,7,r.tcfcaVendorID));break;default:n.deviceAccess=!0,n.createProfilesForAdvertising=!0,n.useProfilesForAdvertising=!0,n.measureAdvertisingPerformance=!0}return n}function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={};!function(){if("function"==typeof window.__tcfapi)return;let e;const t={};let r=window;for(;r;){try{if(r.frames.__tcfapiLocator){e=r;break}}catch(e){}if(r===window.top)break;r=r.parent}e&&(window.__tcfapi=function(r,i,n){const s=Math.random()+"";t[s]=n,e.postMessage({__tcfapiCall:{command:r,version:i,callId:s}},"*")},window.addEventListener("message",(e=>{let r={};try{r="string"==typeof e.data?JSON.parse(e.data):e.data}catch(e){}const i=r.__tcfapiReturn;i&&"function"==typeof t[i.callId]&&(t[i.callId](i.returnValue,i.success),delete t[i.callId])}),!1))}(),function(){if("function"==typeof window.__gpp)return;let e;const t={};let r=window;for(;r;){try{if(r.frames.__gppLocator){e=r;break}}catch(e){}if(r===window.top)break;r=r.parent}e&&(window.__gpp=function(r,i){const n=Math.random()+"";t[n]=i,e.postMessage({__gppCall:{command:r,version:"1.1",callId:n}},"*")},window.addEventListener("message",(e=>{let r={};try{r="string"==typeof e.data?JSON.parse(e.data):e.data}catch(e){}const i=r.__gppReturn;i&&"function"==typeof t[i.callId]&&(t[i.callId](i.returnValue,i.success),delete t[i.callId])}),!1))}();const i=l(e,r,t);return"function"==typeof window.__tcfapi&&(null===(o=(a=window).__tcfapi)||void 0===o||o.call(a,"addEventListener",2,((n,s)=>{s&&("tcloaded"===n.eventStatus||"useractioncomplete"===n.eventStatus)&&(n=>{r.gdprString=n.tcString,r.gdprApplies=n.gdprApplies,r.gdprData=n,Object.assign(i,l(e,r,t))})(n)}))),"function"==typeof window.__gpp&&(null===(n=(s=window).__gpp)||void 0===n||n.call(s,"addEventListener",((n,s)=>{s&&"signalStatus"===n.eventName&&"ready"===n.data&&(n=>{r.gppString=n.gppString,r.gppSectionIDs=n.applicableSections,r.gppData=n,Object.assign(i,l(e,r,t))})(n.pingData)}))),i;var n,s,o,a}function h(e,t,r){var i,n,s,o,a,c;return r?!!(null===(s=e.purpose)||void 0===s||null===(o=s.consents)||void 0===o?void 0:o[t])&&!!(null===(a=e.vendor)||void 0===a||null===(c=a.consents)||void 0===c?void 0:c[r]):!!(null===(i=e.publisher)||void 0===i||null===(n=i.consents)||void 0===n?void 0:n[t])}function f(e,t,r){var i;const n=t>1,s=(null===(i=e.parsedSections)||void 0===i?void 0:i[o])||[];if("number"==typeof r){const e=s.find((e=>"Version"in e));if(!e)return!1;let i=e.PurposesExpressConsent.includes(t)&&e.VendorExpressConsent.includes(r);return n&&(i||(i=e.PurposesImpliedConsent.includes(t)&&e.VendorImpliedConsent.includes(r))),i}const a=s.find((e=>"SubsectionType"in e&&3===e.SubsectionType));if(!a)return!1;let c=a.PubPurposesExpressConsent.includes(t);return n&&(c||(c=a.PubPurposesImpliedConsent.includes(t))),c}function g(e,t,r){var i;const n=t>1,s=(null===(i=e.parsedSections)||void 0===i?void 0:i[a])||[];if("number"==typeof r){const e=s.find((e=>"Version"in e));if(!e)return!1;let i=e.PurposeConsent.includes(t)&&e.VendorConsent.includes(r);return n&&(i||(i=e.PurposesLITransparency.includes(t)&&e.VendorLegitimateInterest.includes(r))),i}const o=s.find((e=>"SegmentType"in e&&3===e.SegmentType));if(!o)return!1;let c=o.PubPurposesConsent.includes(t);return n&&(c||(c=o.PubPurposesLITransparency.includes(t))),c}class v{constructor(e){t(this,"consent",void 0),this.consent=e}getItem(e){return this.consent.deviceAccess?window.localStorage.getItem(e):null}setItem(e,t){this.consent.deviceAccess&&window.localStorage.setItem(e,t)}removeItem(e){this.consent.deviceAccess&&window.localStorage.removeItem(e)}}const y="_optable_pairId";function m(e){const t=new Uint16Array(e.length);for(let r=0;r<t.length;r++)t[r]=e.charCodeAt(r);return btoa(String.fromCharCode(...new Uint8Array(t.buffer)))}function w(e){return e.node?m("".concat(e.host,"/").concat(e.node)):m("".concat(e.host))}class b{constructor(e){this.config=e,t(this,"passportKeys",void 0),t(this,"targetingKeys",void 0),t(this,"siteKeys",void 0),t(this,"pairKeys",void 0),t(this,"storage",void 0),this.passportKeys=function(e){const t=[],r=[],i="OPTABLE_PASSPORT_".concat(w(e));return t.push(i),r.push(i),e.legacyHostCache?(r.push("OPTABLE_PASSPORT_".concat(m("".concat(e.legacyHostCache)))),r.push("OPTABLE_PASS_".concat(m("".concat(e.legacyHostCache,"/").concat(e.site))))):r.push("OPTABLE_PASS_".concat(m("".concat(e.host,"/").concat(e.site)))),{write:t,read:r}}(e),this.targetingKeys=function(e){const t="OPTABLE_TARGETING_".concat(w(e));return{write:[t,e.optableCacheTargeting],read:[t]}}(e),this.siteKeys=function(e){const t="OPTABLE_SITE_".concat(w(e));return{write:[t],read:[t]}}(e),this.pairKeys={write:[y],read:[y]},this.storage=new v(this.config.consent)}getPassport(){return this.readStorageKeys(this.passportKeys)}setPassport(e){this.writeToStorageKeys(this.passportKeys,e)}getTargeting(){const e=this.readStorageKeys(this.targetingKeys);return e?JSON.parse(e):null}setTargeting(e){e&&(this.writeToStorageKeys(this.targetingKeys,JSON.stringify(e)),this.setPairIDs(e))}getSite(){const e=this.readStorageKeys(this.siteKeys);return e?JSON.parse(e):null}setSite(e){e&&this.writeToStorageKeys(this.siteKeys,JSON.stringify(e))}setPairIDs(e){var t,r,i;const n=null===(t=e.ortb2)||void 0===t||null===(r=t.user)||void 0===r||null===(i=r.eids)||void 0===i?void 0:i.filter((e=>"pair-protocol.com"===e.source)),s=null==n?void 0:n.flatMap((e=>e.uids));if(!s)return;const o=new Set(s.map((e=>e.id)));this.writeToStorageKeys(this.pairKeys,btoa(JSON.stringify({envelope:[...o]})))}getPairIDs(){var e;const t=this.readStorageKeys(this.pairKeys);return t?null===(e=JSON.parse(atob(t)))||void 0===e?void 0:e.envelope:null}readStorageKeys(e){for(const t of e.read){const e=this.storage.getItem(t);if(e)return e}return null}writeToStorageKeys(e,t){if(t)for(const r of e.write)this.storage.setItem(r,t)}clearStorageKeys(e){for(const t of[...e.read,...e.write])this.storage.removeItem(t)}clearPassport(){this.clearStorageKeys(this.passportKeys)}clearTargeting(){this.clearStorageKeys(this.targetingKeys)}clearSite(){this.clearStorageKeys(this.siteKeys)}}function A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}async function S(e,r,n){const s=await globalThis.fetch(function(e,r,n){const{host:s,cookies:o}=r,a=new URL(e,"https://".concat(s));if(a.searchParams.set("osdk","web-".concat(i.r)),a.searchParams.set("sid",r.sessionID),r.skipEnrichment&&a.searchParams.set("skip_enrichment","".concat(r.skipEnrichment)),r.node&&a.searchParams.set("t",r.node),r.site&&a.searchParams.set("o",r.site),void 0!==r.consent.gpp&&a.searchParams.set("gpp",r.consent.gpp),void 0!==r.consent.gppSectionIDs&&a.searchParams.set("gpp_sid",r.consent.gppSectionIDs.join(",")),void 0!==r.consent.gdpr&&a.searchParams.set("gdpr_consent",r.consent.gdpr),void 0!==r.consent.gdprApplies&&a.searchParams.set("gdpr",Number(r.consent.gdprApplies).toString()),r.readOnly&&a.searchParams.set("ro","true"),r.timeout&&a.searchParams.set("timeout",r.timeout),o)a.searchParams.set("cookies","yes");else{const e=new b(r).getPassport();a.searchParams.set("cookies","no"),a.searchParams.set("passport",e||"")}const c=function(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?A(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):A(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},n);return c.credentials=r.consent.deviceAccess?"include":"omit",r.mockedIP&&(c.headers=new Headers(c.headers),c.headers.set("X-Forwarded-For",r.mockedIP)),new Request(a.toString(),c)}(e,r,n)),o=s.headers.get("Content-Type"),a=(null==o?void 0:o.startsWith("application/json"))?await s.json():await s.text();if(!s.ok)throw new Error(a.error);return a.passport&&(new b(r).setPassport(a.passport),delete a.passport),a}var _,P,E,I=((P=I||{})[P.Banner=1]="Banner",P[P.Video=2]="Video",P[P.Audio=3]="Audio",P[P.Native=4]="Native",P),O={},k={},T={};(E=_||(_={})).Placement=k,E.Media=T,E.Context=O;const D={cookies:!0,initPassport:!0,readOnly:!1,experiments:[],consent:{reg:null,deviceAccess:!0,createProfilesForAdvertising:!0,useProfilesForAdvertising:!0,measureAdvertisingPerformance:!0}};function j(){const e=new Uint8Array(16);return crypto.getRandomValues(e),btoa(String.fromCharCode(...e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")}function C(e){var t,r;return{user:{data:(null!==(t=null==e?void 0:e.audience)&&void 0!==t?t:[]).map((e=>({name:e.provider,segment:e.ids,ext:{segtax:e.rtb_segtax}}))),ext:{eids:(null!==(r=null==e?void 0:e.user)&&void 0!==r?r:[]).map((e=>({source:e.provider,uids:e.ids.map((e=>{let{id:t}=e;return{id:t,atype:3}}))})))}}}}function x(e){const t={};if(!e)return t;for(const i of null!==(r=e.audience)&&void 0!==r?r:[]){var r;i.keyspace&&(i.keyspace in t||(t[i.keyspace]=[]),t[i.keyspace].push(...i.ids.map((e=>e.id))))}return t}function K(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function B(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?N(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):N(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function V(){const e={};let t=0;return{refs:e,process:(r,i)=>{if(!r.refs)return i;for(const s of i.uids){var n;if(K(null===(n=s.ext)||void 0===n?void 0:n.optable)&&"ref"in s.ext.optable&&"string"==typeof s.ext.optable.ref){const i=r.refs[s.ext.optable.ref];t+=1;const n=t.toString(10);e[n]=i,s.ext.optable.ref=n}}return i}}}var F=r(312);class L{constructor(e){t(this,"dcn",void 0),t(this,"init",void 0),this.dcn=function(e){var t,r,i,n,o,a,c,d;const u={host:e.host,site:e.site,optableCacheTargeting:null!==(t=e.optableCacheTargeting)&&void 0!==t?t:"optable-cache:targeting",cookies:null!==(r=e.cookies)&&void 0!==r?r:D.cookies,initPassport:null!==(i=e.initPassport)&&void 0!==i?i:D.initPassport,consent:D.consent,readOnly:null!==(n=e.readOnly)&&void 0!==n?n:D.readOnly,node:e.node,legacyHostCache:e.legacyHostCache,experiments:null!==(o=e.experiments)&&void 0!==o?o:D.experiments,mockedIP:e.mockedIP,sessionID:null!==(a=e.sessionID)&&void 0!==a?a:j(),skipEnrichment:e.skipEnrichment,initTargeting:e.initTargeting,abTests:e.abTests,additionalTargetingSignals:e.additionalTargetingSignals,timeout:e.timeout};return(null===(c=e.consent)||void 0===c?void 0:c.static)?u.consent=e.consent.static:(null===(d=e.consent)||void 0===d?void 0:d.cmpapi)&&(u.consent=p(function(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone,t=s[e];return"can"===t?["fr","fr-CA"].some((e=>navigator.languages.includes(e)))?"can":null:null!=t?t:null}(),e.consent.cmpapi)),u}(e),this.init=this.initialize()}async initialize(){this.dcn.initPassport&&await n(this.dcn).catch((()=>{})),this.dcn.initTargeting&&this.targeting().catch((()=>{}))}async identify(){await this.init;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e,t){return S("/identify",e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}(this.dcn,t.filter((e=>e)))}async uid2Token(e){return await this.init,function(e,t){return S("/uid2/token",e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}(this.dcn,e)}async targeting(){const e=function(e){if("string"==typeof e)return{ids:[e],hids:[]};var t,r;if(K(e))return{ids:null!==(t=null==e?void 0:e.ids)&&void 0!==t?t:[],hids:null!==(r=null==e?void 0:e.hids)&&void 0!==r?r:[]};throw"Invalid request type for targeting. Expected string or object."}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__passport__");return await this.init,async function(e,t){var r;const i=new URLSearchParams;t.ids.forEach((e=>i.append("id",e))),t.hids.forEach((e=>i.append("hid",e)));const n=function(e){if(!e||0===e.length)return null;if(e.reduce(((e,t)=>e+t.trafficPercentage),0)>100)return console.error("AB Test Config Error: Traffic Percentage Sum Exceeds 100%"),null;const t=Math.floor(100*Math.random());let r=0;for(const i of e)if(r+=i.trafficPercentage,t<r)return i;return null}(e.abTests);n&&(i.append("ab_test_id",n.id),n.matcher_override&&[...n.matcher_override].sort(((e,t)=>e.rank-t.rank)).forEach((e=>{i.append("matcher_override",e.id)})),n.skipMatchers&&i.append("skip_matchers",n.skipMatchers.join(",")));(null===(r=e.additionalTargetingSignals)||void 0===r?void 0:r.ref)&&i.append("ref","".concat(window.location.protocol,"//").concat(window.location.host).concat(window.location.pathname));const s="/v2/targeting?"+i.toString(),o=await S(s,e,{method:"GET",headers:{Accept:"application/json"}});return o&&(new b(e).setTargeting(o),function(e,t){var r,i,n,s,o,a,c,d;const u=null===(r=t.ortb2)||void 0===r||null===(i=r.user)||void 0===i||null===(n=i.eids)||void 0===n?void 0:n.map((e=>e.matcher));window.dispatchEvent(new CustomEvent("optable-targeting:change",{detail:{instance:e.node||e.host,resolved:!!(null===(s=t.ortb2)||void 0===s||null===(o=s.user)||void 0===o||null===(a=o.eids)||void 0===a?void 0:a.length),resolvedIDs:null!==(c=t.resolved_ids)&&void 0!==c?c:[],abTestID:null!==(d=t.ab_test_id)&&void 0!==d?d:void 0,ortb2:t.ortb2,provenance:new Set(u)}}))}(e,o)),o}(this.dcn,e)}targetingFromCache(){return e=this.dcn,new b(e).getTargeting();var e}async site(){return n(this.dcn)}siteFromCache(){return e=this.dcn,new b(e).getSite();var e}targetingClearCache(){var e;e=this.dcn,new b(e).clearTargeting()}async prebidORTB2(){return C(await this.targeting())}prebidORTB2FromCache(){return C(this.targetingFromCache())}async targetingKeyValues(){return x(await this.targeting())}targetingKeyValuesFromCache(){return x(this.targetingFromCache())}async witness(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return await this.init,function(e,t,r){const i={event:t,properties:r};return S("/witness",e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})}(this.dcn,e,t)}async profile(e){return await this.init,function(e,t){const r={traits:t};return S("/profile",e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})}(this.dcn,e)}async tokenize(e){return await this.init,function(e,t){let r={id:t};return S("/v2/tokenize",e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})}(this.dcn,e)}async resolve(e){return await this.init,async function(e,t){const r=new URLSearchParams;"string"==typeof t&&r.append("id",t);const i="/v1/resolve?"+r.toString();return function(e){const t={clusters:[],lmpid:""};if("object"!=typeof e||null===e)return t;if("lmpid"in e&&"string"==typeof(null==e?void 0:e.lmpid)&&(t.lmpid=e.lmpid),!("clusters"in e)||!Array.isArray(null==e?void 0:e.clusters))return t;for(const r of e.clusters){const e={ids:[],traits:[]};if(Array.isArray(null==r?void 0:r.ids))for(const t of r.ids)"string"==typeof t&&e.ids.push(t);if(Array.isArray(null==r?void 0:r.traits))for(const t of r.traits)"string"==typeof(null==t?void 0:t.key)&&"string"==typeof(null==t?void 0:t.value)&&e.traits.push({key:t.key,value:t.value});(e.ids.length>0||e.traits.length>0)&&t.clusters.push(e)}return t}(await S(i,e,{method:"GET",headers:{Accept:"application/json"}}))}(this.dcn,e)}static eid(e){return e?"e:"+F.sha256.hex(e.toLowerCase().trim()):""}static sha256(e){return e?F.sha256.hex(e):""}static cid(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r="c:";if("string"!=typeof e)throw new Error("Invalid ppid");if("number"!=typeof t||isNaN(t)||t<0||t>19)throw new Error("Invalid variant");return t>0&&(r="c".concat(t,":")),e?r+e.trim():""}static TargetingKeyValues(e){return x(e)}static PrebidORTB2(e){return C(e)}}t(L,"version",i.r);const M=L;function R(e){var t,r,i,n,s,o,a,c,d,u;return{advertiser_id:null===(t=e.advertiserId)||void 0===t?void 0:t.toString(),campaign_id:null===(r=e.campaignId)||void 0===r?void 0:r.toString(),creative_id:null===(i=e.creativeId)||void 0===i?void 0:i.toString(),is_empty:null===(n=e.isEmpty)||void 0===n?void 0:n.toString(),line_item_id:null===(s=e.lineItemId)||void 0===s?void 0:s.toString(),service_name:null===(o=e.serviceName)||void 0===o?void 0:o.toString(),size:null===(a=e.size)||void 0===a?void 0:a.toString(),slot_element_id:null===(c=e.slot)||void 0===c?void 0:c.getSlotElementId(),source_agnostic_creative_id:null===(d=e.sourceAgnosticCreativeId)||void 0===d?void 0:d.toString(),source_agnostic_line_item_id:null===(u=e.sourceAgnosticLineItemId)||void 0===u?void 0:u.toString()}}M.prototype.installGPTEventListeners=function(){const e=this;e.installGPTEventListeners=function(){},window.googletag=window.googletag||{cmd:[]};const t=window.googletag;t.cmd.push((function(){t.pubads().addEventListener("slotRenderEnded",(function(t){e.witness("gpt_events_slot_render_ended",R(t))})),t.pubads().addEventListener("impressionViewable",(function(t){e.witness("gpt_events_impression_viewable",R(t))}))}))},M.prototype.installGPTSecureSignals=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];window.googletag=window.googletag||{cmd:[]};const i=window.googletag;t&&t.length>0&&i.cmd.push((()=>{t.forEach((e=>{let{provider:t,id:r}=e;i.secureSignalProviders.push({id:t,collectorFunction:()=>Promise.resolve(r)})}))}))};const J=/^[a-f0-9]{64}$/i;M.prototype.tryIdentifyFromParams=function(e,t){const r=new RegExp("^".concat(e||"oeid","$"),"i"),i=new URLSearchParams(window.location.search);let n="";for(const[e,t]of i)if(r.test(e)){n=t;break}""!=n&&(t||function(e){return J.test(e)}(n))&&this.identify((t||"e")+":"+n.toLowerCase())},window.optable=window.optable||{},window.optable.SDK=M,window.optable.cmd=new class{constructor(e){if(this.cmds=e,Array.isArray(this.cmds))for(const e of this.cmds)"function"==typeof e&&e()}push(e){e()}}(window.optable.cmd||[]),window.optable.utils={resolveMultiNodeTargeting:async function(e){return e?e.some((e=>e.priority))?async function(e){const t=new Set,r=new Set,{refs:i,process:n}=V(),s={user:{data:[],eids:[]}},o=new Map,a=new Map,c=new Map;const d=e.map((e=>{let{targetingFn:t,matcher:r,mm:i,priority:d}=e;return t().then((e=>function(e,t,r){var i,d,u;let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const p=Math.max(0,l),{data:h=[],eids:f=[]}=null!==(i=null===(d=e.ortb2)||void 0===d?void 0:d.user)&&void 0!==i?i:{};s.user.data.push(...h),c.set(p,null!==(u=e.resolved_ids)&&void 0!==u?u:[]),f.filter((e=>e.uids.length)).forEach((i=>{var s,c,d,u,l;const h=null!==(s=i.matcher)&&void 0!==s?s:t,f=null!==(c=o.get(p))&&void 0!==c?c:[];h&&o.set(p,[...f,h]);const g=B(B({},n(e,i)),{},{matcher:null!==(d=i.matcher)&&void 0!==d?d:t,mm:null!==(u=i.mm)&&void 0!==u?u:r}),v=null!==(l=a.get(p))&&void 0!==l?l:[];a.set(p,[...v,g])}))}(e,r,i,d)))}));await Promise.allSettled(d);const u=Array.from(a.keys()).sort(((e,t)=>e-t)).filter((e=>{var t;return null===(t=a.get(e))||void 0===t?void 0:t.length})).shift();if(u){const e=o.get(u)||[],i=c.get(u)||[];s.user.eids.push(...a.get(u)||[]),e.forEach((e=>t.add(e))),i.forEach((e=>r.add(e)))}return{ortb2:s,eidSources:t,refs:i,resolvedIds:r}}(e):async function(e){const t=new Set,r=new Set,{refs:i,process:n}=V(),s={user:{data:[],eids:[]}};const o=e.map((e=>{let{targetingFn:i,matcher:o,mm:a}=e;return i().then((e=>function(e,i,o){var a,c,d;const{data:u=[],eids:l=[]}=null!==(a=null===(c=e.ortb2)||void 0===c?void 0:c.user)&&void 0!==a?a:{};s.user.data.push(...u),null===(d=e.resolved_ids)||void 0===d||d.forEach((e=>r.add(e))),l.filter((e=>e.uids.length)).forEach((r=>{var a,c,d;const u=null!==(a=r.matcher)&&void 0!==a?a:i;u&&t.add(u),s.user.eids.push(B(B({},n(e,r)),{},{mm:null!==(c=r.mm)&&void 0!==c?c:o,matcher:null!==(d=r.matcher)&&void 0!==d?d:i}))}))}(e,o,a)))}));return await Promise.allSettled(o),{ortb2:s,eidSources:t,refs:i,resolvedIds:r}}(e):Promise.reject("No targeting rules provided")}},window.optable.instance_config&&(window.optable.instance=new M(window.optable.instance_config))})()})();
|
|
2
|
+
(()=>{var e={129(){},432(){},704(e){e.exports=function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=90)}({17:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i=r(18),n=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||""},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||""},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});t.push(0);var r=t[0],i=t[1];if(10===r)switch(i){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}switch(r){case 11:return"Big Sur";case 12:return"Monterey";case 13:return"Ventura";case 14:return"Sonoma";case 15:return"Sequoia";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,r,i){void 0===i&&(i=!1);var n=e.getVersionPrecision(t),o=e.getVersionPrecision(r),s=Math.max(n,o),a=0,c=e.map([t,r],function(t){var r=s-e.getVersionPrecision(t),i=t+new Array(r+1).join(".0");return e.map(i.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(i&&(a=s-Math.min(n,o)),s-=1;s>=a;){if(c[0][s]>c[1][s])return 1;if(c[0][s]===c[1][s]){if(s===a)return 0;s-=1}else if(c[0][s]<c[1][s])return-1}},e.map=function(e,t){var r,i=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)i.push(t(e[r]));return i},e.find=function(e,t){var r,i;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(r=0,i=e.length;r<i;r+=1){var n=e[r];if(t(n,r))return n}},e.assign=function(e){for(var t,r,i=e,n=arguments.length,o=new Array(n>1?n-1:0),s=1;s<n;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach(function(t){i[t]=e[t]})};for(t=0,r=o.length;t<r;t+=1)a();return e},e.getBrowserAlias=function(e){return i.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return i.BROWSER_MAP[e]||""},e}();t.default=n,e.exports=t.default},18:function(e,t,r){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={AmazonBot:"amazonbot","Amazon Silk":"amazon_silk","Android Browser":"android",BaiduSpider:"baiduspider",Bada:"bada",BingCrawler:"bingcrawler",Brave:"brave",BlackBerry:"blackberry","ChatGPT-User":"chatgpt_user",Chrome:"chrome",ClaudeBot:"claudebot",Chromium:"chromium",Diffbot:"diffbot",DuckDuckBot:"duckduckbot",DuckDuckGo:"duckduckgo",Electron:"electron",Epiphany:"epiphany",FacebookExternalHit:"facebookexternalhit",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot",GPTBot:"gptbot","Internet Explorer":"ie",InternetArchiveCrawler:"internetarchivecrawler","K-Meleon":"k_meleon",LibreWolf:"librewolf",Linespider:"linespider",Maxthon:"maxthon","Meta-ExternalAds":"meta_externalads","Meta-ExternalAgent":"meta_externalagent","Meta-ExternalFetcher":"meta_externalfetcher","Meta-WebIndexer":"meta_webindexer","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver","OAI-SearchBot":"oai_searchbot",Omgilibot:"omgilibot",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PerplexityBot:"perplexitybot","Perplexity-User":"perplexity_user",PhantomJS:"phantomjs",PingdomBot:"pingdombot",Puffin:"puffin",QQ:"qq",QQLite:"qqlite",QupZilla:"qupzilla",Roku:"roku",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SlackBot:"slackbot",SeaMonkey:"seamonkey",Sleipnir:"sleipnir","Sogou Browser":"sogou",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat",YahooSlurp:"yahooslurp","Yandex Browser":"yandex",YandexBot:"yandexbot",YouBot:"youbot"},t.BROWSER_MAP={amazonbot:"AmazonBot",amazon_silk:"Amazon Silk",android:"Android Browser",baiduspider:"BaiduSpider",bada:"Bada",bingcrawler:"BingCrawler",blackberry:"BlackBerry",brave:"Brave",chatgpt_user:"ChatGPT-User",chrome:"Chrome",claudebot:"ClaudeBot",chromium:"Chromium",diffbot:"Diffbot",duckduckbot:"DuckDuckBot",duckduckgo:"DuckDuckGo",edge:"Microsoft Edge",electron:"Electron",epiphany:"Epiphany",facebookexternalhit:"FacebookExternalHit",firefox:"Firefox",focus:"Focus",generic:"Generic",google_search:"Google Search",googlebot:"Googlebot",gptbot:"GPTBot",ie:"Internet Explorer",internetarchivecrawler:"InternetArchiveCrawler",k_meleon:"K-Meleon",librewolf:"LibreWolf",linespider:"Linespider",maxthon:"Maxthon",meta_externalads:"Meta-ExternalAds",meta_externalagent:"Meta-ExternalAgent",meta_externalfetcher:"Meta-ExternalFetcher",meta_webindexer:"Meta-WebIndexer",mz:"MZ Browser",naver:"NAVER Whale Browser",oai_searchbot:"OAI-SearchBot",omgilibot:"Omgilibot",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",perplexitybot:"PerplexityBot",perplexity_user:"Perplexity-User",phantomjs:"PhantomJS",pingdombot:"PingdomBot",puffin:"Puffin",qq:"QQ Browser",qqlite:"QQ Browser Lite",qupzilla:"QupZilla",roku:"Roku",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",slackbot:"SlackBot",sleipnir:"Sleipnir",sogou:"Sogou Browser",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yahooslurp:"YahooSlurp",yandex:"Yandex Browser",yandexbot:"YandexBot",youbot:"YouBot"},t.PLATFORMS_MAP={bot:"bot",desktop:"desktop",mobile:"mobile",tablet:"tablet",tv:"tv"},t.OS_MAP={Android:"Android",Bada:"Bada",BlackBerry:"BlackBerry",ChromeOS:"Chrome OS",HarmonyOS:"HarmonyOS",iOS:"iOS",Linux:"Linux",MacOS:"macOS",PlayStation4:"PlayStation 4",Roku:"Roku",Tizen:"Tizen",WebOS:"WebOS",Windows:"Windows",WindowsPhone:"Windows Phone"},t.ENGINE_MAP={Blink:"Blink",EdgeHTML:"EdgeHTML",Gecko:"Gecko",Presto:"Presto",Trident:"Trident",WebKit:"WebKit"}},90:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i,n=(i=r(91))&&i.__esModule?i:{default:i},o=r(18);function s(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var a=function(){function e(){}var t,r;return e.getParser=function(e,t,r){if(void 0===t&&(t=!1),void 0===r&&(r=null),"string"!=typeof e)throw new Error("UserAgent should be a string");return new n.default(e,t,r)},e.parse=function(e,t){return void 0===t&&(t=null),new n.default(e,t).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],null&&s(t.prototype,null),r&&s(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i=c(r(92)),n=c(r(93)),o=c(r(94)),s=c(r(95)),a=c(r(17));function c(e){return e&&e.__esModule?e:{default:e}}var d=function(){function e(e,t,r){if(void 0===t&&(t=!1),void 0===r&&(r=null),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e;var i=!1;"boolean"==typeof t?(i=t,this._hints=r):this._hints=null!=t&&"object"==typeof t?t:null,this.parsedResult={},!0!==i&&this.parse()}var t=e.prototype;return t.getHints=function(){return this._hints},t.hasBrand=function(e){if(!this._hints||!Array.isArray(this._hints.brands))return!1;var t=e.toLowerCase();return this._hints.brands.some(function(e){return e.brand&&e.brand.toLowerCase()===t})},t.getBrandVersion=function(e){if(this._hints&&Array.isArray(this._hints.brands)){var t=e.toLowerCase(),r=this._hints.brands.find(function(e){return e.brand&&e.brand.toLowerCase()===t});return r?r.version:void 0}},t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(i.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA(),this)),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(n.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(o.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,r={},i=0,n={},o=0;if(Object.keys(e).forEach(function(t){var s=e[t];"string"==typeof s?(n[t]=s,o+=1):"object"==typeof s&&(r[t]=s,i+=1)}),i>0){var s=Object.keys(r),c=a.default.find(s,function(e){return t.isOS(e)});if(c){var d=this.satisfies(r[c]);if(void 0!==d)return d}var u=a.default.find(s,function(e){return t.isPlatform(e)});if(u){var l=this.satisfies(r[u]);if(void 0!==l)return l}}if(o>0){var f=Object.keys(n),h=a.default.find(f,function(e){return t.isBrowser(e,!0)});if(void 0!==h)return this.compareVersion(n[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),i=e.toLowerCase(),n=a.default.getBrowserTypeByAlias(i);return t&&n&&(i=n.toLowerCase()),i===r},t.compareVersion=function(e){var t=[0],r=e,i=!1,n=this.getBrowserVersion();if("string"==typeof n)return">"===e[0]||"<"===e[0]?(r=e.substr(1),"="===e[1]?(i=!0,r=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?r=e.substr(1):"~"===e[0]&&(i=!0,r=e.substr(1)),t.indexOf(a.default.compareVersions(n,r,i))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=d,e.exports=t.default},92:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i,n=(i=r(17))&&i.__esModule?i:{default:i},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/gptbot/i],describe:function(e){var t={name:"GPTBot"},r=n.default.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/chatgpt-user/i],describe:function(e){var t={name:"ChatGPT-User"},r=n.default.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/oai-searchbot/i],describe:function(e){var t={name:"OAI-SearchBot"},r=n.default.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(e){var t={name:"ClaudeBot"},r=n.default.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(e){var t={name:"Omgilibot"},r=n.default.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/diffbot/i],describe:function(e){var t={name:"Diffbot"},r=n.default.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/perplexitybot/i],describe:function(e){var t={name:"PerplexityBot"},r=n.default.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/perplexity-user/i],describe:function(e){var t={name:"Perplexity-User"},r=n.default.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/youbot/i],describe:function(e){var t={name:"YouBot"},r=n.default.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/meta-webindexer/i],describe:function(e){var t={name:"Meta-WebIndexer"},r=n.default.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/meta-externalads/i],describe:function(e){var t={name:"Meta-ExternalAds"},r=n.default.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/meta-externalagent/i],describe:function(e){var t={name:"Meta-ExternalAgent"},r=n.default.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/meta-externalfetcher/i],describe:function(e){var t={name:"Meta-ExternalFetcher"},r=n.default.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},r=n.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/linespider/i],describe:function(e){var t={name:"Linespider"},r=n.default.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/amazonbot/i],describe:function(e){var t={name:"AmazonBot"},r=n.default.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/bingbot/i],describe:function(e){var t={name:"BingCrawler"},r=n.default.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/baiduspider/i],describe:function(e){var t={name:"BaiduSpider"},r=n.default.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/duckduckbot/i],describe:function(e){var t={name:"DuckDuckBot"},r=n.default.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/ia_archiver/i],describe:function(e){var t={name:"InternetArchiveCrawler"},r=n.default.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{name:"FacebookExternalHit"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(e){var t={name:"SlackBot"},r=n.default.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/yahoo!?[\s/]*slurp/i],describe:function(){return{name:"YahooSlurp"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{name:"YandexBot"}}},{test:[/pingdom/i],describe:function(){return{name:"PingdomBot"}}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},r=n.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/PaleMoon/i],describe:function(e){var t={name:"Pale Moon"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},r=n.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},r=n.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},r=n.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},r=n.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},r=n.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},r=n.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=n.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},r=n.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},r=n.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},r=n.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},r=n.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},r=n.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},r=n.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},r=n.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},r=n.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},r=n.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},r=n.default.getFirstMatch(o,e)||n.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},r=n.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},r=n.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},r=n.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/librewolf/i],describe:function(e){var t={name:"LibreWolf"},r=n.default.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},r=n.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},r=n.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe:function(e){var t={name:"Sogou Browser"},r=n.default.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,e),i=n.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e),o=n.default.getFirstMatch(/se ([\d.]+)x/i,e),s=r||i||o;return s&&(t.version=s),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},r=n.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return!!e.hasBrand("DuckDuckGo")||e.test(/\sDdg\/[\d.]+$/i)},describe:function(e,t){var r={name:"DuckDuckGo"};if(t){var i=t.getBrandVersion("DuckDuckGo");if(i)return r.version=i,r}var o=n.default.getFirstMatch(/\sDdg\/([\d.]+)$/i,e);return o&&(r.version=o),r}},{test:function(e){return e.hasBrand("Brave")},describe:function(e,t){var r={name:"Brave"};if(t){var i=t.getBrandVersion("Brave");if(i)return r.version=i,r}return r}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},r=n.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},r=n.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},r=n.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:"Android Browser"},r=n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},r=n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},r=n.default.getFirstMatch(o,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:n.default.getFirstMatch(t,e),version:n.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i,n=(i=r(17))&&i.__esModule?i:{default:i},o=r(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=n.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=n.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=n.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=n.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},r=n.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe:function(e){var t=n.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=n.default.getMacOSVersionName(t),i={name:o.OS_MAP.MacOS,version:t};return r&&(i.versionName=r),i}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=n.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:[/OpenHarmony/i],describe:function(e){var t=n.default.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.HarmonyOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=n.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=n.default.getAndroidVersionName(t),i={name:o.OS_MAP.Android,version:t};return r&&(i.versionName=r),i}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=n.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:o.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=n.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||n.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||n.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=n.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=n.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=n.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i,n=(i=r(17))&&i.__esModule?i:{default:i},o=r(18),s=[{test:[/googlebot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Google"}}},{test:[/linespider/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Line"}}},{test:[/amazonbot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Amazon"}}},{test:[/gptbot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/chatgpt-user/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/oai-searchbot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/baiduspider/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Baidu"}}},{test:[/bingbot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Bing"}}},{test:[/duckduckbot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"DuckDuckGo"}}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Anthropic"}}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Webz.io"}}},{test:[/diffbot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Diffbot"}}},{test:[/perplexitybot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/perplexity-user/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/youbot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"You.com"}}},{test:[/ia_archiver/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Internet Archive"}}},{test:[/meta-webindexer/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalads/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalagent/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalfetcher/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Slack"}}},{test:[/yahoo/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Yahoo"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Yandex"}}},{test:[/pingdom/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Pingdom"}}},{test:[/huawei/i],describe:function(e){var t=n.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(r.model=t),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=n.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe:function(e){var t=n.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),r={type:o.PLATFORMS_MAP.mobile,vendor:"Nokia"};return t&&(r.model=t),r}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:[/smart-?tv|smarttv/i],describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:[/netcast/i],describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i,n=(i=r(17))&&i.__esModule?i:{default:i},o=r(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=n.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},r=n.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},r=n.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},r=n.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},r=n.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=s,e.exports=t.default}})},966(e,t,r){var i;!function(){"use strict";var t="input is invalid type",n="object"==typeof window,o=n?window:{};o.JS_SHA256_NO_WINDOW&&(n=!1);var s=!n&&"object"==typeof self,a=!o.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node&&"renderer"!=process.type;a?o=r.g:s&&(o=self);var c=!o.JS_SHA256_NO_COMMON_JS&&e.exports,d=r.amdO,u=!o.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,l="0123456789abcdef".split(""),f=[-2147483648,8388608,32768,128],h=[24,16,8,0],p=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],g=["hex","array","digest","arrayBuffer"],b=[];!o.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!u||!o.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var v=function(e,t){return function(r){return new S(t,!0).update(r)[e]()}},m=function(e){var t=v("hex",e);a&&(t=y(t,e)),t.create=function(){return new S(e)},t.update=function(e){return t.create().update(e)};for(var r=0;r<g.length;++r){var i=g[r];t[i]=v(i,e)}return t},y=function(e,i){var n,s=r(432),a=r(129).Buffer,c=i?"sha224":"sha256";return n=a.from&&!o.JS_SHA256_NO_BUFFER_FROM?a.from:function(e){return new a(e)},function(r){if("string"==typeof r)return s.createHash(c).update(r,"utf8").digest("hex");if(null==r)throw new Error(t);return r.constructor===ArrayBuffer&&(r=new Uint8Array(r)),Array.isArray(r)||ArrayBuffer.isView(r)||r.constructor===a?s.createHash(c).update(n(r)).digest("hex"):e(r)}},w=function(e,t){return function(r,i){return new M(r,t,!0).update(i)[e]()}},A=function(e){var t=w("hex",e);t.create=function(t){return new M(t,e)},t.update=function(e,r){return t.create(e).update(r)};for(var r=0;r<g.length;++r){var i=g[r];t[i]=w(i,e)}return t};function S(e,t){t?(b[0]=b[16]=b[1]=b[2]=b[3]=b[4]=b[5]=b[6]=b[7]=b[8]=b[9]=b[10]=b[11]=b[12]=b[13]=b[14]=b[15]=0,this.blocks=b):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}function M(e,r,i){var n,o=typeof e;if("string"===o){var s,a=[],c=e.length,d=0;for(n=0;n<c;++n)(s=e.charCodeAt(n))<128?a[d++]=s:s<2048?(a[d++]=192|s>>>6,a[d++]=128|63&s):s<55296||s>=57344?(a[d++]=224|s>>>12,a[d++]=128|s>>>6&63,a[d++]=128|63&s):(s=65536+((1023&s)<<10|1023&e.charCodeAt(++n)),a[d++]=240|s>>>18,a[d++]=128|s>>>12&63,a[d++]=128|s>>>6&63,a[d++]=128|63&s);e=a}else{if("object"!==o)throw new Error(t);if(null===e)throw new Error(t);if(u&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||u&&ArrayBuffer.isView(e)))throw new Error(t)}e.length>64&&(e=new S(r,!0).update(e).array());var l=[],f=[];for(n=0;n<64;++n){var h=e[n]||0;l[n]=92^h,f[n]=54^h}S.call(this,r,i),this.update(f),this.oKeyPad=l,this.inner=!0,this.sharedMemory=i}S.prototype.update=function(e){if(!this.finalized){var r,i=typeof e;if("string"!==i){if("object"!==i)throw new Error(t);if(null===e)throw new Error(t);if(u&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||u&&ArrayBuffer.isView(e)))throw new Error(t);r=!0}for(var n,o,s=0,a=e.length,c=this.blocks;s<a;){if(this.hashed&&(this.hashed=!1,c[0]=this.block,this.block=c[16]=c[1]=c[2]=c[3]=c[4]=c[5]=c[6]=c[7]=c[8]=c[9]=c[10]=c[11]=c[12]=c[13]=c[14]=c[15]=0),r)for(o=this.start;s<a&&o<64;++s)c[o>>>2]|=e[s]<<h[3&o++];else for(o=this.start;s<a&&o<64;++s)(n=e.charCodeAt(s))<128?c[o>>>2]|=n<<h[3&o++]:n<2048?(c[o>>>2]|=(192|n>>>6)<<h[3&o++],c[o>>>2]|=(128|63&n)<<h[3&o++]):n<55296||n>=57344?(c[o>>>2]|=(224|n>>>12)<<h[3&o++],c[o>>>2]|=(128|n>>>6&63)<<h[3&o++],c[o>>>2]|=(128|63&n)<<h[3&o++]):(n=65536+((1023&n)<<10|1023&e.charCodeAt(++s)),c[o>>>2]|=(240|n>>>18)<<h[3&o++],c[o>>>2]|=(128|n>>>12&63)<<h[3&o++],c[o>>>2]|=(128|n>>>6&63)<<h[3&o++],c[o>>>2]|=(128|63&n)<<h[3&o++]);this.lastByteIndex=o,this.bytes+=o-this.start,o>=64?(this.block=c[16],this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this}},S.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>>2]|=f[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},S.prototype.hash=function(){var e,t,r,i,n,o,s,a,c,d=this.h0,u=this.h1,l=this.h2,f=this.h3,h=this.h4,g=this.h5,b=this.h6,v=this.h7,m=this.blocks;for(e=16;e<64;++e)t=((n=m[e-15])>>>7|n<<25)^(n>>>18|n<<14)^n>>>3,r=((n=m[e-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,m[e]=m[e-16]+t+m[e-7]+r|0;for(c=u&l,e=0;e<64;e+=4)this.first?(this.is224?(o=300032,v=(n=m[0]-1413257819)-150054599|0,f=n+24177077|0):(o=704751109,v=(n=m[0]-210244248)-1521486534|0,f=n+143694565|0),this.first=!1):(t=(d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),i=(o=d&u)^d&l^c,v=f+(n=v+(r=(h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&g^~h&b)+p[e]+m[e])|0,f=n+(t+i)|0),t=(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),i=(s=f&d)^f&u^o,b=l+(n=b+(r=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7))+(v&h^~v&g)+p[e+1]+m[e+1])|0,t=((l=n+(t+i)|0)>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),i=(a=l&f)^l&d^s,g=u+(n=g+(r=(b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7))+(b&v^~b&h)+p[e+2]+m[e+2])|0,t=((u=n+(t+i)|0)>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),i=(c=u&l)^u&f^a,h=d+(n=h+(r=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&b^~g&v)+p[e+3]+m[e+3])|0,d=n+(t+i)|0,this.chromeBugWorkAround=!0;this.h0=this.h0+d|0,this.h1=this.h1+u|0,this.h2=this.h2+l|0,this.h3=this.h3+f|0,this.h4=this.h4+h|0,this.h5=this.h5+g|0,this.h6=this.h6+b|0,this.h7=this.h7+v|0},S.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,i=this.h3,n=this.h4,o=this.h5,s=this.h6,a=this.h7,c=l[e>>>28&15]+l[e>>>24&15]+l[e>>>20&15]+l[e>>>16&15]+l[e>>>12&15]+l[e>>>8&15]+l[e>>>4&15]+l[15&e]+l[t>>>28&15]+l[t>>>24&15]+l[t>>>20&15]+l[t>>>16&15]+l[t>>>12&15]+l[t>>>8&15]+l[t>>>4&15]+l[15&t]+l[r>>>28&15]+l[r>>>24&15]+l[r>>>20&15]+l[r>>>16&15]+l[r>>>12&15]+l[r>>>8&15]+l[r>>>4&15]+l[15&r]+l[i>>>28&15]+l[i>>>24&15]+l[i>>>20&15]+l[i>>>16&15]+l[i>>>12&15]+l[i>>>8&15]+l[i>>>4&15]+l[15&i]+l[n>>>28&15]+l[n>>>24&15]+l[n>>>20&15]+l[n>>>16&15]+l[n>>>12&15]+l[n>>>8&15]+l[n>>>4&15]+l[15&n]+l[o>>>28&15]+l[o>>>24&15]+l[o>>>20&15]+l[o>>>16&15]+l[o>>>12&15]+l[o>>>8&15]+l[o>>>4&15]+l[15&o]+l[s>>>28&15]+l[s>>>24&15]+l[s>>>20&15]+l[s>>>16&15]+l[s>>>12&15]+l[s>>>8&15]+l[s>>>4&15]+l[15&s];return this.is224||(c+=l[a>>>28&15]+l[a>>>24&15]+l[a>>>20&15]+l[a>>>16&15]+l[a>>>12&15]+l[a>>>8&15]+l[a>>>4&15]+l[15&a]),c},S.prototype.toString=S.prototype.hex,S.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,i=this.h3,n=this.h4,o=this.h5,s=this.h6,a=this.h7,c=[e>>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,r>>>24&255,r>>>16&255,r>>>8&255,255&r,i>>>24&255,i>>>16&255,i>>>8&255,255&i,n>>>24&255,n>>>16&255,n>>>8&255,255&n,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s>>>24&255,s>>>16&255,s>>>8&255,255&s];return this.is224||c.push(a>>>24&255,a>>>16&255,a>>>8&255,255&a),c},S.prototype.array=S.prototype.digest,S.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e},M.prototype=new S,M.prototype.finalize=function(){if(S.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();S.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),S.prototype.finalize.call(this)}};var P=m();P.sha256=P,P.sha224=m(!0),P.sha256.hmac=A(),P.sha224.hmac=A(!0),c?e.exports=P:(o.sha256=P.sha256,o.sha224=P.sha224,d&&(void 0===(i=function(){return P}.call(P,r,P,e))||(e.exports=i)))}()}},t={};function r(i){var n=t[i];if(void 0!==n)return n.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,r),o.exports}r.amdO={},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),(()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,r,i){return(r=function(t){var r=function(t){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,"string");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(r)?r:r+""}(r))in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}const i="v0.48.0";async function n(e){const t=await w("/config",e,{method:"GET",headers:{Accept:"application/json"}});return new m(e).setSite(t),t}const o={"Europe/Vienna":"gdpr","Europe/Brussels":"gdpr","Europe/Sofia":"gdpr","Europe/Zagreb":"gdpr","Asia/Nicosia":"gdpr","Europe/Nicosia":"gdpr","Europe/Prague":"gdpr","Europe/Copenhagen":"gdpr","Europe/Tallinn":"gdpr","Europe/Helsinki":"gdpr","Europe/Paris":"gdpr","Europe/Berlin":"gdpr","Europe/Athens":"gdpr","Europe/Budapest":"gdpr","Atlantic/Reykjavik":"gdpr","Europe/Dublin":"gdpr","Europe/Rome":"gdpr","Europe/Riga":"gdpr","Europe/Vaduz":"gdpr","Europe/Vilnius":"gdpr","Europe/Luxembourg":"gdpr","Europe/Malta":"gdpr","Europe/Oslo":"gdpr","Europe/Warsaw":"gdpr","Europe/Lisbon":"gdpr","Europe/Bucharest":"gdpr","Europe/Bratislava":"gdpr","Europe/Ljubljana":"gdpr","Europe/Madrid":"gdpr","Europe/Stockholm":"gdpr","Europe/Amsterdam":"gdpr","Atlantic/Azores":"gdpr","Atlantic/Canary":"gdpr","America/Cayenne":"gdpr","America/Guadeloupe":"gdpr","Atlantic/Madeira":"gdpr","America/Martinique":"gdpr","Indian/Mayotte":"gdpr","Indian/Reunion":"gdpr","America/Marigot":"gdpr","Europe/Zurich":"gdpr","Europe/London":"gdpr","America/Toronto":"can","America/Adak":"us","America/Anchorage":"us","America/Atka":"us","America/Boise":"us","America/Chicago":"us","America/Denver":"us","America/Detroit":"us","America/Indiana/Indianapolis":"us","America/Indiana/Knox":"us","America/Indiana/Marengo":"us","America/Indiana/Petersburg":"us","America/Indiana/Tell_City":"us","America/Indiana/Vevay":"us","America/Indiana/Vincennes":"us","America/Indiana/Winamac":"us","America/Indianapolis":"us","America/Juneau":"us","America/Kentucky/Louisville":"us","America/Kentucky/Monticello":"us","America/Knox_IN":"us","America/Los_Angeles":"us","America/Louisville":"us","America/Menominee":"us","America/Metlakatla":"us","America/New_York":"us","America/Nome":"us","America/North_Dakota/Beulah":"us","America/North_Dakota/Center":"us","America/North_Dakota/New_Salem":"us","America/Phoenix":"us","America/Shiprock":"us","America/Sitka":"us","America/Yakutat":"us","Pacific/Honolulu":"us"},s=[2],a=[5],c=[7,8,10,12,17,13,18,14,19,20,21,15,22,16,11,9];function d(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=function(e,t){const{gdprApplies:r,gppSectionIDs:i,gdprData:n}=t;if(void 0!==r)return r?"gdpr":"gdpr"===e?null:e;if(void 0!==n&&"gdpr"===e)return"gdpr";if(void 0===i||1===i.length&&0===i[0])return e;if(1===i.length&&-1===i[0])return null;if(i.some(e=>s.includes(e)))return"gdpr";if(i.some(e=>a.includes(e)))return"can";if(i.some(e=>c.includes(e)))return"us";switch(e){case"gdpr":if(!i.some(e=>s.includes(e)))return null;break;case"can":if(!i.some(e=>a.includes(e)))return null;break;case"us":if(!i.some(e=>c.includes(e)))return null}return e}(e,t),n={reg:i,gpp:t.gppString,gppSectionIDs:t.gppSectionIDs,gdpr:t.gdprString,gdprApplies:t.gdprApplies,deviceAccess:!1,createProfilesForAdvertising:!1,useProfilesForAdvertising:!1,measureAdvertisingPerformance:!1};switch(i){case"gdpr":t.gdprData?(n.deviceAccess=l(t.gdprData,1,r.tcfeuVendorID),n.createProfilesForAdvertising=l(t.gdprData,3,r.tcfeuVendorID),n.useProfilesForAdvertising=l(t.gdprData,4,r.tcfeuVendorID),n.measureAdvertisingPerformance=l(t.gdprData,7,r.tcfeuVendorID)):t.gppData&&(n.deviceAccess=h(t.gppData,1,r.tcfeuVendorID),n.createProfilesForAdvertising=h(t.gppData,3,r.tcfeuVendorID),n.useProfilesForAdvertising=h(t.gppData,4,r.tcfeuVendorID),n.measureAdvertisingPerformance=h(t.gppData,7,r.tcfeuVendorID));break;case"can":n.deviceAccess=!0,t.gppData&&(n.createProfilesForAdvertising=f(t.gppData,3,r.tcfcaVendorID),n.useProfilesForAdvertising=f(t.gppData,4,r.tcfcaVendorID),n.measureAdvertisingPerformance=f(t.gppData,7,r.tcfcaVendorID));break;default:n.deviceAccess=!0,n.createProfilesForAdvertising=!0,n.useProfilesForAdvertising=!0,n.measureAdvertisingPerformance=!0}return n}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={};!function(){if("function"==typeof window.__tcfapi)return;let e;const t={};let r=window;for(;r;){try{if(r.frames.__tcfapiLocator){e=r;break}}catch(e){}if(r===window.top)break;r=r.parent}e&&(window.__tcfapi=function(r,i,n){const o=Math.random()+"";t[o]=n,e.postMessage({__tcfapiCall:{command:r,version:i,callId:o}},"*")},window.addEventListener("message",e=>{let r={};try{r="string"==typeof e.data?JSON.parse(e.data):e.data}catch(e){}const i=r.__tcfapiReturn;i&&"function"==typeof t[i.callId]&&(t[i.callId](i.returnValue,i.success),delete t[i.callId])},!1))}(),function(){if("function"==typeof window.__gpp)return;let e;const t={};let r=window;for(;r;){try{if(r.frames.__gppLocator){e=r;break}}catch(e){}if(r===window.top)break;r=r.parent}e&&(window.__gpp=function(r,i){const n=Math.random()+"";t[n]=i,e.postMessage({__gppCall:{command:r,version:"1.1",callId:n}},"*")},window.addEventListener("message",e=>{let r={};try{r="string"==typeof e.data?JSON.parse(e.data):e.data}catch(e){}const i=r.__gppReturn;i&&"function"==typeof t[i.callId]&&(t[i.callId](i.returnValue,i.success),delete t[i.callId])},!1))}();const i=d(e,r,t);return"function"==typeof window.__tcfapi&&(null===(s=(a=window).__tcfapi)||void 0===s||s.call(a,"addEventListener",2,(n,o)=>{o&&("tcloaded"===n.eventStatus||"useractioncomplete"===n.eventStatus)&&(n=>{r.gdprString=n.tcString,r.gdprApplies=n.gdprApplies,r.gdprData=n,Object.assign(i,d(e,r,t))})(n)})),"function"==typeof window.__gpp&&(null===(n=(o=window).__gpp)||void 0===n||n.call(o,"addEventListener",(n,o)=>{o&&"signalStatus"===n.eventName&&"ready"===n.data&&(n=>{r.gppString=n.gppString,r.gppSectionIDs=n.applicableSections,r.gppData=n,Object.assign(i,d(e,r,t))})(n.pingData)})),i;var n,o,s,a}function l(e,t,r){var i,n,o;return r?!(null===(n=e.purpose)||void 0===n||null===(n=n.consents)||void 0===n||!n[t]||null===(o=e.vendor)||void 0===o||null===(o=o.consents)||void 0===o||!o[r]):!(null===(i=e.publisher)||void 0===i||null===(i=i.consents)||void 0===i||!i[t])}function f(e,t,r){var i;const n=t>1,o=(null===(i=e.parsedSections)||void 0===i?void 0:i.tcfcav1)||[];if("number"==typeof r){const e=o.find(e=>"Version"in e);if(!e)return!1;let i=e.PurposesExpressConsent.includes(t)&&e.VendorExpressConsent.includes(r);return n&&(i||(i=e.PurposesImpliedConsent.includes(t)&&e.VendorImpliedConsent.includes(r))),i}const s=o.find(e=>"SubsectionType"in e&&3===e.SubsectionType);if(!s)return!1;let a=s.PubPurposesExpressConsent.includes(t);return n&&(a||(a=s.PubPurposesImpliedConsent.includes(t))),a}function h(e,t,r){var i;const n=t>1,o=(null===(i=e.parsedSections)||void 0===i?void 0:i.tcfeuv2)||[];if("number"==typeof r){const e=o.find(e=>"Version"in e);if(!e)return!1;let i=e.PurposeConsent.includes(t)&&e.VendorConsent.includes(r);return n&&(i||(i=e.PurposesLITransparency.includes(t)&&e.VendorLegitimateInterest.includes(r))),i}const s=o.find(e=>"SegmentType"in e&&3===e.SegmentType);if(!s)return!1;let a=s.PubPurposesConsent.includes(t);return n&&(a||(a=s.PubPurposesLITransparency.includes(t))),a}class p{constructor(e){t(this,"consent",void 0),this.consent=e}getItem(e){return this.consent.deviceAccess?window.localStorage.getItem(e):null}setItem(e,t){this.consent.deviceAccess&&window.localStorage.setItem(e,t)}removeItem(e){this.consent.deviceAccess&&window.localStorage.removeItem(e)}}const g="_optable_pairId";function b(e){const t=new Uint16Array(e.length);for(let r=0;r<t.length;r++)t[r]=e.charCodeAt(r);return btoa(String.fromCharCode(...new Uint8Array(t.buffer)))}function v(e){return e.node?b("".concat(e.host,"/").concat(e.node)):b("".concat(e.host))}class m{constructor(e){t(this,"passportKeys",void 0),t(this,"targetingKeys",void 0),t(this,"siteKeys",void 0),t(this,"pairKeys",void 0),t(this,"storage",void 0),this.config=e,this.passportKeys=function(e){const t=[],r=[],i="OPTABLE_PASSPORT_".concat(v(e));return t.push(i),r.push(i),e.legacyHostCache?(r.push("OPTABLE_PASSPORT_".concat(b("".concat(e.legacyHostCache)))),r.push("OPTABLE_PASS_".concat(b("".concat(e.legacyHostCache,"/").concat(e.site))))):r.push("OPTABLE_PASS_".concat(b("".concat(e.host,"/").concat(e.site)))),{write:t,read:r}}(e),this.targetingKeys=function(e){const t="OPTABLE_TARGETING_".concat(v(e));return{write:[t,e.optableCacheTargeting],read:[t]}}(e),this.siteKeys=function(e){const t="OPTABLE_SITE_".concat(v(e));return{write:[t],read:[t]}}(e),this.pairKeys={write:[g],read:[g]},this.storage=new p(this.config.consent)}getPassport(){return this.readStorageKeys(this.passportKeys)}setPassport(e){this.writeToStorageKeys(this.passportKeys,e)}getTargeting(){const e=this.readStorageKeys(this.targetingKeys);return e?JSON.parse(e):null}setTargeting(e){e&&(this.writeToStorageKeys(this.targetingKeys,JSON.stringify(e)),this.setPairIDs(e))}getSite(){const e=this.readStorageKeys(this.siteKeys);return e?JSON.parse(e):null}setSite(e){e&&this.writeToStorageKeys(this.siteKeys,JSON.stringify(e))}setPairIDs(e){var t;const r=null===(t=e.ortb2)||void 0===t||null===(t=t.user)||void 0===t||null===(t=t.eids)||void 0===t?void 0:t.filter(e=>"pair-protocol.com"===e.source),i=null==r?void 0:r.flatMap(e=>e.uids);if(!i)return;const n=new Set(i.map(e=>e.id));this.writeToStorageKeys(this.pairKeys,btoa(JSON.stringify({envelope:[...n]})))}getPairIDs(){var e;const t=this.readStorageKeys(this.pairKeys);return t?null===(e=JSON.parse(atob(t)))||void 0===e?void 0:e.envelope:null}readStorageKeys(e){for(const t of e.read){const e=this.storage.getItem(t);if(e)return e}return null}writeToStorageKeys(e,t){if(t)for(const r of e.write)this.storage.setItem(r,t)}clearStorageKeys(e){for(const t of[...e.read,...e.write])this.storage.removeItem(t)}clearPassport(){this.clearStorageKeys(this.passportKeys)}clearTargeting(){this.clearStorageKeys(this.targetingKeys)}clearSite(){this.clearStorageKeys(this.siteKeys)}}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}async function w(e,r,n){const o=await globalThis.fetch(function(e,r,n){const{host:o,cookies:s}=r,a=new URL(e,"https://".concat(o));if(a.searchParams.set("osdk","web-".concat(i)),a.searchParams.set("sid",r.sessionID),r.skipEnrichment&&a.searchParams.set("skip_enrichment","".concat(r.skipEnrichment)),r.node&&a.searchParams.set("t",r.node),r.site&&a.searchParams.set("o",r.site),void 0!==r.consent.gpp&&a.searchParams.set("gpp",r.consent.gpp),void 0!==r.consent.gppSectionIDs&&a.searchParams.set("gpp_sid",r.consent.gppSectionIDs.join(",")),void 0!==r.consent.gdpr&&a.searchParams.set("gdpr_consent",r.consent.gdpr),void 0!==r.consent.gdprApplies&&a.searchParams.set("gdpr",Number(r.consent.gdprApplies).toString()),r.readOnly&&a.searchParams.set("ro","true"),r.timeout&&a.searchParams.set("timeout",r.timeout),s)a.searchParams.set("cookies","yes");else{const e=new m(r).getPassport();a.searchParams.set("cookies","no"),a.searchParams.set("passport",e||"")}const c=function(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?y(Object(i),!0).forEach(function(r){t(e,r,i[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):y(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}({},n);return c.credentials=r.consent.deviceAccess?"include":"omit",r.mockedIP&&(c.headers=new Headers(c.headers),c.headers.set("X-Forwarded-For",r.mockedIP)),new Request(a.toString(),c)}(e,r,n)),s=o.headers.get("Content-Type"),a=null!=s&&s.startsWith("application/json")?await o.json():await o.text();if(!o.ok)throw new Error(a.error);return a.passport&&(new m(r).setPassport(a.passport),delete a.passport),a}var A,S,M,P=((S=P||{})[S.Banner=1]="Banner",S[S.Video=2]="Video",S[S.Audio=3]="Audio",S[S.Native=4]="Native",S),_={},O={},k={};(M=A||(A={})).Placement=O,M.Media=k,M.Context=_;const F={cookies:!0,initPassport:!0,readOnly:!1,experiments:[],consent:{reg:null,deviceAccess:!0,createProfilesForAdvertising:!0,useProfilesForAdvertising:!0,measureAdvertisingPerformance:!0}};function E(){const e=new Uint8Array(16);return crypto.getRandomValues(e),btoa(String.fromCharCode(...e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")}function x(e){var t,r;return{user:{data:(null!==(t=null==e?void 0:e.audience)&&void 0!==t?t:[]).map(e=>({name:e.provider,segment:e.ids,ext:{segtax:e.rtb_segtax}})),ext:{eids:(null!==(r=null==e?void 0:e.user)&&void 0!==r?r:[]).map(e=>({source:e.provider,uids:e.ids.map(e=>{let{id:t}=e;return{id:t,atype:3}})}))}}}}function I(e){const t={};if(!e)return t;for(const i of null!==(r=e.audience)&&void 0!==r?r:[]){var r;i.keyspace&&(i.keyspace in t||(t[i.keyspace]=[]),t[i.keyspace].push(...i.ids.map(e=>e.id)))}return t}function T(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function B(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function R(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?B(Object(i),!0).forEach(function(r){t(e,r,i[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):B(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function C(){const e={};let t=0;return{refs:e,process:(r,i)=>{if(!r.refs)return i;for(const o of i.uids){var n;if(T(null===(n=o.ext)||void 0===n?void 0:n.optable)&&"ref"in o.ext.optable&&"string"==typeof o.ext.optable.ref){const i=r.refs[o.ext.optable.ref];t+=1;const n=t.toString(10);e[n]=i,o.ext.optable.ref=n}}return i}}}function L(e){var t;const r={title:document.title||""},i=document.querySelector('meta[name="description"]');if(i){const e=i.getAttribute("content");e&&(r.description=e)}const n=document.querySelector('meta[name="keywords"]');if(n){const e=n.getAttribute("content");e&&(r.keywords=e.split(",").map(e=>e.trim()).filter(Boolean))}const o=document.querySelector('link[rel="canonical"]');if(o){const e=o.getAttribute("href");e&&(r.canonicalUrl=e)}const s={};document.querySelectorAll('meta[property^="og:"]').forEach(e=>{const t=e.getAttribute("property"),r=e.getAttribute("content");if(t&&r){const e=t.replace("og:","");s[e]=r}}),Object.keys(s).length>0&&(r.ogTags=s);const a=[];document.querySelectorAll("h1, h2, h3").forEach(e=>{var t;if(a.length>=20)return;const r=parseInt(e.tagName.substring(1),10),i=null===(t=e.textContent)||void 0===t?void 0:t.trim();i&&a.push({level:r,text:i})}),a.length>0&&(r.headings=a);const c=null!==(t=e.maxContentLength)&&void 0!==t?t:5e3,d=function(e){if(e)return document.querySelector(e);const t=["main","article",'[role="main"]',".content","#content",".post",".article"];for(const e of t){const t=document.querySelector(e);if(t)return t}return document.body}(e.contentSelector);if(d){const e=(u=d)instanceof HTMLElement&&u.innerText?u.innerText.trim():"";e&&(r.content=e.substring(0,c))}var u;const l=document.querySelectorAll('script[type="application/ld+json"]'),f=[];l.forEach(e=>{try{const t=JSON.parse(e.textContent||"");t&&"object"==typeof t&&f.push(t)}catch(e){}}),f.length>0&&(r.jsonLd=f);const h=document.documentElement.getAttribute("lang");return h&&(r.language=h),r}function N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function D(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?N(Object(i),!0).forEach(function(r){t(e,r,i[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):N(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}var j=r(966);class V{constructor(e){var r;t(this,"dcn",void 0),t(this,"init",void 0),t(this,"contextSent",!1),t(this,"contextConfig",null),this.dcn=function(e){var t,r,i,n,s,a,c,d;const l={host:e.host,site:e.site,optableCacheTargeting:null!==(t=e.optableCacheTargeting)&&void 0!==t?t:"optable-cache:targeting",cookies:null!==(r=e.cookies)&&void 0!==r?r:F.cookies,initPassport:null!==(i=e.initPassport)&&void 0!==i?i:F.initPassport,consent:F.consent,readOnly:null!==(n=e.readOnly)&&void 0!==n?n:F.readOnly,node:e.node,legacyHostCache:e.legacyHostCache,experiments:null!==(s=e.experiments)&&void 0!==s?s:F.experiments,mockedIP:e.mockedIP,sessionID:null!==(a=e.sessionID)&&void 0!==a?a:E(),skipEnrichment:e.skipEnrichment,initTargeting:e.initTargeting,abTests:e.abTests,additionalTargetingSignals:e.additionalTargetingSignals,timeout:e.timeout};return null!==(c=e.consent)&&void 0!==c&&c.static?l.consent=e.consent.static:null!==(d=e.consent)&&void 0!==d&&d.cmpapi&&(l.consent=u(function(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone,t=o[e];return"can"===t?["fr","fr-CA"].some(e=>navigator.languages.includes(e))?"can":null:null!=t?t:null}(),e.consent.cmpapi)),l}(e),this.contextConfig=(r=e.pageContext)?!0===r?{}:r:null,this.init=this.initialize()}async initialize(){this.dcn.initPassport&&await n(this.dcn).catch(()=>{}),this.dcn.initTargeting&&this.targeting().catch(()=>{})}async identify(){await this.init;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e,t){return w("/identify",e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}(this.dcn,t.filter(e=>e))}async uid2Token(e){return await this.init,function(e,t){return w("/uid2/token",e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}(this.dcn,e)}async targeting(){const e=function(e){if("string"==typeof e)return{ids:[e],hids:[]};var t,r;if(T(e))return{ids:null!==(t=null==e?void 0:e.ids)&&void 0!==t?t:[],hids:null!==(r=null==e?void 0:e.hids)&&void 0!==r?r:[]};throw"Invalid request type for targeting. Expected string or object."}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__passport__");return await this.init,async function(e,t){var r;const i=new URLSearchParams;t.ids.forEach(e=>i.append("id",e)),t.hids.forEach(e=>i.append("hid",e));const n=function(e){if(!e||0===e.length)return null;if(e.reduce((e,t)=>e+t.trafficPercentage,0)>100)return console.error("AB Test Config Error: Traffic Percentage Sum Exceeds 100%"),null;const t=Math.floor(100*Math.random());let r=0;for(const i of e)if(r+=i.trafficPercentage,t<r)return i;return null}(e.abTests);n&&(i.append("ab_test_id",n.id),n.matcher_override&&[...n.matcher_override].sort((e,t)=>e.rank-t.rank).forEach(e=>{i.append("matcher_override",e.id)}),n.skipMatchers&&i.append("skip_matchers",n.skipMatchers.join(",")),n.skipResolvers&&i.append("skip_resolvers",n.skipResolvers.join(",")));null!==(r=e.additionalTargetingSignals)&&void 0!==r&&r.ref&&i.append("ref","".concat(window.location.protocol,"//").concat(window.location.host).concat(window.location.pathname));const o="/v2/targeting?"+i.toString(),s=await w(o,e,{method:"GET",headers:{Accept:"application/json"}});return s&&(new m(e).setTargeting(s),function(e,t){var r,i,n,o;const s=null===(r=t.ortb2)||void 0===r||null===(r=r.user)||void 0===r||null===(r=r.eids)||void 0===r?void 0:r.map(e=>e.matcher);window.dispatchEvent(new CustomEvent("optable-targeting:change",{detail:{instance:e.node||e.host,resolved:!(null===(i=t.ortb2)||void 0===i||null===(i=i.user)||void 0===i||null===(i=i.eids)||void 0===i||!i.length),resolvedIDs:null!==(n=t.resolved_ids)&&void 0!==n?n:[],abTestID:null!==(o=t.ab_test_id)&&void 0!==o?o:void 0,ortb2:t.ortb2,provenance:new Set(s)}}))}(e,s)),s}(this.dcn,e)}targetingFromCache(){return e=this.dcn,new m(e).getTargeting();var e}async site(){return n(this.dcn)}siteFromCache(){return e=this.dcn,new m(e).getSite();var e}targetingClearCache(){var e;e=this.dcn,new m(e).clearTargeting()}async prebidORTB2(){return x(await this.targeting())}prebidORTB2FromCache(){return x(this.targetingFromCache())}async targetingKeyValues(){return I(await this.targeting())}targetingKeyValuesFromCache(){return I(this.targetingFromCache())}async witness(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return await this.init,i.includeContext&&this.contextConfig&&!this.contextSent&&(t=function(e){const t={semantic:L(e),url:window.location.href,extractedAt:Date.now()};if(document.referrer&&(t.referrer=document.referrer),e.includeHtml){var r;const i=null!==(r=e.maxHtmlLength)&&void 0!==r?r:5e4;t.html=document.documentElement.outerHTML.substring(0,i)}return t}(this.contextConfig),this.contextSent=!0),function(e,t,r,i){const n={event:t,properties:r};return i&&(n.pageContext=i),w("/witness",e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}(this.dcn,e,r,t)}resetContext(){this.contextSent=!1}async profile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return await this.init,function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const n=D(D({traits:t},r&&{id:r}),i&&{neighbors:i});return w("/profile",e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}(this.dcn,e,t,r)}async tokenize(e){return await this.init,function(e,t){let r={id:t};return w("/v2/tokenize",e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)})}(this.dcn,e)}async resolve(e){return await this.init,async function(e,t){const r=new URLSearchParams;"string"==typeof t&&r.append("id",t);const i="/v1/resolve?"+r.toString();return function(e){const t={clusters:[],lmpid:""};if("object"!=typeof e||null===e)return t;if("lmpid"in e&&"string"==typeof(null==e?void 0:e.lmpid)&&(t.lmpid=e.lmpid),!("clusters"in e)||!Array.isArray(null==e?void 0:e.clusters))return t;for(const r of e.clusters){const e={ids:[],traits:[]};if(Array.isArray(null==r?void 0:r.ids))for(const t of r.ids)"string"==typeof t&&e.ids.push(t);if(Array.isArray(null==r?void 0:r.traits))for(const t of r.traits)"string"==typeof(null==t?void 0:t.key)&&"string"==typeof(null==t?void 0:t.value)&&e.traits.push({key:t.key,value:t.value});(e.ids.length>0||e.traits.length>0)&&t.clusters.push(e)}return t}(await w(i,e,{method:"GET",headers:{Accept:"application/json"}}))}(this.dcn,e)}static eid(e){return e?"e:"+j.sha256.hex(e.toLowerCase().trim()):""}static sha256(e){return e?j.sha256.hex(e):""}static cid(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r="c:";if("string"!=typeof e)throw new Error("Invalid ppid");if("number"!=typeof t||isNaN(t)||t<0||t>19)throw new Error("Invalid variant");return t>0&&(r="c".concat(t,":")),e?r+e.trim():""}static TargetingKeyValues(e){return I(e)}static PrebidORTB2(e){return x(e)}}t(V,"version",i);const W=V;var z=r(704);const q="REQUESTED",U="RECEIVED",K="NO_BID",G="TIMEOUT",H="optable:prebid:analytics:sample-number";function J(e){var t,r,i,n,o,s,a,c,d,u;return{advertiser_id:null===(t=e.advertiserId)||void 0===t?void 0:t.toString(),campaign_id:null===(r=e.campaignId)||void 0===r?void 0:r.toString(),creative_id:null===(i=e.creativeId)||void 0===i?void 0:i.toString(),is_empty:null===(n=e.isEmpty)||void 0===n?void 0:n.toString(),line_item_id:null===(o=e.lineItemId)||void 0===o?void 0:o.toString(),service_name:null===(s=e.serviceName)||void 0===s?void 0:s.toString(),size:null===(a=e.size)||void 0===a?void 0:a.toString(),slot_element_id:null===(c=e.slot)||void 0===c?void 0:c.getSlotElementId(),source_agnostic_creative_id:null===(d=e.sourceAgnosticCreativeId)||void 0===d?void 0:d.toString(),source_agnostic_line_item_id:null===(u=e.sourceAgnosticLineItemId)||void 0===u?void 0:u.toString()}}W.prototype.installGPTEventListeners=function(e){const t=this;t.installGPTEventListeners=function(){},window.googletag=window.googletag||{cmd:[]};const r=window.googletag,i=["slotRenderEnded","impressionViewable"];function n(e,t){if(!e||!t||!t.length)return{};const r={};for(const i of t)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r}r.cmd.push(function(){try{const o=r.pubads&&r.pubads();if(!o||"function"!=typeof o.addEventListener)return;const s=e?Object.keys(e):i;for(const r of s){const i=e?e[r]:"all";o.addEventListener(r,function(e){const o=J(e),s=Array.isArray(i)&&i.length?n(o,i):o;Object.keys(s).length>0&&t.witness("gpt_events_"+r.replace(/[A-Z]/g,e=>"_"+e.toLowerCase()),s)})}}catch(e){}})},W.prototype.installGPTSecureSignals=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];window.googletag=window.googletag||{cmd:[]};const i=window.googletag;t&&t.length>0&&i.cmd.push(()=>{t.forEach(e=>{let{provider:t,id:r}=e;i.secureSignalProviders.push({id:t,collectorFunction:()=>Promise.resolve(r)})})})};const Y=/^[a-f0-9]{64}$/i;W.prototype.tryIdentifyFromParams=function(e,t){const r=new RegExp("^".concat(e||"oeid","$"),"i"),i=new URLSearchParams(window.location.search);let n="";for(const[e,t]of i)if(r.test(e)){n=t;break}""!=n&&(t||function(e){return Y.test(e)}(n))&&this.identify((t||"e")+":"+n)},window.optable=window.optable||{},window.optable.SDK=W,window.optable.OptablePrebidAnalytics=class{constructor(e){var r,i,n,o,s;let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{samplingRate:1,samplingVolume:"event",bidWinTimeout:1e4};if(t(this,"isInitialized",!1),t(this,"labelStyle","color: white; background-color: #9198dc; padding: 2px 4px; border-radius: 2px;"),t(this,"maxAuctionDataSize",50),t(this,"auctions",new Map),t(this,"prebidInstance",void 0),this.optableInstance=e,this.config=a,!e||"function"!=typeof e.witness)throw new Error("OptablePrebidAnalytics requires a valid optable instance with witness() method");this.config.debug=null!==(r=a.debug)&&void 0!==r&&r,this.config.bidWinTimeout=null!==(i=a.bidWinTimeout)&&void 0!==i?i:1e4,this.config.samplingRate=null!==(n=a.samplingRate)&&void 0!==n?n:1,this.config.samplingVolume=null!==(o=a.samplingVolume)&&void 0!==o?o:"event","session"===this.config.samplingVolume?sessionStorage.setItem(H,Math.random().toFixed(2)):sessionStorage.removeItem(H),sessionStorage.optableSessionDepth=(Number(null===(s=sessionStorage)||void 0===s?void 0:s.optableSessionDepth)||0)+1,this.isInitialized=!0,this.maxAuctionDataSize=50,this.log("OptablePrebidAnalytics initialized")}log(){if(this.config.debug){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];console.log("%cOptable%c [OptablePrebidAnalytics]",this.labelStyle,"color: inherit;",...t)}}shouldSample(){if(this.config.samplingRate<=0)return!1;if(this.config.samplingRate>=1)return!0;if(this.config.samplingRateFn)return this.config.samplingRateFn();if("session"===this.config.samplingVolume)return Number(sessionStorage.getItem(H)||"1")<this.config.samplingRate;if(this.config.samplingSeed){return[...this.config.samplingSeed].reduce((e,t)=>e+t.charCodeAt(0),0)%1e4/1e4<this.config.samplingRate}return Math.random()<this.config.samplingRate}async sendToWitnessAPI(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.config.analytics)return this.log("Witness API calls disabled - would send:",e,t),{disabled:!0,eventName:e,properties:t};if(!this.shouldSample())return this.log("Event not sampled - skipping Witness API call for:",e,t),{disabled:!0,eventName:e,properties:t};try{await this.optableInstance.witness(e,t),this.log("Sending to Witness API:",e,t)}catch(r){throw this.log("Error sending to Witness API:",e,t,r),r}return{disabled:!1,eventName:e,properties:t}}setHooks(e){this.log("Processing missed auctionEnd"),e.getEvents().forEach(e=>{"auctionEnd"===e.eventType&&(this.log("auction missed"),this.trackAuctionEnd(e.args,!0)),"bidWon"===e.eventType&&(this.log("bid won missed"),this.trackBidWon(e.args,!0))}),this.log("Hooking into Prebid.js events"),e.onEvent("auctionEnd",e=>{this.log("auctionEnd event received"),this.trackAuctionEnd(e)}),e.onEvent("bidWon",e=>{this.log("bidWon event received"),this.trackBidWon(e)})}hookIntoPrebid(){const e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.pbjs;return this.prebidInstance=e,void 0===e?(this.log("Prebid.js not found"),!1):("function"!=typeof e.onEvent?(e.que=e.que||[],e.que.push(()=>this.setHooks(e))):this.setHooks(e),!0)}async trackAuctionEnd(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{auctionId:r,timeout:i,bidderRequests:n=[],bidsReceived:o=[],noBids:s=[],timeoutBids:a=[]}=e;this.log("Processing auction ".concat(r," with ").concat(n.length," bidder requests")),window.optable=window.optable||{},window.optable.pageAuctionsCount=(Number(window.optable.pageAuctionsCount)||0)+1;const c={auctionId:r,timeout:i,bidderRequests:n.map(e=>{var t,r,i,n;const{bidderCode:o,bidderRequestId:s,bids:a=[]}=e,c=null!==(t=null===(r=e.ortb2.site)||void 0===r?void 0:r.domain)&&void 0!==t?t:"unknown",d=(null!==(i=null===(n=e.ortb2.user)||void 0===n?void 0:n.eids)&&void 0!==i?i:[]).filter(e=>"optable.co"===e.inserter),u=[...new Set(d.map(e=>e.matcher).filter(Boolean))],l=[...new Set(d.map(e=>e.source).filter(Boolean))];return{bidderCode:o,bidderRequestId:s,domain:c,hasOEids:d.length>0,optableMatchers:u,optableSources:l,status:q,bids:a.map(e=>{var t,r;return{bidId:e.bidId,bidderRequestId:s,adUnitCode:e.adUnitCode,adUnitId:e.adUnitId,transactionId:e.transactionId,src:e.src,floorMin:null===(t=e.floorData)||void 0===t?void 0:t.floorMin,splitTestAssignment:null===(r=e.ortb2Imp)||void 0===r||null===(r=r.ext)||void 0===r||null===(r=r.optable)||void 0===r?void 0:r.splitTestAssignment,status:q}})}})},d={},u={},l={};c.bidderRequests.forEach(e=>{d[e.bidderRequestId]=e,e.bids.forEach(t=>{u[t.bidId]=t,l[t.bidId]=e})}),o.forEach(e=>{const t=e.requestId,r=l[t];if(!r)return void this.log("No bidderRequest found for bidId=".concat(t));let i=u[t];var n,o;i?Object.assign(i,{status:U,cpm:e.cpm,size:"".concat(e.width,"x").concat(e.height),currency:e.currency,splitTestAssignment:null===(n=e.ortb2Imp)||void 0===n||null===(n=n.ext)||void 0===n||null===(n=n.optable)||void 0===n?void 0:n.splitTestAssignment}):(i={bidId:t,bidderRequestId:r.bidderRequestId,adUnitCode:e.adUnitCode,adUnitId:e.adUnitId,transactionId:e.transactionId,src:e.src,cpm:e.cpm,size:"".concat(e.width,"x").concat(e.height),currency:e.currency,status:U,splitTestAssignment:null===(o=e.ortb2Imp)||void 0===o||null===(o=o.ext)||void 0===o||null===(o=o.optable)||void 0===o?void 0:o.splitTestAssignment},r.bids.push(i),u[t]=i,l[t]=r),r.status===q&&(r.status=U)}),s.forEach(e=>{const t=d[e.bidderRequestId];t&&(t.status=K,t.bids.forEach(e=>{e.status=K}))}),a.forEach(e=>{const t=d[e.bidderRequestId];t&&(t.status=G,t.bids.forEach(e=>{e.status=G}))});const f=new Date,h=setTimeout(async()=>{const r=await this.toWitness(e,null,t);r.auctionEndAt=f.toISOString(),r.bidWonAt=null,r.optableLoaded=!t,this.sendToWitnessAPI("optable.prebid.auction",r)},this.config.bidWinTimeout);this.auctions.set(r,{auctionEnd:e,createdAt:f,missed:t,auctionEndTimeoutId:h}),this.cleanupOldAuctions()}async trackBidWon(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r={auctionId:e.auctionId,bidderCode:e.bidderCode,bidId:e.requestId,tenant:this.config.tenant,missed:t};this.log("bidWon filtered event",r);const i=this.auctions.get(e.auctionId);if(!i)return void this.log("Missing 'auctionEnd' event. Skipping.");i.auctionEndTimeoutId&&clearTimeout(i.auctionEndTimeoutId);const n=await this.toWitness(i.auctionEnd,e,t);n.auctionEndAt=i.createdAt.toISOString(),n.bidWonAt=(new Date).toISOString(),n.optableLoaded=!t,this.sendToWitnessAPI("optable.prebid.auction",n),this.auctions.delete(e.auctionId)}cleanupOldAuctions(){const e=[...this.auctions.keys()];if(e.length>this.maxAuctionDataSize){const t=e[0];this.auctions.delete(t),this.log("Cleaned up old auction: ".concat(t))}}clearData(){this.auctions.clear(),this.log("All analytics data cleared")}async toWitness(e,t){var r,i,n,o;let s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{auctionId:a,bidderRequests:c=[],bidsReceived:d=[],noBids:u=[],timeoutBids:l=[]}=e,f=new Set,h=new Set;let p=null;const g=c.map(e=>{var t,r,i,n;const{bidderCode:o,bidderRequestId:s,bids:a=[]}=e,c=null!==(t=null===(r=e.ortb2.site)||void 0===r?void 0:r.domain)&&void 0!==t?t:"unknown",d=(null!==(i=null===(n=e.ortb2.user)||void 0===n?void 0:n.eids)&&void 0!==i?i:[]).filter(e=>"optable.co"===e.inserter),u=[...new Set(d.map(e=>e.matcher).filter(Boolean))],l=[...new Set(d.map(e=>e.source).filter(Boolean))];return p=e.ortb2.device,{bidderCode:o,bidderRequestId:s,domain:c,optableTargetingDone:d.length>0,optableMatchers:u,optableSources:l,status:q,bids:a.map(e=>{var t,r;return{bidId:e.bidId,bidderRequestId:s,adUnitCode:e.adUnitCode,adUnitId:e.adUnitId,transactionId:e.transactionId,src:e.src,floorMin:null===(t=e.floorData)||void 0===t?void 0:t.floorMin,splitTestAssignment:null===(r=e.ortb2Imp)||void 0===r||null===(r=r.ext)||void 0===r||null===(r=r.optable)||void 0===r?void 0:r.splitTestAssignment,status:q}})}}),b=new Map(d.map(e=>[e.requestId,e]));g.forEach(e=>{e.bids.forEach(e=>{var t;const r=b.get(e.bidId);null!=r&&null!==(t=r.ortb2Imp)&&void 0!==t&&null!==(t=t.ext)&&void 0!==t&&null!==(t=t.optable)&&void 0!==t&&t.splitTestAssignment&&(e.splitTestAssignment=r.ortb2Imp.ext.optable.splitTestAssignment)})});const v={bidderRequests:g.map(e=>(e.optableMatchers.forEach(e=>f.add(e)),e.optableSources.forEach(e=>h.add(e)),e)),auctionId:a,adUnitCode:"unknown",totalRequests:c.length,optableSampling:this.config.samplingRate||1,optableTargetingDone:f.size||h.size,optableMatchers:Array.from(f),optableSources:Array.from(h),bidWon:t?{message:t.bidderCode+" won the ad server auction for ad unit "+t.adUnitCode+" at "+t.cpm+" CPM",bidderCode:t.bidderCode,adUnitCode:t.adUnitCode,cpm:t.cpm}:null,missed:s,url:"".concat(window.location.hostname).concat(window.location.pathname),tenant:this.config.tenant,optableWrapperVersion:SDK_WRAPPER_VERSION||"unknown",userAgent:z.parse(window.navigator.userAgent),device:p,prebidjsVersion:(null===(r=this.prebidInstance)||void 0===r?void 0:r.version)||"unknown",sessionDepth:(null===(i=sessionStorage)||void 0===i?void 0:i.optableSessionDepth)||1,pageAuctionsCount:(null===(n=window.optable)||void 0===n?void 0:n.pageAuctionsCount)||1};return this.log("Auction ".concat(a," processed: ").concat(c.length," requests, ").concat(0," total bids, ").concat(d.length," received, ").concat(u.length," no-bids, ").concat(l.length," timeouts")),null!==(o=window.optable)&&void 0!==o&&o.customAnalytics&&await window.optable.customAnalytics().then(e=>{this.log("Adding custom data to payload ".concat(JSON.stringify(e))),Object.assign(v,e)}),v}},window.optable.cmd=new class{constructor(e){if(this.cmds=e,Array.isArray(this.cmds))for(const e of this.cmds)"function"==typeof e&&e()}push(e){e()}}(window.optable.cmd||[]),window.optable.utils={resolveMultiNodeTargeting:async function(e){return e?e.some(e=>e.priority)?async function(e){const t=new Set,r=new Set,{refs:i,process:n}=C(),o={user:{data:[],eids:[]}},s=new Map,a=new Map,c=new Map;const d=e.map(e=>{let{targetingFn:t,matcher:r,mm:i,priority:d}=e;return t().then(e=>function(e,t,r){var i,d,u;let l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const f=Math.max(0,l),{data:h=[],eids:p=[]}=null!==(i=null===(d=e.ortb2)||void 0===d?void 0:d.user)&&void 0!==i?i:{};o.user.data.push(...h),c.set(f,null!==(u=e.resolved_ids)&&void 0!==u?u:[]),p.filter(e=>e.uids.length).forEach(i=>{var o,c,d,u,l;const h=null!==(o=i.matcher)&&void 0!==o?o:t,p=null!==(c=s.get(f))&&void 0!==c?c:[];h&&s.set(f,[...p,h]);const g=R(R({},n(e,i)),{},{matcher:null!==(d=i.matcher)&&void 0!==d?d:t,mm:null!==(u=i.mm)&&void 0!==u?u:r}),b=null!==(l=a.get(f))&&void 0!==l?l:[];a.set(f,[...b,g])})}(e,r,i,d))});await Promise.allSettled(d);const u=Array.from(a.keys()).sort((e,t)=>e-t).filter(e=>{var t;return null===(t=a.get(e))||void 0===t?void 0:t.length}).shift();if(u){const e=s.get(u)||[],i=c.get(u)||[];o.user.eids.push(...a.get(u)||[]),e.forEach(e=>t.add(e)),i.forEach(e=>r.add(e))}return{ortb2:o,eidSources:t,refs:i,resolvedIds:r}}(e):async function(e){const t=new Set,r=new Set,{refs:i,process:n}=C(),o={user:{data:[],eids:[]}};const s=e.map(e=>{let{targetingFn:i,matcher:s,mm:a}=e;return i().then(e=>function(e,i,s){var a,c,d;const{data:u=[],eids:l=[]}=null!==(a=null===(c=e.ortb2)||void 0===c?void 0:c.user)&&void 0!==a?a:{};o.user.data.push(...u),null===(d=e.resolved_ids)||void 0===d||d.forEach(e=>r.add(e)),l.filter(e=>e.uids.length).forEach(r=>{var a,c,d;const u=null!==(a=r.matcher)&&void 0!==a?a:i;u&&t.add(u),o.user.eids.push(R(R({},n(e,r)),{},{mm:null!==(c=r.mm)&&void 0!==c?c:s,matcher:null!==(d=r.matcher)&&void 0!==d?d:i}))})}(e,s,a))});return await Promise.allSettled(s),{ortb2:o,eidSources:t,refs:i,resolvedIds:r}}(e):Promise.reject("No targeting rules provided")}},window.optable.instance_config&&(window.optable.instance=new W(window.optable.instance_config))})()})();
|
package/lib/dist/addons/gpt.js
CHANGED
|
@@ -14,24 +14,47 @@ function toWitnessProperties(event) {
|
|
|
14
14
|
source_agnostic_line_item_id: (_k = event.sourceAgnosticLineItemId) === null || _k === void 0 ? void 0 : _k.toString(),
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
* installGPTEventListeners() sets up event listeners on the Google Publisher Tag
|
|
19
|
-
* "slotRenderEnded" and "impressionViewable" page events, and calls witness()
|
|
20
|
-
* on the OptableSDK instance to send log data to a DCN.
|
|
21
|
-
*/
|
|
22
|
-
OptableSDK.prototype.installGPTEventListeners = function () {
|
|
17
|
+
OptableSDK.prototype.installGPTEventListeners = function (eventSpec) {
|
|
23
18
|
// Next time we get called is a no-op:
|
|
24
19
|
const sdk = this;
|
|
25
20
|
sdk.installGPTEventListeners = function () { };
|
|
26
21
|
window.googletag = window.googletag || { cmd: [] };
|
|
27
22
|
const gpt = window.googletag;
|
|
23
|
+
const DEFAULT_EVENTS = ["slotRenderEnded", "impressionViewable"];
|
|
24
|
+
function snakeCase(name) {
|
|
25
|
+
return name.replace(/[A-Z]/g, (m) => "_" + m.toLowerCase());
|
|
26
|
+
}
|
|
27
|
+
function filterProps(obj, keys) {
|
|
28
|
+
if (!obj || !keys || !keys.length)
|
|
29
|
+
return {};
|
|
30
|
+
const out = {};
|
|
31
|
+
for (const k of keys) {
|
|
32
|
+
if (Object.prototype.hasOwnProperty.call(obj, k)) {
|
|
33
|
+
out[k] = obj[k];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return out;
|
|
37
|
+
}
|
|
28
38
|
gpt.cmd.push(function () {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
39
|
+
try {
|
|
40
|
+
const pubads = gpt.pubads && gpt.pubads();
|
|
41
|
+
if (!pubads || typeof pubads.addEventListener !== "function")
|
|
42
|
+
return;
|
|
43
|
+
const eventsToRegister = eventSpec ? Object.keys(eventSpec) : DEFAULT_EVENTS;
|
|
44
|
+
for (const eventName of eventsToRegister) {
|
|
45
|
+
const keysOrAll = eventSpec ? eventSpec[eventName] : "all";
|
|
46
|
+
pubads.addEventListener(eventName, function (event) {
|
|
47
|
+
const fullProps = toWitnessProperties(event);
|
|
48
|
+
const propsToSend = Array.isArray(keysOrAll) && keysOrAll.length ? filterProps(fullProps, keysOrAll) : fullProps;
|
|
49
|
+
if (Object.keys(propsToSend).length > 0) {
|
|
50
|
+
sdk.witness("gpt_events_" + snakeCase(eventName), propsToSend);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
catch (e) {
|
|
56
|
+
// fail silently to avoid breaking host page
|
|
57
|
+
}
|
|
35
58
|
});
|
|
36
59
|
};
|
|
37
60
|
/*
|