Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@uniformdev/context

Package Overview
Dependencies
Maintainers
12
Versions
676
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uniformdev/context - npm Package Compare versions

Comparing version 17.5.1-alpha.105 to 17.5.1-alpha.130

dist/contextTypes-1907a553.d.ts

28

dist/api/api.d.ts

@@ -1,4 +0,4 @@

import { A as AggregateGetParameters, a as AggregateGetResponse, b as AggregatePutParameters, c as AggregateDeleteParameters, D as DimensionGetParameters, d as DimensionGetResponse, E as EnrichmentGetParameters, e as EnrichmentGetResponse, f as EnrichmentPutParameters, g as EnrichmentDeleteParameters, h as EnrichmentValuePutParameters, i as EnrichmentValueDeleteParameters, M as ManifestGetParameters, j as ManifestGetResponse, Q as QuirkGetParameters, k as QuirkGetResponse, l as QuirkPutParameters, m as QuirkDeleteParameters, S as SignalGetParameters, n as SignalGetResponse, o as SignalPutParameters, p as SignalDeleteParameters, T as TestGetParameters, q as TestGetResponse, r as TestPutParameters, s as TestDeleteParameters, t as DimensionDefinition } from '../contextTypes-ec62120f.js';
export { x as Aggregate, c as AggregateDeleteParameters, A as AggregateGetParameters, a as AggregateGetResponse, b as AggregatePutParameters, C as ContextDefinitions, F as CookieCriteria, J as CurrentPageCriteria, t as DimensionDefinition, D as DimensionGetParameters, d as DimensionGetResponse, u as EnrichmentCategory, v as EnrichmentCategoryWithValues, g as EnrichmentDeleteParameters, E as EnrichmentGetParameters, e as EnrichmentGetResponse, f as EnrichmentPutParameters, w as EnrichmentValue, i as EnrichmentValueDeleteParameters, h as EnrichmentValuePutParameters, I as EventCriteria, M as ManifestGetParameters, j as ManifestGetResponse, P as PageViewCountCriteria, G as QueryStringCriteria, y as Quirk, H as QuirkCriteria, m as QuirkDeleteParameters, Q as QuirkGetParameters, k as QuirkGetResponse, l as QuirkPutParameters, R as RootSignalCriteriaGroup, p as SignalDeleteParameters, S as SignalGetParameters, n as SignalGetResponse, o as SignalPutParameters, B as SignalWithId, z as Test, s as TestDeleteParameters, T as TestGetParameters, q as TestGetResponse, r as TestPutParameters } from '../contextTypes-ec62120f.js';
import { g as ManifestV2 } from '../types-c398dba8.js';
import { A as AggregateGetParameters, a as AggregateGetResponse, b as AggregatePutParameters, c as AggregateDeleteParameters, D as DimensionDefinition, d as DimensionGetParameters, e as DimensionGetResponse, E as EnrichmentGetParameters, f as EnrichmentGetResponse, g as EnrichmentPutParameters, h as EnrichmentDeleteParameters, i as EnrichmentValuePutParameters, j as EnrichmentValueDeleteParameters, M as ManifestGetParameters, k as ManifestGetResponse, Q as QuirkGetParameters, l as QuirkGetResponse, m as QuirkPutParameters, n as QuirkDeleteParameters, S as SignalGetParameters, o as SignalGetResponse, p as SignalPutParameters, q as SignalDeleteParameters, T as TestGetParameters, r as TestGetResponse, s as TestPutParameters, t as TestDeleteParameters } from '../contextTypes-1907a553.js';
export { x as Aggregate, c as AggregateDeleteParameters, A as AggregateGetParameters, a as AggregateGetResponse, b as AggregatePutParameters, C as ContextDefinitions, F as CookieCriteria, J as CurrentPageCriteria, D as DimensionDefinition, d as DimensionGetParameters, e as DimensionGetResponse, u as EnrichmentCategory, v as EnrichmentCategoryWithValues, h as EnrichmentDeleteParameters, E as EnrichmentGetParameters, f as EnrichmentGetResponse, g as EnrichmentPutParameters, w as EnrichmentValue, j as EnrichmentValueDeleteParameters, i as EnrichmentValuePutParameters, I as EventCriteria, M as ManifestGetParameters, k as ManifestGetResponse, P as PageViewCountCriteria, G as QueryStringCriteria, y as Quirk, H as QuirkCriteria, n as QuirkDeleteParameters, Q as QuirkGetParameters, l as QuirkGetResponse, m as QuirkPutParameters, R as RootSignalCriteriaGroup, q as SignalDeleteParameters, S as SignalGetParameters, o as SignalGetResponse, p as SignalPutParameters, B as SignalWithId, z as Test, t as TestDeleteParameters, T as TestGetParameters, r as TestGetResponse, s as TestPutParameters } from '../contextTypes-1907a553.js';
import { I as ManifestV2 } from '../types-cb64a6b4.js';
import '../v2-manifest.swagger-200ca5ee.js';

@@ -67,2 +67,13 @@ import 'mitt';

declare type DimensionDisplayData = {
dim: string;
type: 'Aggregate' | 'Enrichment' | 'Signal' | 'Intent' | 'Audience';
category?: string;
name: string;
};
declare function computeDimensionDefinitionDisplayData(dim: DimensionDefinition): DimensionDisplayData;
declare function computeDimensionDisplayData(dim: string, manifest: ManifestV2): DimensionDisplayData | undefined;
/** Computes the standard display name for a given dimension from the dimensions API */
declare function computeDimensionDisplayName(dim: DimensionDefinition): string;
declare class DimensionClient extends ApiClient {

@@ -179,13 +190,2 @@ #private;

declare type DimensionDisplayData = {
dim: string;
type: 'Aggregate' | 'Enrichment' | 'Signal' | 'Intent' | 'Audience';
category?: string;
name: string;
};
declare function computeDimensionDefinitionDisplayData(dim: DimensionDefinition): DimensionDisplayData;
declare function computeDimensionDisplayData(dim: string, manifest: ManifestV2): DimensionDisplayData | undefined;
/** Computes the standard display name for a given dimension from the dimensions API */
declare function computeDimensionDisplayName(dim: DimensionDefinition): string;
export { AggregateClient, ApiClient, ApiClientError, CachedAggregateClient, CachedContextClient, CachedDimensionClient, CachedEnrichmentClient, CachedManifestClient, CachedQuirkClient, CachedSignalClient, ClientOptions, ContextClient, DimensionClient, DimensionDisplayData, EnrichmentClient, ExceptProject, LimitPolicy, ManifestClient, QuirkClient, SignalClient, UncachedAggregateClient, UncachedContextClient, UncachedDimensionClient, UncachedEnrichmentClient, UncachedManifestClient, UncachedQuirkClient, UncachedSignalClient, computeDimensionDefinitionDisplayData, computeDimensionDisplayData, computeDimensionDisplayName, nullLimitPolicy };

@@ -1,2 +0,2 @@

"use strict";var S=Object.defineProperty;var te=Object.getOwnPropertyDescriptor;var re=Object.getOwnPropertyNames;var se=Object.prototype.hasOwnProperty;var ie=(r,e,t)=>e in r?S(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var oe=(r,e)=>{for(var t in e)S(r,t,{get:e[t],enumerable:!0})},ne=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of re(e))!se.call(r,o)&&o!==t&&S(r,o,{get:()=>e[o],enumerable:!(s=te(e,o))||s.enumerable});return r};var ae=r=>ne(S({},"__esModule",{value:!0}),r);var m=(r,e,t)=>(ie(r,typeof e!="symbol"?e+"":e,t),t),pe=(r,e,t)=>{if(!e.has(r))throw TypeError("Cannot "+t)};var i=(r,e,t)=>(pe(r,e,"read from private field"),t?t.call(r):e.get(r)),c=(r,e,t)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,t)};var me={};oe(me,{AggregateClient:()=>y,ApiClient:()=>n,ApiClientError:()=>P,CachedAggregateClient:()=>J,CachedContextClient:()=>Z,CachedDimensionClient:()=>V,CachedEnrichmentClient:()=>H,CachedManifestClient:()=>q,CachedQuirkClient:()=>B,CachedSignalClient:()=>W,ContextClient:()=>N,DimensionClient:()=>f,EnrichmentClient:()=>u,ManifestClient:()=>x,QuirkClient:()=>g,SignalClient:()=>d,UncachedAggregateClient:()=>L,UncachedContextClient:()=>X,UncachedDimensionClient:()=>$,UncachedEnrichmentClient:()=>Q,UncachedManifestClient:()=>K,UncachedQuirkClient:()=>Y,UncachedSignalClient:()=>F,computeDimensionDefinitionDisplayData:()=>ee,computeDimensionDisplayData:()=>ce,computeDimensionDisplayName:()=>le,nullLimitPolicy:()=>v});module.exports=ae(me);var v=async r=>await r(),P=class extends Error{constructor(t,s,o,a,p,l){super(`${t}
${a}${p?" "+p:""} (${s} ${o}${l?` Request ID: ${l}`:""})`);this.errorMessage=t;this.fetchMethod=s;this.fetchUri=o;this.statusCode=a;this.statusText=p;this.requestId=l;Object.setPrototypeOf(this,P.prototype)}};var n=class{constructor(e){m(this,"options");var s,o,a,p,l,h;if(!e.apiKey&&!e.bearerToken)throw new Error("You must provide an API key or a bearer token");let t=e.fetch;if(!t)if(typeof window!="undefined")t=window.fetch.bind(window);else if(typeof fetch!="undefined")t=fetch;else throw new Error("You must provide or polyfill a fetch implementation when not in a browser");this.options={...e,fetch:t,apiHost:(s=e.apiHost)!=null?s:"https://uniform.app",apiKey:(o=e.apiKey)!=null?o:null,projectId:(a=e.projectId)!=null?a:null,bearerToken:(p=e.bearerToken)!=null?p:null,limitPolicy:(l=e.limitPolicy)!=null?l:v,bypassCache:(h=e.bypassCache)!=null?h:!1}}async apiClient(e,t){return this.options.limitPolicy(async()=>{var a;let s=this.options.apiKey?{"x-api-key":this.options.apiKey}:{Authorization:`Bearer ${this.options.bearerToken}`};this.options.bypassCache&&(s["x-bypass-cache"]="true");let o=await this.options.fetch(e.toString(),{...t,headers:{...t==null?void 0:t.headers,...s}});if(!o.ok){let p="";try{let l=await o.text();try{let h=JSON.parse(l);h.errorMessage?p=Array.isArray(h.errorMessage)?h.errorMessage.join(", "):h.errorMessage:p=l}catch(h){p=l}}catch(l){p="General error"}throw new P(p,(a=t==null?void 0:t.method)!=null?a:"GET",e.toString(),o.status,o.statusText,n.getRequestId(o))}return t!=null&&t.expectNoContent?null:await o.json()})}createUrl(e,t){let s=new URL(`${this.options.apiHost}${e}`);return Object.entries(t!=null?t:{}).forEach(([o,a])=>{var p;typeof a!="undefined"&&a!==null&&s.searchParams.append(o,Array.isArray(a)?a.join(","):(p=a==null?void 0:a.toString())!=null?p:"")}),s}static getRequestId(e){let t=e.headers.get("apigw-requestid");if(t)return t}};var b,U=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(U,b),{...e,projectId:t});return await this.apiClient(s)}async upsert(e){let t=this.createUrl(i(U,b));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(i(U,b));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}},y=U;b=new WeakMap,c(y,b,"/api/v2/aggregate");var L=class extends y{constructor(e){super({...e,bypassCache:!0})}},J=class extends y{constructor(e){super({...e,bypassCache:!1})}};var A,M=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(M,A),{...e,projectId:t});return await this.apiClient(s)}},f=M;A=new WeakMap,c(f,A,"/api/v2/dimension");var $=class extends f{constructor(e){super({...e,bypassCache:!0})}},V=class extends f{constructor(e){super({...e,bypassCache:!1})}};var O,w,C=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(C,O),{...e,projectId:t});return await this.apiClient(s)}async upsertCategory(e){let t=this.createUrl(i(C,O));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeCategory(e){let t=this.createUrl(i(C,O));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async upsertValue(e){let t=this.createUrl(i(C,w));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeValue(e){let t=this.createUrl(i(C,w));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}},u=C;O=new WeakMap,w=new WeakMap,c(u,O,"/api/v1/enrichments"),c(u,w,"/api/v1/enrichment-values");var Q=class extends u{constructor(e){super({...e,bypassCache:!0})}},H=class extends u{constructor(e){super({...e,bypassCache:!1})}};var k,z=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(z,k),{...e,projectId:t});return await this.apiClient(s)}async publish(){let{projectId:e}=this.options,t=this.createUrl("/api/v1/publish",{siteId:e});await this.apiClient(t,{method:"POST",expectNoContent:!0})}},x=z;k=new WeakMap,c(x,k,"/api/v2/manifest");var K=class extends x{constructor(e){super({...e,bypassCache:!0})}},q=class extends x{constructor(e){super({...e,bypassCache:!1})}};var j,R=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(R,j),{...e,projectId:t});return await this.apiClient(s)}async upsert(e){let t=this.createUrl(i(R,j));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(i(R,j));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}},g=R;j=new WeakMap,c(g,j,"/api/v2/quirk");var Y=class extends g{constructor(e){super({...e,bypassCache:!0})}},B=class extends g{constructor(e){super({...e,bypassCache:!1})}};var E,I=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(I,E),{...e,projectId:t});return await this.apiClient(s)}async upsert(e){let t=this.createUrl(i(I,E));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(i(I,E));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}},d=I;E=new WeakMap,c(d,E,"/api/v2/signal");var F=class extends d{constructor(e){super({...e,bypassCache:!0})}},W=class extends d{constructor(e){super({...e,bypassCache:!1})}};var D,G=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(G,D),{...e,projectId:t});return await this.apiClient(s)}async upsert(e){let t=this.createUrl(i(G,D));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(i(G,D));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}},T=G;D=new WeakMap,c(T,D,"/api/v2/test");var N=class{constructor(e){m(this,"enrichments");m(this,"aggregates");m(this,"dimensions");m(this,"manifest");m(this,"quirks");m(this,"signals");m(this,"tests");this.enrichments=new u(e),this.aggregates=new y(e),this.dimensions=new f(e),this.manifest=new x(e),this.quirks=new g(e),this.signals=new d(e),this.tests=new T(e)}},X=class extends N{constructor(e){super({...e,bypassCache:!0})}},Z=class extends N{constructor(e){super({...e,bypassCache:!1})}};var _="_";function ee(r){let e=r.category==="ENR"?"Enrichment":r.category==="SIG"?"Signal":r.subcategory==="1"?"Intent":r.subcategory==="0"?"Audience":"Aggregate";return{dim:r.dim,name:r.name,type:e,category:r.category==="ENR"?r.subcategory:void 0}}function ce(r,e){var t,s,o,a;if((s=(t=e.project.pz)==null?void 0:t.agg)!=null&&s[r])return{dim:r,name:r,type:"Aggregate"};if((a=(o=e.project.pz)==null?void 0:o.sig)!=null&&a[r])return{dim:r,name:r,type:"Signal"};if(r.indexOf(_)>=0){let[p,l]=r.split(_);return{dim:r,name:l,type:"Enrichment",category:p}}}function le(r){let{type:e,name:t}=ee(r);return`${e}: ${t}`}0&&(module.exports={AggregateClient,ApiClient,ApiClientError,CachedAggregateClient,CachedContextClient,CachedDimensionClient,CachedEnrichmentClient,CachedManifestClient,CachedQuirkClient,CachedSignalClient,ContextClient,DimensionClient,EnrichmentClient,ManifestClient,QuirkClient,SignalClient,UncachedAggregateClient,UncachedContextClient,UncachedDimensionClient,UncachedEnrichmentClient,UncachedManifestClient,UncachedQuirkClient,UncachedSignalClient,computeDimensionDefinitionDisplayData,computeDimensionDisplayData,computeDimensionDisplayName,nullLimitPolicy});
"use strict";var S=Object.defineProperty;var te=Object.getOwnPropertyDescriptor;var re=Object.getOwnPropertyNames;var se=Object.prototype.hasOwnProperty;var ie=(r,e,t)=>e in r?S(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var oe=(r,e)=>{for(var t in e)S(r,t,{get:e[t],enumerable:!0})},ne=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of re(e))!se.call(r,o)&&o!==t&&S(r,o,{get:()=>e[o],enumerable:!(s=te(e,o))||s.enumerable});return r};var ae=r=>ne(S({},"__esModule",{value:!0}),r);var m=(r,e,t)=>(ie(r,typeof e!="symbol"?e+"":e,t),t),pe=(r,e,t)=>{if(!e.has(r))throw TypeError("Cannot "+t)};var i=(r,e,t)=>(pe(r,e,"read from private field"),t?t.call(r):e.get(r)),c=(r,e,t)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,t)};var me={};oe(me,{AggregateClient:()=>y,ApiClient:()=>n,ApiClientError:()=>P,CachedAggregateClient:()=>J,CachedContextClient:()=>_,CachedDimensionClient:()=>M,CachedEnrichmentClient:()=>K,CachedManifestClient:()=>z,CachedQuirkClient:()=>F,CachedSignalClient:()=>X,ContextClient:()=>N,DimensionClient:()=>f,EnrichmentClient:()=>u,ManifestClient:()=>x,QuirkClient:()=>g,SignalClient:()=>d,UncachedAggregateClient:()=>L,UncachedContextClient:()=>Z,UncachedDimensionClient:()=>V,UncachedEnrichmentClient:()=>H,UncachedManifestClient:()=>q,UncachedQuirkClient:()=>B,UncachedSignalClient:()=>W,computeDimensionDefinitionDisplayData:()=>ee,computeDimensionDisplayData:()=>ce,computeDimensionDisplayName:()=>le,nullLimitPolicy:()=>v});module.exports=ae(me);var v=async r=>await r(),P=class extends Error{constructor(t,s,o,a,p,l){super(`${t}
${a}${p?" "+p:""} (${s} ${o}${l?` Request ID: ${l}`:""})`);this.errorMessage=t;this.fetchMethod=s;this.fetchUri=o;this.statusCode=a;this.statusText=p;this.requestId=l;Object.setPrototypeOf(this,P.prototype)}};var n=class{constructor(e){m(this,"options");var s,o,a,p,l,h;if(!e.apiKey&&!e.bearerToken)throw new Error("You must provide an API key or a bearer token");let t=e.fetch;if(!t)if(typeof window!="undefined")t=window.fetch.bind(window);else if(typeof fetch!="undefined")t=fetch;else throw new Error("You must provide or polyfill a fetch implementation when not in a browser");this.options={...e,fetch:t,apiHost:(s=e.apiHost)!=null?s:"https://uniform.app",apiKey:(o=e.apiKey)!=null?o:null,projectId:(a=e.projectId)!=null?a:null,bearerToken:(p=e.bearerToken)!=null?p:null,limitPolicy:(l=e.limitPolicy)!=null?l:v,bypassCache:(h=e.bypassCache)!=null?h:!1}}async apiClient(e,t){return this.options.limitPolicy(async()=>{var a;let s=this.options.apiKey?{"x-api-key":this.options.apiKey}:{Authorization:`Bearer ${this.options.bearerToken}`};this.options.bypassCache&&(s["x-bypass-cache"]="true");let o=await this.options.fetch(e.toString(),{...t,headers:{...t==null?void 0:t.headers,...s}});if(!o.ok){let p="";try{let l=await o.text();try{let h=JSON.parse(l);h.errorMessage?p=Array.isArray(h.errorMessage)?h.errorMessage.join(", "):h.errorMessage:p=l}catch(h){p=l}}catch(l){p="General error"}throw new P(p,(a=t==null?void 0:t.method)!=null?a:"GET",e.toString(),o.status,o.statusText,n.getRequestId(o))}return t!=null&&t.expectNoContent?null:await o.json()})}createUrl(e,t){let s=new URL(`${this.options.apiHost}${e}`);return Object.entries(t!=null?t:{}).forEach(([o,a])=>{var p;typeof a!="undefined"&&a!==null&&s.searchParams.append(o,Array.isArray(a)?a.join(","):(p=a==null?void 0:a.toString())!=null?p:"")}),s}static getRequestId(e){let t=e.headers.get("apigw-requestid");if(t)return t}};var b,U=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(U,b),{...e,projectId:t});return await this.apiClient(s)}async upsert(e){let t=this.createUrl(i(U,b));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(i(U,b));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}},y=U;b=new WeakMap,c(y,b,"/api/v2/aggregate");var L=class extends y{constructor(e){super({...e,bypassCache:!0})}},J=class extends y{constructor(e){super({...e,bypassCache:!1})}};var $="_";function ee(r){let e=r.category==="ENR"?"Enrichment":r.category==="SIG"?"Signal":r.subcategory==="1"?"Intent":r.subcategory==="0"?"Audience":"Aggregate";return{dim:r.dim,name:r.name,type:e,category:r.category==="ENR"?r.subcategory:void 0}}function ce(r,e){var t,s,o,a;if((s=(t=e.project.pz)==null?void 0:t.agg)!=null&&s[r])return{dim:r,name:r,type:"Aggregate"};if((a=(o=e.project.pz)==null?void 0:o.sig)!=null&&a[r])return{dim:r,name:r,type:"Signal"};if(r.indexOf($)>=0){let[p,l]=r.split($);return{dim:r,name:l,type:"Enrichment",category:p}}}function le(r){let{type:e,name:t}=ee(r);return`${e}: ${t}`}var A,Q=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(Q,A),{...e,projectId:t});return await this.apiClient(s)}},f=Q;A=new WeakMap,c(f,A,"/api/v2/dimension");var V=class extends f{constructor(e){super({...e,bypassCache:!0})}},M=class extends f{constructor(e){super({...e,bypassCache:!1})}};var O,w,C=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(C,O),{...e,projectId:t});return await this.apiClient(s)}async upsertCategory(e){let t=this.createUrl(i(C,O));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeCategory(e){let t=this.createUrl(i(C,O));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async upsertValue(e){let t=this.createUrl(i(C,w));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeValue(e){let t=this.createUrl(i(C,w));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}},u=C;O=new WeakMap,w=new WeakMap,c(u,O,"/api/v1/enrichments"),c(u,w,"/api/v1/enrichment-values");var H=class extends u{constructor(e){super({...e,bypassCache:!0})}},K=class extends u{constructor(e){super({...e,bypassCache:!1})}};var k,Y=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(Y,k),{...e,projectId:t});return await this.apiClient(s)}async publish(){let{projectId:e}=this.options,t=this.createUrl("/api/v1/publish",{siteId:e});await this.apiClient(t,{method:"POST",expectNoContent:!0})}},x=Y;k=new WeakMap,c(x,k,"/api/v2/manifest");var q=class extends x{constructor(e){super({...e,bypassCache:!0})}},z=class extends x{constructor(e){super({...e,bypassCache:!1})}};var j,R=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(R,j),{...e,projectId:t});return await this.apiClient(s)}async upsert(e){let t=this.createUrl(i(R,j));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(i(R,j));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}},g=R;j=new WeakMap,c(g,j,"/api/v2/quirk");var B=class extends g{constructor(e){super({...e,bypassCache:!0})}},F=class extends g{constructor(e){super({...e,bypassCache:!1})}};var E,I=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(I,E),{...e,projectId:t});return await this.apiClient(s)}async upsert(e){let t=this.createUrl(i(I,E));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(i(I,E));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}},d=I;E=new WeakMap,c(d,E,"/api/v2/signal");var W=class extends d{constructor(e){super({...e,bypassCache:!0})}},X=class extends d{constructor(e){super({...e,bypassCache:!1})}};var D,G=class extends n{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,s=this.createUrl(i(G,D),{...e,projectId:t});return await this.apiClient(s)}async upsert(e){let t=this.createUrl(i(G,D));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(i(G,D));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}},T=G;D=new WeakMap,c(T,D,"/api/v2/test");var N=class{constructor(e){m(this,"enrichments");m(this,"aggregates");m(this,"dimensions");m(this,"manifest");m(this,"quirks");m(this,"signals");m(this,"tests");this.enrichments=new u(e),this.aggregates=new y(e),this.dimensions=new f(e),this.manifest=new x(e),this.quirks=new g(e),this.signals=new d(e),this.tests=new T(e)}},Z=class extends N{constructor(e){super({...e,bypassCache:!0})}},_=class extends N{constructor(e){super({...e,bypassCache:!1})}};0&&(module.exports={AggregateClient,ApiClient,ApiClientError,CachedAggregateClient,CachedContextClient,CachedDimensionClient,CachedEnrichmentClient,CachedManifestClient,CachedQuirkClient,CachedSignalClient,ContextClient,DimensionClient,EnrichmentClient,ManifestClient,QuirkClient,SignalClient,UncachedAggregateClient,UncachedContextClient,UncachedDimensionClient,UncachedEnrichmentClient,UncachedManifestClient,UncachedQuirkClient,UncachedSignalClient,computeDimensionDefinitionDisplayData,computeDimensionDisplayData,computeDimensionDisplayName,nullLimitPolicy});
import { UniformCLIPlugin } from '@uniformdev/cli';
import { UniformPackage } from '@uniformdev/cli/sync';
import { C as ContextDefinitions } from '../contextTypes-ec62120f.js';
import { C as ContextDefinitions } from '../contextTypes-1907a553.js';
import '../v2-manifest.swagger-200ca5ee.js';

@@ -5,0 +5,0 @@

@@ -1,3 +0,3 @@

import { T as TransitionDataStore, S as StorageCommands, V as VisitorData, a as TransitionDataStoreOptions, D as DecayFunction, O as OutputSeverity, L as LogDrain, C as ContextPlugin, b as CriteriaEvaluator, c as StringMatch, d as ScoreVector, A as AggregateDimension, e as VariantMatchCriteria, f as LogMessage } from './types-c398dba8.js';
export { A as AggregateDimension, l as AggregateDimensionInput, ac as BehaviorTag, a0 as Context, $ as ContextEvents, Y as ContextOptions, C as ContextPlugin, t as ContextState, u as ContextStateUpdate, b as CriteriaEvaluator, n as CriteriaEvaluatorParameters, m as CriteriaEvaluatorResult, D as DecayFunction, H as DecayOptions, aj as DevToolsActions, an as DevToolsDataEvent, ak as DevToolsEvent, al as DevToolsEvents, ar as DevToolsForgetEvent, ao as DevToolsHelloEvent, am as DevToolsLogEvent, aq as DevToolsRawCommandsEvent, ai as DevToolsState, ah as DevToolsUiVersion, ap as DevToolsUpdateEvent, ab as DimensionMatch, E as EnrichmentCategory, q as EnrichmentData, r as EventData, G as GroupCriteriaEvaluator, I as IdentifyCommand, L as LogDrain, f as LogMessage, a6 as LogMessageGroup, a5 as LogMessageSingle, a1 as LogMessages, M as ManifestInstance, g as ManifestV2, a3 as MessageCategory, a4 as MessageFunc, w as ModifyScoreCommand, x as ModifySessionScoreCommand, N as NumberMatch, O as OutputSeverity, Z as PersonalizationEvent, P as PersonalizationManifest, a9 as PersonalizeOptions, ae as PersonalizedResult, ad as PersonalizedVariant, Q as Quirks, W as SERVER_STATE_ID, d as ScoreVector, U as ServerToClientTransitionState, y as SetConsentCommand, F as SetControlGroupCommand, z as SetQuirkCommand, B as SetTestCommand, a2 as Severity, h as Signal, j as SignalCriteria, i as SignalCriteriaGroup, o as SignalData, v as StorageCommand, S as StorageCommands, c as StringMatch, k as TestDefinition, _ as TestEvent, a8 as TestOptions, ag as TestResult, af as TestVariant, p as Tests, T as TransitionDataStore, X as TransitionDataStoreEvents, a as TransitionDataStoreOptions, e as VariantMatchCriteria, V as VisitorData, R as VisitorDataStore, K as VisitorDataStoreEvents, J as VisitorDataStoreOptions, s as emptyVisitorData, aa as personalizeVariations, a7 as testVariations } from './types-c398dba8.js';
import { O as OutputSeverity, L as LogDrain, C as ContextPlugin, S as ScoreVector, A as AggregateDimension, T as TransitionDataStore, a as StorageCommands, V as VisitorData, b as TransitionDataStoreOptions, D as DecayFunction, c as CriteriaEvaluator, d as StringMatch, e as VariantMatchCriteria, f as LogMessage } from './types-cb64a6b4.js';
export { A as AggregateDimension, X as AggregateDimensionInput, a1 as BehaviorTag, j as Context, i as ContextEvents, g as ContextOptions, C as ContextPlugin, aq as ContextState, ar as ContextStateUpdate, c as CriteriaEvaluator, F as CriteriaEvaluatorParameters, E as CriteriaEvaluatorResult, D as DecayFunction, ah as DecayOptions, m as DevToolsActions, q as DevToolsDataEvent, n as DevToolsEvent, o as DevToolsEvents, u as DevToolsForgetEvent, r as DevToolsHelloEvent, p as DevToolsLogEvent, t as DevToolsRawCommandsEvent, l as DevToolsState, k as DevToolsUiVersion, s as DevToolsUpdateEvent, _ as DimensionMatch, R as EnrichmentCategory, an as EnrichmentData, ao as EventData, G as GroupCriteriaEvaluator, ac as IdentifyCommand, L as LogDrain, f as LogMessage, z as LogMessageGroup, y as LogMessageSingle, v as LogMessages, B as ManifestInstance, I as ManifestV2, M as MessageCategory, x as MessageFunc, a7 as ModifyScoreCommand, a8 as ModifySessionScoreCommand, U as NumberMatch, O as OutputSeverity, P as PersonalizationEvent, J as PersonalizationManifest, $ as PersonalizeOptions, a3 as PersonalizedResult, a2 as PersonalizedVariant, al as Quirks, af as SERVER_STATE_ID, S as ScoreVector, ae as ServerToClientTransitionState, a9 as SetConsentCommand, ad as SetControlGroupCommand, aa as SetQuirkCommand, ab as SetTestCommand, w as Severity, K as Signal, Q as SignalCriteria, N as SignalCriteriaGroup, H as SignalData, a6 as StorageCommand, a as StorageCommands, d as StringMatch, W as TestDefinition, h as TestEvent, Y as TestOptions, a5 as TestResult, a4 as TestVariant, am as Tests, T as TransitionDataStore, ag as TransitionDataStoreEvents, b as TransitionDataStoreOptions, e as VariantMatchCriteria, V as VisitorData, ak as VisitorDataStore, aj as VisitorDataStoreEvents, ai as VisitorDataStoreOptions, ap as emptyVisitorData, a0 as personalizeVariations, Z as testVariations } from './types-cb64a6b4.js';
import Cookies from 'js-cookie';

@@ -7,2 +7,19 @@ import 'mitt';

/**
* Creates a new log drain that will log to the console.
* The log drain will only log event IDs, but is much smaller than the
* debug log drain.
*
* NOTE: you probably want enableConsoleLogDrain() instead of this function.
*/
declare function createConsoleLogDrain(level: OutputSeverity): LogDrain;
/**
* Enables logging Context events to the browser console.
* Lightweight events with only the event ID are emitted.
*/
declare function enableConsoleLogDrain(level: OutputSeverity): ContextPlugin;
/** Computes aggregated scores based on other dimensions */
declare function computeAggregateDimensions(primitiveScores: ScoreVector, aggregates: Record<string, AggregateDimension>): ScoreVector;
declare type CookieTransitionDataStoreOptions = {

@@ -76,18 +93,10 @@ /**

/**
* Creates a new log drain that will log to the console.
* The log drain will only log event IDs, but is much smaller than the
* debug log drain.
*
* NOTE: you probably want enableConsoleLogDrain() instead of this function.
*/
declare function createConsoleLogDrain(level: OutputSeverity): LogDrain;
/**
* Enables logging Context events to the browser console.
* Lightweight events with only the event ID are emitted.
*/
declare function enableConsoleLogDrain(level: OutputSeverity): ContextPlugin;
declare function getEnrichmentVectorKey(category: string, value: string): string;
declare const cookieEvaluator: CriteriaEvaluator;
declare const currentPageEvaluator: CriteriaEvaluator;
declare const eventEvaluator: CriteriaEvaluator;
declare const pageViewCountDimension: string;

@@ -100,6 +109,2 @@ declare const pageViewCountEvaluator: CriteriaEvaluator;

declare const eventEvaluator: CriteriaEvaluator;
declare const currentPageEvaluator: CriteriaEvaluator;
/** Tests if a StringMatch matches a string value */

@@ -126,9 +131,12 @@ declare function isStringMatch(lhs: string | number | null | undefined, match: StringMatch): boolean;

/** Computes aggregated scores based on other dimensions */
declare function computeAggregateDimensions(primitiveScores: ScoreVector, aggregates: Record<string, AggregateDimension>): ScoreVector;
declare function evaluateVariantMatch(variantId: string, match: VariantMatchCriteria | undefined | null, vec: ScoreVector, onLogMessage?: (message: LogMessage) => void): boolean;
declare function getEnrichmentVectorKey(category: string, value: string): string;
/**
* Enables a Context instance to feed data to the Uniform Context DevTools.
* DevTools can be hosted either as a Chromium extension, or as a standalone
* React app within a page and receive data once this plugin has been activated.
* @returns Function that when invoked detaches the event listeners and disables DevTools.
*/
declare function enableContextDevTools(): ContextPlugin;
declare function evaluateVariantMatch(variantId: string, match: VariantMatchCriteria | undefined | null, vec: ScoreVector, onLogMessage?: (message: LogMessage) => void): boolean;
declare enum ScriptType {

@@ -152,10 +160,2 @@ ListStart = "nesi-list-start",

/**
* Enables a Context instance to feed data to the Uniform Context DevTools.
* DevTools can be hosted either as a Chromium extension, or as a standalone
* React app within a page and receive data once this plugin has been activated.
* @returns Function that when invoked detaches the event listeners and disables DevTools.
*/
declare function enableContextDevTools(): ContextPlugin;
declare type QuickConnectConfig = {

@@ -162,0 +162,0 @@ apiKey: string;

@@ -1,3 +0,3 @@

var fe=Object.defineProperty;var pe=(e,t,i)=>t in e?fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var y=(e,t,i)=>(pe(e,typeof t!="symbol"?t+"":t,i),i),mt=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};var a=(e,t,i)=>(mt(e,t,"read from private field"),i?i.call(e):t.get(e)),d=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},p=(e,t,i,r)=>(mt(e,t,"write to private field"),r?r.call(e,i):t.set(e,i),i);var v=(e,t,i)=>(mt(e,t,"access private method"),i);function At(e,t){let i={...e};for(let r in t){let n=Nt(e,r,t,new Set([r]));n!==0&&(i[r]=n)}return i}function Nt(e,t,i,r){var s;let n=0;for(let o of i[t].inputs){let u=(s=e[o.dim])!=null?s:0;if(!u&&i[o.dim]){if(r.has(o.dim))continue;let l=new Set(r);l.add(o.dim),u=Nt(e,o.dim,i,l)}if(u!==0)if(o.sign==="c"){n=0;break}else o.sign==="-"?n-=u:n+=u}return n}var tt="_";var Q,F,et=class{constructor(t,i,r){d(this,Q,void 0);d(this,F,void 0);y(this,"signal");this.signal=t,p(this,Q,i),p(this,F,r)}computeSignal(t,i){if(t.scores[this.signal.id]>=this.signal.cap&&this.signal.dur!=="t")return;let n=a(this,Q).evaluate(t,this.signal.crit,i,this.signal,a(this,F)),s=this.signal.dur==="s"||this.signal.dur==="t"?"modscoreS":"modscore";if(!!n.changed){if(n.result)i.push({type:s,data:{dimension:this.signal.id,delta:this.signal.str}});else if(this.signal.dur==="t"){let o=t.visitor.sessionScores[this.signal.id];o&&i.push({type:s,data:{dimension:this.signal.id,delta:-o}})}}}};Q=new WeakMap,F=new WeakMap;var b,K,R,it=class{constructor({manifest:t,evaluator:i=new G({}),onLogMessage:r=()=>{}}){y(this,"data");d(this,b,void 0);d(this,K,void 0);d(this,R,void 0);var n,s,o;p(this,b,(n=t.project)!=null?n:{}),this.data=t,p(this,K,Object.entries((o=(s=a(this,b).pz)==null?void 0:s.sig)!=null?o:[]).map(([u,c])=>new et({...c,id:u},i,r))),p(this,R,r)}rollForControlGroup(){var t,i;return Math.random()<((i=(t=a(this,b).pz)==null?void 0:t.control)!=null?i:0)}getTest(t){var i;return(i=a(this,b).test)==null?void 0:i[t]}computeSignals(t){let i=[];a(this,R).call(this,["debug",200,"GROUP"]);try{a(this,K).forEach(r=>{a(this,R).call(this,["debug",201,"GROUP",r.signal]);try{r.computeSignal(t,i)}finally{a(this,R).call(this,["debug",201,"ENDGROUP"])}})}finally{a(this,R).call(this,["debug",200,"ENDGROUP"])}return i}computeAggregateDimensions(t){var i,r;return At(t,(r=(i=a(this,b).pz)==null?void 0:i.agg)!=null?r:{})}getDimensionByKey(t){var r,n,s,o;let i=t.indexOf(tt);return i<=0?(n=(r=a(this,b).pz)==null?void 0:r.sig)==null?void 0:n[t]:(o=(s=a(this,b).pz)==null?void 0:s.enr)==null?void 0:o[t.substring(0,i)]}};b=new WeakMap,K=new WeakMap,R=new WeakMap;import{dequal as me}from"dequal/lite";function E(e,t){var o,u,c,l,f,m;let i=(o=t==null?void 0:t.op)!=null?o:"=";if(t.op==="*")return e!==null&&typeof e!="undefined";if(t.op==="!*")return e===null||typeof e=="undefined";if(!("rhs"in t))throw new Error(`Match expression is required for match type ${i}`);let r=(u=t.cs)!=null?u:!1,n=(r?e!=null?e:"":Gt(e)).toString(),s=(r?t.rhs:Gt(t.rhs)).toString();switch(i){case"=":return n===s;case"!=":return n!==s;case"~":return(c=n.includes(s))!=null?c:!1;case"!~":return!((l=n.includes(s))==null||l);case"//":return new RegExp(t.rhs.toString(),r?"":"i").test((f=e==null?void 0:e.toString())!=null?f:"");case"!//":return!new RegExp(t.rhs.toString(),r?"":"i").test((m=e==null?void 0:e.toString())!=null?m:"");default:throw new Error(`Unknown match type ${i}.`)}}function O(e,t){return`'${("cs"in t?t.cs:!1)?e:e==null?void 0:e.toString().toUpperCase()}' ${ht(t)}`}function ht(e){return"rhs"in e?`${e.op} '${e.cs?e.rhs:e.rhs.toString().toUpperCase()}'`:`${e.op==="*"?"exists":"does not exist"}`}function Gt(e){var t,i;return(i=(t=e==null?void 0:e.toString())==null?void 0:t.toUpperCase())!=null?i:""}var It=({update:e,criteria:t,onLogMessage:i})=>{var u,c;if(t.type!=="CK")return{result:!1,changed:!1};let r=!me(zt(e.state.cookies),zt((u=e.previousState)==null?void 0:u.cookies)),n=(c=e.state.cookies)==null?void 0:c[t.cookieName],o={result:E(n,t.match),changed:r};return i==null||i(["debug",203,{criteria:t,result:o,explanation:O(n,t.match)}]),o};function zt(e){if(!e)return;if(!e.ufvd)return e;let{ufvd:t,...i}=e;return i}function qt(e,t){var r;if(typeof e=="undefined"||e===null)return!1;let i=Number(e);if(isNaN(i))return!1;switch((r=t==null?void 0:t.op)!=null?r:"="){case"=":return i===t.rhs;case"!=":return i!==t.rhs;case">":return i>t.rhs;case"<":return i<t.rhs;default:return console.warn(`Unknown match type ${t.op} is false.`),!1}}function jt(e,t){return`${e} ${he(t)}`}function he(e){return`${e.op} ${e.rhs}`}function rt(e,t){return`${e}${tt}${t}`}var gt=rt("$pvc","v"),vt=({update:e,criteria:t,commands:i,onLogMessage:r})=>{var l,f;if(t.type!=="PVC")return{result:!1,changed:!1};let n=Boolean(e.state.url&&(!e.previousState||((l=e.state.url)==null?void 0:l.toString())!==((f=e.previousState.url)==null?void 0:f.toString()))),o=(e.visitor.sessionScores[gt]||0)+1,u={result:!1,changed:n},c=i.some(m=>m.type==="modscoreS"&&m.data.dimension===gt);return n&&!c&&i.push({type:"modscoreS",data:{dimension:gt,delta:1}}),qt(o,t.match)&&(u.result=!0),r==null||r(["debug",203,{criteria:t,result:u,explanation:jt(o,t.match)}]),u};vt.alwaysExecute=!0;var _t=({update:e,criteria:t,onLogMessage:i})=>{var u,c,l,f,m;if(t.type!=="QS")return{result:!1,changed:!1};let r=!e.previousState||((c=(u=e.state.url)==null?void 0:u.searchParams)==null?void 0:c.toString())!==((f=(l=e.previousState.url)==null?void 0:l.searchParams)==null?void 0:f.toString()),n=(m=e.state.url)==null?void 0:m.searchParams.get(t.queryName),o={result:E(n,t.match),changed:r};return i==null||i(["debug",203,{criteria:t,result:o,explanation:O(n,t.match)}]),o};var Qt=({update:e,criteria:t,signal:i,onLogMessage:r})=>{var f;if(t.type!=="QK")return{result:!1,changed:!1};if(typeof document=="undefined"&&e.scores[i.id]>0)return{result:!0,changed:!1};let n=e.visitor.quirks[t.key],s=(f=e.state.quirks)==null?void 0:f[t.key],o=s!=null?s:n,u=Boolean(s&&n!==s),l={result:E(o,t.match),changed:u};return r==null||r(["debug",203,{criteria:t,result:l,explanation:O(o,t.match)}]),l};var Ft=({update:e,criteria:t,onLogMessage:i})=>{var s,o,u;if(t.type!=="EVT")return{result:!1,changed:!1};let r=(o=(s=e.state.events)==null?void 0:s.some(c=>E(c.event,t.event)))!=null?o:!1,n={result:r,changed:r};return i==null||i(["debug",203,{criteria:t,result:n,explanation:`'${(u=e.state.events)==null?void 0:u.join("', '")}' ${ht(t.event)}`}]),n};var Kt=({update:e,criteria:t,onLogMessage:i})=>{var u,c,l;if(t.type!=="PV")return{result:!1,changed:!1};let r=(u=e.state.url)==null?void 0:u.pathname,n=!e.previousState||(r==null?void 0:r.toString())!==((l=(c=e.previousState.url)==null?void 0:c.pathname)==null?void 0:l.toString()),o={result:E(r,t.path),changed:n};return i==null||i(["debug",203,{criteria:t,result:o,explanation:O(r,t.path)}]),o};var H,G=class{constructor(t){d(this,H,void 0);p(this,H,t)}evaluate(t,i,r,n,s){let o=i.clauses.length>1;o&&(s==null||s(["debug",202,"GROUP",i]));try{let u=!(i.op==="&"||!i.op),c=null,l=!1;for(let m of i.clauses){let S;if(m.type==="G")S=this.evaluate(t,m,r,n,s);else{let C=a(this,H)[m.type];if(c&&!C.alwaysExecute)continue;if(!C)throw new Error(`${m.type} signal criteria not registered`);S=C({update:t,criteria:m,commands:r,signal:n,onLogMessage:s})}S.changed&&(l=!0),!c&&S.result===u&&(c={result:u,changed:l})}let f=c!=null?c:{result:!u,changed:l};return o&&(s==null||s(["debug",204,f])),f}finally{o&&(s==null||s(["debug",202,"ENDGROUP"]))}}};H=new WeakMap;var nt=()=>({quirks:{},scores:{},sessionScores:{},tests:{},consent:!1,controlGroup:!1});import ge from"mitt";import{dequal as ve}from"dequal/lite";var Se="__UNIFORM_DATA__",U,B,z,I=class{constructor({initialData:t}){d(this,U,void 0);d(this,B,void 0);d(this,z,ge());y(this,"events",{on:a(this,z).on,off:a(this,z).off});t&&(p(this,U,t),p(this,B,t))}get data(){return a(this,U)}get initialData(){return a(this,B)}updateData(t,i){return p(this,U,i),this.handleUpdateData(t,i)}async delete(t){p(this,U,void 0),await this.handleDelete(t)}signalAsyncDataUpdate(t){ve(this.data,t)||(p(this,U,t),a(this,z).emit("dataUpdatedAsync",t))}getClientTransitionState(){if(typeof document=="undefined")return;let t=document.getElementById(Se);return t!=null&&t.textContent?JSON.parse(t.textContent):void 0}};U=new WeakMap,B=new WeakMap,z=new WeakMap;var St="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ht=St.split(""),Bt=new Array(123);for(let e=0;e<St.length;e++)Bt[St.charCodeAt(e)]=e;var yt=e=>{if(e<0)return`-${yt(-e)}`;let t=e>>>0,i=e/4294967296>>>0,r="";for(;i>0;)r=Ht[63&t]+r,t>>>=6,t|=(63&i)<<26,i>>>=6;let n="";do n=Ht[63&t]+n,t>>>=6;while(t>0);return n+r},Jt=e=>{let t=0,i=e.charAt(0)==="-"?1:0;for(let r=i;r<e.length;r++)t=t*64+Bt[e.charCodeAt(r)];return i?-t:t};import Dt from"js-cookie";var Ct=typeof document=="undefined",ye="ufvd",$,J,Wt=class extends I{constructor({serverCookieValue:i,cookieName:r=ye,cookieAttributes:n={sameSite:"lax"}}){super({initialData:Ct?De(i):void 0});d(this,$,void 0);d(this,J,void 0);p(this,$,r),p(this,J,n)}handleDelete(){return Ct||Dt.remove(a(this,$)),Promise.resolve()}async handleUpdateData(i,r){Ct||(r.consent?Dt.set(a(this,$),Ce(r),a(this,J)):Dt.remove(a(this,$)))}};$=new WeakMap,J=new WeakMap;var Zt="~",Mt="!",Lt="-";function De(e){if(!e)return;let t=e.split(Zt);if(t.length>3)return;let[i,r,n]=t;return{consent:!0,sessionScores:Yt(xt(r)),scores:Yt(xt(n)),tests:xt(i)}}function xt(e){return e.split(Mt).map(i=>i.split(Lt)).reduce((i,r)=>(r.length<2||(i[r[0]]=r.slice(1).join("-")),i),{})}function Yt(e){return Object.entries(e).reduce((t,[i,r])=>(t[i]=Jt(r),t),{})}function Ce(e){return[bt(e.tests),bt(Xt(e.sessionScores)),bt(Xt(e.scores))].join(Zt)}function Xt(e){return Object.entries(e).reduce((t,[i,r])=>(t[i]=yt(r),t),{})}function bt(e){return Object.entries(e).map(t=>t.join(Lt)).join(Mt)}var ot,ee,te=class extends I{constructor({serverCookieValue:i,visitorIdCookieName:r="ufvi",...n}){super(n);d(this,ot);n.initialData||v(this,ot,ee).call(this).catch(s=>{console.error(s)})}handleDelete(i){throw new Error("Method not implemented.")}async handleUpdateData(i){let r=await new Promise(n=>{setTimeout(()=>{n(void 0)},2e3)});r&&this.signalAsyncDataUpdate(r)}};ot=new WeakSet,ee=async function(){let i=await new Promise(r=>{setTimeout(()=>{r(void 0)},2e3)});i&&this.signalAsyncDataUpdate(i)};function Ii(e){let{gracePeriod:t=864e5,decayRate:i=1/30,decayCap:r=.95}=e!=null?e:{};return function({now:s,lastUpd:o,scores:u,sessionScores:c,onLogMessage:l}){if(typeof o!="number")return!1;let m=s-o-t;if(m<=0)return!1;let S=m/864e5,C=1-Math.min(r,S*i);return C<=0?!1:(ie(u,C),ie(c,C),l==null||l(["info",140,`linear decay factor ${C.toPrecision(6)}`]),!0)}}function ie(e,t){for(let i in e)i.startsWith("$")||(e[i]*=t)}import Ee from"mitt";import{dequal as at}from"dequal/lite";var st=class{constructor(){y(this,"inMemoryFallback",{});y(this,"hasLocalStorageObject",typeof localStorage!="undefined")}get(t){let i=this.inMemoryFallback[t];if(!this.hasLocalStorageObject||i)return i;try{let r=localStorage.getItem(t);return r?JSON.parse(r):void 0}catch(r){return i}}set(t,i,r){if(this.inMemoryFallback[t]=i,!(!this.hasLocalStorageObject||!r))try{localStorage.setItem(t,JSON.stringify(i))}catch(n){console.warn(n)}}delete(t,i){i||delete this.inMemoryFallback[t];try{localStorage.removeItem(t)}catch(r){}}};import xe from"rfdc";var be=xe();function re(e,t,i){let r=t?be(t):nt();return e.forEach(n=>{var s,o;switch(n.type){case"consent":r.consent=n.data;break;case"setquirk":r.quirks[n.data.key]=n.data.value;break;case"settest":r.tests[n.data.test]=n.data.variant;break;case"modscore":if(i)break;let u=Number(n.data.delta);if(isNaN(u))throw new Error("Non-number delta received");let c=(s=r.scores[n.data.dimension])!=null?s:0;r.scores[n.data.dimension]=c+u;break;case"modscoreS":if(i)break;let l=Number(n.data.delta);if(isNaN(l))throw new Error("Non-number delta received");let f=(o=r.sessionScores[n.data.dimension])!=null?o:0;r.sessionScores[n.data.dimension]=f+l;break;case"identify":break;case"setcontrol":r.controlGroup=n.data;break;default:throw new Error("Unknown command")}}),r}var ut="ufvisitor",V,N,q,g,x,P,w,A,ct,ne,dt,oe,W,Et,Y,Vt,lt=class{constructor(t){d(this,x);d(this,w);d(this,ct);d(this,dt);d(this,W);d(this,Y);d(this,V,Ee());d(this,N,new st);d(this,q,void 0);d(this,g,void 0);y(this,"events",{on:a(this,V).on,off:a(this,V).off});if(p(this,g,t),a(this,x,P)||v(this,w,A).call(this,v(this,Y,Vt).call(this),!0),t.transitionStore){let i=t.transitionStore.getClientTransitionState();i&&t.onServerTransitionReceived&&t.onServerTransitionReceived(i),t.transitionStore.events.on("dataUpdatedAsync",n=>{v(this,w,A).call(this,{...a(this,x,P).visitorData,...n})});let r=t.transitionStore.data;r&&v(this,w,A).call(this,{...a(this,x,P).visitorData,...r},!0)}}get data(){var i,r;let t=a(this,x,P);if(v(this,dt,oe).call(this,t)){let{sessionScores:n,...s}=t.visitorData;return v(this,w,A).call(this,{...s,sessionScores:{}}),(r=(i=a(this,g)).onLogMessage)==null||r.call(i,["info",120]),a(this,x,P).visitorData}return t.visitorData}get decayEnabled(){return!!a(this,g).decay}get options(){return a(this,g)}async updateData(t){var r,n,s,o;if(t.length===0)return;(n=(r=a(this,g)).onLogMessage)==null||n.call(r,["debug",101,t]);let i=re(t,this.data,(s=a(this,x,P))==null?void 0:s.visitorData.controlGroup);t.some(u=>u.type==="consent"&&!u.data)&&a(this,N).delete(ut,!0),v(this,w,A).call(this,i),await((o=a(this,g).transitionStore)==null?void 0:o.updateData(t,a(this,x,P).visitorData))}async delete(t){var i,r,n,s,o;(r=(i=a(this,g)).onLogMessage)==null||r.call(i,["info",103,"GROUP",t]);try{a(this,N).delete(ut,!1),await((n=a(this,g).transitionStore)==null?void 0:n.delete(t)),v(this,w,A).call(this,v(this,Y,Vt).call(this))}finally{(o=(s=a(this,g)).onLogMessage)==null||o.call(s,["info",103,"ENDGROUP"])}}};V=new WeakMap,N=new WeakMap,q=new WeakMap,g=new WeakMap,x=new WeakSet,P=function(){return a(this,N).get(ut)},w=new WeakSet,A=function(t,i=!1){var f,m,S,C,L,Rt,Ot,Ut,$t;let r=a(this,x,P),n=Date.now();t.controlGroup?(t.scores={},t.sessionScores={}):(v(this,W,Et).call(this,t.scores),v(this,W,Et).call(this,t.sessionScores),(m=(f=a(this,g)).decay)==null||m.call(f,{now:n,lastUpd:r==null?void 0:r.updated,scores:t.scores,sessionScores:t.sessionScores,onLogMessage:a(this,g).onLogMessage}));let s=!at(r==null?void 0:r.visitorData.scores,t.scores),o=!at(r==null?void 0:r.visitorData.sessionScores,t.sessionScores),u=!at(r==null?void 0:r.visitorData.quirks,t.quirks),c=!at(r==null?void 0:r.visitorData.tests,t.tests),l={updated:n,visitorData:t};v(this,ct,ne).call(this),a(this,N).set(ut,l,!!t.consent),(C=(S=a(this,g)).onLogMessage)==null||C.call(S,["debug",102,t]),i||((s||o)&&a(this,V).emit("scoresUpdated",t),u&&a(this,V).emit("quirksUpdated",t),c&&a(this,V).emit("testsUpdated",t),((L=r==null?void 0:r.visitorData)==null?void 0:L.consent)!==t.consent&&a(this,V).emit("consentUpdated",t),((Rt=r==null?void 0:r.visitorData)==null?void 0:Rt.controlGroup)!==t.controlGroup&&(a(this,V).emit("controlGroupUpdated",t),($t=(Ut=a(this,g)).onLogMessage)==null||$t.call(Ut,["debug",104,(Ot=t.controlGroup)!=null?Ot:!1])))},ct=new WeakSet,ne=function(){typeof document=="undefined"||!a(this,g).visitLifespan||(a(this,q)&&window.clearTimeout(a(this,q)),p(this,q,window.setTimeout(()=>{this.data},a(this,g).visitLifespan+50)))},dt=new WeakSet,oe=function(t){let i=a(this,g).visitLifespan;return i?t.updated+i<Date.now():!1},W=new WeakSet,Et=function(t){var i,r;if(!!a(this,g).manifest)for(let n in t){let s=t[n],o=a(this,g).manifest.getDimensionByKey(n);!o||s>o.cap&&((r=(i=a(this,g)).onLogMessage)==null||r.call(i,["debug",110,{dim:n,score:s,cap:o.cap}]),t[n]=o.cap)}},Y=new WeakSet,Vt=function(){var t,i,r;return{...nt(),consent:(t=a(this,g).defaultConsent)!=null?t:!1,controlGroup:(r=(i=a(this,g).manifest)==null?void 0:i.rollForControlGroup())!=null?r:!1}};import Te from"mitt";function se({name:e,context:t,variations:i,take:r=1,onLogMessage:n}){var s,o,u;n==null||n(["info",300,"GROUP",{name:e,take:r}]);try{let c=(s=t.storage.data.controlGroup)!=null?s:!1,l=[],f=!1,m=t.scores;for(let S of i){if(l.length===r)break;if(!((o=S.pz)!=null&&o.crit.length)){n==null||n(["info",301,"GROUP",{id:S.id,op:(u=S.pz)==null?void 0:u.op}]),n==null||n(["info",302,{matched:!0,description:"default variation"}]),n==null||n(["info",303,!0]),n==null||n(["info",301,"ENDGROUP"]),l.push(S);continue}c||ae(S.id,S.pz,m,n)&&(f=!0,l.push(S))}return{personalized:f,variations:l}}finally{n==null||n(["info",300,"ENDGROUP"])}}function ae(e,t,i,r){r==null||r(["info",301,"GROUP",{id:e,op:t==null?void 0:t.op}]);let n;try{t!=null&&t.crit?!t.op||t.op==="&"?n=t.crit.every(s=>ue(s,i,r)):n=t.crit.some(s=>ue(s,i,r)):(r==null||r(["info",302,{matched:!0,description:"default variation"}]),n=!0),r==null||r(["info",303,n])}finally{r==null||r(["info",301,"ENDGROUP"])}return n}function ue(e,t,i){var u,c;let{op:r,l:n}=e,s=(u=t[n])!=null?u:0;if(r==="+"){let l=Math.max(...Object.values(t))===s&&s>0;return i==null||i(["info",302,{matched:l,description:`${e.l} has the highest score`}]),l}else if(r==="-"){let l=Math.min(...Object.values(t))===s&&s>0;return i==null||i(["info",302,{matched:l,description:`${e.l} has the lowest non-zero score`}]),l}let o;if(e.rDim?o=t[e.rDim]||0:o=parseInt(e.r,10),isNaN(o))return i==null||i(["info",302,{matched:!1,description:`${(c=e.rDim)!=null?c:e.r} has no score value`}]),!1;if(r===">"){let l=s>o;return j(i,l,e,s,o),l}else if(r===">="){let l=s>=o;return j(i,l,e,s,o),l}else if(r==="<"){let l=s<o;return j(i,l,e,s,o),l}else if(r==="<="){let l=s<=o;return j(i,l,e,s,o),l}else if(r==="="){let l=s===o;return j(i,l,e,s,o),l}else if(r==="!="){let l=s!==o;return j(i,l,e,s,o),l}else throw new Error(`Unknown op: ${r}`)}function j(e,t,i,r,n){e==null||e(["info",302,{matched:t,description:`${i.l}[${r}] ${i.op} ${i.rDim?`${i.rDim}[${n}]`:i.r}`}])}var Ve=e=>{let{values:t,total:i,missingDistribution:r}=e.reduce((n,s)=>(s.testDistribution?n.total+=s.testDistribution:++n.missingDistribution,n.values.push(s.testDistribution),n),{values:[],total:0,missingDistribution:0});if(i>100)throw new Error(`Total distribution ${i} is over the maximum 100.`);if(i<100){let s=(100-i)/r;t.forEach((o,u)=>{typeof o=="undefined"&&(t[u]=s)})}return t},Tt=({name:e,context:t,variations:i,onLogMessage:r})=>{r==null||r(["info",400,"GROUP",e]);try{let n,s=t.getTestVariantId(e);if(s===null)return r==null||r(["error",401,e]),{result:void 0,variantAssigned:!1};if(s&&(n=i.find(o=>o.id===s),n||r==null||r(["warn",402,{missingVariant:s,variants:i.map(o=>o.id)}])),!n){let o=Ve(i),u=Math.floor(Math.random()*100),c=0;n=i.find((l,f)=>{let m=o[f];if(u>c&&u<=c+m)return l;c+=m}),n&&(r==null||r(["info",403,n.id]),t.setTestVariantId(e,n.id))}return n&&(r==null||r(["info",404,n.id])),{result:n,variantAssigned:!s}}finally{r==null||r(["info",400,"ENDGROUP"])}};import{dequal as le}from"dequal/lite";var D,T,k,X,h,Z,kt,_,ft,M,Pt,ce=class{constructor(t){d(this,Z);d(this,_);d(this,M);y(this,"manifest");d(this,D,void 0);d(this,T,{});d(this,k,void 0);d(this,X,{});d(this,h,Te());y(this,"events",{on:a(this,h).on,off:a(this,h).off});y(this,"storage");var n,s;let{manifest:i,...r}=t;p(this,k,{}),(n=t.plugins)==null||n.forEach(o=>{!o.logDrain||a(this,h).on("log",o.logDrain)}),a(this,h).emit("log",["info",1,"GROUP"]);try{this.manifest=new it({onLogMessage:o=>a(this,h).emit("log",o),manifest:i,evaluator:new G({CK:It,QS:_t,QK:Qt,PVC:vt,EVT:Ft,PV:Kt})}),this.storage=new lt({...r,manifest:this.manifest,onServerTransitionReceived:o=>{p(this,D,o),o.ssv&&(p(this,T,o.ssv),a(this,h).emit("log",["debug",130,o]))},onLogMessage:o=>a(this,h).emit("log",o)}),this.storage.events.on("scoresUpdated",v(this,_,ft).bind(this)),a(this,D)||v(this,_,ft).call(this,this.storage.data),this.storage.events.on("quirksUpdated",o=>{let u=this.manifest.computeSignals({scores:a(this,T),state:a(this,k),previousState:a(this,k),visitor:this.storage.data});this.storage.updateData(u),a(this,h).emit("quirksUpdated",o.quirks),a(this,h).emit("log",["info",4,o.quirks])}),(s=t.plugins)==null||s.forEach(o=>{!o.init||o.init(this)})}finally{a(this,h).emit("log",["info",1,"ENDGROUP"])}}get scores(){return a(this,T)}get quirks(){var t,i;return(i=(t=a(this,D))==null?void 0:t.quirks)!=null?i:this.storage.data.quirks}async update(t){var n,s,o;let i=[],r={};if((n=a(this,D))!=null&&n.quirks&&(t={...t,quirks:{...a(this,D).quirks,...t.quirks||{}}}),(s=a(this,D))!=null&&s.tests){let u=Object.entries(a(this,D).tests);if(u.length>0){let c=[];u.forEach(([l,f])=>{this.storage.data.tests[l]||(c.push([l,f]),r[l]=f)}),i.push(...c.map(([l,f])=>({type:"settest",data:{test:l,variant:f}})))}}try{a(this,h).emit("log",["info",2,"GROUP",{...t,url:(o=t.url)==null?void 0:o.toString()}]),t.quirks&&i.push(...Object.entries(t.quirks).map(([u,c])=>({type:"setquirk",data:{key:u,value:c}}))),t.enrichments&&t.enrichments.forEach(u=>{let c=rt(u.cat,u.key);this.manifest.getDimensionByKey(c)?i.push({type:"modscore",data:{dimension:c,delta:u.str}}):a(this,h).emit("log",["warn",5,u])}),i.push(...this.manifest.computeSignals({state:t,previousState:a(this,k),visitor:this.storage.data,scores:a(this,D)?v(this,M,Pt).call(this,this.storage.data):a(this,T)})),p(this,k,{...a(this,k),...t}),await this.storage.updateData(i),a(this,D)&&(v(this,_,ft).call(this,this.storage.data),Object.entries(r).forEach(([u,c])=>{v(this,Z,kt).call(this,{name:u,variantId:c,variantAssigned:!0})}),p(this,D,void 0),a(this,h).emit("log",["debug",131]))}finally{a(this,h).emit("log",["info",2,"ENDGROUP"])}}getTestVariantId(t){var r,n,s,o;let i=this.manifest.getTest(t);return i?(o=(s=i.wv)!=null?s:(n=(r=a(this,D))==null?void 0:r.tests)==null?void 0:n[t])!=null?o:this.storage.data.tests[t]:(a(this,h).emit("log",["warn",401,t]),null)}setTestVariantId(t,i){this.storage.updateData([{type:"settest",data:{test:t,variant:i}}])}log(...t){a(this,h).emit("log",t)}test(t){var r,n;let i=Tt({...t,context:this,onLogMessage:s=>a(this,h).emit("log",s)});return v(this,Z,kt).call(this,{name:t.name,variantId:(n=(r=i.result)==null?void 0:r.id)!=null?n:void 0,variantAssigned:i.variantAssigned}),i}personalize(t){let i=se({...t,context:this,onLogMessage:s=>a(this,h).emit("log",s)}),r=a(this,X)[t.name],n={name:t.name,variantIds:i.variations.map(s=>{var o;return(o=s.id)!=null?o:"Unknown"}),control:this.storage.data.controlGroup,changed:!0};return r&&le(n.variantIds,r)&&(n.changed=!1),a(this,h).emit("personalizationResult",n),a(this,X)[t.name]=n.variantIds,i}async forget(t){p(this,k,{}),await this.storage.delete(t)}getServerToClientTransitionState(){let t={quirks:this.storage.data.quirks,ssv:a(this,T),tests:{}},i=this.storage.data.tests;return Object.entries(i).map(([r,n])=>{var s,o,u;((u=(o=(s=this.storage.options.transitionStore)==null?void 0:s.initialData)==null?void 0:o.tests)==null?void 0:u[r])!==i[r]&&t.tests&&(t.tests[r]=n)}),t}};D=new WeakMap,T=new WeakMap,k=new WeakMap,X=new WeakMap,h=new WeakMap,Z=new WeakSet,kt=function(t){a(this,h).emit("testResult",t)},_=new WeakSet,ft=function(t){let i=v(this,M,Pt).call(this,t);!le(i,a(this,T))&&(p(this,T,i),a(this,h).emit("scoresUpdated",i),a(this,h).emit("log",["info",3,i]))},M=new WeakSet,Pt=function(t){var r;let i={...t.scores};for(let n in t.sessionScores)i[n]=((r=i[n])!=null?r:0)+t.sessionScores[n];return i=this.manifest.computeAggregateDimensions(i),i};import ke from"rfdc";function pt(e,t){if(e==="none")return!1;switch(t){case"debug":return e==="debug";case"info":return e==="info"||e==="debug";case"warn":return e==="warn"||e==="info"||e==="debug";case"error":return e==="debug"||"info";default:return!1}}var Pe=ke();function we(e){return([t,...i])=>{if(!pt(e,t))return;let[r,...n]=i;console[t](`\u{1F94B} [${t}] Uniform event ID ${r}
`,...n.map(Pe))}}function Tr(e){return{logDrain:we(e)}}var de={1:()=>["context","initializing Uniform Context"],2:e=>["context","received update()",e],3:e=>["context","new score vector",e],4:e=>["context","updated quirks",e],5:e=>["context","ignored enrichment update for unknown enrichment category",e.cat],101:e=>["storage","received update commands",e],102:e=>["storage","data was updated",e],103:e=>["storage",`deleting visitor data ${e?"from all devices":"from this device"}`],104:e=>["context",e?"Visitor assigned to personalization control group":"Visitor assigned to personalization experiment group"],110:({dim:e,cap:t,score:i})=>["storage",`${e} score ${i} exceeded cap ${t}. Rounded down.`],120:()=>["storage","visitor data expired and was cleared"],130:e=>["storage","server to client transition score data was loaded; it will persist until the next update event occurs",e],131:()=>["storage","server to client transition data was discarded"],140:e=>["storage",`score decay was applied: ${e}`],200:()=>["signals","evaluating signals"],201:e=>["signals",`evaluating signal ${e.id} (${e.dur})`],202:e=>["signals",e.op==="|"?"OR":"AND"],203:({criteria:e,result:t,explanation:i})=>["signals",`${e.type}: ${i} is ${t.result} [${t.changed?"CHANGED":"unchanged"}]`],204:e=>["signals",`group result: ${e.result} [${e.changed?"CHANGED":"unchanged"}]`],300:e=>["personalization",`executing personalization '${e.name}'`],301:({id:e,op:t})=>["personalization",`testing variation ${e} (${t==="|"?"OR":"AND"})`],302:({matched:e,description:t})=>["personalization",`${t} is ${e}`],303:e=>["personalization",e?"selected variation":"did not select variation"],400:e=>["testing",`executing A/B test '${e}'`],401:e=>["testing",`${e} is not registered in the manifest; it will not be run.`],402:({missingVariant:e,variants:t})=>["testing",`test variation '${e}' previously assigned to the visitor for this test no longer exists as a variant. It will be removed. This may indicate changing test variations after publishing a test, which will make results invalid. Known variants: ${t.join(", ")}`],403:e=>["testing",`assigned new test variant '${e}'`],404:e=>["testing",`displaying variation '${e}'`],700:()=>["gtag","gtag is not defined, skipping analytics event emission. Ensure you have added the gtag script to your page."],701:()=>["gtag","enabled gtag event signal redirection"]};import Re from"rfdc";var Oe=Re();function Ue(e,t){let i=typeof document=="undefined",{enableOnServer:r=!1}=t!=null?t:{};return([n,...s])=>{if(!pt(e,n)||i&&!r)return;let[o,...u]=s,c=console[n];if(u[0]==="GROUP"&&(u.shift(),c=console.groupCollapsed),u[0]==="ENDGROUP"){console.groupEnd();return}let l=de[o],f="";switch(n){case"debug":f="\u{1F41E}";break;case"info":f="\u{1F4AC}";break;case"warn":f="\u26A0\uFE0F";break;case"error":f="\u{1F4A5}";break}let m=f;if(!l){c(`${m} unknown event ID ${o}. Log messages data may be older than Uniform Context package.`,...u);return}let[S,C,...L]=l(...u);c(`${m}[${S}] ${C}
`,...L.map(Oe))}}function Ur(e,t){return{logDrain:Ue(e,t)}}var $e=(u=>(u.ListStart="nesi-list-start",u.ListEnd="nesi-list-end",u.ListItem="nesi-list-item-html",u.ListItemSettings="nesi-list-item-settings",u.TestStart="nesi-test-start",u.TestEnd="nesi-test-end",u.Unknown="unknown",u))($e||{}),Ar="nesitag";var wt=typeof top!="undefined";function Gr(){return{logDrain:e=>{!wt||top==null||top.postMessage({type:"uniform:context:log",message:e},window.location.origin)},init:e=>{let t=[],i=[],r=()=>{!wt||top==null||top.postMessage({type:"uniform:context:data",data:{scores:e.scores,data:e.storage.data,manifest:e.manifest.data,personalizations:t,tests:i}},window.location.origin)},n=o=>{!o.changed||t.push(o)},s=o=>{!o.variantAssigned||i.push(o)};if(wt){window.__UNIFORM_DEVTOOLS_CONTEXT_INSTANCE__=e;try{top==null||top.addEventListener("message",async o=>{if(!o.data)return;let u=o.data;await Ae(u,e)})}catch(o){console.warn("Unable to initialize Uniform Context DevTools because it is in a cross-domain iframe.",o)}top==null||top.postMessage({type:"uniform:context:hello",uiVersion:2},window.location.origin),r()}return e.events.on("personalizationResult",n),e.events.on("testResult",s),e.events.on("scoresUpdated",r),e.storage.events.on("*",r),()=>{e.events.off("scoresUpdated",r),e.storage.events.off("*",r),e.events.off("personalizationResult",n),e.events.off("testResult",s)}}}}async function Ae(e,t){e.type==="uniform-in:context:update"&&e.newData&&await t.update(e.newData),e.type==="uniform-in:context:commands"&&e.commands&&Array.isArray(e.commands)&&await t.storage.updateData(e.commands),e.type==="uniform-in:context:forget"&&await t.forget(!1)}function Ir(e){return`${e.apiKey}|${e.projectId}${e.apiHost?`|${e.apiHost}`:""}`}function qr(e){let[t,i,r]=e.split("|");if(!t.startsWith("uf"))throw new Error("Invalid API key");if(!/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})$/i.test(i))throw new Error("Invalid project ID");return{apiKey:t,projectId:i,apiHost:r||"https://uniform.app"}}export{ce as Context,Wt as CookieTransitionDataStore,Ar as EdgeNodeTagName,te as EdgeTransitionDataStore,G as GroupCriteriaEvaluator,it as ManifestInstance,Se as SERVER_STATE_ID,$e as ScriptType,I as TransitionDataStore,ye as UNIFORM_DEFAULT_COOKIE_NAME,lt as VisitorDataStore,At as computeAggregateDimensions,It as cookieEvaluator,we as createConsoleLogDrain,Ue as createDebugConsoleLogDrain,Ii as createLinearDecay,Kt as currentPageEvaluator,nt as emptyVisitorData,Tr as enableConsoleLogDrain,Gr as enableContextDevTools,Ur as enableDebugConsoleLogDrain,ae as evaluateVariantMatch,Ft as eventEvaluator,O as explainStringMatch,ht as explainStringMatchCriteria,rt as getEnrichmentVectorKey,E as isStringMatch,gt as pageViewCountDimension,vt as pageViewCountEvaluator,qr as parseQuickConnect,se as personalizeVariations,_t as queryStringEvaluator,Qt as quirkEvaluator,Ir as serializeQuickConnect,Tt as testVariations};
var fe=Object.defineProperty;var pe=(e,t,i)=>t in e?fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var y=(e,t,i)=>(pe(e,typeof t!="symbol"?t+"":t,i),i),mt=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};var a=(e,t,i)=>(mt(e,t,"read from private field"),i?i.call(e):t.get(e)),d=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},p=(e,t,i,r)=>(mt(e,t,"write to private field"),r?r.call(e,i):t.set(e,i),i);var v=(e,t,i)=>(mt(e,t,"access private method"),i);function At(e,t){let i={...e};for(let r in t){let n=Nt(e,r,t,new Set([r]));n!==0&&(i[r]=n)}return i}function Nt(e,t,i,r){var s;let n=0;for(let o of i[t].inputs){let u=(s=e[o.dim])!=null?s:0;if(!u&&i[o.dim]){if(r.has(o.dim))continue;let l=new Set(r);l.add(o.dim),u=Nt(e,o.dim,i,l)}if(u!==0)if(o.sign==="c"){n=0;break}else o.sign==="-"?n-=u:n+=u}return n}var tt="_";var Q,F,et=class{constructor(t,i,r){d(this,Q,void 0);d(this,F,void 0);y(this,"signal");this.signal=t,p(this,Q,i),p(this,F,r)}computeSignal(t,i){if(t.scores[this.signal.id]>=this.signal.cap&&this.signal.dur!=="t")return;let n=a(this,Q).evaluate(t,this.signal.crit,i,this.signal,a(this,F)),s=this.signal.dur==="s"||this.signal.dur==="t"?"modscoreS":"modscore";if(!!n.changed){if(n.result)i.push({type:s,data:{dimension:this.signal.id,delta:this.signal.str}});else if(this.signal.dur==="t"){let o=t.visitor.sessionScores[this.signal.id];o&&i.push({type:s,data:{dimension:this.signal.id,delta:-o}})}}}};Q=new WeakMap,F=new WeakMap;var b,K,R,it=class{constructor({manifest:t,evaluator:i=new G({}),onLogMessage:r=()=>{}}){y(this,"data");d(this,b,void 0);d(this,K,void 0);d(this,R,void 0);var n,s,o;p(this,b,(n=t.project)!=null?n:{}),this.data=t,p(this,K,Object.entries((o=(s=a(this,b).pz)==null?void 0:s.sig)!=null?o:[]).map(([u,c])=>new et({...c,id:u},i,r))),p(this,R,r)}rollForControlGroup(){var t,i;return Math.random()<((i=(t=a(this,b).pz)==null?void 0:t.control)!=null?i:0)}getTest(t){var i;return(i=a(this,b).test)==null?void 0:i[t]}computeSignals(t){let i=[];a(this,R).call(this,["debug",200,"GROUP"]);try{a(this,K).forEach(r=>{a(this,R).call(this,["debug",201,"GROUP",r.signal]);try{r.computeSignal(t,i)}finally{a(this,R).call(this,["debug",201,"ENDGROUP"])}})}finally{a(this,R).call(this,["debug",200,"ENDGROUP"])}return i}computeAggregateDimensions(t){var i,r;return At(t,(r=(i=a(this,b).pz)==null?void 0:i.agg)!=null?r:{})}getDimensionByKey(t){var r,n,s,o;let i=t.indexOf(tt);return i<=0?(n=(r=a(this,b).pz)==null?void 0:r.sig)==null?void 0:n[t]:(o=(s=a(this,b).pz)==null?void 0:s.enr)==null?void 0:o[t.substring(0,i)]}};b=new WeakMap,K=new WeakMap,R=new WeakMap;import{dequal as me}from"dequal/lite";function E(e,t){var o,u,c,l,f,m;let i=(o=t==null?void 0:t.op)!=null?o:"=";if(t.op==="*")return e!==null&&typeof e!="undefined";if(t.op==="!*")return e===null||typeof e=="undefined";if(!("rhs"in t))throw new Error(`Match expression is required for match type ${i}`);let r=(u=t.cs)!=null?u:!1,n=(r?e!=null?e:"":Gt(e)).toString(),s=(r?t.rhs:Gt(t.rhs)).toString();switch(i){case"=":return n===s;case"!=":return n!==s;case"~":return(c=n.includes(s))!=null?c:!1;case"!~":return!((l=n.includes(s))==null||l);case"//":return new RegExp(t.rhs.toString(),r?"":"i").test((f=e==null?void 0:e.toString())!=null?f:"");case"!//":return!new RegExp(t.rhs.toString(),r?"":"i").test((m=e==null?void 0:e.toString())!=null?m:"");default:throw new Error(`Unknown match type ${i}.`)}}function O(e,t){return`'${("cs"in t?t.cs:!1)?e:e==null?void 0:e.toString().toUpperCase()}' ${ht(t)}`}function ht(e){return"rhs"in e?`${e.op} '${e.cs?e.rhs:e.rhs.toString().toUpperCase()}'`:`${e.op==="*"?"exists":"does not exist"}`}function Gt(e){var t,i;return(i=(t=e==null?void 0:e.toString())==null?void 0:t.toUpperCase())!=null?i:""}var It=({update:e,criteria:t,onLogMessage:i})=>{var u,c;if(t.type!=="CK")return{result:!1,changed:!1};let r=!me(zt(e.state.cookies),zt((u=e.previousState)==null?void 0:u.cookies)),n=(c=e.state.cookies)==null?void 0:c[t.cookieName],o={result:E(n,t.match),changed:r};return i==null||i(["debug",203,{criteria:t,result:o,explanation:O(n,t.match)}]),o};function zt(e){if(!e)return;if(!e.ufvd)return e;let{ufvd:t,...i}=e;return i}var qt=({update:e,criteria:t,onLogMessage:i})=>{var u,c,l;if(t.type!=="PV")return{result:!1,changed:!1};let r=(u=e.state.url)==null?void 0:u.pathname,n=!e.previousState||(r==null?void 0:r.toString())!==((l=(c=e.previousState.url)==null?void 0:c.pathname)==null?void 0:l.toString()),o={result:E(r,t.path),changed:n};return i==null||i(["debug",203,{criteria:t,result:o,explanation:O(r,t.path)}]),o};var jt=({update:e,criteria:t,onLogMessage:i})=>{var s,o,u;if(t.type!=="EVT")return{result:!1,changed:!1};let r=(o=(s=e.state.events)==null?void 0:s.some(c=>E(c.event,t.event)))!=null?o:!1,n={result:r,changed:r};return i==null||i(["debug",203,{criteria:t,result:n,explanation:`'${(u=e.state.events)==null?void 0:u.join("', '")}' ${ht(t.event)}`}]),n};function rt(e,t){return`${e}${tt}${t}`}function _t(e,t){var r;if(typeof e=="undefined"||e===null)return!1;let i=Number(e);if(isNaN(i))return!1;switch((r=t==null?void 0:t.op)!=null?r:"="){case"=":return i===t.rhs;case"!=":return i!==t.rhs;case">":return i>t.rhs;case"<":return i<t.rhs;default:return console.warn(`Unknown match type ${t.op} is false.`),!1}}function Qt(e,t){return`${e} ${he(t)}`}function he(e){return`${e.op} ${e.rhs}`}var gt=rt("$pvc","v"),vt=({update:e,criteria:t,commands:i,onLogMessage:r})=>{var l,f;if(t.type!=="PVC")return{result:!1,changed:!1};let n=Boolean(e.state.url&&(!e.previousState||((l=e.state.url)==null?void 0:l.toString())!==((f=e.previousState.url)==null?void 0:f.toString()))),o=(e.visitor.sessionScores[gt]||0)+1,u={result:!1,changed:n},c=i.some(m=>m.type==="modscoreS"&&m.data.dimension===gt);return n&&!c&&i.push({type:"modscoreS",data:{dimension:gt,delta:1}}),_t(o,t.match)&&(u.result=!0),r==null||r(["debug",203,{criteria:t,result:u,explanation:Qt(o,t.match)}]),u};vt.alwaysExecute=!0;var Ft=({update:e,criteria:t,onLogMessage:i})=>{var u,c,l,f,m;if(t.type!=="QS")return{result:!1,changed:!1};let r=!e.previousState||((c=(u=e.state.url)==null?void 0:u.searchParams)==null?void 0:c.toString())!==((f=(l=e.previousState.url)==null?void 0:l.searchParams)==null?void 0:f.toString()),n=(m=e.state.url)==null?void 0:m.searchParams.get(t.queryName),o={result:E(n,t.match),changed:r};return i==null||i(["debug",203,{criteria:t,result:o,explanation:O(n,t.match)}]),o};var Kt=({update:e,criteria:t,signal:i,onLogMessage:r})=>{var f;if(t.type!=="QK")return{result:!1,changed:!1};if(typeof document=="undefined"&&e.scores[i.id]>0)return{result:!0,changed:!1};let n=e.visitor.quirks[t.key],s=(f=e.state.quirks)==null?void 0:f[t.key],o=s!=null?s:n,u=Boolean(s&&n!==s),l={result:E(o,t.match),changed:u};return r==null||r(["debug",203,{criteria:t,result:l,explanation:O(o,t.match)}]),l};var H,G=class{constructor(t){d(this,H,void 0);p(this,H,t)}evaluate(t,i,r,n,s){let o=i.clauses.length>1;o&&(s==null||s(["debug",202,"GROUP",i]));try{let u=!(i.op==="&"||!i.op),c=null,l=!1;for(let m of i.clauses){let S;if(m.type==="G")S=this.evaluate(t,m,r,n,s);else{let C=a(this,H)[m.type];if(c&&!C.alwaysExecute)continue;if(!C)throw new Error(`${m.type} signal criteria not registered`);S=C({update:t,criteria:m,commands:r,signal:n,onLogMessage:s})}S.changed&&(l=!0),!c&&S.result===u&&(c={result:u,changed:l})}let f=c!=null?c:{result:!u,changed:l};return o&&(s==null||s(["debug",204,f])),f}finally{o&&(s==null||s(["debug",202,"ENDGROUP"]))}}};H=new WeakMap;function Bt(e,t,i,r){r==null||r(["info",301,"GROUP",{id:e,op:t==null?void 0:t.op}]);let n;try{t!=null&&t.crit?!t.op||t.op==="&"?n=t.crit.every(s=>Ht(s,i,r)):n=t.crit.some(s=>Ht(s,i,r)):(r==null||r(["info",302,{matched:!0,description:"default variation"}]),n=!0),r==null||r(["info",303,n])}finally{r==null||r(["info",301,"ENDGROUP"])}return n}function Ht(e,t,i){var u,c;let{op:r,l:n}=e,s=(u=t[n])!=null?u:0;if(r==="+"){let l=Math.max(...Object.values(t))===s&&s>0;return i==null||i(["info",302,{matched:l,description:`${e.l} has the highest score`}]),l}else if(r==="-"){let l=Math.min(...Object.values(t))===s&&s>0;return i==null||i(["info",302,{matched:l,description:`${e.l} has the lowest non-zero score`}]),l}let o;if(e.rDim?o=t[e.rDim]||0:o=parseInt(e.r,10),isNaN(o))return i==null||i(["info",302,{matched:!1,description:`${(c=e.rDim)!=null?c:e.r} has no score value`}]),!1;if(r===">"){let l=s>o;return z(i,l,e,s,o),l}else if(r===">="){let l=s>=o;return z(i,l,e,s,o),l}else if(r==="<"){let l=s<o;return z(i,l,e,s,o),l}else if(r==="<="){let l=s<=o;return z(i,l,e,s,o),l}else if(r==="="){let l=s===o;return z(i,l,e,s,o),l}else if(r==="!="){let l=s!==o;return z(i,l,e,s,o),l}else throw new Error(`Unknown op: ${r}`)}function z(e,t,i,r,n){e==null||e(["info",302,{matched:t,description:`${i.l}[${r}] ${i.op} ${i.rDim?`${i.rDim}[${n}]`:i.r}`}])}function Jt({name:e,context:t,variations:i,take:r=1,onLogMessage:n}){var s,o,u;n==null||n(["info",300,"GROUP",{name:e,take:r}]);try{let c=(s=t.storage.data.controlGroup)!=null?s:!1,l=[],f=!1,m=t.scores;for(let S of i){if(l.length===r)break;if(!((o=S.pz)!=null&&o.crit.length)){n==null||n(["info",301,"GROUP",{id:S.id,op:(u=S.pz)==null?void 0:u.op}]),n==null||n(["info",302,{matched:!0,description:"default variation"}]),n==null||n(["info",303,!0]),n==null||n(["info",301,"ENDGROUP"]),l.push(S);continue}c||Bt(S.id,S.pz,m,n)&&(f=!0,l.push(S))}return{personalized:f,variations:l}}finally{n==null||n(["info",300,"ENDGROUP"])}}var ge=e=>{let{values:t,total:i,missingDistribution:r}=e.reduce((n,s)=>(s.testDistribution?n.total+=s.testDistribution:++n.missingDistribution,n.values.push(s.testDistribution),n),{values:[],total:0,missingDistribution:0});if(i>100)throw new Error(`Total distribution ${i} is over the maximum 100.`);if(i<100){let s=(100-i)/r;t.forEach((o,u)=>{typeof o=="undefined"&&(t[u]=s)})}return t},St=({name:e,context:t,variations:i,onLogMessage:r})=>{r==null||r(["info",400,"GROUP",e]);try{let n,s=t.getTestVariantId(e);if(s===null)return r==null||r(["error",401,e]),{result:void 0,variantAssigned:!1};if(s&&(n=i.find(o=>o.id===s),n||r==null||r(["warn",402,{missingVariant:s,variants:i.map(o=>o.id)}])),!n){let o=ge(i),u=Math.floor(Math.random()*100),c=0;n=i.find((l,f)=>{let m=o[f];if(u>c&&u<=c+m)return l;c+=m}),n&&(r==null||r(["info",403,n.id]),t.setTestVariantId(e,n.id))}return n&&(r==null||r(["info",404,n.id])),{result:n,variantAssigned:!s}}finally{r==null||r(["info",400,"ENDGROUP"])}};import Ct from"js-cookie";import{dequal as ve}from"dequal/lite";import Se from"mitt";var ye="__UNIFORM_DATA__",U,B,I,q=class{constructor({initialData:t}){d(this,U,void 0);d(this,B,void 0);d(this,I,Se());y(this,"events",{on:a(this,I).on,off:a(this,I).off});t&&(p(this,U,t),p(this,B,t))}get data(){return a(this,U)}get initialData(){return a(this,B)}updateData(t,i){return p(this,U,i),this.handleUpdateData(t,i)}async delete(t){p(this,U,void 0),await this.handleDelete(t)}signalAsyncDataUpdate(t){ve(this.data,t)||(p(this,U,t),a(this,I).emit("dataUpdatedAsync",t))}getClientTransitionState(){if(typeof document=="undefined")return;let t=document.getElementById(ye);return t!=null&&t.textContent?JSON.parse(t.textContent):void 0}};U=new WeakMap,B=new WeakMap,I=new WeakMap;var yt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wt=yt.split(""),Yt=new Array(123);for(let e=0;e<yt.length;e++)Yt[yt.charCodeAt(e)]=e;var Dt=e=>{if(e<0)return`-${Dt(-e)}`;let t=e>>>0,i=e/4294967296>>>0,r="";for(;i>0;)r=Wt[63&t]+r,t>>>=6,t|=(63&i)<<26,i>>>=6;let n="";do n=Wt[63&t]+n,t>>>=6;while(t>0);return n+r},Xt=e=>{let t=0,i=e.charAt(0)==="-"?1:0;for(let r=i;r<e.length;r++)t=t*64+Yt[e.charCodeAt(r)];return i?-t:t};var xt=typeof document=="undefined",De="ufvd",$,J,Zt=class extends q{constructor({serverCookieValue:i,cookieName:r=De,cookieAttributes:n={sameSite:"lax"}}){super({initialData:xt?Ce(i):void 0});d(this,$,void 0);d(this,J,void 0);p(this,$,r),p(this,J,n)}handleDelete(){return xt||Ct.remove(a(this,$)),Promise.resolve()}async handleUpdateData(i,r){xt||(r.consent?Ct.set(a(this,$),xe(r),a(this,J)):Ct.remove(a(this,$)))}};$=new WeakMap,J=new WeakMap;var te="~",ee="!",ie="-";function Ce(e){if(!e)return;let t=e.split(te);if(t.length>3)return;let[i,r,n]=t;return{consent:!0,sessionScores:Mt(bt(r)),scores:Mt(bt(n)),tests:bt(i)}}function bt(e){return e.split(ee).map(i=>i.split(ie)).reduce((i,r)=>(r.length<2||(i[r[0]]=r.slice(1).join("-")),i),{})}function Mt(e){return Object.entries(e).reduce((t,[i,r])=>(t[i]=Xt(r),t),{})}function xe(e){return[Et(e.tests),Et(Lt(e.sessionScores)),Et(Lt(e.scores))].join(te)}function Lt(e){return Object.entries(e).reduce((t,[i,r])=>(t[i]=Dt(r),t),{})}function Et(e){return Object.entries(e).map(t=>t.join(ie)).join(ee)}var nt,ne,re=class extends q{constructor({serverCookieValue:i,visitorIdCookieName:r="ufvi",...n}){super(n);d(this,nt);n.initialData||v(this,nt,ne).call(this).catch(s=>{console.error(s)})}handleDelete(i){throw new Error("Method not implemented.")}async handleUpdateData(i){let r=await new Promise(n=>{setTimeout(()=>{n(void 0)},2e3)});r&&this.signalAsyncDataUpdate(r)}};nt=new WeakSet,ne=async function(){let i=await new Promise(r=>{setTimeout(()=>{r(void 0)},2e3)});i&&this.signalAsyncDataUpdate(i)};function Ji(e){let{gracePeriod:t=864e5,decayRate:i=1/30,decayCap:r=.95}=e!=null?e:{};return function({now:s,lastUpd:o,scores:u,sessionScores:c,onLogMessage:l}){if(typeof o!="number")return!1;let m=s-o-t;if(m<=0)return!1;let S=m/864e5,C=1-Math.min(r,S*i);return C<=0?!1:(oe(u,C),oe(c,C),l==null||l(["info",140,`linear decay factor ${C.toPrecision(6)}`]),!0)}}function oe(e,t){for(let i in e)i.startsWith("$")||(e[i]*=t)}var ot=()=>({quirks:{},scores:{},sessionScores:{},tests:{},consent:!1,controlGroup:!1});import{dequal as at}from"dequal/lite";import Ve from"mitt";import be from"rfdc";var Ee=be();function se(e,t,i){let r=t?Ee(t):ot();return e.forEach(n=>{var s,o;switch(n.type){case"consent":r.consent=n.data;break;case"setquirk":r.quirks[n.data.key]=n.data.value;break;case"settest":r.tests[n.data.test]=n.data.variant;break;case"modscore":if(i)break;let u=Number(n.data.delta);if(isNaN(u))throw new Error("Non-number delta received");let c=(s=r.scores[n.data.dimension])!=null?s:0;r.scores[n.data.dimension]=c+u;break;case"modscoreS":if(i)break;let l=Number(n.data.delta);if(isNaN(l))throw new Error("Non-number delta received");let f=(o=r.sessionScores[n.data.dimension])!=null?o:0;r.sessionScores[n.data.dimension]=f+l;break;case"identify":break;case"setcontrol":r.controlGroup=n.data;break;default:throw new Error("Unknown command")}}),r}var st=class{constructor(){y(this,"inMemoryFallback",{});y(this,"hasLocalStorageObject",typeof localStorage!="undefined")}get(t){let i=this.inMemoryFallback[t];if(!this.hasLocalStorageObject||i)return i;try{let r=localStorage.getItem(t);return r?JSON.parse(r):void 0}catch(r){return i}}set(t,i,r){if(this.inMemoryFallback[t]=i,!(!this.hasLocalStorageObject||!r))try{localStorage.setItem(t,JSON.stringify(i))}catch(n){console.warn(n)}}delete(t,i){i||delete this.inMemoryFallback[t];try{localStorage.removeItem(t)}catch(r){}}};var ut="ufvisitor",V,N,j,g,x,P,w,A,ct,ae,dt,ue,W,Vt,Y,Tt,lt=class{constructor(t){d(this,x);d(this,w);d(this,ct);d(this,dt);d(this,W);d(this,Y);d(this,V,Ve());d(this,N,new st);d(this,j,void 0);d(this,g,void 0);y(this,"events",{on:a(this,V).on,off:a(this,V).off});if(p(this,g,t),a(this,x,P)||v(this,w,A).call(this,v(this,Y,Tt).call(this),!0),t.transitionStore){let i=t.transitionStore.getClientTransitionState();i&&t.onServerTransitionReceived&&t.onServerTransitionReceived(i),t.transitionStore.events.on("dataUpdatedAsync",n=>{v(this,w,A).call(this,{...a(this,x,P).visitorData,...n})});let r=t.transitionStore.data;r&&v(this,w,A).call(this,{...a(this,x,P).visitorData,...r},!0)}}get data(){var i,r;let t=a(this,x,P);if(v(this,dt,ue).call(this,t)){let{sessionScores:n,...s}=t.visitorData;return v(this,w,A).call(this,{...s,sessionScores:{}}),(r=(i=a(this,g)).onLogMessage)==null||r.call(i,["info",120]),a(this,x,P).visitorData}return t.visitorData}get decayEnabled(){return!!a(this,g).decay}get options(){return a(this,g)}async updateData(t){var r,n,s,o;if(t.length===0)return;(n=(r=a(this,g)).onLogMessage)==null||n.call(r,["debug",101,t]);let i=se(t,this.data,(s=a(this,x,P))==null?void 0:s.visitorData.controlGroup);t.some(u=>u.type==="consent"&&!u.data)&&a(this,N).delete(ut,!0),v(this,w,A).call(this,i),await((o=a(this,g).transitionStore)==null?void 0:o.updateData(t,a(this,x,P).visitorData))}async delete(t){var i,r,n,s,o;(r=(i=a(this,g)).onLogMessage)==null||r.call(i,["info",103,"GROUP",t]);try{a(this,N).delete(ut,!1),await((n=a(this,g).transitionStore)==null?void 0:n.delete(t)),v(this,w,A).call(this,v(this,Y,Tt).call(this))}finally{(o=(s=a(this,g)).onLogMessage)==null||o.call(s,["info",103,"ENDGROUP"])}}};V=new WeakMap,N=new WeakMap,j=new WeakMap,g=new WeakMap,x=new WeakSet,P=function(){return a(this,N).get(ut)},w=new WeakSet,A=function(t,i=!1){var f,m,S,C,L,Rt,Ot,Ut,$t;let r=a(this,x,P),n=Date.now();t.controlGroup?(t.scores={},t.sessionScores={}):(v(this,W,Vt).call(this,t.scores),v(this,W,Vt).call(this,t.sessionScores),(m=(f=a(this,g)).decay)==null||m.call(f,{now:n,lastUpd:r==null?void 0:r.updated,scores:t.scores,sessionScores:t.sessionScores,onLogMessage:a(this,g).onLogMessage}));let s=!at(r==null?void 0:r.visitorData.scores,t.scores),o=!at(r==null?void 0:r.visitorData.sessionScores,t.sessionScores),u=!at(r==null?void 0:r.visitorData.quirks,t.quirks),c=!at(r==null?void 0:r.visitorData.tests,t.tests),l={updated:n,visitorData:t};v(this,ct,ae).call(this),a(this,N).set(ut,l,!!t.consent),(C=(S=a(this,g)).onLogMessage)==null||C.call(S,["debug",102,t]),i||((s||o)&&a(this,V).emit("scoresUpdated",t),u&&a(this,V).emit("quirksUpdated",t),c&&a(this,V).emit("testsUpdated",t),((L=r==null?void 0:r.visitorData)==null?void 0:L.consent)!==t.consent&&a(this,V).emit("consentUpdated",t),((Rt=r==null?void 0:r.visitorData)==null?void 0:Rt.controlGroup)!==t.controlGroup&&(a(this,V).emit("controlGroupUpdated",t),($t=(Ut=a(this,g)).onLogMessage)==null||$t.call(Ut,["debug",104,(Ot=t.controlGroup)!=null?Ot:!1])))},ct=new WeakSet,ae=function(){typeof document=="undefined"||!a(this,g).visitLifespan||(a(this,j)&&window.clearTimeout(a(this,j)),p(this,j,window.setTimeout(()=>{this.data},a(this,g).visitLifespan+50)))},dt=new WeakSet,ue=function(t){let i=a(this,g).visitLifespan;return i?t.updated+i<Date.now():!1},W=new WeakSet,Vt=function(t){var i,r;if(!!a(this,g).manifest)for(let n in t){let s=t[n],o=a(this,g).manifest.getDimensionByKey(n);!o||s>o.cap&&((r=(i=a(this,g)).onLogMessage)==null||r.call(i,["debug",110,{dim:n,score:s,cap:o.cap}]),t[n]=o.cap)}},Y=new WeakSet,Tt=function(){var t,i,r;return{...ot(),consent:(t=a(this,g).defaultConsent)!=null?t:!1,controlGroup:(r=(i=a(this,g).manifest)==null?void 0:i.rollForControlGroup())!=null?r:!1}};import{dequal as le}from"dequal/lite";import Te from"mitt";var D,T,k,X,h,Z,kt,_,ft,M,Pt,ce=class{constructor(t){d(this,Z);d(this,_);d(this,M);y(this,"manifest");d(this,D,void 0);d(this,T,{});d(this,k,void 0);d(this,X,{});d(this,h,Te());y(this,"events",{on:a(this,h).on,off:a(this,h).off});y(this,"storage");var n,s;let{manifest:i,...r}=t;p(this,k,{}),(n=t.plugins)==null||n.forEach(o=>{!o.logDrain||a(this,h).on("log",o.logDrain)}),a(this,h).emit("log",["info",1,"GROUP"]);try{this.manifest=new it({onLogMessage:o=>a(this,h).emit("log",o),manifest:i,evaluator:new G({CK:It,QS:Ft,QK:Kt,PVC:vt,EVT:jt,PV:qt})}),this.storage=new lt({...r,manifest:this.manifest,onServerTransitionReceived:o=>{p(this,D,o),o.ssv&&(p(this,T,o.ssv),a(this,h).emit("log",["debug",130,o]))},onLogMessage:o=>a(this,h).emit("log",o)}),this.storage.events.on("scoresUpdated",v(this,_,ft).bind(this)),a(this,D)||v(this,_,ft).call(this,this.storage.data),this.storage.events.on("quirksUpdated",o=>{let u=this.manifest.computeSignals({scores:a(this,T),state:a(this,k),previousState:a(this,k),visitor:this.storage.data});this.storage.updateData(u),a(this,h).emit("quirksUpdated",o.quirks),a(this,h).emit("log",["info",4,o.quirks])}),(s=t.plugins)==null||s.forEach(o=>{!o.init||o.init(this)})}finally{a(this,h).emit("log",["info",1,"ENDGROUP"])}}get scores(){return a(this,T)}get quirks(){var t,i;return(i=(t=a(this,D))==null?void 0:t.quirks)!=null?i:this.storage.data.quirks}async update(t){var n,s,o;let i=[],r={};if((n=a(this,D))!=null&&n.quirks&&(t={...t,quirks:{...a(this,D).quirks,...t.quirks||{}}}),(s=a(this,D))!=null&&s.tests){let u=Object.entries(a(this,D).tests);if(u.length>0){let c=[];u.forEach(([l,f])=>{this.storage.data.tests[l]||(c.push([l,f]),r[l]=f)}),i.push(...c.map(([l,f])=>({type:"settest",data:{test:l,variant:f}})))}}try{a(this,h).emit("log",["info",2,"GROUP",{...t,url:(o=t.url)==null?void 0:o.toString()}]),t.quirks&&i.push(...Object.entries(t.quirks).map(([u,c])=>({type:"setquirk",data:{key:u,value:c}}))),t.enrichments&&t.enrichments.forEach(u=>{let c=rt(u.cat,u.key);this.manifest.getDimensionByKey(c)?i.push({type:"modscore",data:{dimension:c,delta:u.str}}):a(this,h).emit("log",["warn",5,u])}),i.push(...this.manifest.computeSignals({state:t,previousState:a(this,k),visitor:this.storage.data,scores:a(this,D)?v(this,M,Pt).call(this,this.storage.data):a(this,T)})),p(this,k,{...a(this,k),...t}),await this.storage.updateData(i),a(this,D)&&(v(this,_,ft).call(this,this.storage.data),Object.entries(r).forEach(([u,c])=>{v(this,Z,kt).call(this,{name:u,variantId:c,variantAssigned:!0})}),p(this,D,void 0),a(this,h).emit("log",["debug",131]))}finally{a(this,h).emit("log",["info",2,"ENDGROUP"])}}getTestVariantId(t){var r,n,s,o;let i=this.manifest.getTest(t);return i?(o=(s=i.wv)!=null?s:(n=(r=a(this,D))==null?void 0:r.tests)==null?void 0:n[t])!=null?o:this.storage.data.tests[t]:(a(this,h).emit("log",["warn",401,t]),null)}setTestVariantId(t,i){this.storage.updateData([{type:"settest",data:{test:t,variant:i}}])}log(...t){a(this,h).emit("log",t)}test(t){var r,n;let i=St({...t,context:this,onLogMessage:s=>a(this,h).emit("log",s)});return v(this,Z,kt).call(this,{name:t.name,variantId:(n=(r=i.result)==null?void 0:r.id)!=null?n:void 0,variantAssigned:i.variantAssigned}),i}personalize(t){let i=Jt({...t,context:this,onLogMessage:s=>a(this,h).emit("log",s)}),r=a(this,X)[t.name],n={name:t.name,variantIds:i.variations.map(s=>{var o;return(o=s.id)!=null?o:"Unknown"}),control:this.storage.data.controlGroup,changed:!0};return r&&le(n.variantIds,r)&&(n.changed=!1),a(this,h).emit("personalizationResult",n),a(this,X)[t.name]=n.variantIds,i}async forget(t){p(this,k,{}),await this.storage.delete(t)}getServerToClientTransitionState(){let t={quirks:this.storage.data.quirks,ssv:a(this,T),tests:{}},i=this.storage.data.tests;return Object.entries(i).map(([r,n])=>{var s,o,u;((u=(o=(s=this.storage.options.transitionStore)==null?void 0:s.initialData)==null?void 0:o.tests)==null?void 0:u[r])!==i[r]&&t.tests&&(t.tests[r]=n)}),t}};D=new WeakMap,T=new WeakMap,k=new WeakMap,X=new WeakMap,h=new WeakMap,Z=new WeakSet,kt=function(t){a(this,h).emit("testResult",t)},_=new WeakSet,ft=function(t){let i=v(this,M,Pt).call(this,t);!le(i,a(this,T))&&(p(this,T,i),a(this,h).emit("scoresUpdated",i),a(this,h).emit("log",["info",3,i]))},M=new WeakSet,Pt=function(t){var r;let i={...t.scores};for(let n in t.sessionScores)i[n]=((r=i[n])!=null?r:0)+t.sessionScores[n];return i=this.manifest.computeAggregateDimensions(i),i};var wt=typeof top!="undefined";function br(){return{logDrain:e=>{!wt||top==null||top.postMessage({type:"uniform:context:log",message:e},window.location.origin)},init:e=>{let t=[],i=[],r=()=>{!wt||top==null||top.postMessage({type:"uniform:context:data",data:{scores:e.scores,data:e.storage.data,manifest:e.manifest.data,personalizations:t,tests:i}},window.location.origin)},n=o=>{!o.changed||t.push(o)},s=o=>{!o.variantAssigned||i.push(o)};if(wt){window.__UNIFORM_DEVTOOLS_CONTEXT_INSTANCE__=e;try{top==null||top.addEventListener("message",async o=>{if(!o.data)return;let u=o.data;await ke(u,e)})}catch(o){console.warn("Unable to initialize Uniform Context DevTools because it is in a cross-domain iframe.",o)}top==null||top.postMessage({type:"uniform:context:hello",uiVersion:2},window.location.origin),r()}return e.events.on("personalizationResult",n),e.events.on("testResult",s),e.events.on("scoresUpdated",r),e.storage.events.on("*",r),()=>{e.events.off("scoresUpdated",r),e.storage.events.off("*",r),e.events.off("personalizationResult",n),e.events.off("testResult",s)}}}}async function ke(e,t){e.type==="uniform-in:context:update"&&e.newData&&await t.update(e.newData),e.type==="uniform-in:context:commands"&&e.commands&&Array.isArray(e.commands)&&await t.storage.updateData(e.commands),e.type==="uniform-in:context:forget"&&await t.forget(!1)}var Pe=(u=>(u.ListStart="nesi-list-start",u.ListEnd="nesi-list-end",u.ListItem="nesi-list-item-html",u.ListItemSettings="nesi-list-item-settings",u.TestStart="nesi-test-start",u.TestEnd="nesi-test-end",u.Unknown="unknown",u))(Pe||{}),Vr="nesitag";import we from"rfdc";function pt(e,t){if(e==="none")return!1;switch(t){case"debug":return e==="debug";case"info":return e==="info"||e==="debug";case"warn":return e==="warn"||e==="info"||e==="debug";case"error":return e==="debug"||"info";default:return!1}}var Re=we();function Oe(e){return([t,...i])=>{if(!pt(e,t))return;let[r,...n]=i;console[t](`\u{1F94B} [${t}] Uniform event ID ${r}
`,...n.map(Re))}}function Rr(e){return{logDrain:Oe(e)}}import Ue from"rfdc";var de={1:()=>["context","initializing Uniform Context"],2:e=>["context","received update()",e],3:e=>["context","new score vector",e],4:e=>["context","updated quirks",e],5:e=>["context","ignored enrichment update for unknown enrichment category",e.cat],101:e=>["storage","received update commands",e],102:e=>["storage","data was updated",e],103:e=>["storage",`deleting visitor data ${e?"from all devices":"from this device"}`],104:e=>["context",e?"Visitor assigned to personalization control group":"Visitor assigned to personalization experiment group"],110:({dim:e,cap:t,score:i})=>["storage",`${e} score ${i} exceeded cap ${t}. Rounded down.`],120:()=>["storage","visitor data expired and was cleared"],130:e=>["storage","server to client transition score data was loaded; it will persist until the next update event occurs",e],131:()=>["storage","server to client transition data was discarded"],140:e=>["storage",`score decay was applied: ${e}`],200:()=>["signals","evaluating signals"],201:e=>["signals",`evaluating signal ${e.id} (${e.dur})`],202:e=>["signals",e.op==="|"?"OR":"AND"],203:({criteria:e,result:t,explanation:i})=>["signals",`${e.type}: ${i} is ${t.result} [${t.changed?"CHANGED":"unchanged"}]`],204:e=>["signals",`group result: ${e.result} [${e.changed?"CHANGED":"unchanged"}]`],300:e=>["personalization",`executing personalization '${e.name}'`],301:({id:e,op:t})=>["personalization",`testing variation ${e} (${t==="|"?"OR":"AND"})`],302:({matched:e,description:t})=>["personalization",`${t} is ${e}`],303:e=>["personalization",e?"selected variation":"did not select variation"],400:e=>["testing",`executing A/B test '${e}'`],401:e=>["testing",`${e} is not registered in the manifest; it will not be run.`],402:({missingVariant:e,variants:t})=>["testing",`test variation '${e}' previously assigned to the visitor for this test no longer exists as a variant. It will be removed. This may indicate changing test variations after publishing a test, which will make results invalid. Known variants: ${t.join(", ")}`],403:e=>["testing",`assigned new test variant '${e}'`],404:e=>["testing",`displaying variation '${e}'`],700:()=>["gtag","gtag is not defined, skipping analytics event emission. Ensure you have added the gtag script to your page."],701:()=>["gtag","enabled gtag event signal redirection"]};var $e=Ue();function Ae(e,t){let i=typeof document=="undefined",{enableOnServer:r=!1}=t!=null?t:{};return([n,...s])=>{if(!pt(e,n)||i&&!r)return;let[o,...u]=s,c=console[n];if(u[0]==="GROUP"&&(u.shift(),c=console.groupCollapsed),u[0]==="ENDGROUP"){console.groupEnd();return}let l=de[o],f="";switch(n){case"debug":f="\u{1F41E}";break;case"info":f="\u{1F4AC}";break;case"warn":f="\u26A0\uFE0F";break;case"error":f="\u{1F4A5}";break}let m=f;if(!l){c(`${m} unknown event ID ${o}. Log messages data may be older than Uniform Context package.`,...u);return}let[S,C,...L]=l(...u);c(`${m}[${S}] ${C}
`,...L.map($e))}}function Gr(e,t){return{logDrain:Ae(e,t)}}function Ir(e){return`${e.apiKey}|${e.projectId}${e.apiHost?`|${e.apiHost}`:""}`}function qr(e){let[t,i,r]=e.split("|");if(!t.startsWith("uf"))throw new Error("Invalid API key");if(!/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})$/i.test(i))throw new Error("Invalid project ID");return{apiKey:t,projectId:i,apiHost:r||"https://uniform.app"}}export{ce as Context,Zt as CookieTransitionDataStore,Vr as EdgeNodeTagName,re as EdgeTransitionDataStore,G as GroupCriteriaEvaluator,it as ManifestInstance,ye as SERVER_STATE_ID,Pe as ScriptType,q as TransitionDataStore,De as UNIFORM_DEFAULT_COOKIE_NAME,lt as VisitorDataStore,At as computeAggregateDimensions,It as cookieEvaluator,Oe as createConsoleLogDrain,Ae as createDebugConsoleLogDrain,Ji as createLinearDecay,qt as currentPageEvaluator,ot as emptyVisitorData,Rr as enableConsoleLogDrain,br as enableContextDevTools,Gr as enableDebugConsoleLogDrain,Bt as evaluateVariantMatch,jt as eventEvaluator,O as explainStringMatch,ht as explainStringMatchCriteria,rt as getEnrichmentVectorKey,E as isStringMatch,gt as pageViewCountDimension,vt as pageViewCountEvaluator,qr as parseQuickConnect,Jt as personalizeVariations,Ft as queryStringEvaluator,Kt as quirkEvaluator,Ir as serializeQuickConnect,St as testVariations};

@@ -1,3 +0,3 @@

"use strict";var Pe=Object.create;var F=Object.defineProperty;var we=Object.getOwnPropertyDescriptor;var Re=Object.getOwnPropertyNames;var Oe=Object.getPrototypeOf,Ue=Object.prototype.hasOwnProperty;var $e=(e,t,i)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var Ae=(e,t)=>{for(var i in t)F(e,i,{get:t[i],enumerable:!0})},Wt=(e,t,i,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Re(t))!Ue.call(e,n)&&n!==i&&F(e,n,{get:()=>t[n],enumerable:!(r=we(t,n))||r.enumerable});return e};var $=(e,t,i)=>(i=e!=null?Pe(Oe(e)):{},Wt(t||!e||!e.__esModule?F(i,"default",{value:e,enumerable:!0}):i,e)),Ne=e=>Wt(F({},"__esModule",{value:!0}),e);var y=(e,t,i)=>($e(e,typeof t!="symbol"?t+"":t,i),i),Ct=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};var a=(e,t,i)=>(Ct(e,t,"read from private field"),i?i.call(e):t.get(e)),d=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},p=(e,t,i,r)=>(Ct(e,t,"write to private field"),r?r.call(e,i):t.set(e,i),i);var v=(e,t,i)=>(Ct(e,t,"access private method"),i);var Ze={};Ae(Ze,{Context:()=>jt,CookieTransitionDataStore:()=>$t,EdgeNodeTagName:()=>Be,EdgeTransitionDataStore:()=>At,GroupCriteriaEvaluator:()=>A,ManifestInstance:()=>B,SERVER_STATE_ID:()=>re,ScriptType:()=>ke,TransitionDataStore:()=>N,UNIFORM_DEFAULT_COOKIE_NAME:()=>le,VisitorDataStore:()=>tt,computeAggregateDimensions:()=>xt,cookieEvaluator:()=>bt,createConsoleLogDrain:()=>be,createDebugConsoleLogDrain:()=>Te,createLinearDecay:()=>qe,currentPageEvaluator:()=>kt,emptyVisitorData:()=>X,enableConsoleLogDrain:()=>Fe,enableContextDevTools:()=>Je,enableDebugConsoleLogDrain:()=>He,evaluateVariantMatch:()=>It,eventEvaluator:()=>Tt,explainStringMatch:()=>P,explainStringMatchCriteria:()=>lt,getEnrichmentVectorKey:()=>W,isStringMatch:()=>x,pageViewCountDimension:()=>ct,pageViewCountEvaluator:()=>dt,parseQuickConnect:()=>Xe,personalizeVariations:()=>zt,queryStringEvaluator:()=>Et,quirkEvaluator:()=>Vt,serializeQuickConnect:()=>Ye,testVariations:()=>St});module.exports=Ne(Ze);function xt(e,t){let i={...e};for(let r in t){let n=Yt(e,r,t,new Set([r]));n!==0&&(i[r]=n)}return i}function Yt(e,t,i,r){var s;let n=0;for(let o of i[t].inputs){let u=(s=e[o.dim])!=null?s:0;if(!u&&i[o.dim]){if(r.has(o.dim))continue;let l=new Set(r);l.add(o.dim),u=Yt(e,o.dim,i,l)}if(u!==0)if(o.sign==="c"){n=0;break}else o.sign==="-"?n-=u:n+=u}return n}var at="_";var K,H,ut=class{constructor(t,i,r){d(this,K,void 0);d(this,H,void 0);y(this,"signal");this.signal=t,p(this,K,i),p(this,H,r)}computeSignal(t,i){if(t.scores[this.signal.id]>=this.signal.cap&&this.signal.dur!=="t")return;let n=a(this,K).evaluate(t,this.signal.crit,i,this.signal,a(this,H)),s=this.signal.dur==="s"||this.signal.dur==="t"?"modscoreS":"modscore";if(!!n.changed){if(n.result)i.push({type:s,data:{dimension:this.signal.id,delta:this.signal.str}});else if(this.signal.dur==="t"){let o=t.visitor.sessionScores[this.signal.id];o&&i.push({type:s,data:{dimension:this.signal.id,delta:-o}})}}}};K=new WeakMap,H=new WeakMap;var E,J,O,B=class{constructor({manifest:t,evaluator:i=new A({}),onLogMessage:r=()=>{}}){y(this,"data");d(this,E,void 0);d(this,J,void 0);d(this,O,void 0);var n,s,o;p(this,E,(n=t.project)!=null?n:{}),this.data=t,p(this,J,Object.entries((o=(s=a(this,E).pz)==null?void 0:s.sig)!=null?o:[]).map(([u,c])=>new ut({...c,id:u},i,r))),p(this,O,r)}rollForControlGroup(){var t,i;return Math.random()<((i=(t=a(this,E).pz)==null?void 0:t.control)!=null?i:0)}getTest(t){var i;return(i=a(this,E).test)==null?void 0:i[t]}computeSignals(t){let i=[];a(this,O).call(this,["debug",200,"GROUP"]);try{a(this,J).forEach(r=>{a(this,O).call(this,["debug",201,"GROUP",r.signal]);try{r.computeSignal(t,i)}finally{a(this,O).call(this,["debug",201,"ENDGROUP"])}})}finally{a(this,O).call(this,["debug",200,"ENDGROUP"])}return i}computeAggregateDimensions(t){var i,r;return xt(t,(r=(i=a(this,E).pz)==null?void 0:i.agg)!=null?r:{})}getDimensionByKey(t){var r,n,s,o;let i=t.indexOf(at);return i<=0?(n=(r=a(this,E).pz)==null?void 0:r.sig)==null?void 0:n[t]:(o=(s=a(this,E).pz)==null?void 0:s.enr)==null?void 0:o[t.substring(0,i)]}};E=new WeakMap,J=new WeakMap,O=new WeakMap;var Mt=require("dequal/lite");function x(e,t){var o,u,c,l,f,m;let i=(o=t==null?void 0:t.op)!=null?o:"=";if(t.op==="*")return e!==null&&typeof e!="undefined";if(t.op==="!*")return e===null||typeof e=="undefined";if(!("rhs"in t))throw new Error(`Match expression is required for match type ${i}`);let r=(u=t.cs)!=null?u:!1,n=(r?e!=null?e:"":Xt(e)).toString(),s=(r?t.rhs:Xt(t.rhs)).toString();switch(i){case"=":return n===s;case"!=":return n!==s;case"~":return(c=n.includes(s))!=null?c:!1;case"!~":return!((l=n.includes(s))==null||l);case"//":return new RegExp(t.rhs.toString(),r?"":"i").test((f=e==null?void 0:e.toString())!=null?f:"");case"!//":return!new RegExp(t.rhs.toString(),r?"":"i").test((m=e==null?void 0:e.toString())!=null?m:"");default:throw new Error(`Unknown match type ${i}.`)}}function P(e,t){return`'${("cs"in t?t.cs:!1)?e:e==null?void 0:e.toString().toUpperCase()}' ${lt(t)}`}function lt(e){return"rhs"in e?`${e.op} '${e.cs?e.rhs:e.rhs.toString().toUpperCase()}'`:`${e.op==="*"?"exists":"does not exist"}`}function Xt(e){var t,i;return(i=(t=e==null?void 0:e.toString())==null?void 0:t.toUpperCase())!=null?i:""}var bt=({update:e,criteria:t,onLogMessage:i})=>{var u,c;if(t.type!=="CK")return{result:!1,changed:!1};let r=!(0,Mt.dequal)(Zt(e.state.cookies),Zt((u=e.previousState)==null?void 0:u.cookies)),n=(c=e.state.cookies)==null?void 0:c[t.cookieName],o={result:x(n,t.match),changed:r};return i==null||i(["debug",203,{criteria:t,result:o,explanation:P(n,t.match)}]),o};function Zt(e){if(!e)return;if(!e.ufvd)return e;let{ufvd:t,...i}=e;return i}function Lt(e,t){var r;if(typeof e=="undefined"||e===null)return!1;let i=Number(e);if(isNaN(i))return!1;switch((r=t==null?void 0:t.op)!=null?r:"="){case"=":return i===t.rhs;case"!=":return i!==t.rhs;case">":return i>t.rhs;case"<":return i<t.rhs;default:return console.warn(`Unknown match type ${t.op} is false.`),!1}}function te(e,t){return`${e} ${Ge(t)}`}function Ge(e){return`${e.op} ${e.rhs}`}function W(e,t){return`${e}${at}${t}`}var ct=W("$pvc","v"),dt=({update:e,criteria:t,commands:i,onLogMessage:r})=>{var l,f;if(t.type!=="PVC")return{result:!1,changed:!1};let n=Boolean(e.state.url&&(!e.previousState||((l=e.state.url)==null?void 0:l.toString())!==((f=e.previousState.url)==null?void 0:f.toString()))),o=(e.visitor.sessionScores[ct]||0)+1,u={result:!1,changed:n},c=i.some(m=>m.type==="modscoreS"&&m.data.dimension===ct);return n&&!c&&i.push({type:"modscoreS",data:{dimension:ct,delta:1}}),Lt(o,t.match)&&(u.result=!0),r==null||r(["debug",203,{criteria:t,result:u,explanation:te(o,t.match)}]),u};dt.alwaysExecute=!0;var Et=({update:e,criteria:t,onLogMessage:i})=>{var u,c,l,f,m;if(t.type!=="QS")return{result:!1,changed:!1};let r=!e.previousState||((c=(u=e.state.url)==null?void 0:u.searchParams)==null?void 0:c.toString())!==((f=(l=e.previousState.url)==null?void 0:l.searchParams)==null?void 0:f.toString()),n=(m=e.state.url)==null?void 0:m.searchParams.get(t.queryName),o={result:x(n,t.match),changed:r};return i==null||i(["debug",203,{criteria:t,result:o,explanation:P(n,t.match)}]),o};var Vt=({update:e,criteria:t,signal:i,onLogMessage:r})=>{var f;if(t.type!=="QK")return{result:!1,changed:!1};if(typeof document=="undefined"&&e.scores[i.id]>0)return{result:!0,changed:!1};let n=e.visitor.quirks[t.key],s=(f=e.state.quirks)==null?void 0:f[t.key],o=s!=null?s:n,u=Boolean(s&&n!==s),l={result:x(o,t.match),changed:u};return r==null||r(["debug",203,{criteria:t,result:l,explanation:P(o,t.match)}]),l};var Tt=({update:e,criteria:t,onLogMessage:i})=>{var s,o,u;if(t.type!=="EVT")return{result:!1,changed:!1};let r=(o=(s=e.state.events)==null?void 0:s.some(c=>x(c.event,t.event)))!=null?o:!1,n={result:r,changed:r};return i==null||i(["debug",203,{criteria:t,result:n,explanation:`'${(u=e.state.events)==null?void 0:u.join("', '")}' ${lt(t.event)}`}]),n};var kt=({update:e,criteria:t,onLogMessage:i})=>{var u,c,l;if(t.type!=="PV")return{result:!1,changed:!1};let r=(u=e.state.url)==null?void 0:u.pathname,n=!e.previousState||(r==null?void 0:r.toString())!==((l=(c=e.previousState.url)==null?void 0:c.pathname)==null?void 0:l.toString()),o={result:x(r,t.path),changed:n};return i==null||i(["debug",203,{criteria:t,result:o,explanation:P(r,t.path)}]),o};var Y,A=class{constructor(t){d(this,Y,void 0);p(this,Y,t)}evaluate(t,i,r,n,s){let o=i.clauses.length>1;o&&(s==null||s(["debug",202,"GROUP",i]));try{let u=!(i.op==="&"||!i.op),c=null,l=!1;for(let m of i.clauses){let S;if(m.type==="G")S=this.evaluate(t,m,r,n,s);else{let C=a(this,Y)[m.type];if(c&&!C.alwaysExecute)continue;if(!C)throw new Error(`${m.type} signal criteria not registered`);S=C({update:t,criteria:m,commands:r,signal:n,onLogMessage:s})}S.changed&&(l=!0),!c&&S.result===u&&(c={result:u,changed:l})}let f=c!=null?c:{result:!u,changed:l};return o&&(s==null||s(["debug",204,f])),f}finally{o&&(s==null||s(["debug",202,"ENDGROUP"]))}}};Y=new WeakMap;var X=()=>({quirks:{},scores:{},sessionScores:{},tests:{},consent:!1,controlGroup:!1});var ee=$(require("mitt")),ie=require("dequal/lite");var re="__UNIFORM_DATA__",U,Z,q,N=class{constructor({initialData:t}){d(this,U,void 0);d(this,Z,void 0);d(this,q,(0,ee.default)());y(this,"events",{on:a(this,q).on,off:a(this,q).off});t&&(p(this,U,t),p(this,Z,t))}get data(){return a(this,U)}get initialData(){return a(this,Z)}updateData(t,i){return p(this,U,i),this.handleUpdateData(t,i)}async delete(t){p(this,U,void 0),await this.handleDelete(t)}signalAsyncDataUpdate(t){(0,ie.dequal)(this.data,t)||(p(this,U,t),a(this,q).emit("dataUpdatedAsync",t))}getClientTransitionState(){if(typeof document=="undefined")return;let t=document.getElementById(re);return t!=null&&t.textContent?JSON.parse(t.textContent):void 0}};U=new WeakMap,Z=new WeakMap,q=new WeakMap;var Pt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ne=Pt.split(""),oe=new Array(123);for(let e=0;e<Pt.length;e++)oe[Pt.charCodeAt(e)]=e;var wt=e=>{if(e<0)return`-${wt(-e)}`;let t=e>>>0,i=e/4294967296>>>0,r="";for(;i>0;)r=ne[63&t]+r,t>>>=6,t|=(63&i)<<26,i>>>=6;let n="";do n=ne[63&t]+n,t>>>=6;while(t>0);return n+r},se=e=>{let t=0,i=e.charAt(0)==="-"?1:0;for(let r=i;r<e.length;r++)t=t*64+oe[e.charCodeAt(r)];return i?-t:t};var ft=$(require("js-cookie"));var Rt=typeof document=="undefined",le="ufvd",G,M,$t=class extends N{constructor({serverCookieValue:i,cookieName:r=le,cookieAttributes:n={sameSite:"lax"}}){super({initialData:Rt?ze(i):void 0});d(this,G,void 0);d(this,M,void 0);p(this,G,r),p(this,M,n)}handleDelete(){return Rt||ft.default.remove(a(this,G)),Promise.resolve()}async handleUpdateData(i,r){Rt||(r.consent?ft.default.set(a(this,G),Ie(r),a(this,M)):ft.default.remove(a(this,G)))}};G=new WeakMap,M=new WeakMap;var ce="~",de="!",fe="-";function ze(e){if(!e)return;let t=e.split(ce);if(t.length>3)return;let[i,r,n]=t;return{consent:!0,sessionScores:ae(Ot(r)),scores:ae(Ot(n)),tests:Ot(i)}}function Ot(e){return e.split(de).map(i=>i.split(fe)).reduce((i,r)=>(r.length<2||(i[r[0]]=r.slice(1).join("-")),i),{})}function ae(e){return Object.entries(e).reduce((t,[i,r])=>(t[i]=se(r),t),{})}function Ie(e){return[Ut(e.tests),Ut(ue(e.sessionScores)),Ut(ue(e.scores))].join(ce)}function ue(e){return Object.entries(e).reduce((t,[i,r])=>(t[i]=wt(r),t),{})}function Ut(e){return Object.entries(e).map(t=>t.join(fe)).join(de)}var pt,pe,At=class extends N{constructor({serverCookieValue:i,visitorIdCookieName:r="ufvi",...n}){super(n);d(this,pt);n.initialData||v(this,pt,pe).call(this).catch(s=>{console.error(s)})}handleDelete(i){throw new Error("Method not implemented.")}async handleUpdateData(i){let r=await new Promise(n=>{setTimeout(()=>{n(void 0)},2e3)});r&&this.signalAsyncDataUpdate(r)}};pt=new WeakSet,pe=async function(){let i=await new Promise(r=>{setTimeout(()=>{r(void 0)},2e3)});i&&this.signalAsyncDataUpdate(i)};function qe(e){let{gracePeriod:t=864e5,decayRate:i=1/30,decayCap:r=.95}=e!=null?e:{};return function({now:s,lastUpd:o,scores:u,sessionScores:c,onLogMessage:l}){if(typeof o!="number")return!1;let m=s-o-t;if(m<=0)return!1;let S=m/864e5,C=1-Math.min(r,S*i);return C<=0?!1:(me(u,C),me(c,C),l==null||l(["info",140,`linear decay factor ${C.toPrecision(6)}`]),!0)}}function me(e,t){for(let i in e)i.startsWith("$")||(e[i]*=t)}var ve=$(require("mitt")),L=require("dequal/lite");var mt=class{constructor(){y(this,"inMemoryFallback",{});y(this,"hasLocalStorageObject",typeof localStorage!="undefined")}get(t){let i=this.inMemoryFallback[t];if(!this.hasLocalStorageObject||i)return i;try{let r=localStorage.getItem(t);return r?JSON.parse(r):void 0}catch(r){return i}}set(t,i,r){if(this.inMemoryFallback[t]=i,!(!this.hasLocalStorageObject||!r))try{localStorage.setItem(t,JSON.stringify(i))}catch(n){console.warn(n)}}delete(t,i){i||delete this.inMemoryFallback[t];try{localStorage.removeItem(t)}catch(r){}}};var he=$(require("rfdc"));var je=(0,he.default)();function ge(e,t,i){let r=t?je(t):X();return e.forEach(n=>{var s,o;switch(n.type){case"consent":r.consent=n.data;break;case"setquirk":r.quirks[n.data.key]=n.data.value;break;case"settest":r.tests[n.data.test]=n.data.variant;break;case"modscore":if(i)break;let u=Number(n.data.delta);if(isNaN(u))throw new Error("Non-number delta received");let c=(s=r.scores[n.data.dimension])!=null?s:0;r.scores[n.data.dimension]=c+u;break;case"modscoreS":if(i)break;let l=Number(n.data.delta);if(isNaN(l))throw new Error("Non-number delta received");let f=(o=r.sessionScores[n.data.dimension])!=null?o:0;r.sessionScores[n.data.dimension]=f+l;break;case"identify":break;case"setcontrol":r.controlGroup=n.data;break;default:throw new Error("Unknown command")}}),r}var ht="ufvisitor",V,I,j,g,b,w,R,z,gt,Se,vt,ye,et,Nt,it,Gt,tt=class{constructor(t){d(this,b);d(this,R);d(this,gt);d(this,vt);d(this,et);d(this,it);d(this,V,(0,ve.default)());d(this,I,new mt);d(this,j,void 0);d(this,g,void 0);y(this,"events",{on:a(this,V).on,off:a(this,V).off});if(p(this,g,t),a(this,b,w)||v(this,R,z).call(this,v(this,it,Gt).call(this),!0),t.transitionStore){let i=t.transitionStore.getClientTransitionState();i&&t.onServerTransitionReceived&&t.onServerTransitionReceived(i),t.transitionStore.events.on("dataUpdatedAsync",n=>{v(this,R,z).call(this,{...a(this,b,w).visitorData,...n})});let r=t.transitionStore.data;r&&v(this,R,z).call(this,{...a(this,b,w).visitorData,...r},!0)}}get data(){var i,r;let t=a(this,b,w);if(v(this,vt,ye).call(this,t)){let{sessionScores:n,...s}=t.visitorData;return v(this,R,z).call(this,{...s,sessionScores:{}}),(r=(i=a(this,g)).onLogMessage)==null||r.call(i,["info",120]),a(this,b,w).visitorData}return t.visitorData}get decayEnabled(){return!!a(this,g).decay}get options(){return a(this,g)}async updateData(t){var r,n,s,o;if(t.length===0)return;(n=(r=a(this,g)).onLogMessage)==null||n.call(r,["debug",101,t]);let i=ge(t,this.data,(s=a(this,b,w))==null?void 0:s.visitorData.controlGroup);t.some(u=>u.type==="consent"&&!u.data)&&a(this,I).delete(ht,!0),v(this,R,z).call(this,i),await((o=a(this,g).transitionStore)==null?void 0:o.updateData(t,a(this,b,w).visitorData))}async delete(t){var i,r,n,s,o;(r=(i=a(this,g)).onLogMessage)==null||r.call(i,["info",103,"GROUP",t]);try{a(this,I).delete(ht,!1),await((n=a(this,g).transitionStore)==null?void 0:n.delete(t)),v(this,R,z).call(this,v(this,it,Gt).call(this))}finally{(o=(s=a(this,g)).onLogMessage)==null||o.call(s,["info",103,"ENDGROUP"])}}};V=new WeakMap,I=new WeakMap,j=new WeakMap,g=new WeakMap,b=new WeakSet,w=function(){return a(this,I).get(ht)},R=new WeakSet,z=function(t,i=!1){var f,m,S,C,st,Kt,Ht,Bt,Jt;let r=a(this,b,w),n=Date.now();t.controlGroup?(t.scores={},t.sessionScores={}):(v(this,et,Nt).call(this,t.scores),v(this,et,Nt).call(this,t.sessionScores),(m=(f=a(this,g)).decay)==null||m.call(f,{now:n,lastUpd:r==null?void 0:r.updated,scores:t.scores,sessionScores:t.sessionScores,onLogMessage:a(this,g).onLogMessage}));let s=!(0,L.dequal)(r==null?void 0:r.visitorData.scores,t.scores),o=!(0,L.dequal)(r==null?void 0:r.visitorData.sessionScores,t.sessionScores),u=!(0,L.dequal)(r==null?void 0:r.visitorData.quirks,t.quirks),c=!(0,L.dequal)(r==null?void 0:r.visitorData.tests,t.tests),l={updated:n,visitorData:t};v(this,gt,Se).call(this),a(this,I).set(ht,l,!!t.consent),(C=(S=a(this,g)).onLogMessage)==null||C.call(S,["debug",102,t]),i||((s||o)&&a(this,V).emit("scoresUpdated",t),u&&a(this,V).emit("quirksUpdated",t),c&&a(this,V).emit("testsUpdated",t),((st=r==null?void 0:r.visitorData)==null?void 0:st.consent)!==t.consent&&a(this,V).emit("consentUpdated",t),((Kt=r==null?void 0:r.visitorData)==null?void 0:Kt.controlGroup)!==t.controlGroup&&(a(this,V).emit("controlGroupUpdated",t),(Jt=(Bt=a(this,g)).onLogMessage)==null||Jt.call(Bt,["debug",104,(Ht=t.controlGroup)!=null?Ht:!1])))},gt=new WeakSet,Se=function(){typeof document=="undefined"||!a(this,g).visitLifespan||(a(this,j)&&window.clearTimeout(a(this,j)),p(this,j,window.setTimeout(()=>{this.data},a(this,g).visitLifespan+50)))},vt=new WeakSet,ye=function(t){let i=a(this,g).visitLifespan;return i?t.updated+i<Date.now():!1},et=new WeakSet,Nt=function(t){var i,r;if(!!a(this,g).manifest)for(let n in t){let s=t[n],o=a(this,g).manifest.getDimensionByKey(n);!o||s>o.cap&&((r=(i=a(this,g)).onLogMessage)==null||r.call(i,["debug",110,{dim:n,score:s,cap:o.cap}]),t[n]=o.cap)}},it=new WeakSet,Gt=function(){var t,i,r;return{...X(),consent:(t=a(this,g).defaultConsent)!=null?t:!1,controlGroup:(r=(i=a(this,g).manifest)==null?void 0:i.rollForControlGroup())!=null?r:!1}};var Ce=$(require("mitt"));function zt({name:e,context:t,variations:i,take:r=1,onLogMessage:n}){var s,o,u;n==null||n(["info",300,"GROUP",{name:e,take:r}]);try{let c=(s=t.storage.data.controlGroup)!=null?s:!1,l=[],f=!1,m=t.scores;for(let S of i){if(l.length===r)break;if(!((o=S.pz)!=null&&o.crit.length)){n==null||n(["info",301,"GROUP",{id:S.id,op:(u=S.pz)==null?void 0:u.op}]),n==null||n(["info",302,{matched:!0,description:"default variation"}]),n==null||n(["info",303,!0]),n==null||n(["info",301,"ENDGROUP"]),l.push(S);continue}c||It(S.id,S.pz,m,n)&&(f=!0,l.push(S))}return{personalized:f,variations:l}}finally{n==null||n(["info",300,"ENDGROUP"])}}function It(e,t,i,r){r==null||r(["info",301,"GROUP",{id:e,op:t==null?void 0:t.op}]);let n;try{t!=null&&t.crit?!t.op||t.op==="&"?n=t.crit.every(s=>De(s,i,r)):n=t.crit.some(s=>De(s,i,r)):(r==null||r(["info",302,{matched:!0,description:"default variation"}]),n=!0),r==null||r(["info",303,n])}finally{r==null||r(["info",301,"ENDGROUP"])}return n}function De(e,t,i){var u,c;let{op:r,l:n}=e,s=(u=t[n])!=null?u:0;if(r==="+"){let l=Math.max(...Object.values(t))===s&&s>0;return i==null||i(["info",302,{matched:l,description:`${e.l} has the highest score`}]),l}else if(r==="-"){let l=Math.min(...Object.values(t))===s&&s>0;return i==null||i(["info",302,{matched:l,description:`${e.l} has the lowest non-zero score`}]),l}let o;if(e.rDim?o=t[e.rDim]||0:o=parseInt(e.r,10),isNaN(o))return i==null||i(["info",302,{matched:!1,description:`${(c=e.rDim)!=null?c:e.r} has no score value`}]),!1;if(r===">"){let l=s>o;return _(i,l,e,s,o),l}else if(r===">="){let l=s>=o;return _(i,l,e,s,o),l}else if(r==="<"){let l=s<o;return _(i,l,e,s,o),l}else if(r==="<="){let l=s<=o;return _(i,l,e,s,o),l}else if(r==="="){let l=s===o;return _(i,l,e,s,o),l}else if(r==="!="){let l=s!==o;return _(i,l,e,s,o),l}else throw new Error(`Unknown op: ${r}`)}function _(e,t,i,r,n){e==null||e(["info",302,{matched:t,description:`${i.l}[${r}] ${i.op} ${i.rDim?`${i.rDim}[${n}]`:i.r}`}])}var _e=e=>{let{values:t,total:i,missingDistribution:r}=e.reduce((n,s)=>(s.testDistribution?n.total+=s.testDistribution:++n.missingDistribution,n.values.push(s.testDistribution),n),{values:[],total:0,missingDistribution:0});if(i>100)throw new Error(`Total distribution ${i} is over the maximum 100.`);if(i<100){let s=(100-i)/r;t.forEach((o,u)=>{typeof o=="undefined"&&(t[u]=s)})}return t},St=({name:e,context:t,variations:i,onLogMessage:r})=>{r==null||r(["info",400,"GROUP",e]);try{let n,s=t.getTestVariantId(e);if(s===null)return r==null||r(["error",401,e]),{result:void 0,variantAssigned:!1};if(s&&(n=i.find(o=>o.id===s),n||r==null||r(["warn",402,{missingVariant:s,variants:i.map(o=>o.id)}])),!n){let o=_e(i),u=Math.floor(Math.random()*100),c=0;n=i.find((l,f)=>{let m=o[f];if(u>c&&u<=c+m)return l;c+=m}),n&&(r==null||r(["info",403,n.id]),t.setTestVariantId(e,n.id))}return n&&(r==null||r(["info",404,n.id])),{result:n,variantAssigned:!s}}finally{r==null||r(["info",400,"ENDGROUP"])}};var qt=require("dequal/lite");var D,T,k,rt,h,nt,_t,Q,yt,ot,Qt,jt=class{constructor(t){d(this,nt);d(this,Q);d(this,ot);y(this,"manifest");d(this,D,void 0);d(this,T,{});d(this,k,void 0);d(this,rt,{});d(this,h,(0,Ce.default)());y(this,"events",{on:a(this,h).on,off:a(this,h).off});y(this,"storage");var n,s;let{manifest:i,...r}=t;p(this,k,{}),(n=t.plugins)==null||n.forEach(o=>{!o.logDrain||a(this,h).on("log",o.logDrain)}),a(this,h).emit("log",["info",1,"GROUP"]);try{this.manifest=new B({onLogMessage:o=>a(this,h).emit("log",o),manifest:i,evaluator:new A({CK:bt,QS:Et,QK:Vt,PVC:dt,EVT:Tt,PV:kt})}),this.storage=new tt({...r,manifest:this.manifest,onServerTransitionReceived:o=>{p(this,D,o),o.ssv&&(p(this,T,o.ssv),a(this,h).emit("log",["debug",130,o]))},onLogMessage:o=>a(this,h).emit("log",o)}),this.storage.events.on("scoresUpdated",v(this,Q,yt).bind(this)),a(this,D)||v(this,Q,yt).call(this,this.storage.data),this.storage.events.on("quirksUpdated",o=>{let u=this.manifest.computeSignals({scores:a(this,T),state:a(this,k),previousState:a(this,k),visitor:this.storage.data});this.storage.updateData(u),a(this,h).emit("quirksUpdated",o.quirks),a(this,h).emit("log",["info",4,o.quirks])}),(s=t.plugins)==null||s.forEach(o=>{!o.init||o.init(this)})}finally{a(this,h).emit("log",["info",1,"ENDGROUP"])}}get scores(){return a(this,T)}get quirks(){var t,i;return(i=(t=a(this,D))==null?void 0:t.quirks)!=null?i:this.storage.data.quirks}async update(t){var n,s,o;let i=[],r={};if((n=a(this,D))!=null&&n.quirks&&(t={...t,quirks:{...a(this,D).quirks,...t.quirks||{}}}),(s=a(this,D))!=null&&s.tests){let u=Object.entries(a(this,D).tests);if(u.length>0){let c=[];u.forEach(([l,f])=>{this.storage.data.tests[l]||(c.push([l,f]),r[l]=f)}),i.push(...c.map(([l,f])=>({type:"settest",data:{test:l,variant:f}})))}}try{a(this,h).emit("log",["info",2,"GROUP",{...t,url:(o=t.url)==null?void 0:o.toString()}]),t.quirks&&i.push(...Object.entries(t.quirks).map(([u,c])=>({type:"setquirk",data:{key:u,value:c}}))),t.enrichments&&t.enrichments.forEach(u=>{let c=W(u.cat,u.key);this.manifest.getDimensionByKey(c)?i.push({type:"modscore",data:{dimension:c,delta:u.str}}):a(this,h).emit("log",["warn",5,u])}),i.push(...this.manifest.computeSignals({state:t,previousState:a(this,k),visitor:this.storage.data,scores:a(this,D)?v(this,ot,Qt).call(this,this.storage.data):a(this,T)})),p(this,k,{...a(this,k),...t}),await this.storage.updateData(i),a(this,D)&&(v(this,Q,yt).call(this,this.storage.data),Object.entries(r).forEach(([u,c])=>{v(this,nt,_t).call(this,{name:u,variantId:c,variantAssigned:!0})}),p(this,D,void 0),a(this,h).emit("log",["debug",131]))}finally{a(this,h).emit("log",["info",2,"ENDGROUP"])}}getTestVariantId(t){var r,n,s,o;let i=this.manifest.getTest(t);return i?(o=(s=i.wv)!=null?s:(n=(r=a(this,D))==null?void 0:r.tests)==null?void 0:n[t])!=null?o:this.storage.data.tests[t]:(a(this,h).emit("log",["warn",401,t]),null)}setTestVariantId(t,i){this.storage.updateData([{type:"settest",data:{test:t,variant:i}}])}log(...t){a(this,h).emit("log",t)}test(t){var r,n;let i=St({...t,context:this,onLogMessage:s=>a(this,h).emit("log",s)});return v(this,nt,_t).call(this,{name:t.name,variantId:(n=(r=i.result)==null?void 0:r.id)!=null?n:void 0,variantAssigned:i.variantAssigned}),i}personalize(t){let i=zt({...t,context:this,onLogMessage:s=>a(this,h).emit("log",s)}),r=a(this,rt)[t.name],n={name:t.name,variantIds:i.variations.map(s=>{var o;return(o=s.id)!=null?o:"Unknown"}),control:this.storage.data.controlGroup,changed:!0};return r&&(0,qt.dequal)(n.variantIds,r)&&(n.changed=!1),a(this,h).emit("personalizationResult",n),a(this,rt)[t.name]=n.variantIds,i}async forget(t){p(this,k,{}),await this.storage.delete(t)}getServerToClientTransitionState(){let t={quirks:this.storage.data.quirks,ssv:a(this,T),tests:{}},i=this.storage.data.tests;return Object.entries(i).map(([r,n])=>{var s,o,u;((u=(o=(s=this.storage.options.transitionStore)==null?void 0:s.initialData)==null?void 0:o.tests)==null?void 0:u[r])!==i[r]&&t.tests&&(t.tests[r]=n)}),t}};D=new WeakMap,T=new WeakMap,k=new WeakMap,rt=new WeakMap,h=new WeakMap,nt=new WeakSet,_t=function(t){a(this,h).emit("testResult",t)},Q=new WeakSet,yt=function(t){let i=v(this,ot,Qt).call(this,t);!(0,qt.dequal)(i,a(this,T))&&(p(this,T,i),a(this,h).emit("scoresUpdated",i),a(this,h).emit("log",["info",3,i]))},ot=new WeakSet,Qt=function(t){var r;let i={...t.scores};for(let n in t.sessionScores)i[n]=((r=i[n])!=null?r:0)+t.sessionScores[n];return i=this.manifest.computeAggregateDimensions(i),i};var xe=$(require("rfdc"));function Dt(e,t){if(e==="none")return!1;switch(t){case"debug":return e==="debug";case"info":return e==="info"||e==="debug";case"warn":return e==="warn"||e==="info"||e==="debug";case"error":return e==="debug"||"info";default:return!1}}var Qe=(0,xe.default)();function be(e){return([t,...i])=>{if(!Dt(e,t))return;let[r,...n]=i;console[t](`\u{1F94B} [${t}] Uniform event ID ${r}
`,...n.map(Qe))}}function Fe(e){return{logDrain:be(e)}}var Ee={1:()=>["context","initializing Uniform Context"],2:e=>["context","received update()",e],3:e=>["context","new score vector",e],4:e=>["context","updated quirks",e],5:e=>["context","ignored enrichment update for unknown enrichment category",e.cat],101:e=>["storage","received update commands",e],102:e=>["storage","data was updated",e],103:e=>["storage",`deleting visitor data ${e?"from all devices":"from this device"}`],104:e=>["context",e?"Visitor assigned to personalization control group":"Visitor assigned to personalization experiment group"],110:({dim:e,cap:t,score:i})=>["storage",`${e} score ${i} exceeded cap ${t}. Rounded down.`],120:()=>["storage","visitor data expired and was cleared"],130:e=>["storage","server to client transition score data was loaded; it will persist until the next update event occurs",e],131:()=>["storage","server to client transition data was discarded"],140:e=>["storage",`score decay was applied: ${e}`],200:()=>["signals","evaluating signals"],201:e=>["signals",`evaluating signal ${e.id} (${e.dur})`],202:e=>["signals",e.op==="|"?"OR":"AND"],203:({criteria:e,result:t,explanation:i})=>["signals",`${e.type}: ${i} is ${t.result} [${t.changed?"CHANGED":"unchanged"}]`],204:e=>["signals",`group result: ${e.result} [${e.changed?"CHANGED":"unchanged"}]`],300:e=>["personalization",`executing personalization '${e.name}'`],301:({id:e,op:t})=>["personalization",`testing variation ${e} (${t==="|"?"OR":"AND"})`],302:({matched:e,description:t})=>["personalization",`${t} is ${e}`],303:e=>["personalization",e?"selected variation":"did not select variation"],400:e=>["testing",`executing A/B test '${e}'`],401:e=>["testing",`${e} is not registered in the manifest; it will not be run.`],402:({missingVariant:e,variants:t})=>["testing",`test variation '${e}' previously assigned to the visitor for this test no longer exists as a variant. It will be removed. This may indicate changing test variations after publishing a test, which will make results invalid. Known variants: ${t.join(", ")}`],403:e=>["testing",`assigned new test variant '${e}'`],404:e=>["testing",`displaying variation '${e}'`],700:()=>["gtag","gtag is not defined, skipping analytics event emission. Ensure you have added the gtag script to your page."],701:()=>["gtag","enabled gtag event signal redirection"]};var Ve=$(require("rfdc")),Ke=(0,Ve.default)();function Te(e,t){let i=typeof document=="undefined",{enableOnServer:r=!1}=t!=null?t:{};return([n,...s])=>{if(!Dt(e,n)||i&&!r)return;let[o,...u]=s,c=console[n];if(u[0]==="GROUP"&&(u.shift(),c=console.groupCollapsed),u[0]==="ENDGROUP"){console.groupEnd();return}let l=Ee[o],f="";switch(n){case"debug":f="\u{1F41E}";break;case"info":f="\u{1F4AC}";break;case"warn":f="\u26A0\uFE0F";break;case"error":f="\u{1F4A5}";break}let m=f;if(!l){c(`${m} unknown event ID ${o}. Log messages data may be older than Uniform Context package.`,...u);return}let[S,C,...st]=l(...u);c(`${m}[${S}] ${C}
`,...st.map(Ke))}}function He(e,t){return{logDrain:Te(e,t)}}var ke=(u=>(u.ListStart="nesi-list-start",u.ListEnd="nesi-list-end",u.ListItem="nesi-list-item-html",u.ListItemSettings="nesi-list-item-settings",u.TestStart="nesi-test-start",u.TestEnd="nesi-test-end",u.Unknown="unknown",u))(ke||{}),Be="nesitag";var Ft=typeof top!="undefined";function Je(){return{logDrain:e=>{!Ft||top==null||top.postMessage({type:"uniform:context:log",message:e},window.location.origin)},init:e=>{let t=[],i=[],r=()=>{!Ft||top==null||top.postMessage({type:"uniform:context:data",data:{scores:e.scores,data:e.storage.data,manifest:e.manifest.data,personalizations:t,tests:i}},window.location.origin)},n=o=>{!o.changed||t.push(o)},s=o=>{!o.variantAssigned||i.push(o)};if(Ft){window.__UNIFORM_DEVTOOLS_CONTEXT_INSTANCE__=e;try{top==null||top.addEventListener("message",async o=>{if(!o.data)return;let u=o.data;await We(u,e)})}catch(o){console.warn("Unable to initialize Uniform Context DevTools because it is in a cross-domain iframe.",o)}top==null||top.postMessage({type:"uniform:context:hello",uiVersion:2},window.location.origin),r()}return e.events.on("personalizationResult",n),e.events.on("testResult",s),e.events.on("scoresUpdated",r),e.storage.events.on("*",r),()=>{e.events.off("scoresUpdated",r),e.storage.events.off("*",r),e.events.off("personalizationResult",n),e.events.off("testResult",s)}}}}async function We(e,t){e.type==="uniform-in:context:update"&&e.newData&&await t.update(e.newData),e.type==="uniform-in:context:commands"&&e.commands&&Array.isArray(e.commands)&&await t.storage.updateData(e.commands),e.type==="uniform-in:context:forget"&&await t.forget(!1)}function Ye(e){return`${e.apiKey}|${e.projectId}${e.apiHost?`|${e.apiHost}`:""}`}function Xe(e){let[t,i,r]=e.split("|");if(!t.startsWith("uf"))throw new Error("Invalid API key");if(!/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})$/i.test(i))throw new Error("Invalid project ID");return{apiKey:t,projectId:i,apiHost:r||"https://uniform.app"}}0&&(module.exports={Context,CookieTransitionDataStore,EdgeNodeTagName,EdgeTransitionDataStore,GroupCriteriaEvaluator,ManifestInstance,SERVER_STATE_ID,ScriptType,TransitionDataStore,UNIFORM_DEFAULT_COOKIE_NAME,VisitorDataStore,computeAggregateDimensions,cookieEvaluator,createConsoleLogDrain,createDebugConsoleLogDrain,createLinearDecay,currentPageEvaluator,emptyVisitorData,enableConsoleLogDrain,enableContextDevTools,enableDebugConsoleLogDrain,evaluateVariantMatch,eventEvaluator,explainStringMatch,explainStringMatchCriteria,getEnrichmentVectorKey,isStringMatch,pageViewCountDimension,pageViewCountEvaluator,parseQuickConnect,personalizeVariations,queryStringEvaluator,quirkEvaluator,serializeQuickConnect,testVariations});
"use strict";var Pe=Object.create;var F=Object.defineProperty;var we=Object.getOwnPropertyDescriptor;var Re=Object.getOwnPropertyNames;var Oe=Object.getPrototypeOf,Ue=Object.prototype.hasOwnProperty;var $e=(e,t,i)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var Ae=(e,t)=>{for(var i in t)F(e,i,{get:t[i],enumerable:!0})},Wt=(e,t,i,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Re(t))!Ue.call(e,n)&&n!==i&&F(e,n,{get:()=>t[n],enumerable:!(r=we(t,n))||r.enumerable});return e};var $=(e,t,i)=>(i=e!=null?Pe(Oe(e)):{},Wt(t||!e||!e.__esModule?F(i,"default",{value:e,enumerable:!0}):i,e)),Ne=e=>Wt(F({},"__esModule",{value:!0}),e);var y=(e,t,i)=>($e(e,typeof t!="symbol"?t+"":t,i),i),Ct=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)};var a=(e,t,i)=>(Ct(e,t,"read from private field"),i?i.call(e):t.get(e)),d=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},p=(e,t,i,r)=>(Ct(e,t,"write to private field"),r?r.call(e,i):t.set(e,i),i);var v=(e,t,i)=>(Ct(e,t,"access private method"),i);var Ze={};Ae(Ze,{Context:()=>jt,CookieTransitionDataStore:()=>Nt,EdgeNodeTagName:()=>Ke,EdgeTransitionDataStore:()=>Gt,GroupCriteriaEvaluator:()=>A,ManifestInstance:()=>B,SERVER_STATE_ID:()=>ne,ScriptType:()=>xe,TransitionDataStore:()=>N,UNIFORM_DEFAULT_COOKIE_NAME:()=>ce,VisitorDataStore:()=>tt,computeAggregateDimensions:()=>xt,cookieEvaluator:()=>bt,createConsoleLogDrain:()=>Ee,createDebugConsoleLogDrain:()=>ke,createLinearDecay:()=>je,currentPageEvaluator:()=>Et,emptyVisitorData:()=>M,enableConsoleLogDrain:()=>Be,enableContextDevTools:()=>Qe,enableDebugConsoleLogDrain:()=>We,evaluateVariantMatch:()=>Pt,eventEvaluator:()=>Vt,explainStringMatch:()=>P,explainStringMatchCriteria:()=>lt,getEnrichmentVectorKey:()=>W,isStringMatch:()=>x,pageViewCountDimension:()=>ct,pageViewCountEvaluator:()=>dt,parseQuickConnect:()=>Xe,personalizeVariations:()=>wt,queryStringEvaluator:()=>Tt,quirkEvaluator:()=>kt,serializeQuickConnect:()=>Ye,testVariations:()=>ft});module.exports=Ne(Ze);function xt(e,t){let i={...e};for(let r in t){let n=Yt(e,r,t,new Set([r]));n!==0&&(i[r]=n)}return i}function Yt(e,t,i,r){var s;let n=0;for(let o of i[t].inputs){let u=(s=e[o.dim])!=null?s:0;if(!u&&i[o.dim]){if(r.has(o.dim))continue;let l=new Set(r);l.add(o.dim),u=Yt(e,o.dim,i,l)}if(u!==0)if(o.sign==="c"){n=0;break}else o.sign==="-"?n-=u:n+=u}return n}var at="_";var K,H,ut=class{constructor(t,i,r){d(this,K,void 0);d(this,H,void 0);y(this,"signal");this.signal=t,p(this,K,i),p(this,H,r)}computeSignal(t,i){if(t.scores[this.signal.id]>=this.signal.cap&&this.signal.dur!=="t")return;let n=a(this,K).evaluate(t,this.signal.crit,i,this.signal,a(this,H)),s=this.signal.dur==="s"||this.signal.dur==="t"?"modscoreS":"modscore";if(!!n.changed){if(n.result)i.push({type:s,data:{dimension:this.signal.id,delta:this.signal.str}});else if(this.signal.dur==="t"){let o=t.visitor.sessionScores[this.signal.id];o&&i.push({type:s,data:{dimension:this.signal.id,delta:-o}})}}}};K=new WeakMap,H=new WeakMap;var E,J,O,B=class{constructor({manifest:t,evaluator:i=new A({}),onLogMessage:r=()=>{}}){y(this,"data");d(this,E,void 0);d(this,J,void 0);d(this,O,void 0);var n,s,o;p(this,E,(n=t.project)!=null?n:{}),this.data=t,p(this,J,Object.entries((o=(s=a(this,E).pz)==null?void 0:s.sig)!=null?o:[]).map(([u,c])=>new ut({...c,id:u},i,r))),p(this,O,r)}rollForControlGroup(){var t,i;return Math.random()<((i=(t=a(this,E).pz)==null?void 0:t.control)!=null?i:0)}getTest(t){var i;return(i=a(this,E).test)==null?void 0:i[t]}computeSignals(t){let i=[];a(this,O).call(this,["debug",200,"GROUP"]);try{a(this,J).forEach(r=>{a(this,O).call(this,["debug",201,"GROUP",r.signal]);try{r.computeSignal(t,i)}finally{a(this,O).call(this,["debug",201,"ENDGROUP"])}})}finally{a(this,O).call(this,["debug",200,"ENDGROUP"])}return i}computeAggregateDimensions(t){var i,r;return xt(t,(r=(i=a(this,E).pz)==null?void 0:i.agg)!=null?r:{})}getDimensionByKey(t){var r,n,s,o;let i=t.indexOf(at);return i<=0?(n=(r=a(this,E).pz)==null?void 0:r.sig)==null?void 0:n[t]:(o=(s=a(this,E).pz)==null?void 0:s.enr)==null?void 0:o[t.substring(0,i)]}};E=new WeakMap,J=new WeakMap,O=new WeakMap;var Mt=require("dequal/lite");function x(e,t){var o,u,c,l,f,m;let i=(o=t==null?void 0:t.op)!=null?o:"=";if(t.op==="*")return e!==null&&typeof e!="undefined";if(t.op==="!*")return e===null||typeof e=="undefined";if(!("rhs"in t))throw new Error(`Match expression is required for match type ${i}`);let r=(u=t.cs)!=null?u:!1,n=(r?e!=null?e:"":Xt(e)).toString(),s=(r?t.rhs:Xt(t.rhs)).toString();switch(i){case"=":return n===s;case"!=":return n!==s;case"~":return(c=n.includes(s))!=null?c:!1;case"!~":return!((l=n.includes(s))==null||l);case"//":return new RegExp(t.rhs.toString(),r?"":"i").test((f=e==null?void 0:e.toString())!=null?f:"");case"!//":return!new RegExp(t.rhs.toString(),r?"":"i").test((m=e==null?void 0:e.toString())!=null?m:"");default:throw new Error(`Unknown match type ${i}.`)}}function P(e,t){return`'${("cs"in t?t.cs:!1)?e:e==null?void 0:e.toString().toUpperCase()}' ${lt(t)}`}function lt(e){return"rhs"in e?`${e.op} '${e.cs?e.rhs:e.rhs.toString().toUpperCase()}'`:`${e.op==="*"?"exists":"does not exist"}`}function Xt(e){var t,i;return(i=(t=e==null?void 0:e.toString())==null?void 0:t.toUpperCase())!=null?i:""}var bt=({update:e,criteria:t,onLogMessage:i})=>{var u,c;if(t.type!=="CK")return{result:!1,changed:!1};let r=!(0,Mt.dequal)(Zt(e.state.cookies),Zt((u=e.previousState)==null?void 0:u.cookies)),n=(c=e.state.cookies)==null?void 0:c[t.cookieName],o={result:x(n,t.match),changed:r};return i==null||i(["debug",203,{criteria:t,result:o,explanation:P(n,t.match)}]),o};function Zt(e){if(!e)return;if(!e.ufvd)return e;let{ufvd:t,...i}=e;return i}var Et=({update:e,criteria:t,onLogMessage:i})=>{var u,c,l;if(t.type!=="PV")return{result:!1,changed:!1};let r=(u=e.state.url)==null?void 0:u.pathname,n=!e.previousState||(r==null?void 0:r.toString())!==((l=(c=e.previousState.url)==null?void 0:c.pathname)==null?void 0:l.toString()),o={result:x(r,t.path),changed:n};return i==null||i(["debug",203,{criteria:t,result:o,explanation:P(r,t.path)}]),o};var Vt=({update:e,criteria:t,onLogMessage:i})=>{var s,o,u;if(t.type!=="EVT")return{result:!1,changed:!1};let r=(o=(s=e.state.events)==null?void 0:s.some(c=>x(c.event,t.event)))!=null?o:!1,n={result:r,changed:r};return i==null||i(["debug",203,{criteria:t,result:n,explanation:`'${(u=e.state.events)==null?void 0:u.join("', '")}' ${lt(t.event)}`}]),n};function W(e,t){return`${e}${at}${t}`}function Lt(e,t){var r;if(typeof e=="undefined"||e===null)return!1;let i=Number(e);if(isNaN(i))return!1;switch((r=t==null?void 0:t.op)!=null?r:"="){case"=":return i===t.rhs;case"!=":return i!==t.rhs;case">":return i>t.rhs;case"<":return i<t.rhs;default:return console.warn(`Unknown match type ${t.op} is false.`),!1}}function te(e,t){return`${e} ${Ge(t)}`}function Ge(e){return`${e.op} ${e.rhs}`}var ct=W("$pvc","v"),dt=({update:e,criteria:t,commands:i,onLogMessage:r})=>{var l,f;if(t.type!=="PVC")return{result:!1,changed:!1};let n=Boolean(e.state.url&&(!e.previousState||((l=e.state.url)==null?void 0:l.toString())!==((f=e.previousState.url)==null?void 0:f.toString()))),o=(e.visitor.sessionScores[ct]||0)+1,u={result:!1,changed:n},c=i.some(m=>m.type==="modscoreS"&&m.data.dimension===ct);return n&&!c&&i.push({type:"modscoreS",data:{dimension:ct,delta:1}}),Lt(o,t.match)&&(u.result=!0),r==null||r(["debug",203,{criteria:t,result:u,explanation:te(o,t.match)}]),u};dt.alwaysExecute=!0;var Tt=({update:e,criteria:t,onLogMessage:i})=>{var u,c,l,f,m;if(t.type!=="QS")return{result:!1,changed:!1};let r=!e.previousState||((c=(u=e.state.url)==null?void 0:u.searchParams)==null?void 0:c.toString())!==((f=(l=e.previousState.url)==null?void 0:l.searchParams)==null?void 0:f.toString()),n=(m=e.state.url)==null?void 0:m.searchParams.get(t.queryName),o={result:x(n,t.match),changed:r};return i==null||i(["debug",203,{criteria:t,result:o,explanation:P(n,t.match)}]),o};var kt=({update:e,criteria:t,signal:i,onLogMessage:r})=>{var f;if(t.type!=="QK")return{result:!1,changed:!1};if(typeof document=="undefined"&&e.scores[i.id]>0)return{result:!0,changed:!1};let n=e.visitor.quirks[t.key],s=(f=e.state.quirks)==null?void 0:f[t.key],o=s!=null?s:n,u=Boolean(s&&n!==s),l={result:x(o,t.match),changed:u};return r==null||r(["debug",203,{criteria:t,result:l,explanation:P(o,t.match)}]),l};var Y,A=class{constructor(t){d(this,Y,void 0);p(this,Y,t)}evaluate(t,i,r,n,s){let o=i.clauses.length>1;o&&(s==null||s(["debug",202,"GROUP",i]));try{let u=!(i.op==="&"||!i.op),c=null,l=!1;for(let m of i.clauses){let S;if(m.type==="G")S=this.evaluate(t,m,r,n,s);else{let C=a(this,Y)[m.type];if(c&&!C.alwaysExecute)continue;if(!C)throw new Error(`${m.type} signal criteria not registered`);S=C({update:t,criteria:m,commands:r,signal:n,onLogMessage:s})}S.changed&&(l=!0),!c&&S.result===u&&(c={result:u,changed:l})}let f=c!=null?c:{result:!u,changed:l};return o&&(s==null||s(["debug",204,f])),f}finally{o&&(s==null||s(["debug",202,"ENDGROUP"]))}}};Y=new WeakMap;function Pt(e,t,i,r){r==null||r(["info",301,"GROUP",{id:e,op:t==null?void 0:t.op}]);let n;try{t!=null&&t.crit?!t.op||t.op==="&"?n=t.crit.every(s=>ee(s,i,r)):n=t.crit.some(s=>ee(s,i,r)):(r==null||r(["info",302,{matched:!0,description:"default variation"}]),n=!0),r==null||r(["info",303,n])}finally{r==null||r(["info",301,"ENDGROUP"])}return n}function ee(e,t,i){var u,c;let{op:r,l:n}=e,s=(u=t[n])!=null?u:0;if(r==="+"){let l=Math.max(...Object.values(t))===s&&s>0;return i==null||i(["info",302,{matched:l,description:`${e.l} has the highest score`}]),l}else if(r==="-"){let l=Math.min(...Object.values(t))===s&&s>0;return i==null||i(["info",302,{matched:l,description:`${e.l} has the lowest non-zero score`}]),l}let o;if(e.rDim?o=t[e.rDim]||0:o=parseInt(e.r,10),isNaN(o))return i==null||i(["info",302,{matched:!1,description:`${(c=e.rDim)!=null?c:e.r} has no score value`}]),!1;if(r===">"){let l=s>o;return q(i,l,e,s,o),l}else if(r===">="){let l=s>=o;return q(i,l,e,s,o),l}else if(r==="<"){let l=s<o;return q(i,l,e,s,o),l}else if(r==="<="){let l=s<=o;return q(i,l,e,s,o),l}else if(r==="="){let l=s===o;return q(i,l,e,s,o),l}else if(r==="!="){let l=s!==o;return q(i,l,e,s,o),l}else throw new Error(`Unknown op: ${r}`)}function q(e,t,i,r,n){e==null||e(["info",302,{matched:t,description:`${i.l}[${r}] ${i.op} ${i.rDim?`${i.rDim}[${n}]`:i.r}`}])}function wt({name:e,context:t,variations:i,take:r=1,onLogMessage:n}){var s,o,u;n==null||n(["info",300,"GROUP",{name:e,take:r}]);try{let c=(s=t.storage.data.controlGroup)!=null?s:!1,l=[],f=!1,m=t.scores;for(let S of i){if(l.length===r)break;if(!((o=S.pz)!=null&&o.crit.length)){n==null||n(["info",301,"GROUP",{id:S.id,op:(u=S.pz)==null?void 0:u.op}]),n==null||n(["info",302,{matched:!0,description:"default variation"}]),n==null||n(["info",303,!0]),n==null||n(["info",301,"ENDGROUP"]),l.push(S);continue}c||Pt(S.id,S.pz,m,n)&&(f=!0,l.push(S))}return{personalized:f,variations:l}}finally{n==null||n(["info",300,"ENDGROUP"])}}var ze=e=>{let{values:t,total:i,missingDistribution:r}=e.reduce((n,s)=>(s.testDistribution?n.total+=s.testDistribution:++n.missingDistribution,n.values.push(s.testDistribution),n),{values:[],total:0,missingDistribution:0});if(i>100)throw new Error(`Total distribution ${i} is over the maximum 100.`);if(i<100){let s=(100-i)/r;t.forEach((o,u)=>{typeof o=="undefined"&&(t[u]=s)})}return t},ft=({name:e,context:t,variations:i,onLogMessage:r})=>{r==null||r(["info",400,"GROUP",e]);try{let n,s=t.getTestVariantId(e);if(s===null)return r==null||r(["error",401,e]),{result:void 0,variantAssigned:!1};if(s&&(n=i.find(o=>o.id===s),n||r==null||r(["warn",402,{missingVariant:s,variants:i.map(o=>o.id)}])),!n){let o=ze(i),u=Math.floor(Math.random()*100),c=0;n=i.find((l,f)=>{let m=o[f];if(u>c&&u<=c+m)return l;c+=m}),n&&(r==null||r(["info",403,n.id]),t.setTestVariantId(e,n.id))}return n&&(r==null||r(["info",404,n.id])),{result:n,variantAssigned:!s}}finally{r==null||r(["info",400,"ENDGROUP"])}};var pt=$(require("js-cookie"));var ie=require("dequal/lite"),re=$(require("mitt"));var ne="__UNIFORM_DATA__",U,X,j,N=class{constructor({initialData:t}){d(this,U,void 0);d(this,X,void 0);d(this,j,(0,re.default)());y(this,"events",{on:a(this,j).on,off:a(this,j).off});t&&(p(this,U,t),p(this,X,t))}get data(){return a(this,U)}get initialData(){return a(this,X)}updateData(t,i){return p(this,U,i),this.handleUpdateData(t,i)}async delete(t){p(this,U,void 0),await this.handleDelete(t)}signalAsyncDataUpdate(t){(0,ie.dequal)(this.data,t)||(p(this,U,t),a(this,j).emit("dataUpdatedAsync",t))}getClientTransitionState(){if(typeof document=="undefined")return;let t=document.getElementById(ne);return t!=null&&t.textContent?JSON.parse(t.textContent):void 0}};U=new WeakMap,X=new WeakMap,j=new WeakMap;var Rt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",oe=Rt.split(""),se=new Array(123);for(let e=0;e<Rt.length;e++)se[Rt.charCodeAt(e)]=e;var Ot=e=>{if(e<0)return`-${Ot(-e)}`;let t=e>>>0,i=e/4294967296>>>0,r="";for(;i>0;)r=oe[63&t]+r,t>>>=6,t|=(63&i)<<26,i>>>=6;let n="";do n=oe[63&t]+n,t>>>=6;while(t>0);return n+r},ae=e=>{let t=0,i=e.charAt(0)==="-"?1:0;for(let r=i;r<e.length;r++)t=t*64+se[e.charCodeAt(r)];return i?-t:t};var Ut=typeof document=="undefined",ce="ufvd",G,Z,Nt=class extends N{constructor({serverCookieValue:i,cookieName:r=ce,cookieAttributes:n={sameSite:"lax"}}){super({initialData:Ut?Ie(i):void 0});d(this,G,void 0);d(this,Z,void 0);p(this,G,r),p(this,Z,n)}handleDelete(){return Ut||pt.default.remove(a(this,G)),Promise.resolve()}async handleUpdateData(i,r){Ut||(r.consent?pt.default.set(a(this,G),qe(r),a(this,Z)):pt.default.remove(a(this,G)))}};G=new WeakMap,Z=new WeakMap;var de="~",fe="!",pe="-";function Ie(e){if(!e)return;let t=e.split(de);if(t.length>3)return;let[i,r,n]=t;return{consent:!0,sessionScores:ue($t(r)),scores:ue($t(n)),tests:$t(i)}}function $t(e){return e.split(fe).map(i=>i.split(pe)).reduce((i,r)=>(r.length<2||(i[r[0]]=r.slice(1).join("-")),i),{})}function ue(e){return Object.entries(e).reduce((t,[i,r])=>(t[i]=ae(r),t),{})}function qe(e){return[At(e.tests),At(le(e.sessionScores)),At(le(e.scores))].join(de)}function le(e){return Object.entries(e).reduce((t,[i,r])=>(t[i]=Ot(r),t),{})}function At(e){return Object.entries(e).map(t=>t.join(pe)).join(fe)}var mt,me,Gt=class extends N{constructor({serverCookieValue:i,visitorIdCookieName:r="ufvi",...n}){super(n);d(this,mt);n.initialData||v(this,mt,me).call(this).catch(s=>{console.error(s)})}handleDelete(i){throw new Error("Method not implemented.")}async handleUpdateData(i){let r=await new Promise(n=>{setTimeout(()=>{n(void 0)},2e3)});r&&this.signalAsyncDataUpdate(r)}};mt=new WeakSet,me=async function(){let i=await new Promise(r=>{setTimeout(()=>{r(void 0)},2e3)});i&&this.signalAsyncDataUpdate(i)};function je(e){let{gracePeriod:t=864e5,decayRate:i=1/30,decayCap:r=.95}=e!=null?e:{};return function({now:s,lastUpd:o,scores:u,sessionScores:c,onLogMessage:l}){if(typeof o!="number")return!1;let m=s-o-t;if(m<=0)return!1;let S=m/864e5,C=1-Math.min(r,S*i);return C<=0?!1:(he(u,C),he(c,C),l==null||l(["info",140,`linear decay factor ${C.toPrecision(6)}`]),!0)}}function he(e,t){for(let i in e)i.startsWith("$")||(e[i]*=t)}var M=()=>({quirks:{},scores:{},sessionScores:{},tests:{},consent:!1,controlGroup:!1});var L=require("dequal/lite"),Se=$(require("mitt"));var ge=$(require("rfdc"));var _e=(0,ge.default)();function ve(e,t,i){let r=t?_e(t):M();return e.forEach(n=>{var s,o;switch(n.type){case"consent":r.consent=n.data;break;case"setquirk":r.quirks[n.data.key]=n.data.value;break;case"settest":r.tests[n.data.test]=n.data.variant;break;case"modscore":if(i)break;let u=Number(n.data.delta);if(isNaN(u))throw new Error("Non-number delta received");let c=(s=r.scores[n.data.dimension])!=null?s:0;r.scores[n.data.dimension]=c+u;break;case"modscoreS":if(i)break;let l=Number(n.data.delta);if(isNaN(l))throw new Error("Non-number delta received");let f=(o=r.sessionScores[n.data.dimension])!=null?o:0;r.sessionScores[n.data.dimension]=f+l;break;case"identify":break;case"setcontrol":r.controlGroup=n.data;break;default:throw new Error("Unknown command")}}),r}var ht=class{constructor(){y(this,"inMemoryFallback",{});y(this,"hasLocalStorageObject",typeof localStorage!="undefined")}get(t){let i=this.inMemoryFallback[t];if(!this.hasLocalStorageObject||i)return i;try{let r=localStorage.getItem(t);return r?JSON.parse(r):void 0}catch(r){return i}}set(t,i,r){if(this.inMemoryFallback[t]=i,!(!this.hasLocalStorageObject||!r))try{localStorage.setItem(t,JSON.stringify(i))}catch(n){console.warn(n)}}delete(t,i){i||delete this.inMemoryFallback[t];try{localStorage.removeItem(t)}catch(r){}}};var gt="ufvisitor",V,I,_,g,b,w,R,z,vt,ye,St,De,et,zt,it,It,tt=class{constructor(t){d(this,b);d(this,R);d(this,vt);d(this,St);d(this,et);d(this,it);d(this,V,(0,Se.default)());d(this,I,new ht);d(this,_,void 0);d(this,g,void 0);y(this,"events",{on:a(this,V).on,off:a(this,V).off});if(p(this,g,t),a(this,b,w)||v(this,R,z).call(this,v(this,it,It).call(this),!0),t.transitionStore){let i=t.transitionStore.getClientTransitionState();i&&t.onServerTransitionReceived&&t.onServerTransitionReceived(i),t.transitionStore.events.on("dataUpdatedAsync",n=>{v(this,R,z).call(this,{...a(this,b,w).visitorData,...n})});let r=t.transitionStore.data;r&&v(this,R,z).call(this,{...a(this,b,w).visitorData,...r},!0)}}get data(){var i,r;let t=a(this,b,w);if(v(this,St,De).call(this,t)){let{sessionScores:n,...s}=t.visitorData;return v(this,R,z).call(this,{...s,sessionScores:{}}),(r=(i=a(this,g)).onLogMessage)==null||r.call(i,["info",120]),a(this,b,w).visitorData}return t.visitorData}get decayEnabled(){return!!a(this,g).decay}get options(){return a(this,g)}async updateData(t){var r,n,s,o;if(t.length===0)return;(n=(r=a(this,g)).onLogMessage)==null||n.call(r,["debug",101,t]);let i=ve(t,this.data,(s=a(this,b,w))==null?void 0:s.visitorData.controlGroup);t.some(u=>u.type==="consent"&&!u.data)&&a(this,I).delete(gt,!0),v(this,R,z).call(this,i),await((o=a(this,g).transitionStore)==null?void 0:o.updateData(t,a(this,b,w).visitorData))}async delete(t){var i,r,n,s,o;(r=(i=a(this,g)).onLogMessage)==null||r.call(i,["info",103,"GROUP",t]);try{a(this,I).delete(gt,!1),await((n=a(this,g).transitionStore)==null?void 0:n.delete(t)),v(this,R,z).call(this,v(this,it,It).call(this))}finally{(o=(s=a(this,g)).onLogMessage)==null||o.call(s,["info",103,"ENDGROUP"])}}};V=new WeakMap,I=new WeakMap,_=new WeakMap,g=new WeakMap,b=new WeakSet,w=function(){return a(this,I).get(gt)},R=new WeakSet,z=function(t,i=!1){var f,m,S,C,st,Kt,Ht,Bt,Jt;let r=a(this,b,w),n=Date.now();t.controlGroup?(t.scores={},t.sessionScores={}):(v(this,et,zt).call(this,t.scores),v(this,et,zt).call(this,t.sessionScores),(m=(f=a(this,g)).decay)==null||m.call(f,{now:n,lastUpd:r==null?void 0:r.updated,scores:t.scores,sessionScores:t.sessionScores,onLogMessage:a(this,g).onLogMessage}));let s=!(0,L.dequal)(r==null?void 0:r.visitorData.scores,t.scores),o=!(0,L.dequal)(r==null?void 0:r.visitorData.sessionScores,t.sessionScores),u=!(0,L.dequal)(r==null?void 0:r.visitorData.quirks,t.quirks),c=!(0,L.dequal)(r==null?void 0:r.visitorData.tests,t.tests),l={updated:n,visitorData:t};v(this,vt,ye).call(this),a(this,I).set(gt,l,!!t.consent),(C=(S=a(this,g)).onLogMessage)==null||C.call(S,["debug",102,t]),i||((s||o)&&a(this,V).emit("scoresUpdated",t),u&&a(this,V).emit("quirksUpdated",t),c&&a(this,V).emit("testsUpdated",t),((st=r==null?void 0:r.visitorData)==null?void 0:st.consent)!==t.consent&&a(this,V).emit("consentUpdated",t),((Kt=r==null?void 0:r.visitorData)==null?void 0:Kt.controlGroup)!==t.controlGroup&&(a(this,V).emit("controlGroupUpdated",t),(Jt=(Bt=a(this,g)).onLogMessage)==null||Jt.call(Bt,["debug",104,(Ht=t.controlGroup)!=null?Ht:!1])))},vt=new WeakSet,ye=function(){typeof document=="undefined"||!a(this,g).visitLifespan||(a(this,_)&&window.clearTimeout(a(this,_)),p(this,_,window.setTimeout(()=>{this.data},a(this,g).visitLifespan+50)))},St=new WeakSet,De=function(t){let i=a(this,g).visitLifespan;return i?t.updated+i<Date.now():!1},et=new WeakSet,zt=function(t){var i,r;if(!!a(this,g).manifest)for(let n in t){let s=t[n],o=a(this,g).manifest.getDimensionByKey(n);!o||s>o.cap&&((r=(i=a(this,g)).onLogMessage)==null||r.call(i,["debug",110,{dim:n,score:s,cap:o.cap}]),t[n]=o.cap)}},it=new WeakSet,It=function(){var t,i,r;return{...M(),consent:(t=a(this,g).defaultConsent)!=null?t:!1,controlGroup:(r=(i=a(this,g).manifest)==null?void 0:i.rollForControlGroup())!=null?r:!1}};var qt=require("dequal/lite"),Ce=$(require("mitt"));var D,T,k,rt,h,nt,_t,Q,yt,ot,Qt,jt=class{constructor(t){d(this,nt);d(this,Q);d(this,ot);y(this,"manifest");d(this,D,void 0);d(this,T,{});d(this,k,void 0);d(this,rt,{});d(this,h,(0,Ce.default)());y(this,"events",{on:a(this,h).on,off:a(this,h).off});y(this,"storage");var n,s;let{manifest:i,...r}=t;p(this,k,{}),(n=t.plugins)==null||n.forEach(o=>{!o.logDrain||a(this,h).on("log",o.logDrain)}),a(this,h).emit("log",["info",1,"GROUP"]);try{this.manifest=new B({onLogMessage:o=>a(this,h).emit("log",o),manifest:i,evaluator:new A({CK:bt,QS:Tt,QK:kt,PVC:dt,EVT:Vt,PV:Et})}),this.storage=new tt({...r,manifest:this.manifest,onServerTransitionReceived:o=>{p(this,D,o),o.ssv&&(p(this,T,o.ssv),a(this,h).emit("log",["debug",130,o]))},onLogMessage:o=>a(this,h).emit("log",o)}),this.storage.events.on("scoresUpdated",v(this,Q,yt).bind(this)),a(this,D)||v(this,Q,yt).call(this,this.storage.data),this.storage.events.on("quirksUpdated",o=>{let u=this.manifest.computeSignals({scores:a(this,T),state:a(this,k),previousState:a(this,k),visitor:this.storage.data});this.storage.updateData(u),a(this,h).emit("quirksUpdated",o.quirks),a(this,h).emit("log",["info",4,o.quirks])}),(s=t.plugins)==null||s.forEach(o=>{!o.init||o.init(this)})}finally{a(this,h).emit("log",["info",1,"ENDGROUP"])}}get scores(){return a(this,T)}get quirks(){var t,i;return(i=(t=a(this,D))==null?void 0:t.quirks)!=null?i:this.storage.data.quirks}async update(t){var n,s,o;let i=[],r={};if((n=a(this,D))!=null&&n.quirks&&(t={...t,quirks:{...a(this,D).quirks,...t.quirks||{}}}),(s=a(this,D))!=null&&s.tests){let u=Object.entries(a(this,D).tests);if(u.length>0){let c=[];u.forEach(([l,f])=>{this.storage.data.tests[l]||(c.push([l,f]),r[l]=f)}),i.push(...c.map(([l,f])=>({type:"settest",data:{test:l,variant:f}})))}}try{a(this,h).emit("log",["info",2,"GROUP",{...t,url:(o=t.url)==null?void 0:o.toString()}]),t.quirks&&i.push(...Object.entries(t.quirks).map(([u,c])=>({type:"setquirk",data:{key:u,value:c}}))),t.enrichments&&t.enrichments.forEach(u=>{let c=W(u.cat,u.key);this.manifest.getDimensionByKey(c)?i.push({type:"modscore",data:{dimension:c,delta:u.str}}):a(this,h).emit("log",["warn",5,u])}),i.push(...this.manifest.computeSignals({state:t,previousState:a(this,k),visitor:this.storage.data,scores:a(this,D)?v(this,ot,Qt).call(this,this.storage.data):a(this,T)})),p(this,k,{...a(this,k),...t}),await this.storage.updateData(i),a(this,D)&&(v(this,Q,yt).call(this,this.storage.data),Object.entries(r).forEach(([u,c])=>{v(this,nt,_t).call(this,{name:u,variantId:c,variantAssigned:!0})}),p(this,D,void 0),a(this,h).emit("log",["debug",131]))}finally{a(this,h).emit("log",["info",2,"ENDGROUP"])}}getTestVariantId(t){var r,n,s,o;let i=this.manifest.getTest(t);return i?(o=(s=i.wv)!=null?s:(n=(r=a(this,D))==null?void 0:r.tests)==null?void 0:n[t])!=null?o:this.storage.data.tests[t]:(a(this,h).emit("log",["warn",401,t]),null)}setTestVariantId(t,i){this.storage.updateData([{type:"settest",data:{test:t,variant:i}}])}log(...t){a(this,h).emit("log",t)}test(t){var r,n;let i=ft({...t,context:this,onLogMessage:s=>a(this,h).emit("log",s)});return v(this,nt,_t).call(this,{name:t.name,variantId:(n=(r=i.result)==null?void 0:r.id)!=null?n:void 0,variantAssigned:i.variantAssigned}),i}personalize(t){let i=wt({...t,context:this,onLogMessage:s=>a(this,h).emit("log",s)}),r=a(this,rt)[t.name],n={name:t.name,variantIds:i.variations.map(s=>{var o;return(o=s.id)!=null?o:"Unknown"}),control:this.storage.data.controlGroup,changed:!0};return r&&(0,qt.dequal)(n.variantIds,r)&&(n.changed=!1),a(this,h).emit("personalizationResult",n),a(this,rt)[t.name]=n.variantIds,i}async forget(t){p(this,k,{}),await this.storage.delete(t)}getServerToClientTransitionState(){let t={quirks:this.storage.data.quirks,ssv:a(this,T),tests:{}},i=this.storage.data.tests;return Object.entries(i).map(([r,n])=>{var s,o,u;((u=(o=(s=this.storage.options.transitionStore)==null?void 0:s.initialData)==null?void 0:o.tests)==null?void 0:u[r])!==i[r]&&t.tests&&(t.tests[r]=n)}),t}};D=new WeakMap,T=new WeakMap,k=new WeakMap,rt=new WeakMap,h=new WeakMap,nt=new WeakSet,_t=function(t){a(this,h).emit("testResult",t)},Q=new WeakSet,yt=function(t){let i=v(this,ot,Qt).call(this,t);!(0,qt.dequal)(i,a(this,T))&&(p(this,T,i),a(this,h).emit("scoresUpdated",i),a(this,h).emit("log",["info",3,i]))},ot=new WeakSet,Qt=function(t){var r;let i={...t.scores};for(let n in t.sessionScores)i[n]=((r=i[n])!=null?r:0)+t.sessionScores[n];return i=this.manifest.computeAggregateDimensions(i),i};var Ft=typeof top!="undefined";function Qe(){return{logDrain:e=>{!Ft||top==null||top.postMessage({type:"uniform:context:log",message:e},window.location.origin)},init:e=>{let t=[],i=[],r=()=>{!Ft||top==null||top.postMessage({type:"uniform:context:data",data:{scores:e.scores,data:e.storage.data,manifest:e.manifest.data,personalizations:t,tests:i}},window.location.origin)},n=o=>{!o.changed||t.push(o)},s=o=>{!o.variantAssigned||i.push(o)};if(Ft){window.__UNIFORM_DEVTOOLS_CONTEXT_INSTANCE__=e;try{top==null||top.addEventListener("message",async o=>{if(!o.data)return;let u=o.data;await Fe(u,e)})}catch(o){console.warn("Unable to initialize Uniform Context DevTools because it is in a cross-domain iframe.",o)}top==null||top.postMessage({type:"uniform:context:hello",uiVersion:2},window.location.origin),r()}return e.events.on("personalizationResult",n),e.events.on("testResult",s),e.events.on("scoresUpdated",r),e.storage.events.on("*",r),()=>{e.events.off("scoresUpdated",r),e.storage.events.off("*",r),e.events.off("personalizationResult",n),e.events.off("testResult",s)}}}}async function Fe(e,t){e.type==="uniform-in:context:update"&&e.newData&&await t.update(e.newData),e.type==="uniform-in:context:commands"&&e.commands&&Array.isArray(e.commands)&&await t.storage.updateData(e.commands),e.type==="uniform-in:context:forget"&&await t.forget(!1)}var xe=(u=>(u.ListStart="nesi-list-start",u.ListEnd="nesi-list-end",u.ListItem="nesi-list-item-html",u.ListItemSettings="nesi-list-item-settings",u.TestStart="nesi-test-start",u.TestEnd="nesi-test-end",u.Unknown="unknown",u))(xe||{}),Ke="nesitag";var be=$(require("rfdc"));function Dt(e,t){if(e==="none")return!1;switch(t){case"debug":return e==="debug";case"info":return e==="info"||e==="debug";case"warn":return e==="warn"||e==="info"||e==="debug";case"error":return e==="debug"||"info";default:return!1}}var He=(0,be.default)();function Ee(e){return([t,...i])=>{if(!Dt(e,t))return;let[r,...n]=i;console[t](`\u{1F94B} [${t}] Uniform event ID ${r}
`,...n.map(He))}}function Be(e){return{logDrain:Ee(e)}}var Te=$(require("rfdc"));var Ve={1:()=>["context","initializing Uniform Context"],2:e=>["context","received update()",e],3:e=>["context","new score vector",e],4:e=>["context","updated quirks",e],5:e=>["context","ignored enrichment update for unknown enrichment category",e.cat],101:e=>["storage","received update commands",e],102:e=>["storage","data was updated",e],103:e=>["storage",`deleting visitor data ${e?"from all devices":"from this device"}`],104:e=>["context",e?"Visitor assigned to personalization control group":"Visitor assigned to personalization experiment group"],110:({dim:e,cap:t,score:i})=>["storage",`${e} score ${i} exceeded cap ${t}. Rounded down.`],120:()=>["storage","visitor data expired and was cleared"],130:e=>["storage","server to client transition score data was loaded; it will persist until the next update event occurs",e],131:()=>["storage","server to client transition data was discarded"],140:e=>["storage",`score decay was applied: ${e}`],200:()=>["signals","evaluating signals"],201:e=>["signals",`evaluating signal ${e.id} (${e.dur})`],202:e=>["signals",e.op==="|"?"OR":"AND"],203:({criteria:e,result:t,explanation:i})=>["signals",`${e.type}: ${i} is ${t.result} [${t.changed?"CHANGED":"unchanged"}]`],204:e=>["signals",`group result: ${e.result} [${e.changed?"CHANGED":"unchanged"}]`],300:e=>["personalization",`executing personalization '${e.name}'`],301:({id:e,op:t})=>["personalization",`testing variation ${e} (${t==="|"?"OR":"AND"})`],302:({matched:e,description:t})=>["personalization",`${t} is ${e}`],303:e=>["personalization",e?"selected variation":"did not select variation"],400:e=>["testing",`executing A/B test '${e}'`],401:e=>["testing",`${e} is not registered in the manifest; it will not be run.`],402:({missingVariant:e,variants:t})=>["testing",`test variation '${e}' previously assigned to the visitor for this test no longer exists as a variant. It will be removed. This may indicate changing test variations after publishing a test, which will make results invalid. Known variants: ${t.join(", ")}`],403:e=>["testing",`assigned new test variant '${e}'`],404:e=>["testing",`displaying variation '${e}'`],700:()=>["gtag","gtag is not defined, skipping analytics event emission. Ensure you have added the gtag script to your page."],701:()=>["gtag","enabled gtag event signal redirection"]};var Je=(0,Te.default)();function ke(e,t){let i=typeof document=="undefined",{enableOnServer:r=!1}=t!=null?t:{};return([n,...s])=>{if(!Dt(e,n)||i&&!r)return;let[o,...u]=s,c=console[n];if(u[0]==="GROUP"&&(u.shift(),c=console.groupCollapsed),u[0]==="ENDGROUP"){console.groupEnd();return}let l=Ve[o],f="";switch(n){case"debug":f="\u{1F41E}";break;case"info":f="\u{1F4AC}";break;case"warn":f="\u26A0\uFE0F";break;case"error":f="\u{1F4A5}";break}let m=f;if(!l){c(`${m} unknown event ID ${o}. Log messages data may be older than Uniform Context package.`,...u);return}let[S,C,...st]=l(...u);c(`${m}[${S}] ${C}
`,...st.map(Je))}}function We(e,t){return{logDrain:ke(e,t)}}function Ye(e){return`${e.apiKey}|${e.projectId}${e.apiHost?`|${e.apiHost}`:""}`}function Xe(e){let[t,i,r]=e.split("|");if(!t.startsWith("uf"))throw new Error("Invalid API key");if(!/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})$/i.test(i))throw new Error("Invalid project ID");return{apiKey:t,projectId:i,apiHost:r||"https://uniform.app"}}0&&(module.exports={Context,CookieTransitionDataStore,EdgeNodeTagName,EdgeTransitionDataStore,GroupCriteriaEvaluator,ManifestInstance,SERVER_STATE_ID,ScriptType,TransitionDataStore,UNIFORM_DEFAULT_COOKIE_NAME,VisitorDataStore,computeAggregateDimensions,cookieEvaluator,createConsoleLogDrain,createDebugConsoleLogDrain,createLinearDecay,currentPageEvaluator,emptyVisitorData,enableConsoleLogDrain,enableContextDevTools,enableDebugConsoleLogDrain,evaluateVariantMatch,eventEvaluator,explainStringMatch,explainStringMatchCriteria,getEnrichmentVectorKey,isStringMatch,pageViewCountDimension,pageViewCountEvaluator,parseQuickConnect,personalizeVariations,queryStringEvaluator,quirkEvaluator,serializeQuickConnect,testVariations});
{
"name": "@uniformdev/context",
"version": "17.5.1-alpha.105+9b3f152e7",
"version": "17.5.1-alpha.130+3fac779b1",
"description": "Uniform Context core package",

@@ -62,3 +62,3 @@ "license": "SEE LICENSE IN LICENSE.txt",

"@types/yargs": "17.0.14",
"@uniformdev/cli": "^17.5.1-alpha.105+9b3f152e7",
"@uniformdev/cli": "^17.5.1-alpha.130+3fac779b1",
"benny": "3.7.1",

@@ -80,3 +80,3 @@ "yargs": "17.6.2"

},
"gitHead": "9b3f152e7455f37fd8609004bab4ded4a9a88bc7"
"gitHead": "3fac779b1b42a1afeb05156cb51768a98573438f"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc