1"use strict";(self.webpackChunkfront_react=self.webpackChunkfront_react||[]).push([[58079],{"20bd1c89fef7e49eb999":(e,t,n)=>{var i,o,a;Object.defineProperty(t,"__esModule",{value:!0}),t._getInstance=t._getStatsigGlobalFlag=t._getStatsigGlobal=void 0;const s=n("527f3c4823d0df0a6327");t._getStatsigGlobal=()=>{try{return"undefined"!==typeof __STATSIG__?__STATSIG__:u}catch(e){return u}};t._getStatsigGlobalFlag=e=>(0,t._getStatsigGlobal)()[e];t._getInstance=e=>{const n=(0,t._getStatsigGlobal)();return e?n.instances&&n.instances[e]:(n.instances&&Object.keys(n.instances).length>1&&s.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),n.firstInstance)};const r="__STATSIG__",l="undefined"!==typeof window?window:{},c="undefined"!==typeof n.g?n.g:{},d="undefined"!==typeof globalThis?globalThis:{},u=null!==(a=null!==(o=null!==(i=l[r])&&void 0!==i?i:c[r])&&void 0!==o?o:d[r])&&void 0!==a?a:{instance:t._getInstance};l[r]=u,c[r]=u,d[r]=u},"46390844cb2b54bdd4f6":(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._getStorageKey=t._getUserStorageKey=void 0;const i=n("7d0b04c1858fd4d8b0bc");function o(e,t,n){var o;if(n)return n(e,t);const a=t&&t.customIDs?t.customIDs:{},s=["uid:".concat(null!==(o=null===t||void 0===t?void 0:t.userID)&&void 0!==o?o:""),"cids:".concat(Object.keys(a).sort(((e,t)=>e.localeCompare(t))).map((e=>"".concat(e,"-").concat(a[e]))).join(",")),"k:".concat(e)];return(0,i._DJB2)(s.join("|"))}t._getUserStorageKey=o,t._getStorageKey=function(e,t,n){return t?o(e,t,n):(0,i._DJB2)("k:".concat(e))}},c37ca927282859bea647:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},"11b5eaaa57a871a300cf":function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,a){function s(e){try{l(i.next(e))}catch(t){a(t)}}function r(e){try{l(i.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,r)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t._makeDataAdapterResult=t.DataAdapterCore=void 0;const o=n("527f3c4823d0df0a6327"),a=n("1b43a7a2c61e35851549"),s=n("0f9c552350cbb63bb1dc"),r=n("1b9c526a32bcc9fb7637"),l=n("80dbab59b8ce477f72f7");function c(e,t,n,i){return{source:e,data:t,receivedAt:Date.now(),stableID:n,fullUserHash:(0,s._getFullUserHash)(i)}}t.DataAdapterCore=class{constructor(e,t){this._adapterName=e,this._cacheSuffix=t,this._options=null,this._sdkKey=null,this._cacheLimit=10,this._lastModifiedStoreKey="statsig.last_modified_time.".concat(t),this._inMemoryCache=new d}attach(e,t,n){this._sdkKey=e,this._options=t}getDataSync(e){const t=e&&(0,s._normalizeUser)(e,this._options),n=this._getCacheKey(t),i=this._inMemoryCache.get(n,t);if(i&&this._getIsCacheValueValid(i))return i;const o=this._loadFromCache(n);return o&&this._getIsCacheValueValid(o)?(this._inMemoryCache.add(n,o,this._cacheLimit),this._inMemoryCache.get(n,t)):null}setData(e,t){const n=t&&(0,s._normalizeUser)(t,this._options),i=this._getCacheKey(n);this._inMemoryCache.add(i,c("Bootstrap",e,null,n),this._cacheLimit)}_getIsCacheValueValid(e){return null==e.stableID||e.stableID===a.StableID.get(this._getSdkKey())}_getDataAsyncImpl(e,t,n){return i(this,void 0,void 0,(function*(){r.Storage.isReady()||(yield r.Storage.isReadyResolver());const i=null!==e&&void 0!==e?e:this.getDataSync(t),a=[this._fetchAndPrepFromNetwork(i,t,n)];return(null===n||void 0===n?void 0:n.timeoutMs)&&a.push(new Promise((e=>setTimeout(e,n.timeoutMs))).then((()=>(o.Log.debug("Fetching latest value timed out"),null)))),yield Promise.race(a)}))}_prefetchDataImpl(e,t){return i(this,void 0,void 0,(function*(){const n=e&&(0,s._normalizeUser)(e,this._options),i=this._getCacheKey(n),o=yield this._getDataAsyncImpl(null,n,t);o&&this._inMemoryCache.add(i,Object.assign(Object.assign({},o),{source:"Prefetch"}),this._cacheLimit)}))}_fetchAndPrepFromNetwork(e,t,n){return i(this,void 0,void 0,(function*(){var i;const s=null!==(i=null===e||void 0===e?void 0:e.data)&&void 0!==i?i:null,r=null!=e&&this._isCachedResultValidFor204(e,t),d=yield this._fetchFromNetwork(s,t,n,r);if(!d)return o.Log.debug("No response returned for latest value"),null;const u=(0,l._typedJsonParse)(d,"has_updates","Response"),g=this._getSdkKey(),f=a.StableID.get(g);let _=null;if(!0===(null===u||void 0===u?void 0:u.has_updates))_=c("Network",d,f,t);else{if(!s||!1!==(null===u||void 0===u?void 0:u.has_updates))return null;_=c("NetworkNotModified",s,f,t)}const v=this._getCacheKey(t);return this._inMemoryCache.add(v,_,this._cacheLimit),this._writeToCache(v,_),_}))}_getSdkKey(){return null!=this._sdkKey?this._sdkKey:(o.Log.error("".concat(this._adapterName," is not attached to a Client")),"")}_loadFromCache(e){var t;const n=null===(t=r.Storage.getItem)||void 0===t?void 0:t.call(r.Storage,e);if(null==n)return null;const i=(0,l._typedJsonParse)(n,"source","Cached Result");return i?Object.assign(Object.assign({},i),{source:"Cache"}):null}_writeToCache(e,t){const n=JSON.stringify(t);for(let o=0;o<8;o++)try{r.Storage.setItem(e,n);break}catch(i){if(!(i instanceof Error)||!i.toString().includes("QuotaExceededError")&&!i.toString().includes("QUOTA_EXCEEDED_ERR")||this._cacheLimit<=1)throw i;this._cacheLimit=Math.ceil(this._cacheLimit/2),this._runLocalStorageCacheEviction(e,this._cacheLimit-1)}this._runLocalStorageCacheEviction(e)}_runLocalStorageCacheEviction(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._cacheLimit;var n;const i=null!==(n=(0,r._getObjectFromStorage)(this._lastModifiedStoreKey))&&void 0!==n?n:{};i[e]=Date.now();const o=u(i,t);for(const a of o)delete i[a],r.Storage.removeItem(a);(0,r._setObjectInStorage)(this._lastModifiedStoreKey,i)}},t._makeDataAdapterResult=c;class d{constructor(){this._data={}}get(e,t){var n;const i=this._data[e],a=null===i||void 0===i?void 0:i.stableID,s=null===(n=null===t||void 0===t?void 0:t.customIDs)||void 0===n?void 0:n.stableID;return s&&a&&s!==a?(o.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):i}add(e,t,n){const i=u(this._data,n-1);for(const o of i)delete this._data[o];this._data[e]=t}merge(e){this._data=Object.assign(Object.assign({},this._data),e)}}function u(e,t){const n=Object.keys(e);return n.length<=t?[]:0===t?n:n.sort(((t,n)=>{const i=e[t],o=e[n];return"object"===typeof i&&"object"===typeof o?i.receivedAt-o.receivedAt:i-o})).slice(0,n.length-t)}},"8ba7d454a3fa534c656a":(e,t)=>
vendor: 4,490 bytes, line 1
1{Object.defineProperty(t,"__esModule",{value:!0}),t.Diagnostics=void 0;const n=new Map,i="start",o="end",a="statsig::diagnostics";function s(e,t,n,i){return Object.assign({key:n,action:t,step:i,timestamp:Date.now()},e)}function r(e,t){var i;const o=null!==(i=n.get(e))&&void 0!==i?i:[];o.push(t),n.set(e,o)}function l(e,t){if(t in e)return e[t]}t.Diagnostics={_getMarkers:e=>n.get(e),_markInitOverallStart:e=>{r(e,s({},i,"overall"))},_markInitOverallEnd:(e,t,n)=>{r(e,s({success:t,error:t?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:n},o,"overall"))},_markInitNetworkReqStart:(e,t)=>{r(e,s(t,i,"initialize","network_request"))},_markInitNetworkReqEnd:(e,t)=>{r(e,s(t,o,"initialize","network_request"))},_markInitProcessStart:e=>{r(e,s({},i,"initialize","process"))},_markInitProcessEnd:(e,t)=>{r(e,s(t,o,"initialize","process"))},_clearMarkers:e=>{n.delete(e)},_formatError(e){if(e&&"object"===typeof e)return{code:l(e,"code"),name:l(e,"name"),message:l(e,"message")}},_getDiagnosticsData(e,n,i,o){var a;return{success:!0===(null===e||void 0===e?void 0:e.ok),statusCode:null===e||void 0===e?void 0:e.status,sdkRegion:null===(a=null===e||void 0===e?void 0:e.headers)||void 0===a?void 0:a.get("x-statsig-region"),isDelta:!0===i.includes('"is_delta":true')||void 0,attempt:n,error:t.Diagnostics._formatError(o)}},_enqueueDiagnosticsEvent(e,n,i,o){const s=t.Diagnostics._getMarkers(i);if(null==s||s.length<=0)return-1;const r=s[s.length-1].timestamp-s[0].timestamp;t.Diagnostics._clearMarkers(i);const l=function(e,t){const n={eventName:a,user:e,value:null,metadata:t,time:Date.now()};return n}(e,{context:"initialize",markers:s.slice(),statsigOptions:o});return n.enqueue(l),r}}},ef0923ecff9f065bcca3:function(e,t){var n=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,a){function s(e){try{l(i.next(e))}catch(t){a(t)}}function r(e){try{l(i.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,r)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t._fetchTxtRecords=void 0;const i=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),o=["i","e","d"],a=200;t._fetchTxtRecords=function(e){return n(this,void 0,void 0,(function*(){const t=yield e("https://cloudflare-dns.com/dns-query",{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:i});if(!t.ok){const e=new Error("Failed to fetch TXT records from DNS");throw e.name="DnsTxtFetchError",e}const n=yield t.arrayBuffer();return function(e){const t=e.findIndex(((t,n)=>n<a&&"="===String.fromCharCode(t)&&o.includes(String.fromCharCode(e[n-1]))));if(-1===t){const e=new Error("Failed to parse TXT records from DNS");throw e.name="DnsTxtParseError",e}let n="";for(let i=t-1;i<e.length;i++)n+=String.fromCharCode(e[i]);return n.split(",")}(new Uint8Array(n))}))}},"448d2dc8ff42a107e8f8":(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},e05e3602f4144ab7420f:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,a){function s(e){try{l(i.next(e))}catch(t){a(t)}}function r(e){try{l(i.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,r)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorBoundary=t.EXCEPTION_ENDPOINT=void 0;const o=n("527f3c4823d0df0a6327"),a=n("d0b20ed986540103af41"),s=n("ade89bfde843c6add3f2");t.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";const r="[Statsig] UnknownError";function l(e){return e instanceof Error?e:"string"===typeof e?new Error(e):new Error("An unknown error occurred.")}function c(e){if(!e)return{};const t={};return Object.keys(e).forEach((n=>{const i=n,o=e[i];switch(typeof o){case"number":case"bigint":case"boolean":t[String(i)]=o;break;case"string":o.length<50?t[String(i)]=o:t[String(i)]="set";break;case"object":"environment"===i?t.environment=o:"networkConfig"===i?t.networkConfig=o:t[String(i)]=null!=o?"set":"unset"}})),t}t.ErrorBoundary=class{constructor(e,t,n,i){this._sdkKey=e,this._options=t,this._emitter=n,this._lastSeenError=i,this._seen=new Set}wrap(e,t){var n=this;try{const i=e;(function(e){const t=new Set;let n=Object.getPrototypeOf(e);for(;n&&n!==Object.prototype;)Object.getOwnPropertyNames(n).filter((e=>
vendor: 9,184 bytes, line 1
1"function"===typeof(null===n||void 0===n?void 0:n[e]))).forEach((e=>t.add(e))),n=Object.getPrototypeOf(n);return Array.from(t)})(i).forEach((o=>{const a=i[o];"$EB"in a||(i[o]=function(){for(var i=arguments.length,s=new Array(i),r=0;r<i;r++)s[r]=arguments[r];return n._capture(t?"".concat(t,":").concat(o):o,(()=>a.apply(e,s)))},i[o].$EB=!0)}))}catch(i){this._onError("eb:wrap",i)}}logError(e,t){this._onError(e,t)}getLastSeenErrorAndReset(){const e=this._lastSeenError;return this._lastSeenError=void 0,null!==e&&void 0!==e?e:null}attachErrorIfNoneExists(e){this._lastSeenError||(this._lastSeenError=l(e))}_capture(e,t){try{const n=t();return n&&n instanceof Promise?n.catch((t=>this._onError(e,t))):n}catch(n){return this._onError(e,n),null}}_onError(e,n){try{o.Log.warn("Caught error in ".concat(e),{error:n});(()=>i(this,void 0,void 0,(function*(){var i,o,d,u,g,f,_;const v=n||Error(r),h=v instanceof Error,b=h?v.name:"No Name",p=l(v);if(this._lastSeenError=p,this._seen.has(b))return;if(this._seen.add(b),null===(o=null===(i=this._options)||void 0===i?void 0:i.networkConfig)||void 0===o?void 0:o.preventAllNetworkTraffic)return void(null===(d=this._emitter)||void 0===d||d.call(this,{name:"error",error:n,tag:e}));const y=a.SDKType._get(this._sdkKey),m=s.StatsigMetadataProvider.get(),S=h?v.stack:function(e){try{return JSON.stringify(e)}catch(i){return r}}(v),k=Object.assign({tag:e,exception:b,info:S,statsigOptions:c(this._options)},Object.assign(Object.assign({},m),{sdkType:y})),E=null!==(f=null===(g=null===(u=this._options)||void 0===u?void 0:u.networkConfig)||void 0===g?void 0:g.networkOverrideFunc)&&void 0!==f?f:fetch;yield E(t.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String(y),"STATSIG-SDK-VERSION":String(m.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(k)}),null===(_=this._emitter)||void 0===_||_.call(this,{name:"error",error:n,tag:e})})))().then((()=>{})).catch((()=>{}))}catch(d){}}}},"982036ed5edc56255947":(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},eb3d1acfd1715a091a3f:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},"0105e9a4e69c110e70b6":function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,a){function s(e){try{l(i.next(e))}catch(t){a(t)}}function r(e){try{l(i.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,r)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EventLogger=void 0;const o=n("46390844cb2b54bdd4f6"),a=n("7d0b04c1858fd4d8b0bc"),s=n("527f3c4823d0df0a6327"),r=n("2d879fb9503fa3628110"),l=n("bba8620bd6a33579ab22"),c=n("b4e76bd11719c3dcbc1e"),d=n("05d2e3d8f1d7867b0b81"),u=n("1b9c526a32bcc9fb7637"),g=n("12c4a526269ccc883a84"),f=n("4e601cf136f6c2323fe0"),_={},v="startup",h="gained_focus";class b{static _safeFlushAndForget(e){var t;null===(t=_[e])||void 0===t||t.flush().catch((()=>{}))}static _safeRetryFailedLogs(e){var t;null===(t=_[e])||void 0===t||t._retryFailedLogs(h)}constructor(e,t,n,i){var o,a;this._sdkKey=e,this._emitter=t,this._network=n,this._options=i,this._queue=[],this._lastExposureTimeMap={},this._nonExposedChecks={},this._hasRunQuickFlush=!1,this._creationTime=Date.now(),this._loggingEnabled=null!==(o=null===i||void 0===i?void 0:i.loggingEnabled)&&void 0!==o?o:!0===(null===i||void 0===i?void 0:i.disableLogging)?d.LoggingEnabledOption.disabled:d.LoggingEnabledOption.browserOnly,(null===i||void 0===i?void 0:i.loggingEnabled)&&void 0!==i.disableLogging&&s.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this._maxQueueSize=null!==(a=null===i||void 0===i?void 0:i.loggingBufferMaxSize)&&void 0!==a?a:100;const l=null===i||void 0===i?void 0:i.networkConfig;this._logEventUrlConfig=new g.UrlConfiguration(r.Endpoint._rgstr,null===l||void 0===l?void 0:l.logEventUrl,null===l||void 0===l?void 0:l.api,null===l||void 0===l?void 0:l.logEventFallbackUrls)}setLogEventCompressionMode(e){this._network.setLogEventCompressionMode(e)}setLoggingEnabled(e){if("disabled"===this._loggingEnabled&&"disabled"!==e){const e=this._getStorageKey(),t=(0,u._getObjectFromStorage)(e);t&&this._queue.push(...t),u.Storage.removeItem(e)}this._loggingEnabled=e}enqueue(e){this._shouldLogEvent(e)&&(this._normalizeAndAppendEvent(e),this._quickFlushIfNeeded(),this._queue.length>this._maxQueueSize&&b._safeFlushAndForget(this._sdkKey))}incrementNonExposureCount(e){var t;const n=null!==(t=this._nonExposedChecks[e])&&void 0!==t?t:0;this._nonExposedChecks[e]=n+1}reset(){this.flush().catch((()=>{})),this._lastExposureTimeMap={}}start(){var e;const t=(0,l._isServerEnv)();t&&"always"!==(null===(e=this._options)||void 0===e?void 0:e.loggingEnabled)||(_[this._sdkKey]=this,t||(0,f._subscribeToVisiblityChanged)((e=>{"background"===e?b._safeFlushAndForget(this._sdkKey):"foreground"===e&&b._safeRetryFailedLogs(this._sdkKey)})),this._retryFailedLogs(v),this._startBackgroundFlushInterval())}stop(){return i(this,void 0,void 0,(function*(){this._flushIntervalId&&(clearInterval(this._flushIntervalId),this._flushIntervalId=null),delete _[this._sdkKey],yield this.flush()}))}flush(){return i(this,void 0,void 0,(function*(){if(this._appendAndResetNonExposedChecks(),0===this._queue.length)return;const e=this._queue;this._queue=[],yield this._sendEvents(e)}))}_quickFlushIfNeeded(){this._hasRunQuickFlush||(this._hasRunQuickFlush=!0,Date.now()-this._creationTime>200||setTimeout((()=>b._safeFlushAndForget(this._sdkKey)),200))}_shouldLogEvent(e){var t;if("always"!==(null===(t=this._options)||void 0===t?void 0:t.loggingEnabled)&&(0,l._isServerEnv)())return!1;if(!(0,c._isExposureEvent)(e))return!0;const n=e.user?e.user:{statsigEnvironment:void 0},i=(0,o._getUserStorageKey)(this._sdkKey,n),a=e.metadata?e.metadata:{},s=[e.eventName,i,a.gate,a.config,a.ruleID,a.allocatedExperiment,a.parameterName,String(a.isExplicitParameter),a.reason].join("|"),r=this._lastExposureTimeMap[s],d=Date.now();return!(r&&d-r<6e5)&&(Object.keys(this._lastExposureTimeMap).length>1e3&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[s]=d,!0)}_sendEvents(e){return i(this,void 0,void 0,(function*(){var t,n;if("disabled"===this._loggingEnabled)return this._saveFailedLogsToStorage(e),!1;try{const i=(0,f._isUnloading)()&&this._network.isBeaconSupported()&&null==(null===(n=null===(t=this._options)||void 0===t?void 0:t.networkConfig)||void 0===n?void 0:n.networkOverrideFunc);this._emitter({name:"pre_logs_flushed",events:e});return(i?this._sendEventsViaBeacon(e):yield this._sendEventsViaPost(e)).success?(this._emitter({name:"logs_flushed",events:e}),!0):(s.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(e),!1)}catch(i){return s.Log.warn("Failed to flush events."),!1}}))}_sendEventsViaPost(e){return i(this,void 0,void 0,(function*(){var t;const n=yield this._network.post(this._getRequestData(e)),i=null!==(t=null===n||void 0===n?void 0:n.code)&&void 0!==t?t:-1;return{success:i>=200&&i<300}}))}_sendEventsViaBeacon(e){return{success:this._network.beacon(this._getRequestData(e))}}_getRequestData(e){return{sdkKey:this._sdkKey,data:{events:e},urlConfig:this._logEventUrlConfig,retries:3,isCompressable:!0,params:{[r.NetworkParam.EventCount]:String(e.length)},credentials:"same-origin"}}_saveFailedLogsToStorage(e){for(;e.length>500;)e.shift();const t=this._getStorageKey();try{const n=this._getFailedLogsFromStorage(t);(0,u._setObjectInStorage)(t,[...n,...e])}catch(n){s.Log.warn("Unable to save failed logs to storage")}}_getFailedLogsFromStorage(e){let t=[];try{const n=(0,u._getObjectFromStorage)(e);return Array.isArray(n)&&(t=n),t}catch(n){return[]}}_retryFailedLogs(e){const t=this._getStorageKey();(()=>i(this,void 0,void 0,(function*(){u.Storage.isReady()||(yield u.Storage.isReadyResolver());const n=(0,u._getObjectFromStorage)(t);if(!n)return;e===v&&u.Storage.removeItem(t);(yield this._sendEvents(n))&&e===h&&u.Storage.removeItem(t)})))().catch((()=>{s.Log.warn("Failed to flush stored logs")}))}_getStorageKey(){return"statsig.failed_logs.".concat((0,a._DJB2)(this._sdkKey))}_normalizeAndAppendEvent(e){e.user&&(e.user=Object.assign({},e.user),delete e.user.privateAttributes);const t={},n=this._getCurrentPageUrl();n&&(t.statsigMetadata={currentPage:n});const i=Object.assign(Object.assign({},e),t);s.Log.debug("Enqueued Event:",i),this._queue.push(i)}_appendAndResetNonExposedChecks(){0!==Object.keys(this._nonExposedChecks).length&&(this._normalizeAndAppendEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this._nonExposedChecks)}}),this._nonExposedChecks={})}_getCurrentPageUrl(){var e;if(!1!==(null===(e=this._options)||void 0===e?void 0:e.includeCurrentPageUrlWithEvents))return(0,l._getCurrentPageUrlSafe)()}_startBackgroundFlushInterval(){var e,t;const n=null!==(t=null===(e=this._options)||void 0===e?void 0:e.loggingIntervalMs)&&void 0!==t?t:1e4,i=setInterval((()=>{const e=_[this._sdkKey];e&&e._flushIntervalId===i?b._safeFlushAndForget(this._sdkKey):clearInterval(i)}),n);this._flushIntervalId=i}}t.EventLogger=b}
1,"7d0b04c1858fd4d8b0bc":(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._getSortedObject=t._DJB2Object=t._DJB2=void 0;const i=n("ad33555ce9562b4619d4");t._DJB2=e=>{let t=0;for(let n=0;n<e.length;n++){t=(t<<5)-t+e.charCodeAt(n),t&=t}return String(t>>>0)};t._DJB2Object=(e,n)=>(0,t._DJB2)(JSON.stringify((0,t._getSortedObject)(e,n)));t._getSortedObject=(e,n)=>{if(null==e)return null;const o=Object.keys(e).sort(),a={};return o.forEach((o=>{const s=e[o];0!==n&&"object"===(0,i._typeOf)(s)?a[o]=(0,t._getSortedObject)(s,null!=n?n-1:n):a[o]=s})),a}},de0a23aa0b26bd54867d:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},"527f3c4823d0df0a6327":(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Log=t.LogLevel=void 0;function n(e){return e.unshift("[Statsig]"),e}t.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class i{static info(){if(i.level>=t.LogLevel.Info){for(var e=arguments.length,o=new Array(e),a=0;a<e;a++)o[a]=arguments[a];console.info(" INFO ",...n(o))}}static debug(){if(i.level>=t.LogLevel.Debug){for(var e=arguments.length,o=new Array(e),a=0;a<e;a++)o[a]=arguments[a];console.debug(" DEBUG ",...n(o))}}static warn(){if(i.level>=t.LogLevel.Warn){for(var e=arguments.length,o=new Array(e),a=0;a<e;a++)o[a]=arguments[a];console.warn(" WARN ",...n(o))}}static error(){if(i.level>=t.LogLevel.Error){for(var e=arguments.length,o=new Array(e),a=0;a<e;a++)o[a]=arguments[a];console.error(" ERROR ",...n(o))}}}t.Log=i,i.level=t.LogLevel.Warn},e84f5a8a5d81b58c2ccf:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createMemoKey=t.MemoPrefix=void 0,t.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};const n=new Set([]),i=new Set(["userPersistedValues"]);t.createMemoKey=function(e,t,o){let a="".concat(e,"|").concat(t);if(!o)return a;for(const s of Object.keys(o)){if(i.has(s))return;n.has(s)?a+="|".concat(s,"=true"):a+="|".concat(s,"=").concat(o[s])}return a}},"2d879fb9503fa3628110":(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkParam=t.NetworkDefault=t.Endpoint=void 0,t.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},t.NetworkDefault={[t.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[t.Endpoint._initialize]:"https://featureassets.org/v1",[t.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},t.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}},"6560aeedba5a591c3aef":function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,a){function s(e){try{l(i.next(e))}catch(t){a(t)}}function r(e){try{l(i.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,r)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkCore=void 0,n("20bd1c89fef7e49eb999");const o=n("20bd1c89fef7e49eb999"),a=n("8ba7d454a3fa534c656a"),s=n("527f3c4823d0df0a6327"),r=n("2d879fb9503fa3628110"),l=n("a3f1021265ea543509ff"),c=n("8134dcee0e44ff75b2d2"),d=n("d0b20ed986540103af41"),u=n("bba8620bd6a33579ab22"),g=n("ad3c7f27a7b0ac115342"),f=n("1b43a7a2c61e35851549"),_=n("2d6afc4e5a2e7ad1c542"),v=n("ade89bfde843c6add3f2"),h=n("05d2e3d8f1d7867b0b81"),b=n("4e601cf136f6c2323fe0"),p=new Set([408,500,502,503,504,522,524,599]);t.NetworkCore=class{constructor(e,t){this._emitter=t,this._errorBoundary=null,this._timeout=1e4,this._netConfig={},this._options={},this._leakyBucket={},this._lastUsedInitUrl=null,e&&(this._options=e),this._options.networkConfig&&(this._netConfig=this._options.networkConfig),this._netConfig.networkTimeoutMs&&(this._timeout=this._netConfig.networkTimeoutMs),this._fallbackResolver=new l.NetworkFallbackResolver(this._options),this.setLogEventCompressionMode(this._getLogEventCompressionMode(e))}setLogEventCompressionMode(e){this._options.logEventCompressionMode=e}setErrorBoundary(e){this._errorBoundary=e,this._errorBoundary.wrap(this),this._errorBoundary.wrap(this._fallbackResolver),this._fallbackResolver.setErrorBoundary(e)}isBeaconSupported(){return"undefined"!==typeof navigator&&"function"===typeof navigator.sendBeacon}
1getLastUsedInitUrlAndReset(){const e=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,e}beacon(e){if(!y(e))return!1;const t=this._getInternalRequestArgs("POST",e),n=this._getPopulatedURL(t),i=navigator;return i.sendBeacon.bind(i)(n,t.body)}post(e){return i(this,void 0,void 0,(function*(){const t=this._getInternalRequestArgs("POST",e);return this._tryEncodeBody(t),yield this._tryToCompressBody(t),this._sendRequest(t)}))}get(e){const t=this._getInternalRequestArgs("GET",e);return this._sendRequest(t)}_sendRequest(e){return i(this,void 0,void 0,(function*(){var t,n,o,l;if(!y(e))return null;if(this._netConfig.preventAllNetworkTraffic)return null;const{method:c,body:d,retries:u,attempt:g}=e,f=e.urlConfig.endpoint;if(this._isRateLimited(f))return s.Log.warn("Request to ".concat(f," was blocked because you are making requests too frequently.")),null;const v=null!==g&&void 0!==g?g:1;let h=!1;const m=this._getPopulatedURL(e);let k=null;const E=(0,b._isUnloading)();try{const n={method:c,body:d,headers:Object.assign({},e.headers),priority:e.priority,keepalive:E};!function(e,t){if(e.urlConfig.endpoint!==r.Endpoint._initialize)return;a.Diagnostics._markInitNetworkReqStart(e.sdkKey,{attempt:t})}(e,v);const i=this._leakyBucket[f];i&&(i.lastRequestTime=Date.now(),this._leakyBucket[f]=i);const o=null!==(t=this._netConfig.networkOverrideFunc)&&void 0!==t?t:fetch;let s;if(k=yield Promise.race([o(m,n).finally((()=>clearTimeout(s))),new Promise(((e,t)=>{s=setTimeout((()=>{h=!0,t(new Error("Timeout of ".concat(this._timeout,"ms expired.")))}),this._timeout)}))]),!k.ok){const e=yield k.text().catch((()=>"No Text")),t=new Error("NetworkError: ".concat(m," ").concat(e));throw t.name="NetworkError",t}const l=yield k.text();return S(e,k,v,l),this._fallbackResolver.tryBumpExpiryTime(e.sdkKey,e.urlConfig),{body:l,code:k.status}}catch(w){const t=function(e){if("string"===typeof e)return e;if(e instanceof Error)return"".concat(e.name,": ").concat(e.message);return"Unknown Error"}(w),a=(C=h,(null!==t&&void 0!==t?t:"").includes("Timeout")||C);S(e,k,v,"",w);if((yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(e.sdkKey,e.urlConfig,t,a))&&(e.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(e.sdkKey,e.urlConfig)),!u||v>u||!p.has(null!==(n=null===k||void 0===k?void 0:k.status)&&void 0!==n?n:500)){null===(o=this._emitter)||void 0===o||o.call(this,{name:"error",error:w,tag:_.ErrorTag.NetworkError,requestArgs:e});const n="A networking error occurred during ".concat(c," request to ").concat(m,".");return s.Log.error(n,t,w),null===(l=this._errorBoundary)||void 0===l||l.attachErrorIfNoneExists(n),null}return yield function(e){return i(this,void 0,void 0,(function*(){yield new Promise((t=>setTimeout(t,Math.min(e*e*500,3e4))))}))}(v),this._sendRequest(Object.assign(Object.assign({},e),{retries:u,attempt:v+1}))}var C}))}_getLogEventCompressionMode(e){let t=null===e||void 0===e?void 0:e.logEventCompressionMode;return t||!0!==(null===e||void 0===e?void 0:e.disableCompression)||(t=h.LogEventCompressionMode.Disabled),t||(t=h.LogEventCompressionMode.Enabled),t}_isRateLimited(e){var t;const n=Date.now(),i=null!==(t=this._leakyBucket[e])&&void 0!==t?t:{count:0,lastRequestTime:n},o=n-i.lastRequestTime,a=Math.floor(.05*o);return i.count=Math.max(0,i.count-a),i.count>=50||(i.count+=1,i.lastRequestTime=n,this._leakyBucket[e]=i,!1)}_getPopulatedURL(e){var t;const n=null!==(t=e.fallbackUrl)&&void 0!==t?t:e.urlConfig.getUrl();e.urlConfig.endpoint!==r.Endpoint._initialize&&e.urlConfig.endpoint!==r.Endpoint._download_config_specs||(this._lastUsedInitUrl=n);const i=Object.assign({[r.NetworkParam.SdkKey]:e.sdkKey,[r.NetworkParam.SdkType]:d.SDKType._get(e.sdkKey),[r.NetworkParam.SdkVersion]:v.SDK_VERSION,[r.NetworkParam.Time]:String(Date.now()),[r.NetworkParam.SessionID]:g.SessionID.get(e.sdkKey)},e.params),o=Object.keys(i).map((e=>"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(i[e])))).join("&");return"".concat(n).concat(o?"?".concat(o):"")}_tryEncodeBody(e){var t;const n=(0,u._getWindowSafe)(),i=e.body;if(e.isStatsigEncodable&&!this._options.disableStatsigEncoding&&"string"===typeof i&&null==(0,o._getStatsigGlobalFlag)("no-encode")&&(null===n||void 0===n?void 0:n.btoa))try{e.body=n.btoa(i).split("").reverse().join(""),e.params=Object.assign(Object.assign({},null!==(t=e.params)&&void 0!==t?t:{}),{[r.NetworkParam.StatsigEncoded]:"1"})}catch(a){s.Log.warn("Request encoding failed for ".concat(e.urlConfig.getUrl()),a)}}_tryToCompressBody(e){return i(this,void 0,void 0,(function*(){var t;const n=e.body;if("string"===typeof n&&function(e,t){if(!e.isCompressable)return!1;if(null!=(0,o._getStatsigGlobalFlag)("no-compress")||"undefined"===typeof CompressionStream||"undefined"===typeof TextEncoder)return!1;const n=null!=e.urlConfig.customUrl||null!=e.urlConfig.fallbackUrls,i=!0===c.SDKFlags.get(e.sdkKey,"enable_log_event_compression");switch(t.logEventCompressionMode){case h.LogEventCompressionMode.Disabled:return!1;case h.LogEventCompressionMode.Enabled:return!(n&&!i);case h.LogEventCompressionMode.Forced:return!0;default:return!1}}(e,this._options))try{const i=(new TextEncoder).encode(n),o=new CompressionStream("gzip"),a=o.writable.getWriter();a.write(i).catch(s.Log.error),a.close().catch(s.Log.error);const l=o.readable.getReader(),c=[];let d;for(;!(d=yield l.read()).done;)c.push(d.value);const u=c.reduce(((e,t)=>e+t.length),0),g=new Uint8Array(u);let f=0;for(const e of c)g.set(e,f),f+=e.length;e.body=g,e.params=Object.assign(Object.assign({},null!==(t=e.params)&&void 0!==t?t:{}),{[r.NetworkParam.IsGzipped]:"1"})}catch(i){s.Log.warn("Request compression failed for ".concat(e.urlConfig.getUrl()),i)}}))}_getInternalRequestArgs(e,t){const n=this._fallbackResolver.getActiveFallbackUrl(t.sdkKey,t.urlConfig),i=Object.assign(Object.assign({},t),{method:e,fallbackUrl:n});return"data"in t&&m(i,t.data),i}};const y=e=>!!e.sdkKey||(s.Log.warn("Unable to make request without an SDK key"),!1),m=(e,t)=>
vendor: 4,302 bytes, line 1
1{const{sdkKey:n,fallbackUrl:i}=e,o=f.StableID.get(n),a=g.SessionID.get(n),s=d.SDKType._get(n);e.body=JSON.stringify(Object.assign(Object.assign({},t),{statsigMetadata:Object.assign(Object.assign({},v.StatsigMetadataProvider.get()),{stableID:o,sessionID:a,sdkType:s,fallbackUrl:i})}))};function S(e,t,n,i,o){e.urlConfig.endpoint===r.Endpoint._initialize&&a.Diagnostics._markInitNetworkReqEnd(e.sdkKey,a.Diagnostics._getDiagnosticsData(t,n,i,o))}},a3f1021265ea543509ff:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,a){function s(e){try{l(i.next(e))}catch(t){a(t)}}function r(e){try{l(i.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,r)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t._isDomainFailure=t.NetworkFallbackResolver=void 0;const o=n("ef0923ecff9f065bcca3"),a=n("7d0b04c1858fd4d8b0bc"),s=n("527f3c4823d0df0a6327"),r=n("1b9c526a32bcc9fb7637"),l=6048e5;function c(e,t){var n;const i=null!==(n=null===e||void 0===e?void 0:e.toLowerCase())&&void 0!==n?n:"";return t||i.includes("uncaught exception")||i.includes("failed to fetch")||i.includes("networkerror when attempting to fetch resource")}function d(e){return"statsig.network_fallback.".concat((0,a._DJB2)(e))}function u(e,t){const n=d(e);t&&0!==Object.keys(t).length?r.Storage.setItem(n,JSON.stringify(t)):r.Storage.removeItem(n)}t.NetworkFallbackResolver=class{constructor(e){var t;this._fallbackInfo=null,this._errorBoundary=null,this._dnsQueryCooldowns={},this._networkOverrideFunc=null===(t=e.networkConfig)||void 0===t?void 0:t.networkOverrideFunc}setErrorBoundary(e){this._errorBoundary=e}tryBumpExpiryTime(e,t){var n;const i=null===(n=this._fallbackInfo)||void 0===n?void 0:n[t.endpoint];i&&(i.expiryTime=Date.now()+l,u(e,Object.assign(Object.assign({},this._fallbackInfo),{[t.endpoint]:i})))}getActiveFallbackUrl(e,t){var n,i;if(null!=t.customUrl&&null!=t.fallbackUrls)return null;let o=this._fallbackInfo;null==o&&(o=null!==(n=function(e){const t=d(e),i=r.Storage.getItem(t);if(!i)return null;try{return JSON.parse(i)}catch(n){return s.Log.error("Failed to parse FallbackInfo"),null}}(e))&&void 0!==n?n:{},this._fallbackInfo=o);const a=o[t.endpoint];return!a||Date.now()>(null!==(i=a.expiryTime)&&void 0!==i?i:0)||t.getChecksum()!==a.urlConfigChecksum?(delete o[t.endpoint],this._fallbackInfo=o,u(e,this._fallbackInfo),null):a.url?a.url:null}tryFetchUpdatedFallbackInfo(e,t,n,o){return i(this,void 0,void 0,(function*(){var i,a;try{if(!c(n,o))return!1;const a=null==t.customUrl&&null==t.fallbackUrls?yield this._tryFetchFallbackUrlsFromNetwork(t):t.fallbackUrls,s=this._pickNewFallbackUrl(null===(i=this._fallbackInfo)||void 0===i?void 0:i[t.endpoint],a);return!!s&&(this._updateFallbackInfoWithNewUrl(e,t,s),!0)}catch(s){return null===(a=this._errorBoundary)||void 0===a||a.logError("tryFetchUpdatedFallbackInfo",s),!1}}))}_updateFallbackInfoWithNewUrl(e,t,n){var i,o,a;const s={urlConfigChecksum:t.getChecksum(),url:n,expiryTime:Date.now()+l,previous:[]},r=t.endpoint,c=null===(i=this._fallbackInfo)||void 0===i?void 0:i[r];c&&s.previous.push(...c.previous),s.previous.length>10&&(s.previous=[]);const d=null===(a=null===(o=this._fallbackInfo)||void 0===o?void 0:o[r])||void 0===a?void 0:a.url;null!=d&&s.previous.push(d),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[r]:s}),u(e,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(e){return i(this,void 0,void 0,(function*(){var t;const n=this._dnsQueryCooldowns[e.endpoint];if(n&&Date.now()<n)return null;this._dnsQueryCooldowns[e.endpoint]=Date.now()+144e5;const i=[],a=yield(0,o._fetchTxtRecords)(null!==(t=this._networkOverrideFunc)&&void 0!==t?t:fetch),s=function(e){try{return new URL(e).pathname}catch(t){return null}}(e.defaultUrl);for(const o of a){if(!o.startsWith(e.endpointDnsKey+"="))continue;const t=o.split("=");if(t.length>1){let e=t[1];e.endsWith("/")&&(e=e.slice(0,-1)),i.push("https://".concat(e).concat(s))}}return i}))}_pickNewFallbackUrl(e,t){var n;if(null==t)return null;const i=new Set(null!==(n=null===e||void 0===e?void 0:e.previous)&&void 0!==n?n:[]),o=null===e||void 0===e?void 0:e.url;let a=null;for(const s of t){const e=s.endsWith("/")?s.slice(0,-1):s;
1if(!i.has(s)&&e!==o){a=e;break}}return a}},t._isDomainFailure=c},"4e97c642f7ff3cdf9adf":(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},"50cfe3eedf83da781cce":(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},"8134dcee0e44ff75b2d2":(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SDKFlags=void 0;const n={};t.SDKFlags={setFlags:(e,t)=>{n[e]=t},get:(e,t)=>{var i,o;return null!==(o=null===(i=n[e])||void 0===i?void 0:i[t])&&void 0!==o&&o}}},d0b20ed986540103af41:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SDKType=void 0;const n={};let i;t.SDKType={_get:e=>{var t;return(null!==(t=n[e])&&void 0!==t?t:"js-mono")+(null!==i&&void 0!==i?i:"")},_setClientType(e,t){n[e]=t},_setBindingType(e){i&&"-react"!==i||(i="-"+e)}}},bba8620bd6a33579ab22:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._getUnloadEvent=t._getCurrentPageUrlSafe=t._addDocumentEventListenerSafe=t._addWindowEventListenerSafe=t._isServerEnv=t._getDocumentSafe=t._getWindowSafe=void 0;t._getWindowSafe=()=>"undefined"!==typeof window?window:null;t._getDocumentSafe=()=>{var e;const n=(0,t._getWindowSafe)();return null!==(e=null===n||void 0===n?void 0:n.document)&&void 0!==e?e:null};t._isServerEnv=()=>{if(null!==(0,t._getDocumentSafe)())return!1;const e="undefined"!==typeof process&&null!=process.versions&&null!=process.versions.node;return"string"===typeof EdgeRuntime||e};t._addWindowEventListenerSafe=(e,n)=>{const i=(0,t._getWindowSafe)();"function"===typeof(null===i||void 0===i?void 0:i.addEventListener)&&i.addEventListener(e,n)};t._addDocumentEventListenerSafe=(e,n)=>{const i=(0,t._getDocumentSafe)();"function"===typeof(null===i||void 0===i?void 0:i.addEventListener)&&i.addEventListener(e,n)};t._getCurrentPageUrlSafe=()=>{var e;try{return null===(e=(0,t._getWindowSafe)())||void 0===e?void 0:e.location.href.split(/[?#]/)[0]}catch(n){return}};t._getUnloadEvent=()=>{const e=(0,t._getWindowSafe)();if(!e)return"beforeunload";return"onpagehide"in e?"pagehide":"beforeunload"}},ad3c7f27a7b0ac115342:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigSession=t.SessionID=void 0;const i=n("20bd1c89fef7e49eb999"),o=n("46390844cb2b54bdd4f6"),a=n("527f3c4823d0df0a6327"),s=n("1b9c526a32bcc9fb7637"),r=n("c9ab9018ede25783b208"),l=18e5,c=144e5,d={};function u(e,t){return setTimeout((()=>{var t;const n=null===(t=(0,i._getStatsigGlobal)())||void 0===t?void 0:t.instance(e);n&&n.$emt({name:"session_expired"})}),t)}function g(e){return"statsig.session_id.".concat((0,o._getStorageKey)(e))}t.SessionID={get:e=>t.StatsigSession.get(e).data.sessionID},t.StatsigSession={get:e=>{null==d[e]&&(d[e]=function(e){let t=function(e){const t=g(e);return(0,s._getObjectFromStorage)(t)}(e);const n=Date.now();t||(t={sessionID:(0,r.getUUID)(),startTime:n,lastUpdate:n});return{data:t,sdkKey:e}}(e));return function(e){const t=Date.now(),n=e.data,i=e.sdkKey;if(function(e){let{lastUpdate:t}=e;return Date.now()-t>l}(n)||function(e){let{startTime:t}=e;return Date.now()-t>c}(n)){n.sessionID=(0,r.getUUID)(),n.startTime=t;const e=null===__STATSIG__||void 0===__STATSIG__?void 0:__STATSIG__.instance(i);e&&e.$emt({name:"session_expired"})}n.lastUpdate=t,function(e,t){const n=g(t);try{(0,s._setObjectInStorage)(n,e)}catch(i){a.Log.warn("Failed to save SessionID")}}(n,e.sdkKey),clearTimeout(e.idleTimeoutID),clearTimeout(e.ageTimeoutID);const o=t-n.startTime;return e.idleTimeoutID=u(i,l),e.ageTimeoutID=u(i,c-o),e}(d[e])},overrideInitialSessionID:(e,t)=>{d[t]=function(e,t){const n=Date.now();return{data:{sessionID:e,startTime:n,lastUpdate:n},sdkKey:t}}(e,t)}}},"74e9f1b8c0f774a97842":(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._fastApproxSizeOf=void 0;t._fastApproxSizeOf=(e,n)=>{let i=0;const o=Object.keys(e);for(let a=0;a<o.length;a++){const s=o[a],r=e[s];if(i+=s.length,i+="object"===typeof r&&null!==r?(0,t._fastApproxSizeOf)(r,n)+2:String(r).length+1,i>=n)return i}return i}},"1b43a7a2c61e35851549":(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getCookieName=t.StableID=void 0;const i=n("46390844cb2b54bdd4f6"),o=n("527f3c4823d0df0a6327"),a=n("bba8620bd6a33579ab22"),s=n("1b9c526a32bcc9fb7637"),r=n("c9ab9018ede25783b208"),l={},c={},d={};function u(e){return"statsig.stable_id.".concat((0,i._getStorageKey)(e))}function g(e,t){const n=u(t);try{(0,s._setObjectInStorage)(n,e)}catch(i){o.Log.warn("Failed to save StableID to storage")}}function f(e,t){if(!c[t]||null==(0,a._getDocumentSafe)())return;const n=new Date;n.setFullYear(n.getFullYear()+1),document.cookie="".concat(_(t),"=").concat(encodeURIComponent(e),"; expires=").concat(n.toUTCString(),"; path=/")}
vendor: 5,284 bytes, line 1
1function _(e){return"statsig.stable_id.".concat((0,i._getStorageKey)(e))}t.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:e=>{if(d[e])return null;if(null!=l[e])return l[e];let t=null;return t=function(e){if(!c[e]||null==(0,a._getDocumentSafe)())return null;const t=document.cookie.split(";");for(const n of t){const[t,i]=n.trim().split("=");if(t===_(e))return decodeURIComponent(i)}return null}(e),null!=t?(l[e]=t,g(t,e),t):(t=function(e){const t=u(e);return(0,s._getObjectFromStorage)(t)}(e),null==t&&(t=(0,r.getUUID)()),g(t,e),f(t,e),l[e]=t,t)},setOverride:(e,t)=>{l[t]=e,g(e,t),f(e,t)},_setCookiesEnabled:(e,t)=>{c[e]=t},_setDisabled:(e,t)=>{d[e]=t}},t.getCookieName=_},e0b7c7b11e1b5e361220:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,a){function s(e){try{l(i.next(e))}catch(t){a(t)}}function r(e){try{l(i.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,r)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigClientBase=void 0,n("20bd1c89fef7e49eb999");const o=n("20bd1c89fef7e49eb999"),a=n("e05e3602f4144ab7420f"),s=n("0105e9a4e69c110e70b6"),r=n("527f3c4823d0df0a6327"),l=n("e84f5a8a5d81b58c2ccf"),c=n("bba8620bd6a33579ab22"),d=n("ad3c7f27a7b0ac115342"),u=n("1b43a7a2c61e35851549"),g=n("05d2e3d8f1d7867b0b81"),f=n("1b9c526a32bcc9fb7637");t.StatsigClientBase=class{constructor(e,t,n,i){var l,g,_,v;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};const h=this.$emt.bind(this);null!=(null===i||void 0===i?void 0:i.logLevel)&&(r.Log.level=i.logLevel),(null===i||void 0===i?void 0:i.disableStorage)&&f.Storage._setDisabled(!0),(null===i||void 0===i?void 0:i.initialSessionID)&&d.StatsigSession.overrideInitialSessionID(i.initialSessionID,e),(null===i||void 0===i?void 0:i.storageProvider)&&f.Storage._setProvider(i.storageProvider),(null===i||void 0===i?void 0:i.enableCookies)&&u.StableID._setCookiesEnabled(e,i.enableCookies),(null===i||void 0===i?void 0:i.disableStableID)&&u.StableID._setDisabled(e,!0),this._sdkKey=e,this._options=null!==i&&void 0!==i?i:{},this._memoCache={},this.overrideAdapter=null!==(l=null===i||void 0===i?void 0:i.overrideAdapter)&&void 0!==l?l:null,this._logger=new s.EventLogger(e,h,n,i),this._errorBoundary=new a.ErrorBoundary(e,i,h),this._errorBoundary.wrap(this),this._errorBoundary.wrap(t),this._errorBoundary.wrap(this._logger),n.setErrorBoundary(this._errorBoundary),this.dataAdapter=t,this.dataAdapter.attach(e,i,n),this.storageProvider=f.Storage,null===(v=null===(_=null===(g=this.overrideAdapter)||void 0===g?void 0:g.loadFromStorage)||void 0===_?void 0:_.call(g))||void 0===v||v.catch((e=>this._errorBoundary.logError("OA::loadFromStorage",e))),this._primeReadyRipcord(),function(e,t){var n;if((0,c._isServerEnv)())return;const i=(0,o._getStatsigGlobal)(),a=null!==(n=i.instances)&&void 0!==n?n:{},s=t;null!=a[e]&&r.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys.");a[e]=s,i.firstInstance||(i.firstInstance=s);i.instances=a,__STATSIG__=i}(e,this)}updateRuntimeOptions(e){e.loggingEnabled?(this._options.loggingEnabled=e.loggingEnabled,this._logger.setLoggingEnabled(e.loggingEnabled)):null!=e.disableLogging&&(this._options.disableLogging=e.disableLogging,this._logger.setLoggingEnabled(e.disableLogging?"disabled":"browser-only")),null!=e.disableStorage&&(this._options.disableStorage=e.disableStorage,f.Storage._setDisabled(e.disableStorage)),null!=e.enableCookies&&(this._options.enableCookies=e.enableCookies,u.StableID._setCookiesEnabled(this._sdkKey,e.enableCookies)),e.logEventCompressionMode?this._logger.setLogEventCompressionMode(e.logEventCompressionMode):e.disableCompression&&this._logger.setLogEventCompressionMode(g.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return i(this,void 0,void 0,(function*(){this.$emt({name:"pre_shutdown"}),this._setStatus("Uninitialized",null),this._initializePromise=null,yield this._logger.stop()}))}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){if(this._listeners[e]){const n=this._listeners[e].indexOf(t);-1!==n&&this._listeners[e].splice(n,1)}}$on(e,t){t.__isInternal=!0,this.on(e,t)}$emt(e){var t;const n=t=>{try{t(e)}catch(n){if(!0===t.__isInternal)return void this._errorBoundary.logError("__emit:".concat(e.name),n);r.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",e)}};this._listeners[e.name]&&this._listeners[e.name].forEach((e=>n(e))),null===(t=this._listeners["*"])||void 0===t||t.forEach(n)}_setStatus(e,t){this.loadingStatus=e,this._memoCache={},this.$emt({name:"values_updated",status:e,values:t})}_enqueueExposure(e,t,n){!0!==(null===n||void 0===n?void 0:n.disableExposureLog)?this._logger.enqueue(t):this._logger.incrementNonExposureCount(e)}_memoize(e,t){return(n,i)=>{if(this._options.disableEvaluationMemoization)return t(n,i);const o=(0,l.createMemoKey)(e,n,i);return o?(o in this._memoCache||(Object.keys(this._memoCache).length>=3e3&&(this._memoCache={}),this._memoCache[o]=t(n,i)),this._memoCache[o]):t(n,i)}}}}
1,"2d6afc4e5a2e7ad1c542":(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorTag=void 0,t.ErrorTag={NetworkError:"NetworkError"}},b38a5849bb41c6b9aa5b:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DataAdapterCachePrefix=void 0,t.DataAdapterCachePrefix="statsig.cached"},b4e76bd11719c3dcbc1e:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._createLayerParameterExposure=t._createConfigExposure=t._mapExposures=t._createGateExposure=t._isExposureEvent=void 0;const n="statsig::config_exposure",i="statsig::gate_exposure",o="statsig::layer_exposure",a=(e,t,n,i,o)=>(n.bootstrapMetadata&&(i.bootstrapMetadata=n.bootstrapMetadata),{eventName:e,user:t,value:null,metadata:r(n,i),secondaryExposures:o,time:Date.now()});t._isExposureEvent=e=>{let{eventName:t}=e;return t===i||t===n||t===o};function s(e,t){return e.map((e=>"string"===typeof e?(null!==t&&void 0!==t?t:{})[e]:e)).filter((e=>null!=e))}t._createGateExposure=(e,t,n)=>{var o,r,l;const c={gate:t.name,gateValue:String(t.value),ruleID:t.ruleID};return null!=(null===(o=t.__evaluation)||void 0===o?void 0:o.version)&&(c.configVersion=t.__evaluation.version),a(i,e,t.details,c,s(null!==(l=null===(r=t.__evaluation)||void 0===r?void 0:r.secondary_exposures)&&void 0!==l?l:[],n))},t._mapExposures=s;t._createConfigExposure=(e,t,i)=>{var o,r,l,c;const d={config:t.name,ruleID:t.ruleID};return null!=(null===(o=t.__evaluation)||void 0===o?void 0:o.version)&&(d.configVersion=t.__evaluation.version),null!=(null===(r=t.__evaluation)||void 0===r?void 0:r.passed)&&(d.rulePassed=String(t.__evaluation.passed)),a(n,e,t.details,d,s(null!==(c=null===(l=t.__evaluation)||void 0===l?void 0:l.secondary_exposures)&&void 0!==c?c:[],i))};t._createLayerParameterExposure=(e,t,n,i)=>{var r,l,c,d,u,g,f;const _=t.__evaluation,v=!0===(null===(r=null===_||void 0===_?void 0:_.explicit_parameters)||void 0===r?void 0:r.includes(n));let h="",b=null!==(l=null===_||void 0===_?void 0:_.undelegated_secondary_exposures)&&void 0!==l?l:[];v&&(h=null!==(c=_.allocated_experiment_name)&&void 0!==c?c:"",b=null!==(d=_.secondary_exposures)&&void 0!==d?d:[]);const p=null===(u=t.__evaluation)||void 0===u?void 0:u.parameter_rule_ids,y={config:t.name,parameterName:n,ruleID:null!==(g=null===p||void 0===p?void 0:p[n])&&void 0!==g?g:t.ruleID,allocatedExperiment:h,isExplicitParameter:String(v)};return null!=(null===(f=t.__evaluation)||void 0===f?void 0:f.version)&&(y.configVersion=t.__evaluation.version),a(o,e,t.details,y,s(b,i))};const r=(e,t)=>(t.reason=e.reason,e.lcut&&(t.lcut=String(e.lcut)),e.receivedAt&&(t.receivedAt=String(e.receivedAt)),t)},ade89bfde843c6add3f2:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigMetadataProvider=t.SDK_VERSION=void 0,t.SDK_VERSION="3.28.0";let n={sdkVersion:t.SDK_VERSION,sdkType:"js-mono"};t.StatsigMetadataProvider={get:()=>n,add:e=>{n=Object.assign(Object.assign({},n),e)}}},"05d2e3d8f1d7867b0b81":(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LoggingEnabledOption=t.LogEventCompressionMode=void 0,t.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},t.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}},"4e49ccfdfac5f80ad1a0":(e,t)=>
1{Object.defineProperty(t,"__esModule",{value:!0})},"57007abe5d0a7f420365":(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._makeTypedGet=t._mergeOverride=t._makeLayer=t._makeExperiment=t._makeDynamicConfig=t._makeFeatureGate=void 0;const i=n("527f3c4823d0df0a6327"),o=n("ad33555ce9562b4619d4");function a(e,t,n,i){var o;return{name:e,details:t,ruleID:null!==(o=null===n||void 0===n?void 0:n.rule_id)&&void 0!==o?o:"",__evaluation:n,value:i}}function s(e,t,n){var i,o;const s=null!==(i=null===n||void 0===n?void 0:n.value)&&void 0!==i?i:{};return Object.assign(Object.assign({},a(e,t,n,s)),{idType:null!==(o=null===n||void 0===n?void 0:n.id_type)&&void 0!==o?o:null,get:r(e,null===n||void 0===n?void 0:n.value)})}function r(e,t,n){return(a,s)=>{var r;const l=null!==(r=null===t||void 0===t?void 0:t[a])&&void 0!==r?r:null;return null==l?null!==s&&void 0!==s?s:null:null==s||(0,o._isTypeMatch)(l,s)?(null===n||void 0===n||n(a),l):(i.Log.warn("Parameter type mismatch. '".concat(e,".").concat(a,"' was found to be type '").concat(typeof l,"' but fallback/return type is '").concat(typeof s,"'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters")),null!==s&&void 0!==s?s:null)}}t._makeFeatureGate=function(e,t,n){var i;return Object.assign(Object.assign({},a(e,t,n,!0===(null===n||void 0===n?void 0:n.value))),{idType:null!==(i=null===n||void 0===n?void 0:n.id_type)&&void 0!==i?i:null})},t._makeDynamicConfig=s,t._makeExperiment=function(e,t,n){var i;const o=s(e,t,n);return Object.assign(Object.assign({},o),{groupName:null!==(i=null===n||void 0===n?void 0:n.group_name)&&void 0!==i?i:null})},t._makeLayer=function(e,t,n,i){var o,s;return Object.assign(Object.assign({},a(e,t,n,void 0)),{get:r(e,null===n||void 0===n?void 0:n.value,i),groupName:null!==(o=null===n||void 0===n?void 0:n.group_name)&&void 0!==o?o:null,__value:null!==(s=null===n||void 0===n?void 0:n.value)&&void 0!==s?s:{}})},t._mergeOverride=function(e,t,n,i){return Object.assign(Object.assign(Object.assign({},e),t),{get:r(e.name,n,i)})},t._makeTypedGet=r},"7dfb0f109679e92633a1":(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},"9539cdfdd3c81b68f540":(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_DETAIL_ERROR_MESSAGES=t.createUpdateDetails=void 0;t.createUpdateDetails=(e,t,n,i,o,a)=>({duration:n,source:t,success:e,error:i,sourceUrl:o,warnings:a}),t.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."}},"0f9c552350cbb63bb1dc":(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._getFullUserHash=t._normalizeUser=void 0;const i=n("7d0b04c1858fd4d8b0bc"),o=n("527f3c4823d0df0a6327");t._normalizeUser=function(e,t,n){try{const i=JSON.parse(JSON.stringify(e));return null!=t&&null!=t.environment?i.statsigEnvironment=t.environment:null!=n&&(i.statsigEnvironment={tier:n}),i}catch(i){return o.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}},t._getFullUserHash=function(e){return e?(0,i._DJB2Object)(e):null}},"1b9c526a32bcc9fb7637":(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._setObjectInStorage=t._getObjectFromStorage=t.Storage=void 0;const i=n("527f3c4823d0df0a6327"),o=n("bba8620bd6a33579ab22"),a={},s={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:e=>a[e]?a[e]:null,setItem:(e,t)=>{a[e]=t},removeItem:e=>{delete a[e]},getAllKeys:()=>Object.keys(a)};let r=null;try{const e=(0,o._getWindowSafe)();e&&e.localStorage&&"function"===typeof e.localStorage.getItem&&(r={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:t=>e.localStorage.getItem(t),setItem:(t,n)=>e.localStorage.setItem(t,n),removeItem:t=>e.localStorage.removeItem(t),getAllKeys:()=>Object.keys(e.localStorage)})}catch(u){i.Log.warn("Failed to setup localStorageProvider.")}let l=null!==r&&void 0!==r?r:s,c=l;function d(e){try{return e()}catch(u){if(u instanceof Error&&"SecurityError"===u.name)return t.Storage._setProvider(s),null;throw u}}t.Storage={isReady:()=>c.isReady(),isReadyResolver:()=>c.isReadyResolver(),getProviderName:()=>c.getProviderName(),getItem:e=>d((()=>c.getItem(e))),setItem:(e,t)=>
1d((()=>c.setItem(e,t))),removeItem:e=>c.removeItem(e),getAllKeys:()=>c.getAllKeys(),_setProvider:e=>{l=e,c=e},_setDisabled:e=>{c=e?s:l}},t._getObjectFromStorage=function(e){const n=t.Storage.getItem(e);return JSON.parse(null!==n&&void 0!==n?n:"null")},t._setObjectInStorage=function(e,n){t.Storage.setItem(e,JSON.stringify(n))}},"80dbab59b8ce477f72f7":(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._typedJsonParse=void 0;const i=n("527f3c4823d0df0a6327");t._typedJsonParse=function(e,t,n){try{const n=JSON.parse(e);if(n&&"object"===typeof n&&t in n)return n}catch(o){}return i.Log.error("Failed to parse ".concat(n)),null}},ad33555ce9562b4619d4:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._isTypeMatch=t._typeOf=void 0,t._typeOf=function(e){return Array.isArray(e)?"array":typeof e},t._isTypeMatch=function(e,t){const n=e=>Array.isArray(e)?"array":null===e?"null":typeof e;return n(e)===n(t)}},c9ab9018ede25783b208:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getUUID=void 0,t.getUUID=function(){if("undefined"!==typeof crypto&&"function"===typeof crypto.randomUUID)return crypto.randomUUID();let e=(new Date).getTime(),t="undefined"!==typeof performance&&performance.now&&1e3*performance.now()||0;const n="89ab"[Math.floor(4*Math.random())];return"xxxxxxxx-xxxx-4xxx-".concat(n,"xxx-xxxxxxxxxxxx").replace(/[xy]/g,(n=>{let i=16*Math.random();return e>0?(i=(e+i)%16|0,e=Math.floor(e/16)):(i=(t+i)%16|0,t=Math.floor(t/16)),("x"===n?i:7&i|8).toString(16)}))}},"12c4a526269ccc883a84":(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UrlConfiguration=void 0;const i=n("7d0b04c1858fd4d8b0bc"),o=n("2d879fb9503fa3628110"),a={[o.Endpoint._initialize]:"i",[o.Endpoint._rgstr]:"e",[o.Endpoint._download_config_specs]:"d"};t.UrlConfiguration=class{constructor(e,t,n,i){this.customUrl=null,this.fallbackUrls=null,this.endpoint=e,this.endpointDnsKey=a[e],t&&(this.customUrl=t),!t&&n&&(this.customUrl=n.endsWith("/")?"".concat(n).concat(e):"".concat(n,"/").concat(e)),i&&(this.fallbackUrls=i);const s=o.NetworkDefault[e];this.defaultUrl="".concat(s,"/").concat(e)}getUrl(){var e;return null!==(e=this.customUrl)&&void 0!==e?e:this.defaultUrl}getChecksum(){var e;const t=(null!==(e=this.fallbackUrls)&&void 0!==e?e:[]).sort().join(",");return(0,i._DJB2)(this.customUrl+t)}}},"4e601cf136f6c2323fe0":(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._notifyVisibilityChanged=t._subscribeToVisiblityChanged=t._isUnloading=t._isCurrentlyVisible=void 0;const i=n("bba8620bd6a33579ab22"),o="foreground",a="background",s=[];let r=o,l=!1;t._isCurrentlyVisible=()=>r===o;t._isUnloading=()=>l;t._subscribeToVisiblityChanged=e=>{s.unshift(e)};t._notifyVisibilityChanged=e=>{e!==r&&(r=e,s.forEach((t=>t(e))))},(0,i._addWindowEventListenerSafe)("focus",(()=>{l=!1,(0,t._notifyVisibilityChanged)(o)})),(0,i._addWindowEventListenerSafe)("blur",(()=>(0,t._notifyVisibilityChanged)(a))),(0,i._addDocumentEventListenerSafe)("visibilitychange",(()=>{(0,t._notifyVisibilityChanged)("visible"===document.visibilityState?o:a)})),(0,i._addWindowEventListenerSafe)((0,i._getUnloadEvent)(),(()=>{l=!0,(0,t._notifyVisibilityChanged)(a)}))},"2c5ad0f51a2b0c9a0251":function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=t.Log=t.EventLogger=t.Diagnostics=void 0,n("20bd1c89fef7e49eb999");const a=n("20bd1c89fef7e49eb999"),s=n("8ba7d454a3fa534c656a");Object.defineProperty(t,"Diagnostics",{enumerable:!0,get:function(){return s.Diagnostics}});const r=n("0105e9a4e69c110e70b6");Object.defineProperty(t,"EventLogger",{enumerable:!0,get:function(){return r.EventLogger}});const l=n("527f3c4823d0df0a6327");Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return l.Log}});const c=n("ade89bfde843c6add3f2"),d=n("1b9c526a32bcc9fb7637");Object.defineProperty(t,"Storage",{enumerable:!0,get:function(){return d.Storage}}),o(n("20bd1c89fef7e49eb999"),t),o(n("46390844cb2b54bdd4f6"),t),o(n("c37ca927282859bea647"),t),o(n("11b5eaaa57a871a300cf"),t),o(n("8ba7d454a3fa534c656a"),t),o(n("448d2dc8ff42a107e8f8"),t),o(n("e05e3602f4144ab7420f"),t),o(n("982036ed5edc56255947"),t),o(n("eb3d1acfd1715a091a3f"),t),o(n("7d0b04c1858fd4d8b0bc"),t),o(n("de0a23aa0b26bd54867d"),t),o(n("527f3c4823d0df0a6327"),t),o(n("e84f5a8a5d81b58c2ccf"),t),o(n("2d879fb9503fa3628110"),t),o(n("6560aeedba5a591c3aef"),t),o(n("4e97c642f7ff3cdf9adf"),t),o(n("50cfe3eedf83da781cce"),t),o(n("bba8620bd6a33579ab22"),t),o(n("d0b20ed986540103af41"),t),o(n("ad3c7f27a7b0ac115342"),t),o(n("74e9f1b8c0f7
174a97842"),t),o(n("1b43a7a2c61e35851549"),t),o(n("e0b7c7b11e1b5e361220"),t),o(n("2d6afc4e5a2e7ad1c542"),t),o(n("b38a5849bb41c6b9aa5b"),t),o(n("b4e76bd11719c3dcbc1e"),t),o(n("ade89bfde843c6add3f2"),t),o(n("05d2e3d8f1d7867b0b81"),t),o(n("4e49ccfdfac5f80ad1a0"),t),o(n("57007abe5d0a7f420365"),t),o(n("7dfb0f109679e92633a1"),t),o(n("0f9c552350cbb63bb1dc"),t),o(n("1b9c526a32bcc9fb7637"),t),o(n("80dbab59b8ce477f72f7"),t),o(n("ad33555ce9562b4619d4"),t),o(n("12c4a526269ccc883a84"),t),o(n("c9ab9018ede25783b208"),t),o(n("4e601cf136f6c2323fe0"),t),o(n("9539cdfdd3c81b68f540"),t),o(n("8134dcee0e44ff75b2d2"),t),Object.assign((0,a._getStatsigGlobal)(),{Log:l.Log,SDK_VERSION:c.SDK_VERSION})},"30be2aded40e4898cda9":(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._resolveDeltasResponse=void 0;const i=n("2c5ad0f51a2b0c9a0251");function o(e,t){null===e||void 0===e||e.forEach((e=>{delete t[e]}))}t._resolveDeltasResponse=function(e,t){const n=(0,i._typedJsonParse)(t,"checksum","DeltasEvaluationResponse");if(!n)return{hadBadDeltaChecksum:!0};const a=function(e){const t=e;return o(e.deleted_gates,t.feature_gates),delete t.deleted_gates,o(e.deleted_configs,t.dynamic_configs),delete t.deleted_configs,o(e.deleted_layers,t.layer_configs),delete t.deleted_layers,t}(function(e,t){return Object.assign(Object.assign(Object.assign({},e),t),{feature_gates:Object.assign(Object.assign({},e.feature_gates),t.feature_gates),layer_configs:Object.assign(Object.assign({},e.layer_configs),t.layer_configs),dynamic_configs:Object.assign(Object.assign({},e.dynamic_configs),t.dynamic_configs)})}(e,n)),s=(0,i._DJB2Object)({feature_gates:a.feature_gates,dynamic_configs:a.dynamic_configs,layer_configs:a.layer_configs},2);return s===n.checksumV2?JSON.stringify(a):{hadBadDeltaChecksum:!0,badChecksum:s,badMergedConfigs:a,badFullResponse:n.deltas_full_response}}},dfe33831a2daa2f0a089:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const i=n("2c5ad0f51a2b0c9a0251"),o=n("695c73b2c1ea5b80e058"),a=n("9d01c18f053d9eff57d5");t.default=class{constructor(e){this._sdkKey=e,this._rawValues=null,this._values=null,this._source="Uninitialized",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings=new Set}reset(){this._values=null,this._rawValues=null,this._source="Loading",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings.clear()}finalize(){this._values||(this._source="NoValues")}getValues(){return this._rawValues?(0,i._typedJsonParse)(this._rawValues,"has_updates","EvaluationStoreValues"):null}setValues(e,t){var n,s;if(!e)return!1;const r=(0,i._typedJsonParse)(e.data,"has_updates","EvaluationResponse");if(null==r)return!1;if(this._source=e.source,!0!==(null===r||void 0===r?void 0:r.has_updates))return!0;return(null!==(n=r.time)&&void 0!==n?n:0)<this._lcut||(this._rawValues=e.data,this._lcut=r.time,this._receivedAt=e.receivedAt,"init-v2"===r.response_format?this._values=new a.V2InitializeContainer(r):this._values=new o.V1InitializeContainer(r),this._bootstrapMetadata=this._extractBootstrapMetadata(e.source,r),e.source&&r.user&&this._setWarningState(t,r),i.SDKFlags.setFlags(this._sdkKey,null!==(s=r.sdk_flags)&&void 0!==s?s:{})),!0}getWarnings(){if(0!==this._warnings.size)return Array.from(this._warnings)}getGate(e){const t=this._values?this._values.getGate(e):null;return this._getDetailedStoreResult(t)}getConfig(e){const t=this._values?this._values.getConfig(e):null;return this._getDetailedStoreResult(t)}getConfigList(){return this._values?this._values.getConfigList():[]}getLayer(e){const t=this._values?this._values.getLayer(e):null;return this._getDetailedStoreResult(t)}getParamStore(e){const t=this._values?this._values.getParamStore(e):null;return this._getDetailedStoreResult(t)}getSource(){return this._source}getExposureMapping(){var e;return null===(e=this._values)||void 0===e?void 0:e.getExposureMapping()}_extractBootstrapMetadata(e,t){if("Bootstrap"!==e)return null;const n={};return t.user&&(n.user=t.user),t.sdkInfo&&(n.generatorSDKInfo=t.sdkInfo),n.lcut=t.time,n}_getDetailedStoreResult(e){return{result:e,details:this._getDetails(null==e)}}_setWarningState(e,t){var n,o;const a=i.StableID.get(this._sdkKey);if((null===(n=e.customIDs)||void 0===n?void 0:n.stableID)===a||!(null===(o=e.customIDs)||void 0===o?void 0:o.stableID)&&!a){if("user"in t){const n=t.user,o=Object.assign(Object.assign({},e),{analyticsOnlyMetadata:void 0,privateAttributes:void 0});(0,i._getFullUserHash)(o)!==(0,i._getFullUserHash)(n)&&this._warnings.add("Parti
1alUserMatch")}}else this._warnings.add("StableIDMismatch")}getCurrentSourceDetails(){if("Uninitialized"===this._source||"NoValues"===this._source)return{reason:this._source};const e={reason:this._source,lcut:this._lcut,receivedAt:this._receivedAt};return this._warnings.size>0&&(e.warnings=Array.from(this._warnings)),e}_getDetails(e){var t,n;const i=this.getCurrentSourceDetails();let o=i.reason;const a=null!==(t=i.warnings)&&void 0!==t?t:[];if("Bootstrap"===this._source&&a.length>0&&(o+=a[0]),"Uninitialized"!==o&&"NoValues"!==o){const t=e?"Unrecognized":"Recognized";o="".concat(o,":").concat(t)}const s="Bootstrap"===this._source&&null!==(n=this._bootstrapMetadata)&&void 0!==n?n:void 0;return s&&(i.bootstrapMetadata=s),Object.assign(Object.assign({},i),{reason:o})}}},"24e47eaba56b75eb5e31":function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,a){function s(e){try{l(i.next(e))}catch(t){a(t)}}function r(e){try{l(i.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,r)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const o=n("2c5ad0f51a2b0c9a0251"),a=n("30be2aded40e4898cda9");class s extends o.NetworkCore{constructor(e,t){super(e,t);const n=null===e||void 0===e?void 0:e.networkConfig;this._option=e,this._initializeUrlConfig=new o.UrlConfiguration(o.Endpoint._initialize,null===n||void 0===n?void 0:n.initializeUrl,null===n||void 0===n?void 0:n.api,null===n||void 0===n?void 0:n.initializeFallbackUrls)}fetchEvaluations(e,t,n,a,s){return i(this,void 0,void 0,(function*(){var i,r,l,c,d,u;const g=t?(0,o._typedJsonParse)(t,"has_updates","InitializeResponse"):null;let f={user:a,hash:null!==(l=null===(r=null===(i=this._option)||void 0===i?void 0:i.networkConfig)||void 0===r?void 0:r.initializeHashAlgorithm)&&void 0!==l?l:"djb2",deltasResponseRequested:!1,full_checksum:null};if(null===g||void 0===g?void 0:g.has_updates){const e=(null===g||void 0===g?void 0:g.hash_used)!==(null!==(u=null===(d=null===(c=this._option)||void 0===c?void 0:c.networkConfig)||void 0===d?void 0:d.initializeHashAlgorithm)&&void 0!==u?u:"djb2");f=Object.assign(Object.assign({},f),{sinceTime:s&&!e?g.time:0,previousDerivedFields:"derived_fields"in g&&s?g.derived_fields:{},deltasResponseRequested:!0,full_checksum:g.full_checksum,partialUserMatchSinceTime:e?0:g.time})}return this._fetchEvaluations(e,g,f,n)}))}_fetchEvaluations(e,t,n,o){return i(this,void 0,void 0,(function*(){var i,s;const r=yield this.post({sdkKey:e,urlConfig:this._initializeUrlConfig,data:n,retries:2,isStatsigEncodable:!0,priority:o});if(204===(null===r||void 0===r?void 0:r.code))return'{"has_updates": false}';if(200!==(null===r||void 0===r?void 0:r.code))return null!==(i=null===r||void 0===r?void 0:r.body)&&void 0!==i?i:null;if(!0!==(null===t||void 0===t?void 0:t.has_updates)||!0!==(null===(s=r.body)||void 0===s?void 0:s.includes('"is_delta":true'))||!0!==n.deltasResponseRequested)return r.body;const l=(0,a._resolveDeltasResponse)(t,r.body);return"string"===typeof l?l:this._fetchEvaluations(e,t,Object.assign(Object.assign(Object.assign({},n),l),{deltasResponseRequested:!1}),o)}))}}t.default=s},c149710ad82193288d9a:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._makeParamStoreGetter=void 0;const i=n("2c5ad0f51a2b0c9a0251"),o={disableExposureLog:!0};function a(e){return null==e||!1===e.disableExposureLog}function s(e,t){return null!=t&&!(0,i._isTypeMatch)(e,t)}t._makeParamStoreGetter=function(e,t,n){return(r,l)=>{if(null==t)return l;const c=t[r];if(null==c||null!=l&&(0,i._typeOf)(l)!==c.param_type)return l;switch(c.ref_type){case"static":return function(e,t){return e.value}(c);case"gate":return function(e,t,n){return e.getFeatureGate(t.gate_name,a(n)?void 0:o).value?t.pass_value:t.fail_value}(e,c,n);case"dynamic_config":return function(e,t,n,i){const r=e.getDynamicConfig(t.config_name,a(i)?void 0:o).get(t.param_name);return s(r,n)?n:r}(e,c,l,n);case"experiment":return function(e,t,n,i){const r=e.getExperiment(t.experiment_name,a(i)?void 0:o).get(t.param_name);return s(r,n)?n:r}(e,c,l,n);case"layer":return function(e,t,n,i){const r=e.getLayer(t.layer_name,a(i)?void 0:o).get(t.param_name);return s(r,n)?n:r}(e,c,l,n);default:return l}}}},"2dad8713de4e78bd5716":function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Prom
vendor: 7,458 bytes, line 1
1ise))((function(o,a){function s(e){try{l(i.next(e))}catch(t){a(t)}}function r(e){try{l(i.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,r)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const o=n("2c5ad0f51a2b0c9a0251"),a=n("dfe33831a2daa2f0a089"),s=n("24e47eaba56b75eb5e31"),r=n("c149710ad82193288d9a"),l=n("a3153ea9dc3a5fa6c9a6");class c extends o.StatsigClientBase{static instance(e){const t=(0,o._getStatsigGlobal)().instance(e);return t instanceof c?t:(o.Log.warn((0,o._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new c(null!==e&&void 0!==e?e:"",{}))}constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;var i,r;o.SDKType._setClientType(e,"javascript-client");const c=new s.default(n,(e=>{this.$emt(e)}));super(e,null!==(i=null===n||void 0===n?void 0:n.dataAdapter)&&void 0!==i?i:new l.StatsigEvaluationsDataAdapter,c,n),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(o.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(o.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(o.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(o.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(o.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(o.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new a.default(e),this._network=c,this._user=this._configureUser(t,n),this._sdkInstanceID=(0,o.getUUID)();const d=null!==(r=null===n||void 0===n?void 0:n.plugins)&&void 0!==r?r:[];for(const o of d)o.bind(this)}initializeSync(e){var t;return"Uninitialized"!==this.loadingStatus?(0,o.createUpdateDetails)(!0,this._store.getSource(),-1,null,null,["MultipleInitializations",...null!==(t=this._store.getWarnings())&&void 0!==t?t:[]]):(this._logger.start(),this.updateUserSync(this._user,e))}initializeAsync(e){return i(this,void 0,void 0,(function*(){return this._initializePromise||(this._initializePromise=this._initializeAsyncImpl(e)),this._initializePromise}))}updateUserSync(e,t){const n=performance.now();try{return this._updateUserSyncImpl(e,t,n)}catch(i){const e=i instanceof Error?i:new Error(String(i));return this._createErrorUpdateDetails(e,n)}}_updateUserSyncImpl(e,t,n){var i;const a=[...null!==(i=this._store.getWarnings())&&void 0!==i?i:[]];this._resetForUser(e);const s=this.dataAdapter.getDataSync(this._user);null==s&&a.push("NoCachedValues"),this._store.setValues(s,this._user),this._finalizeUpdate(s);const r=null===t||void 0===t?void 0:t.disableBackgroundCacheRefresh;return!0===r||null==r&&"Bootstrap"===(null===s||void 0===s?void 0:s.source)||this._runPostUpdate(null!==s&&void 0!==s?s:null,this._user),(0,o.createUpdateDetails)(!0,this._store.getSource(),performance.now()-n,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),a)}updateUserAsync(e,t){return i(this,void 0,void 0,(function*(){const n=performance.now();try{return yield this._updateUserAsyncImpl(e,t)}catch(i){const e=i instanceof Error?i:new Error(String(i));return this._createErrorUpdateDetails(e,n)}}))}_updateUserAsyncImpl(e,t){return i(this,void 0,void 0,(function*(){this._resetForUser(e);const n=this._user;o.Diagnostics._markInitOverallStart(this._sdkKey);let i=this.dataAdapter.getDataSync(n);if(this._store.setValues(i,this._user),this._setStatus("Loading",i),i=yield this.dataAdapter.getDataAsync(i,n,t),n!==this._user)return(0,o.createUpdateDetails)(!1,this._store.getSource(),-1,new Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let a=!1;null!=i&&(o.Diagnostics._markInitProcessStart(this._sdkKey),a=this._store.setValues(i,this._user),o.Diagnostics._markInitProcessEnd(this._sdkKey,{success:a})),this._finalizeUpdate(i),a||(this._errorBoundary.attachErrorIfNoneExists(o.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),o.Diagnostics._markInitOverallEnd(this._sdkKey,a,this._store.getCurrentSourceDetails());const s=o.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,o.createUpdateDetails)(a,this._store.getSource(),s,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())}))}getContext(){return{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:JSON.parse(JSON.stringify(this._user)),errorBoundary:this._errorBoundary,session:o.StatsigSession.get(this._sdkKey),stableID:o.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}checkGate(e,t){return this.getFeatureGate(e,t).value}logEvent(e,t,n){const i="string"===typeof e?{eventName:e,value:t,metadata:n}:e;this.$emt({name:"log_event_called",event:i}),this._logger.enqueue(Object.assign(Object.assign({},i),{user:this._user,time:Date.now()}))}updateUserWithAnalyticsOnlyMetadata(e){this._user=this._configureUser(Object.assign(Object.assign({},this._user),{analyticsOnlyMetadata:e}),this._options)}_primeReadyRipcord(){this.$on("error",(()=>{"Loading"===this.loadingStatus&&this._finalizeUpdate(null)}))}_initializeAsyncImpl(e){return i(this,void 0,void 0,(function*(){return o.Storage.isReady()||(yield o.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,e)}))}_createErrorUpdateDetails(e,t){var n;return(0,o.createUpdateDetails)(!1,this._store.getSource(),performance.now()-t,e,null,[...null!==(n=this._store.getWarnings())&&void 0!==n?n:[]])}_finalizeUpdate(e){this._store.finalize(),this._setStatus("Ready",e)}_runPostUpdate(e,t){this.dataAdapter.getDataAsync(e,t,{priority:"low"}).catch((e=>{o.Log.error("An error occurred after update.",e)}))}_resetForUser(e){this._logger.reset(),this._store.reset(),this._user=this._configureUser(e,this._options)}_configureUser(e,t){var n,i,a;const s=(0,o._normalizeUser)(e,t),r=null===(n=s.customIDs)||void 0===n?void 0:n.stableID;if(r){const e=null===(a=(i=this.storageProvider).isReadyResolver)||void 0===a?void 0:a.call(i);e?e.then((()=>o.StableID.setOverride(r,this._sdkKey)),(()=>o.StableID.setOverride(r,this._sdkKey))):o.StableID.setOverride(r,this._sdkKey)}return Object.keys(this._possibleFirstTouchMetadata).length>0&&(s.analyticsOnlyMetadata=Object.assign(Object.assign({},s.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),s}_getFeatureGateImpl(e,t){var n,i;const{result:a,details:s}=this._store.getGate(e),r=(0,o._makeFeatureGate)(e,s,a),l=null===(i=null===(n=this.overrideAdapter)||void 0===n?void 0:n.getGateOverride)||void 0===i?void 0:i.call(n,r,this._user,t),c=null!==l&&void 0!==l?l:r;return this._enqueueExposure(e,(0,o._createGateExposure)(this._user,c,this._store.getExposureMapping()),t),this.$emt({name:"gate_evaluation",gate:c}),c}_getDynamicConfigImpl(e,t){var n,i;const{result:a,details:s}=this._store.getConfig(e),r=(0,o._makeDynamicConfig)(e,s,a),l=null===(i=null===(n=this.overrideAdapter)||void 0===n?void 0:n.getDynamicConfigOverride)||void 0===i?void 0:i.call(n,r,this._user,t),c=null!==l&&void 0!==l?l:r;return this._enqueueExposure(e,(0,o._createConfigExposure)(this._user,c,this._store.getExposureMapping()),t),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:c}
1),c}_getExperimentImpl(e,t){var n,i,a,s;const{result:r,details:l}=this._store.getConfig(e),c=(0,o._makeExperiment)(e,l,r);null!=c.__evaluation&&(c.__evaluation.secondary_exposures=(0,o._mapExposures)(null!==(i=null===(n=c.__evaluation)||void 0===n?void 0:n.secondary_exposures)&&void 0!==i?i:[],this._store.getExposureMapping()));const d=null===(s=null===(a=this.overrideAdapter)||void 0===a?void 0:a.getExperimentOverride)||void 0===s?void 0:s.call(a,c,this._user,t),u=null!==d&&void 0!==d?d:c;return this._enqueueExposure(e,(0,o._createConfigExposure)(this._user,u,this._store.getExposureMapping()),t),this.$emt({name:"experiment_evaluation",experiment:u}),u}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(e,t){var n,i,a;const{result:s,details:r}=this._store.getLayer(e),l=(0,o._makeLayer)(e,r,s),c=null===(i=null===(n=this.overrideAdapter)||void 0===n?void 0:n.getLayerOverride)||void 0===i?void 0:i.call(n,l,this._user,t);(null===t||void 0===t?void 0:t.disableExposureLog)&&this._logger.incrementNonExposureCount(e);const d=(0,o._mergeOverride)(l,c,null!==(a=null===c||void 0===c?void 0:c.__value)&&void 0!==a?a:l.__value,(n=>{(null===t||void 0===t?void 0:t.disableExposureLog)||this._enqueueExposure(e,(0,o._createLayerParameterExposure)(this._user,d,n,this._store.getExposureMapping()),t)}));return this.$emt({name:"layer_evaluation",layer:d}),d}_getParameterStoreImpl(e,t){var n,i;const{result:o,details:a}=this._store.getParamStore(e);this._logger.incrementNonExposureCount(e);const s={name:e,details:a,__configuration:o,get:(0,r._makeParamStoreGetter)(this,o,t)},l=null===(i=null===(n=this.overrideAdapter)||void 0===n?void 0:n.getParamStoreOverride)||void 0===i?void 0:i.call(n,s,t);return null!=l&&(s.__configuration=l.config,s.details=l.details,s.get=(0,r._makeParamStoreGetter)(this,l.config,t)),s}}t.default=c},a3153ea9dc3a5fa6c9a6:function(e,t,n){var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(o,a){function s(e){try{l(i.next(e))}catch(t){a(t)}}function r(e){try{l(i.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,r)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigEvaluationsDataAdapter=void 0;const o=n("2c5ad0f51a2b0c9a0251"),a=n("24e47eaba56b75eb5e31");class s extends o.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(e,t,n){super.attach(e,t,n),null!==n&&n instanceof a.default?this._network=n:this._network=new a.default(null!==t&&void 0!==t?t:{})}getDataAsync(e,t,n){return this._getDataAsyncImpl(e,(0,o._normalizeUser)(t,this._options),n)}prefetchData(e,t){return this._prefetchDataImpl(e,t)}setData(e){const t=(0,o._typedJsonParse)(e,"has_updates","data");t&&"user"in t?super.setData(e,t.user):o.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(e,t){super.setData(e,t)}_fetchFromNetwork(e,t,n,o){return i(this,void 0,void 0,(function*(){var i;const a=yield null===(i=this._network)||void 0===i?void 0:i.fetchEvaluations(this._getSdkKey(),e,null===n||void 0===n?void 0:n.priority,t,o);return null!==a&&void 0!==a?a:null}))}_getCacheKey(e){var t;const n=(0,o._getStorageKey)(this._getSdkKey(),e,null===(t=this._options)||void 0===t?void 0:t.customUserCacheKeyFunc);return"".concat(o.DataAdapterCachePrefix,".").concat(this._cacheSuffix,".").concat(n)}_isCachedResultValidFor204(e,t){return null!=e.fullUserHash&&e.fullUserHash===(0,o._getFullUserHash)(t)}}t.StatsigEvaluationsDataAdapter=s},"695c73b2c1ea5b80e058":(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.V1InitializeContainer=void 0;const i=n("2c5ad0f51a2b0c9a0251");t.V1InitializeContainer=class{constructor(e){this._values=e}getGate(e){return this._getResultFromLookup(this._values.feature_gates,e)}getConfig(e){return this._getResultFromLookup(this._values.dynamic_configs,e)}getLayer(e){return this._getResultFromLookup(this._values.layer_configs,e)}getParamStore(e){return this._getResultFromLookup(this._values.param_stores,e)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(e,t){var n,o;return e&&null!==(o=null!==(n=e[t])&&void 0!==n?n:e[(0,i._DJB2)(t)])&&void 0!==o?o:null}}}
1,"9d01c18f053d9eff57d5":(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.V2InitializeContainer=void 0;const i=n("2c5ad0f51a2b0c9a0251");t.V2InitializeContainer=class{constructor(e){this._values=e}getGate(e){var t,n,i;const o=this._getResultFromLookup(this._values.feature_gates,e);return o?{name:e,value:!0===o.v,rule_id:null!==(t=o.r)&&void 0!==t?t:"default",secondary_exposures:null!==(n=o.s)&&void 0!==n?n:[],id_type:null!==(i=o.i)&&void 0!==i?i:""}:null}getConfig(e){var t,n,i,o;const a=this._getResultFromLookup(this._values.dynamic_configs,e);return a?{name:e,value:null!==(t=this._values.values[a.v])&&void 0!==t?t:{},rule_id:a.r,secondary_exposures:null!==(n=a.s)&&void 0!==n?n:[],id_type:null!==(i=a.i)&&void 0!==i?i:"",is_user_in_experiment:!0===a.ue,passed:!0===a.p,group_name:null!==(o=a.gn)&&void 0!==o?o:void 0,is_experiment_active:!0===a.ea,group:a.r,is_device_based:"stableID"===a.i}:null}getLayer(e){var t,n,i,o,a,s;const r=this._getResultFromLookup(this._values.layer_configs,e);return r?{name:e,value:null!==(t=this._values.values[r.v])&&void 0!==t?t:{},rule_id:r.r,secondary_exposures:null!==(n=r.s)&&void 0!==n?n:[],is_user_in_experiment:!0===r.ue,group_name:null!==(i=r.gn)&&void 0!==i?i:void 0,is_experiment_active:!0===r.ea,group:r.r,is_device_based:"stableID"===r.i,allocated_experiment_name:null!==(o=r.ae)&&void 0!==o?o:"",explicit_parameters:null!==(a=r.ep)&&void 0!==a?a:[],undelegated_secondary_exposures:null!==(s=r.us)&&void 0!==s?s:[],parameter_rule_ids:r.pr}:null}getParamStore(e){return this._getResultFromLookup(this._values.param_stores,e)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(e,t){var n,o;return e&&null!==(o=null!==(n=e[t])&&void 0!==n?n:e[(0,i._DJB2)(t)])&&void 0!==o?o:null}}},"6d50b6e8e29ff6ad9a0e":function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigClient=void 0;const a=n("2c5ad0f51a2b0c9a0251"),s=n("2dad8713de4e78bd5716");t.StatsigClient=s.default,o(n("2c5ad0f51a2b0c9a0251"),t);const r=Object.assign((0,a._getStatsigGlobal)(),{StatsigClient:s.default});t.default=r},"9dffe036c15b295bcba5":(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isNoopClient=t.NoopEvaluationsClient=void 0;const i=n("2c5ad0f51a2b0c9a0251"),o={success:!1,error:Error("NoClient"),duration:0,source:"Uninitialized",sourceUrl:null},a=()=>{},s=()=>o,r=()=>Promise.resolve(),l=()=>Promise.resolve(o),c={reason:"Error:NoClient"},d=e=>function(){const t="string"===typeof(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:arguments.length<=1?void 0:arguments[1];switch(e){case"gate":return(0,i._makeFeatureGate)(t,c,null);case"config":return(0,i._makeDynamicConfig)(t,c,null);case"layer":return(0,i._makeLayer)(t,c,null);case"param_store":return{name:t}}},u={attach:a,getDataSync:()=>null,getDataAsync:()=>Promise.resolve(null),setData:a,setDataLegacy:a,prefetchData:r},g={sdkKey:"",options:{},values:null,user:{userID:""},errorBoundary:{},session:{data:{sessionID:"",startTime:0,lastUpdate:0},sdkKey:""},stableID:"",storageProvider:i.Storage,sdkInstanceID:""},f={isNoop:!0,loadingStatus:"Uninitialized",initializeSync:s,initializeAsync:l,shutdown:r,flush:r,updateRuntimeOptions:a,updateUserSync:s,updateUserAsync:l,getContext:()=>Object.assign({},g),checkGate:()=>!1,getFeatureGate:d("gate"),getDynamicConfig:d("config"),getExperiment:d("config"),getLayer:d("layer"),getParameterStore:d("param_store"),logEvent:a,on:a,off:a,$on:a,$emt:a,dataAdapter:u};t.NoopEvaluationsClient=f,t.isNoopClient=function(e){return"isNoop"in e}},"8585acdeb8441e0b90ac":(e,t,n)=>
1{Object.defineProperty(t,"__esModule",{value:!0});const i=n("862166c04d824c806c27"),o=n("9dffe036c15b295bcba5");t.default=(0,i.createContext)({renderVersion:0,client:o.NoopEvaluationsClient,isLoading:!0})},"031f79ba9df8d1ba20c7":(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigProvider=void 0;const i=n("c7675f90f72c1e59e17e"),o=n("862166c04d824c806c27"),a=n("2c5ad0f51a2b0c9a0251"),s=n("8585acdeb8441e0b90ac"),r=n("b46f4f54fd6a074ad97b");function l(e){const[t,n]=(0,o.useState)(0),a=(0,r.useClientAsyncInit)(e.sdkKey,e.user,e.options).client,[l,c]=(0,o.useState)(!u(a));d(a,n,c);const g=(0,o.useMemo)((()=>({renderVersion:t,client:a,isLoading:l})),[t,a,l]);return(0,i.jsx)(s.default.Provider,{value:g,children:null!=e.loadingComponent&&g.isLoading?e.loadingComponent:e.children})}function c(e){const[t,n]=(0,o.useState)(0),a=e.client,[r,l]=(0,o.useState)(!u(a));d(a,n,l);const c=(0,o.useMemo)((()=>({renderVersion:t,client:a,isLoading:r})),[t,a,r]);return(0,i.jsx)(s.default.Provider,{value:c,children:null!=e.loadingComponent&&c.isLoading?e.loadingComponent:e.children})}function d(e,t,n){(0,o.useEffect)((()=>{const i=()=>{t((e=>e+1)),n(!u(e))};return a.SDKType._setBindingType("react"),e.$on("values_updated",i),()=>{e.flush().catch((e=>a.Log.error("An error occurred during flush",e))),e.off("values_updated",i)}}),[e,t])}function u(e){return"isNoop"in e||"Ready"===e.loadingStatus}t.StatsigProvider=function(e){return"client"in e?(("sdkKey"in e||"user"in e)&&a.Log.warn("Both client and configuration props (sdkKey, user) were provided to StatsigProvider. The client prop will be used and the configuration props will be ignored."),(0,i.jsx)(c,Object.assign({},e))):(0,i.jsx)(l,Object.assign({},e))}},b2214e7a4741de9aa9a7:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.useStatsigUser=t.useStatsigInternalClientFactoryBootstrap=t.useStatsigInternalClientFactoryAsync=t.useStatsigClient=t.useParameterStore=t.useLayer=t.useGateValue=t.useFeatureGate=t.useExperiment=t.useDynamicConfig=t.useClientBootstrapInit=t.useClientAsyncInit=t.StatsigProvider=t.StatsigContext=void 0;const a=n("2c5ad0f51a2b0c9a0251"),s=n("8585acdeb8441e0b90ac");t.StatsigContext=s.default;const r=n("031f79ba9df8d1ba20c7");Object.defineProperty(t,"StatsigProvider",{enumerable:!0,get:function(){return r.StatsigProvider}});const l=n("b46f4f54fd6a074ad97b");Object.defineProperty(t,"useClientAsyncInit",{enumerable:!0,get:function(){return l.useClientAsyncInit}});const c=n("b3602067b6d9910c593a");Object.defineProperty(t,"useClientBootstrapInit",{enumerable:!0,get:function(){return c.useClientBootstrapInit}});const d=n("d5d9e574847fba493f70");t.useDynamicConfig=d.default;const u=n("23c3455ae6b4be73155c");t.useExperiment=u.default;const g=n("75296236c46e4cb04b5e");t.useFeatureGate=g.default;const f=n("b3f0b26bf900750f21ca");t.useGateValue=f.default;const _=n("76d7148f17d051df2970");t.useLayer=_.default;const v=n("04ea92254b116a53a417");t.useParameterStore=v.default;const h=n("e42c4689a92a7536418a");Object.defineProperty(t,"useStatsigClient",{enumerable:!0,get:function(){return h.useStatsigClient}});const b=n("a783a664857cbcf5303d");Object.defineProperty(t,"useStatsigInternalClientFactoryAsync",{enumerable:!0,get:function(){return b.useStatsigInternalClientFactoryAsync}});const p=n("5651fd644b5792253538");Object.defineProperty(t,"useStatsigInternalClientFactoryBootstrap",{enumerable:!0,get:function(){return p.useStatsigInternalClientFactoryBootstrap}});const y=n("aa5b4260a6e1d6e7ef6f");Object.defineProperty(t,"useStatsigUser",{enumerable:!0,get:function(){return y.useStatsigUser}}),o(n("6d50b6e8e29ff6ad9a0e"),t),Object.assign((0,a._getStatsigGlobal)(),{StatsigContext:s.default,StatsigProvider:r.StatsigProvider,useClientAsyncInit:l.useClientAsyncInit,useClientBootstrapInit:c.useClientBootstrapInit,useDynamicConfig:d.default,useExperiment:u.default,useFeatureGate:g.default,useGateValue:f.default,useLayer:_.default,useParameterStore:v.default,useStatsigClient:h.useStatsigClient,useStatsigInternalClientFactoryAsync:b.useStatsigInternalClientFactoryAsync,useStatsigInternalClientFactoryBootstrap:p.useStatsigInternalClientFactoryBootstrap,useStatsigUser:y.useStatsigUser})}
1,b46f4f54fd6a074ad97b:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useClientAsyncInit=void 0;const i=n("6d50b6e8e29ff6ad9a0e"),o=n("a783a664857cbcf5303d");t.useClientAsyncInit=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return(0,o.useStatsigInternalClientFactoryAsync)((e=>new i.StatsigClient(e.sdkKey,e.initialUser,e.statsigOptions)),{sdkKey:e,initialUser:t,statsigOptions:n})}},b3602067b6d9910c593a:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useClientBootstrapInit=void 0;const i=n("6d50b6e8e29ff6ad9a0e"),o=n("5651fd644b5792253538");t.useClientBootstrapInit=function(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=arguments.length>4?arguments[4]:void 0;return(0,o.useStatsigInternalClientFactoryBootstrap)((e=>new i.StatsigClient(e.sdkKey,e.initialUser,e.statsigOptions)),{sdkKey:e,initialUser:t,initialValues:n,statsigOptions:a,useLegacyFormat:s})}},d5d9e574847fba493f70:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const i=n("862166c04d824c806c27"),o=n("2c5ad0f51a2b0c9a0251"),a=n("9dffe036c15b295bcba5"),s=n("8585acdeb8441e0b90ac");t.default=function(e,t){const{client:n,renderVersion:r}=(0,i.useContext)(s.default);return(0,i.useMemo)((()=>(0,a.isNoopClient)(n)?(o.Log.warn("useDynamicConfig hook failed to find a valid StatsigClient for dynamic config '".concat(e,"'.")),a.NoopEvaluationsClient.getDynamicConfig(e,t)):n.getDynamicConfig(e,t)),[e,n,r,...t?Object.values(t):[]])}},"23c3455ae6b4be73155c":(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const i=n("862166c04d824c806c27"),o=n("2c5ad0f51a2b0c9a0251"),a=n("9dffe036c15b295bcba5"),s=n("8585acdeb8441e0b90ac");t.default=function(e,t){const{client:n,renderVersion:r}=(0,i.useContext)(s.default);return(0,i.useMemo)((()=>(0,a.isNoopClient)(n)?(o.Log.warn("useExperiment hook failed to find a valid Statsig client for experiment '".concat(e,"'.")),a.NoopEvaluationsClient.getExperiment(e,t)):n.getExperiment(e,t)),[e,n,r,...t?Object.values(t):[]])}},"75296236c46e4cb04b5e":(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const i=n("862166c04d824c806c27"),o=n("2c5ad0f51a2b0c9a0251"),a=n("9dffe036c15b295bcba5"),s=n("8585acdeb8441e0b90ac");t.default=function(e,t){const{client:n,renderVersion:r}=(0,i.useContext)(s.default);return(0,i.useMemo)((()=>(0,a.isNoopClient)(n)?(o.Log.warn("useFeatureGate hook failed to find a valid StatsigClient for gate '".concat(e,"'.")),a.NoopEvaluationsClient.getFeatureGate(e,t)):n.getFeatureGate(e,t)),[e,n,r,...t?Object.values(t):[]])}},b3f0b26bf900750f21ca:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const i=n("862166c04d824c806c27"),o=n("2c5ad0f51a2b0c9a0251"),a=n("9dffe036c15b295bcba5"),s=n("8585acdeb8441e0b90ac");t.default=function(e,t){const{client:n,renderVersion:r}=(0,i.useContext)(s.default);return(0,i.useMemo)((()=>(0,a.isNoopClient)(n)?(o.Log.warn("useGateValue hook failed to find a valid StatsigClient for gate '".concat(e,"'.")),a.NoopEvaluationsClient.checkGate(e,t)):n.checkGate(e,t)),[e,n,r,...t?Object.values(t):[]])}},"76d7148f17d051df2970":(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const i=n("862166c04d824c806c27"),o=n("2c5ad0f51a2b0c9a0251"),a=n("9dffe036c15b295bcba5"),s=n("8585acdeb8441e0b90ac");t.default=function(e,t){const{client:n,renderVersion:r}=(0,i.useContext)(s.default);return(0,i.useMemo)((()=>(0,a.isNoopClient)(n)?(o.Log.warn("useLayer hook failed to find a valid Statsig client for layer '".concat(e,"'.")),a.NoopEvaluationsClient.getLayer(e,t)):n.getLayer(e,t)),[e,n,r,...t?Object.values(t):[]])}},"04ea92254b116a53a417":(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const i=n("862166c04d824c806c27"),o=n("2c5ad0f51a2b0c9a0251"),a=n("9dffe036c15b295bcba5"),s=n("8585acdeb8441e0b90ac");t.default=function(e,t){const{client:n,renderVersion:r}=(0,i.useContext)(s.default);return(0,i.useMemo)((()=>(0,a.isNoopClient)(n)?(o.Log.warn("useParameterStore hook failed to find a valid StatsigClient for parameter store '".concat(e,"'.")),a.NoopEvaluationsClient.getParameterStore(e,t)):n.getParameterStore(e,t)),[e,n,r,...t?Object.values(t):[]])}},e42c4689a92a7536418a:(e,t,n)=>
1{Object.defineProperty(t,"__esModule",{value:!0}),t.useStatsigClient=void 0;const i=n("862166c04d824c806c27"),o=n("2c5ad0f51a2b0c9a0251"),a=n("9dffe036c15b295bcba5"),s=n("8585acdeb8441e0b90ac");t.useStatsigClient=function(){const{client:e,renderVersion:t,isLoading:n}=(0,i.useContext)(s.default),r=(0,i.useMemo)((()=>(0,a.isNoopClient)(e)?(o.Log.warn("Attempting to retrieve a StatsigClient but none was set."),a.NoopEvaluationsClient):e),[e,t]),l=[r,t],c=(0,i.useCallback)(((e,t)=>r.checkGate(e,t)),l),d=(0,i.useCallback)(((e,t)=>r.getFeatureGate(e,t)),l),u=(0,i.useCallback)(((e,t)=>r.getDynamicConfig(e,t)),l),g=(0,i.useCallback)(((e,t)=>r.getExperiment(e,t)),l),f=(0,i.useCallback)(((e,t)=>r.getLayer(e,t)),l),_=(0,i.useCallback)(((e,t)=>r.getParameterStore(e,t)),l),v=(0,i.useCallback)(((e,t,n)=>"string"===typeof e?r.logEvent(e,t,n):r.logEvent(e)),l);return(0,i.useMemo)((()=>({client:r,checkGate:c,getFeatureGate:d,getDynamicConfig:u,getExperiment:g,getLayer:f,getParameterStore:_,logEvent:v,isLoading:n})),[r,c,d,u,g,f,_,v,n])}},a783a664857cbcf5303d:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useStatsigInternalClientFactoryAsync=void 0;const i=n("862166c04d824c806c27"),o=n("2c5ad0f51a2b0c9a0251");t.useStatsigInternalClientFactoryAsync=function(e,t){const n=(0,i.useMemo)((()=>{var n;return null!==(n=(0,o._getInstance)(t.sdkKey))&&void 0!==n?n:e(t)}),[]),[a,s]=(0,i.useState)("Ready"!==n.loadingStatus);return(0,i.useMemo)((()=>{"Ready"!==n.loadingStatus&&n.initializeAsync().catch(o.Log.error).finally((()=>s(!1)))}),[]),{client:n,isLoading:a}}},"5651fd644b5792253538":(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useStatsigInternalClientFactoryBootstrap=void 0;const i=n("862166c04d824c806c27"),o=n("2c5ad0f51a2b0c9a0251");t.useStatsigInternalClientFactoryBootstrap=function(e,t){const n=(0,i.useRef)((0,o._getInstance)(t.sdkKey));return(0,i.useMemo)((()=>{if(n.current)return n.current;const i=e(t);return n.current=i,t.useLegacyFormat?i.dataAdapter.setDataLegacy(t.initialValues,t.initialUser):i.dataAdapter.setData(t.initialValues),i.initializeSync(),i}),[])}},aa5b4260a6e1d6e7ef6f:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useStatsigUser=void 0;const i=n("862166c04d824c806c27"),o=n("8585acdeb8441e0b90ac"),a=n("e42c4689a92a7536418a");function s(e){return e.getContext().user}t.useStatsigUser=function(){const{client:e}=(0,a.useStatsigClient)(),{renderVersion:t}=(0,i.useContext)(o.default);return{user:(0,i.useMemo)((()=>s(e)),[e,t]),updateUserSync:(0,i.useCallback)((t=>("function"===typeof t&&(t=t(s(e))),e.updateUserSync(t))),[e]),updateUserAsync:(0,i.useCallback)((t=>("function"===typeof t&&(t=t(s(e))),e.updateUserAsync(t))),[e])}}}}]); 2//# sourceMappingURL=vendor-statsig.9cdaca3d1e9744a7e8f1.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.