@optable/web-sdk 0.48.0 → 0.50.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 CHANGED
@@ -1,8 +1,8 @@
1
- # Optable Web SDK [![Continuous Integration](https://github.com/Optable/optable-web-sdk/actions/workflows/pull-request.yml/badge.svg)](https://github.com/Optable/optable-web-sdk/actions/workflows/pull-request.yml)
1
+ # Optable Web SDK [![Continuous Integration](https://github.com/Optable/optable-web-sdk/actions/workflows/pull-request.yml/badge.svg)](https://github.com/Optable/optable-web-sdk/actions/workflows/pull-request.yml) <!-- omit in toc -->
2
2
 
3
3
  JavaScript SDK for integrating with an [Optable Data Connectivity Node (DCN)](https://docs.optable.co/) from a web site or web application.
4
4
 
5
- ## Contents
5
+ ## Contents <!-- omit in toc -->
6
6
 
7
7
  - [Installing](#installing)
8
8
  - [NPM module](#npm-module)
@@ -11,23 +11,43 @@ JavaScript SDK for integrating with an [Optable Data Connectivity Node (DCN)](ht
11
11
  - [Domains and Cookies](#domains-and-cookies)
12
12
  - [LocalStorage](#localstorage)
13
13
  - [Using the NPM module](#using-the-npm-module)
14
+ - [Initialization Configuration (`InitConfig`)](#initialization-configuration-initconfig)
15
+ - [Required Keys](#required-keys)
16
+ - [Optional Keys](#optional-keys)
17
+ - [Usage Example](#usage-example)
18
+ - [Security \& Privacy](#security--privacy)
14
19
  - [Identify API](#identify-api)
15
20
  - [Profile API](#profile-api)
16
21
  - [Targeting API](#targeting-api)
22
+ - [Single Identifier (Default)](#single-identifier-default)
23
+ - [Multiple Identifiers](#multiple-identifiers)
24
+ - [TypeScript Types](#typescript-types)
25
+ - [Caching Targeting Data](#caching-targeting-data)
17
26
  - [Witness API](#witness-api)
18
27
  - [Using a script tag](#using-a-script-tag)
28
+ - [Option 1: Automatic Initialization](#option-1-automatic-initialization)
29
+ - [Option 2: Manual Initialization with Commands Queue](#option-2-manual-initialization-with-commands-queue)
30
+ - [Integrating PrebidJS analytics](#integrating-prebidjs-analytics)
31
+ - [Script tag](#script-tag-1)
32
+ - [NPM package](#npm-package)
19
33
  - [Integrating GAM360](#integrating-gam360)
20
34
  - [Targeting key values](#targeting-key-values)
21
35
  - [Targeting key values from local cache](#targeting-key-values-from-local-cache)
22
36
  - [Witnessing ad events](#witnessing-ad-events)
23
- - [Passing Secure Signals to GAM](#gam-secure-signals)
37
+ - [GAM Secure Signals](#gam-secure-signals)
24
38
  - [Integrating Prebid](#integrating-prebid)
39
+ - [Open Pair ID Prebid Module](#open-pair-id-prebid-module)
25
40
  - [Seller Defined Audiences](#seller-defined-audiences)
26
41
  - [Custom key values](#custom-key-values)
27
42
  - [Identifying visitors arriving from Email newsletters](#identifying-visitors-arriving-from-email-newsletters)
28
43
  - [Insert oeid into your Email newsletter template](#insert-oeid-into-your-email-newsletter-template)
29
44
  - [Call tryIdentifyFromParams SDK API](#call-tryidentifyfromparams-sdk-api)
30
- - [Fetching Google Privacy Sandbox Topics](#fetching-google-privacy-sandbox-topics)
45
+ - [Passport and Visitor ID](#passport-and-visitor-id)
46
+ - [Multi-Node Targeting Resolver](#multi-node-targeting-resolver)
47
+ - [Usage](#usage)
48
+ - [Rules](#rules)
49
+ - [Return Value](#return-value)
50
+ - [Input Type](#input-type)
31
51
  - [Demo Pages](#demo-pages)
32
52
 
33
53
  ## Installing
@@ -392,6 +412,58 @@ You can also manually initialize the SDK using the cmd queue. This approach is u
392
412
  <input type="text" id="email" value="some.email@address.com" />
393
413
  ```
394
414
 
415
+ ## Integrating PrebidJS analytics
416
+
417
+ The `OptablePrebidAnalytics` addon hooks into [Prebid.js](https://prebid.org/) auction events (`auctionEnd` and `bidWon`) and sends auction analytics to the Optable DCN via the **witness API**. It reports per-bidder EID coverage, bid outcomes, and optional custom key-value pairs, enabling you to measure the impact of Optable targeting on your Prebid auctions.
418
+
419
+ ### Script tag
420
+
421
+ When the SDK is loaded via a `<script>` tag, `OptablePrebidAnalytics` is available as `window.optable.OptablePrebidAnalytics`.
422
+
423
+ ```html
424
+ <!-- Optable SDK async load: -->
425
+ <script async src="https://cdn.optable.co/web-sdk/v0/sdk.js"></script>
426
+
427
+ <!-- Prebid.js async load: -->
428
+ <script async src="prebid.js"></script>
429
+
430
+ <script>
431
+ window.optable = window.optable || { cmd: [] };
432
+ window.pbjs = window.pbjs || { que: [] };
433
+
434
+ optable.cmd.push(function () {
435
+ optable.instance = new optable.SDK({ host: "dcn.customer.com", site: "my-site" });
436
+
437
+ const analytics = new optable.OptablePrebidAnalytics(optable.instance, {
438
+ analytics: true,
439
+ tenant: "my_tenant", // Replace with your Optable tenant name
440
+ });
441
+
442
+ analytics.hookIntoPrebid(window.pbjs);
443
+ });
444
+ </script>
445
+ ```
446
+
447
+ ### NPM package
448
+
449
+ When using the SDK as an NPM package, import `OptablePrebidAnalytics` directly from the addon module:
450
+
451
+ ```javascript
452
+ import OptableSDK from "@optable/web-sdk";
453
+ import OptablePrebidAnalytics from "@optable/web-sdk/lib/addons/prebid/analytics";
454
+
455
+ const sdk = new OptableSDK({ host: "dcn.customer.com", site: "my-site" });
456
+
457
+ const analytics = new OptablePrebidAnalytics(sdk, {
458
+ analytics: true,
459
+ tenant: "my_tenant", // Replace with your Optable tenant name
460
+ });
461
+
462
+ analytics.hookIntoPrebid(window.pbjs);
463
+ ```
464
+
465
+ For extended configuration options such as sampling, debug mode, and custom analytics data, see the [Prebid analytics addon README](lib/addons/prebid/README.md).
466
+
395
467
  ## Integrating GAM360
396
468
 
397
469
  The Optable Web SDK can fetch targeting data from a DCN and map it to be sent to [Google Ad Manager 360](https://admanager.google.com/home/) ad server account for real-time targeting. It's also capable of intercepting advertising events from the [Google Publisher Tag](https://developers.google.com/doubleclick-gpt/guides/get-started) and logging them to a DCN via the **witness API**.
@@ -853,51 +925,28 @@ For example:
853
925
  </script>
854
926
  ```
855
927
 
856
- ## Fetching Google Privacy Sandbox topics
857
-
858
- To fetch Google Privacy Sandbox topics using the Optable SDK, you can use the `getTopics` method. This method asynchronously retrieves topics IDs and taxonomy versions from the Chrome browser. Alternatively, you can use the `ingestTopics` method. This method invokes `getTopics` and sends the retrieved topics to the Optable DCN under the trait "topics_api". See the [Topics API dictionary](https://patcg-individual-drafts.github.io/topics/#dictdef-browsingtopic) for details.
928
+ ## Passport and Visitor ID
859
929
 
860
- It is recommended to call this method before making ad calls to ensure that the latest topics are available for targeting.
930
+ The Optable DCN issues a _passport_ (a signed JWT) that is cached in browser `localStorage`. The passport encodes a unique _visitor ID_ that the DCN uses to anonymously identify the browser. Both values can be read synchronously from the SDK:
861
931
 
862
- ```html
863
- <!-- Optable SDK async load: -->
864
- <script async src="https://cdn.optable.co/web-sdk/latest/sdk.js"></script>
865
- <script>
866
- window.optable = window.optable || { cmd: [] };
867
- optable.cmd.push(function () {
868
- optable.instance = new optable.SDK({ host: "dcn.customer.com", site: "my-site" });
869
- // Fetch Google Privacy Sandbox topics and send them to the Optable DCN
870
- optable.instance.ingestTopics();
871
- });
872
- </script>
932
+ ```javascript
933
+ const passport = sdk.passport(); // string | null — the raw JWT as stored in localStorage
934
+ const visitorId = sdk.visitorId(); // string | null — the `id` claim decoded from the passport
873
935
  ```
874
936
 
875
- ## Demo Pages
937
+ Both methods return `null` until the passport has been populated in `localStorage`. By default (`initPassport: true`) the SDK triggers a `/config` call at construction time, and the DCN response populates the passport.
876
938
 
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.
878
-
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/).
880
-
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).
882
-
883
- To build and run the demos locally, you will need [Docker](https://www.docker.com/), `docker-compose` and `make`:
884
-
885
- ```shell
886
- cd path/to/optable-web-sdk
887
- make
888
- docker-compose up
889
- ```
890
-
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).
939
+ If the returned value is `null`, the SDK logs a one-time warning per instance to help diagnose the cause. The two expected reasons for a `null` return are:
892
940
 
893
- Note that using HTTP first-party cookies with a local instance of the demos pages pointing to an Optable DCN will not work because [https://localhost:8180/](localhost:8180) does not share the same top-level domain name `.optable.co`. We recommend using [LocalStorage](https://github.com/Optable/optable-web-sdk#localstorage) instead.
941
+ 1. The method was called before the passport was cached (e.g. before `sdk.site()` resolved).
942
+ 2. The DCN is configured to not echo the passport in response bodies, in which case the client-side cache is never populated.
894
943
 
895
944
  ## Multi-Node Targeting Resolver
896
945
 
897
946
  Resolves multiple **Node Targeting Rules** based on **priority** or **aggregation**.
898
947
  This function is available under `window.optable.utils` as part of a collection of helper methods extending the SDK.
899
948
 
900
- ### **Usage**
949
+ ### Usage
901
950
 
902
951
  Define targeting rules:
903
952
 
@@ -934,13 +983,13 @@ const result = await window.optable.utils.resolveMultiNodeTargeting(rules);
934
983
  console.log(result);
935
984
  ```
936
985
 
937
- ### **Rules**
986
+ ### Rules
938
987
 
939
988
  - If **any rule has a `priority`**, the function will return the response with the highest priority (1 being the highest). Lower priorities (2, 3, etc.) are considered progressively less important. Any rules with priority values of 0 or below are ignored.
940
989
  - If **multiple nodes share the highest priority**, merges their `eids`.
941
990
  - If **no priority is set**, aggregates all responses.
942
991
 
943
- ### **Return Value**
992
+ ### Return Value
944
993
 
945
994
  ```typescript
946
995
  type MultiNodeTargetingResponse = {
@@ -951,7 +1000,7 @@ type MultiNodeTargetingResponse = {
951
1000
  };
952
1001
  ```
953
1002
 
954
- ### **Input Type**
1003
+ ### Input Type
955
1004
 
956
1005
  ```typescript
957
1006
  type NodeTargetingRule = {
@@ -969,3 +1018,23 @@ type NodeTargetingRule = {
969
1018
  priority?: number;
970
1019
  };
971
1020
  ```
1021
+
1022
+ ## Demo Pages
1023
+
1024
+ 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.
1025
+
1026
+ 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/).
1027
+
1028
+ 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).
1029
+
1030
+ To build and run the demos locally, you will need [Docker](https://www.docker.com/), `docker-compose` and `make`:
1031
+
1032
+ ```shell
1033
+ cd path/to/optable-web-sdk
1034
+ make
1035
+ docker-compose up
1036
+ ```
1037
+
1038
+ 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).
1039
+
1040
+ Note that using HTTP first-party cookies with a local instance of the demos pages pointing to an Optable DCN will not work because [https://localhost:8180/](localhost:8180) does not share the same top-level domain name `.optable.co`. We recommend using [LocalStorage](https://github.com/Optable/optable-web-sdk#localstorage) instead.
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see sdk.js.LICENSE.txt */
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))})()})();
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),p=a.default.find(f,function(e){return t.isBrowser(e,!0)});if(void 0!==p)return this.compareVersion(n[p])}},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],p=[24,16,8,0],h=[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 p=e[n]||0;l[n]=92^p,f[n]=54^p}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]<<p[3&o++];else for(o=this.start;s<a&&o<64;++s)(n=e.charCodeAt(s))<128?c[o>>>2]|=n<<p[3&o++]:n<2048?(c[o>>>2]|=(192|n>>>6)<<p[3&o++],c[o>>>2]|=(128|63&n)<<p[3&o++]):n<55296||n>=57344?(c[o>>>2]|=(224|n>>>12)<<p[3&o++],c[o>>>2]|=(128|n>>>6&63)<<p[3&o++],c[o>>>2]|=(128|63&n)<<p[3&o++]):(n=65536+((1023&n)<<10|1023&e.charCodeAt(++s)),c[o>>>2]|=(240|n>>>18)<<p[3&o++],c[o>>>2]|=(128|n>>>12&63)<<p[3&o++],c[o>>>2]|=(128|n>>>6&63)<<p[3&o++],c[o>>>2]|=(128|63&n)<<p[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,p=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=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&g^~p&b)+h[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&p^~v&g)+h[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&p)+h[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,p=d+(n=p+(r=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&b^~g&v)+h[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+p|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.50.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=p(t.gppData,1,r.tcfeuVendorID),n.createProfilesForAdvertising=p(t.gppData,3,r.tcfeuVendorID),n.useProfilesForAdvertising=p(t.gppData,4,r.tcfeuVendorID),n.measureAdvertisingPerformance=p(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 p(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 h{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 h(this.config.consent)}getPassport(){return this.readStorageKeys(this.passportKeys)}setPassport(e){this.writeToStorageKeys(this.passportKeys,e)}getVisitorId(){const e=this.getPassport();if(!e)return null;const t=e.split(".")[1];if(!t)return null;try{const e=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),r=JSON.parse(atob(e));return"string"==typeof(null==r?void 0:r.id)?r.id:null}catch(e){return null}}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 N(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 p=document.documentElement.getAttribute("lang");return p&&(r.language=p),r}function L(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?L(Object(i),!0).forEach(function(r){t(e,r,i[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):L(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}var j=r(966);class W{constructor(e){var r;t(this,"dcn",void 0),t(this,"init",void 0),t(this,"contextSent",!1),t(this,"contextConfig",null),t(this,"passportNullWarned",!1),t(this,"visitorIdNullWarned",!1),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}passport(){const e=new m(this.dcn).getPassport();return null!==e||this.passportNullWarned||(this.passportNullWarned=!0,console.warn("[Optable] passport() returned null. The passport is cached in localStorage once the DCN returns one. Call before initialization (await sdk.site() or sdk.targeting()) may return null, and deployments where the DCN does not echo the passport in response bodies will never populate it client-side.")),e}visitorId(){const e=new m(this.dcn).getVisitorId();return null!==e||this.visitorIdNullWarned||(this.visitorIdNullWarned=!0,console.warn("[Optable] visitorId() returned null. The visitor ID is derived from the passport JWT in localStorage. Call before initialization (await sdk.site() or sdk.targeting()) may return null, and deployments where the DCN does not echo the passport in response bodies will never populate it client-side.")),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:N(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(W,"version",i);const V=W;var z=r(704);function q(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 U(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?q(Object(i),!0).forEach(function(r){t(e,r,i[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):q(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}const K="REQUESTED",G="RECEIVED",H="NO_BID",J="TIMEOUT",Y="optable:prebid:analytics:sample-number";function Q(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()}}V.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=Q(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){}})},V.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 Z=/^[a-f0-9]{64}$/i;V.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 Z.test(e)}(n))&&this.identify((t||"e")+":"+n)},window.optable=window.optable||{},window.optable.SDK=V,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(Y,Math.random().toFixed(2)):sessionStorage.removeItem(Y),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(Y)||"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,o,s;const{bidderCode:a,bidderRequestId:c,bids:d=[]}=e,u=null!==(t=null===(r=e.ortb2.site)||void 0===r?void 0:r.domain)&&void 0!==t?t:"unknown",l=[...null!==(i=null===(n=e.ortb2.user)||void 0===n||null===(n=n.ext)||void 0===n?void 0:n.eids)&&void 0!==i?i:[],...null!==(o=null===(s=e.ortb2.user)||void 0===s?void 0:s.eids)&&void 0!==o?o:[]],f=Array.from(new Map(l.map(e=>[e.source,e])).values()).filter(e=>"optable.co"===e.inserter),p=[...new Set(f.map(e=>e.matcher).filter(Boolean))],h=[...new Set(f.map(e=>e.source).filter(Boolean))];return{bidderCode:a,bidderRequestId:c,domain:u,hasOEids:f.length>0,optableMatchers:p,optableSources:h,status:K,bids:d.map(e=>{var t,r;return{bidId:e.bidId,bidderRequestId:c,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:K}})}})},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:G,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:G,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===K&&(r.status=G)}),s.forEach(e=>{const t=d[e.bidderRequestId];t&&(t.status=H,t.bids.forEach(e=>{e.status=H}))}),a.forEach(e=>{const t=d[e.bidderRequestId];t&&(t.status=J,t.bids.forEach(e=>{e.status=J}))});const f=new Date,p=setTimeout(async()=>{const t=this.auctions.get(r);if(!t)return;const i=t.missed,n=await this.toWitness(e,t.bidWonEvents,i);n.auctionEndAt=f.toISOString(),n.bidWonAt=t.bidWonEvents.length>0?new Date(Math.min(...t.bidWonEvents.map(e=>e._receivedAt.getTime()))).toISOString():null,n.optableLoaded=!i,this.sendToWitnessAPI("optable.prebid.auction",n),this.auctions.delete(r)},this.config.bidWinTimeout);this.auctions.set(r,{auctionEnd:e,createdAt:f,missed:t,auctionEndTimeoutId:p,bidWonEvents:[]}),this.cleanupOldAuctions()}async trackBidWon(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.log("bidWon event",{auctionId:e.auctionId,bidderCode:e.bidderCode,missed:t});const r=this.auctions.get(e.auctionId);r?(r.bidWonEvents.push(U(U({},e),{},{_receivedAt:new Date})),t&&(r.missed=!0)):this.log("Missing 'auctionEnd' event. Skipping.")}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,p=new Set;let h=null;const g=c.map(e=>{var t,r,i,n,o,s;const{bidderCode:a,bidderRequestId:c,bids:d=[]}=e,u=null!==(t=null===(r=e.ortb2.site)||void 0===r?void 0:r.domain)&&void 0!==t?t:"unknown",l=[...null!==(i=null===(n=e.ortb2.user)||void 0===n||null===(n=n.ext)||void 0===n?void 0:n.eids)&&void 0!==i?i:[],...null!==(o=null===(s=e.ortb2.user)||void 0===s?void 0:s.eids)&&void 0!==o?o:[]],f=Array.from(new Map(l.map(e=>[e.source,e])).values()).filter(e=>"optable.co"===e.inserter),p=[...new Set(f.map(e=>e.matcher).filter(Boolean))],g=[...new Set(f.map(e=>e.source).filter(Boolean))];return h=e.ortb2.device,{bidderCode:a,bidderRequestId:c,domain:u,optableTargetingDone:f.length>0,optableMatchers:p,optableSources:g,status:K,bids:d.map(e=>{var t,r;return{bidId:e.bidId,bidderRequestId:c,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:K}})}}),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=>p.add(e)),e)),auctionId:a,adUnitCode:"unknown",totalRequests:c.length,optableSampling:this.config.samplingRate||1,optableTargetingDone:f.size||p.size,optableMatchers:Array.from(f),optableSources:Array.from(p),bidWon:t.map(e=>({bidderCode:e.bidderCode,adUnitCode:e.adUnitCode,cpm:e.cpm})),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:h,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:p=[],eids:h=[]}=null!==(i=null===(d=e.ortb2)||void 0===d?void 0:d.user)&&void 0!==i?i:{};o.user.data.push(...p),c.set(f,null!==(u=e.resolved_ids)&&void 0!==u?u:[]),h.filter(e=>e.uids.length).forEach(i=>{var o,c,d,u,l;const p=null!==(o=i.matcher)&&void 0!==o?o:t,h=null!==(c=s.get(f))&&void 0!==c?c:[];p&&s.set(f,[...h,p]);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 V(window.optable.instance_config))})()})();
@@ -75,8 +75,8 @@ declare class OptablePrebidAnalytics {
75
75
  */
76
76
  trackAuctionEnd(event: any, missed?: boolean): Promise<void>;
77
77
  /**
78
- * Handle a Prebid `bidWon` event by finalizing the matching auction, clearing
79
- * the pending timeout and sending the combined payload to Witness.
78
+ * Accumulate a Prebid `bidWon` event into the matching auction's event list
79
+ * for deferred emission when the auction timeout fires.
80
80
  * @param event - The raw Prebid bidWon event object.
81
81
  * @param missed - True when the event was previously emitted (missed replay).
82
82
  * @returns void
@@ -94,13 +94,13 @@ declare class OptablePrebidAnalytics {
94
94
  */
95
95
  clearData(): void;
96
96
  /**
97
- * Convert internal auction state and optional bidWon event into a Witness payload.
97
+ * Convert internal auction state and accumulated bidWon events into a Witness payload.
98
98
  * This collects matcher/source metadata, bid counts and optional custom analytics.
99
99
  * @param auctionEndEvent - The `auctionEnd` event object from Prebid.js.
100
- * @param bidWonEvent - Optional `bidWon` event when a winning bid exists.
100
+ * @param bidWonEvents - Array of `bidWon` events accumulated during the auction window.
101
101
  * @param missed - True when the original events were already emitted (replayed).
102
102
  * @returns A payload object compatible with the Witness API.
103
103
  */
104
- toWitness(auctionEndEvent: any, bidWonEvent: any | null, missed?: boolean): Promise<Record<string, any>>;
104
+ toWitness(auctionEndEvent: any, bidWonEvents: any[], missed?: boolean): Promise<Record<string, any>>;
105
105
  }
106
106
  export default OptablePrebidAnalytics;
@@ -180,10 +180,12 @@ class OptablePrebidAnalytics {
180
180
  auctionId,
181
181
  timeout,
182
182
  bidderRequests: bidderRequests.map((br) => {
183
- var _a, _b, _c, _d;
183
+ var _a, _b, _c, _d, _e, _f, _g;
184
184
  const { bidderCode, bidderRequestId, bids = [] } = br;
185
185
  const domain = (_b = (_a = br.ortb2.site) === null || _a === void 0 ? void 0 : _a.domain) !== null && _b !== void 0 ? _b : "unknown";
186
- const eids = (_d = (_c = br.ortb2.user) === null || _c === void 0 ? void 0 : _c.eids) !== null && _d !== void 0 ? _d : [];
186
+ const allEids = [...((_e = (_d = (_c = br.ortb2.user) === null || _c === void 0 ? void 0 : _c.ext) === null || _d === void 0 ? void 0 : _d.eids) !== null && _e !== void 0 ? _e : []), ...((_g = (_f = br.ortb2.user) === null || _f === void 0 ? void 0 : _f.eids) !== null && _g !== void 0 ? _g : [])];
187
+ // Deduplicate EIDs by source
188
+ const eids = Array.from(new Map(allEids.map((eid) => [eid.source, eid])).values());
187
189
  // Optable EIDs
188
190
  const optableEIDS = eids.filter((e) => e.inserter === "optable.co");
189
191
  const optableMatchers = [...new Set(optableEIDS.map((e) => e.matcher).filter(Boolean))];
@@ -293,49 +295,45 @@ class OptablePrebidAnalytics {
293
295
  });
294
296
  const createdAt = new Date();
295
297
  const auctionEndTimeoutId = setTimeout(() => __awaiter(this, void 0, void 0, function* () {
296
- const payload = yield this.toWitness(event, null, missed);
298
+ const storedAuction = this.auctions.get(auctionId);
299
+ if (!storedAuction)
300
+ return;
301
+ const effectiveMissed = storedAuction.missed;
302
+ const payload = yield this.toWitness(event, storedAuction.bidWonEvents, effectiveMissed);
297
303
  payload["auctionEndAt"] = createdAt.toISOString();
298
- payload["bidWonAt"] = null;
299
- payload["optableLoaded"] = !missed;
304
+ payload["bidWonAt"] =
305
+ storedAuction.bidWonEvents.length > 0
306
+ ? new Date(Math.min(...storedAuction.bidWonEvents.map((e) => e._receivedAt.getTime()))).toISOString()
307
+ : null;
308
+ payload["optableLoaded"] = !effectiveMissed;
300
309
  this.sendToWitnessAPI("optable.prebid.auction", payload);
310
+ this.auctions.delete(auctionId);
301
311
  }), this.config.bidWinTimeout);
302
312
  // Store the auction data
303
- this.auctions.set(auctionId, { auctionEnd: event, createdAt, missed, auctionEndTimeoutId });
313
+ this.auctions.set(auctionId, { auctionEnd: event, createdAt, missed, auctionEndTimeoutId, bidWonEvents: [] });
304
314
  // Clean up old auctions
305
315
  this.cleanupOldAuctions();
306
316
  });
307
317
  }
308
318
  /**
309
- * Handle a Prebid `bidWon` event by finalizing the matching auction, clearing
310
- * the pending timeout and sending the combined payload to Witness.
319
+ * Accumulate a Prebid `bidWon` event into the matching auction's event list
320
+ * for deferred emission when the auction timeout fires.
311
321
  * @param event - The raw Prebid bidWon event object.
312
322
  * @param missed - True when the event was previously emitted (missed replay).
313
323
  * @returns void
314
324
  */
315
325
  trackBidWon(event_1) {
316
326
  return __awaiter(this, arguments, void 0, function* (event, missed = false) {
317
- const filteredEvent = {
318
- auctionId: event.auctionId,
319
- bidderCode: event.bidderCode,
320
- bidId: event.requestId,
321
- tenant: this.config.tenant,
322
- missed,
323
- };
324
- this.log("bidWon filtered event", filteredEvent);
327
+ this.log("bidWon event", { auctionId: event.auctionId, bidderCode: event.bidderCode, missed });
325
328
  const auction = this.auctions.get(event.auctionId);
326
329
  if (!auction) {
327
330
  this.log("Missing 'auctionEnd' event. Skipping.");
328
331
  return;
329
332
  }
330
- if (auction.auctionEndTimeoutId) {
331
- clearTimeout(auction.auctionEndTimeoutId);
333
+ auction.bidWonEvents.push(Object.assign(Object.assign({}, event), { _receivedAt: new Date() }));
334
+ if (missed) {
335
+ auction.missed = true;
332
336
  }
333
- const payload = yield this.toWitness(auction.auctionEnd, event, missed);
334
- payload["auctionEndAt"] = auction.createdAt.toISOString();
335
- payload["bidWonAt"] = new Date().toISOString();
336
- payload["optableLoaded"] = !missed;
337
- this.sendToWitnessAPI("optable.prebid.auction", payload);
338
- this.auctions.delete(event.auctionId);
339
337
  });
340
338
  }
341
339
  /**
@@ -360,15 +358,15 @@ class OptablePrebidAnalytics {
360
358
  this.log("All analytics data cleared");
361
359
  }
362
360
  /**
363
- * Convert internal auction state and optional bidWon event into a Witness payload.
361
+ * Convert internal auction state and accumulated bidWon events into a Witness payload.
364
362
  * This collects matcher/source metadata, bid counts and optional custom analytics.
365
363
  * @param auctionEndEvent - The `auctionEnd` event object from Prebid.js.
366
- * @param bidWonEvent - Optional `bidWon` event when a winning bid exists.
364
+ * @param bidWonEvents - Array of `bidWon` events accumulated during the auction window.
367
365
  * @param missed - True when the original events were already emitted (replayed).
368
366
  * @returns A payload object compatible with the Witness API.
369
367
  */
370
- toWitness(auctionEndEvent_1, bidWonEvent_1) {
371
- return __awaiter(this, arguments, void 0, function* (auctionEndEvent, bidWonEvent, missed = false) {
368
+ toWitness(auctionEndEvent_1, bidWonEvents_1) {
369
+ return __awaiter(this, arguments, void 0, function* (auctionEndEvent, bidWonEvents, missed = false) {
372
370
  var _a, _b, _c;
373
371
  const { auctionId, bidderRequests = [], bidsReceived = [], noBids = [], timeoutBids = [] } = auctionEndEvent;
374
372
  const oMatchersSet = new Set();
@@ -378,10 +376,12 @@ class OptablePrebidAnalytics {
378
376
  let device = null;
379
377
  // Process bidder requests
380
378
  const requests = bidderRequests.map((br) => {
381
- var _a, _b, _c, _d;
379
+ var _a, _b, _c, _d, _e, _f, _g;
382
380
  const { bidderCode, bidderRequestId, bids = [] } = br;
383
381
  const domain = (_b = (_a = br.ortb2.site) === null || _a === void 0 ? void 0 : _a.domain) !== null && _b !== void 0 ? _b : "unknown";
384
- const eids = (_d = (_c = br.ortb2.user) === null || _c === void 0 ? void 0 : _c.eids) !== null && _d !== void 0 ? _d : [];
382
+ const allEids = [...((_e = (_d = (_c = br.ortb2.user) === null || _c === void 0 ? void 0 : _c.ext) === null || _d === void 0 ? void 0 : _d.eids) !== null && _e !== void 0 ? _e : []), ...((_g = (_f = br.ortb2.user) === null || _f === void 0 ? void 0 : _f.eids) !== null && _g !== void 0 ? _g : [])];
383
+ // Deduplicate EIDs by source
384
+ const eids = Array.from(new Map(allEids.map((eid) => [eid.source, eid])).values());
385
385
  // Optable EIDs
386
386
  const optableEIDS = eids.filter((e) => e.inserter === "optable.co");
387
387
  const optableMatchers = [...new Set(optableEIDS.map((e) => e.matcher).filter(Boolean))];
@@ -435,19 +435,11 @@ class OptablePrebidAnalytics {
435
435
  optableTargetingDone: oMatchersSet.size || oSourcesSet.size,
436
436
  optableMatchers: Array.from(oMatchersSet),
437
437
  optableSources: Array.from(oSourcesSet),
438
- bidWon: bidWonEvent
439
- ? {
440
- message: bidWonEvent.bidderCode +
441
- " won the ad server auction for ad unit " +
442
- bidWonEvent.adUnitCode +
443
- " at " +
444
- bidWonEvent.cpm +
445
- " CPM",
446
- bidderCode: bidWonEvent.bidderCode,
447
- adUnitCode: bidWonEvent.adUnitCode,
448
- cpm: bidWonEvent.cpm,
449
- }
450
- : null,
438
+ bidWon: bidWonEvents.map((e) => ({
439
+ bidderCode: e.bidderCode,
440
+ adUnitCode: e.adUnitCode,
441
+ cpm: e.cpm,
442
+ })),
451
443
  missed,
452
444
  url: `${window.location.hostname}${window.location.pathname}`,
453
445
  tenant: this.config.tenant,
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "v0.48.0"
2
+ "version": "v0.50.0"
3
3
  }
@@ -12,6 +12,7 @@ declare class LocalStorage {
12
12
  constructor(config: ResolvedConfig);
13
13
  getPassport(): string | null;
14
14
  setPassport(passport: string): void;
15
+ getVisitorId(): string | null;
15
16
  getTargeting(): TargetingResponse | null;
16
17
  setTargeting(targeting?: TargetingResponse | null): void;
17
18
  getSite(): SiteResponse | null;
@@ -16,6 +16,26 @@ class LocalStorage {
16
16
  setPassport(passport) {
17
17
  this.writeToStorageKeys(this.passportKeys, passport);
18
18
  }
19
+ getVisitorId() {
20
+ const passport = this.getPassport();
21
+ if (!passport)
22
+ return null;
23
+ const payload = passport.split(".")[1];
24
+ if (!payload)
25
+ return null;
26
+ try {
27
+ // JWT payload is base64url; normalize to base64 before atob.
28
+ const b64 = payload
29
+ .replace(/-/g, "+")
30
+ .replace(/_/g, "/")
31
+ .padEnd(payload.length + ((4 - (payload.length % 4)) % 4), "=");
32
+ const claims = JSON.parse(atob(b64));
33
+ return typeof (claims === null || claims === void 0 ? void 0 : claims.id) === "string" ? claims.id : null;
34
+ }
35
+ catch (_a) {
36
+ return null;
37
+ }
38
+ }
19
39
  getTargeting() {
20
40
  const raw = this.readStorageKeys(this.targetingKeys);
21
41
  return raw ? JSON.parse(raw) : null;
package/lib/dist/sdk.d.ts CHANGED
@@ -12,6 +12,8 @@ declare class OptableSDK {
12
12
  protected init: Promise<void>;
13
13
  private contextSent;
14
14
  private contextConfig;
15
+ private passportNullWarned;
16
+ private visitorIdNullWarned;
15
17
  constructor(dcn: InitConfig);
16
18
  initialize(): Promise<void>;
17
19
  identify(...ids: string[]): Promise<void>;
@@ -20,6 +22,8 @@ declare class OptableSDK {
20
22
  targetingFromCache(): TargetingResponse | null;
21
23
  site(): Promise<SiteResponse>;
22
24
  siteFromCache(): SiteResponse | null;
25
+ passport(): string | null;
26
+ visitorId(): string | null;
23
27
  targetingClearCache(): void;
24
28
  prebidORTB2(): Promise<PrebidORTB2>;
25
29
  prebidORTB2FromCache(): PrebidORTB2;
package/lib/dist/sdk.js CHANGED
@@ -20,10 +20,13 @@ import { Witness } from "./edge/witness";
20
20
  import { Profile } from "./edge/profile";
21
21
  import { sha256 } from "js-sha256";
22
22
  import { Tokenize } from "./edge/tokenize";
23
+ import { LocalStorage } from "./core/storage";
23
24
  class OptableSDK {
24
25
  constructor(dcn) {
25
26
  this.contextSent = false;
26
27
  this.contextConfig = null;
28
+ this.passportNullWarned = false;
29
+ this.visitorIdNullWarned = false;
27
30
  this.dcn = getConfig(dcn);
28
31
  this.contextConfig = normalizeContextConfig(dcn.pageContext);
29
32
  this.init = this.initialize();
@@ -68,6 +71,26 @@ class OptableSDK {
68
71
  siteFromCache() {
69
72
  return SiteFromCache(this.dcn);
70
73
  }
74
+ passport() {
75
+ const value = new LocalStorage(this.dcn).getPassport();
76
+ if (value === null && !this.passportNullWarned) {
77
+ this.passportNullWarned = true;
78
+ console.warn("[Optable] passport() returned null. The passport is cached in localStorage once the DCN returns one. " +
79
+ "Call before initialization (await sdk.site() or sdk.targeting()) may return null, and deployments where the DCN " +
80
+ "does not echo the passport in response bodies will never populate it client-side.");
81
+ }
82
+ return value;
83
+ }
84
+ visitorId() {
85
+ const value = new LocalStorage(this.dcn).getVisitorId();
86
+ if (value === null && !this.visitorIdNullWarned) {
87
+ this.visitorIdNullWarned = true;
88
+ console.warn("[Optable] visitorId() returned null. The visitor ID is derived from the passport JWT in localStorage. " +
89
+ "Call before initialization (await sdk.site() or sdk.targeting()) may return null, and deployments where the DCN " +
90
+ "does not echo the passport in response bodies will never populate it client-side.");
91
+ }
92
+ return value;
93
+ }
71
94
  targetingClearCache() {
72
95
  TargetingClearCache(this.dcn);
73
96
  }
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "homepage": "https://optable.co",
11
11
  "license": "SEE LICENSE IN LICENSE",
12
- "version": "v0.48.0",
12
+ "version": "v0.50.0",
13
13
  "devDependencies": {
14
14
  "@babel/core": "^7.12.3",
15
15
  "@babel/plugin-proposal-class-properties": "^7.12.1",