@zeniai/web-components 4.4.46-betaAK0 → 4.4.46-betaAK1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{SessionTimeoutPopup-jX4Ll_hL.cjs → SessionTimeoutPopup-CbT1ZTmx.cjs} +3 -3
- package/dist/SessionTimeoutPopup-CbT1ZTmx.cjs.map +4 -0
- package/dist/{SessionTimeoutPopup-BuDnLG3V.js → SessionTimeoutPopup-j5ZaJE5e.js} +3 -3
- package/dist/SessionTimeoutPopup-j5ZaJE5e.js.map +4 -0
- package/dist/cockpit.cjs.js +1 -1
- package/dist/cockpit.esm.js +1 -1
- package/dist/{index-Cq8CHkNO.js → index-BrplqizN.js} +2 -2
- package/dist/{index-Cq8CHkNO.js.map → index-BrplqizN.js.map} +1 -1
- package/dist/{index-pV_EtQ9Q.cjs → index-pxCLEu5F.cjs} +2 -2
- package/dist/{index-pV_EtQ9Q.cjs.map → index-pxCLEu5F.cjs.map} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/package.json +1 -1
- package/dist/SessionTimeoutPopup-BuDnLG3V.js.map +0 -4
- package/dist/SessionTimeoutPopup-jX4Ll_hL.cjs.map +0 -4
|
@@ -2125,7 +2125,7 @@
|
|
|
2125
2125
|
gap: ${({windowSize:e})=>D$53.tileGap.valuePx(e)};
|
|
2126
2126
|
align-items: stretch;
|
|
2127
2127
|
min-width: 0;
|
|
2128
|
-
`;var now_1,hasRequiredNow,_trimmedEndIndex,hasRequired_trimmedEndIndex,_baseTrim,hasRequired_baseTrim,isSymbol_1,hasRequiredIsSymbol,toNumber_1,hasRequiredToNumber,debounce_1,hasRequiredDebounce;function requireNow(){if(hasRequiredNow)return now_1;hasRequiredNow=1;var e=require_root();return now_1=function(){return e.Date.now()}}function require_trimmedEndIndex(){if(hasRequired_trimmedEndIndex)return _trimmedEndIndex;hasRequired_trimmedEndIndex=1;var e=/\s/;return _trimmedEndIndex=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}}function require_baseTrim(){if(hasRequired_baseTrim)return _baseTrim;hasRequired_baseTrim=1;var e=require_trimmedEndIndex(),t=/^\s+/;return _baseTrim=function(n){return n?n.slice(0,e(n)+1).replace(t,""):n}}function requireIsSymbol(){if(hasRequiredIsSymbol)return isSymbol_1;hasRequiredIsSymbol=1;var e=require_baseGetTag(),t=requireIsObjectLike();return isSymbol_1=function(n){return"symbol"==typeof n||t(n)&&"[object Symbol]"==e(n)}}function requireToNumber(){if(hasRequiredToNumber)return toNumber_1;hasRequiredToNumber=1;var e=require_baseTrim(),t=requireIsObject(),n=requireIsSymbol(),o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,r=/^0o[0-7]+$/i,a=parseInt;return toNumber_1=function(s){if("number"==typeof s)return s;if(n(s))return NaN;if(t(s)){var l="function"==typeof s.valueOf?s.valueOf():s;s=t(l)?l+"":l}if("string"!=typeof s)return 0===s?s:+s;s=e(s);var c=i.test(s);return c||r.test(s)?a(s.slice(2),c?2:8):o.test(s)?NaN:+s}}function requireDebounce(){if(hasRequiredDebounce)return debounce_1;hasRequiredDebounce=1;var e=requireIsObject(),t=requireNow(),n=requireToNumber(),o=Math.max,i=Math.min;return debounce_1=function(r,a,s){var l,c,d,p,u,m,h=0,g=!1,x=!1,f=!0;if("function"!=typeof r)throw new TypeError("Expected a function");function y(e){var t=l,n=c;return l=c=void 0,h=e,p=r.apply(n,t)}function S(e){var t=e-m;return void 0===m||t>=a||t<0||x&&e-h>=d}function C(){var e=t();if(S(e))return b(e);u=setTimeout(C,function(e){var t=a-(e-m);return x?i(t,d-(e-h)):t}(e))}function b(e){return u=void 0,f&&l?y(e):(l=c=void 0,p)}function $(){var e=t(),n=S(e);if(l=arguments,c=this,m=e,n){if(void 0===u)return function(e){return h=e,u=setTimeout(C,a),g?y(e):p}(m);if(x)return clearTimeout(u),u=setTimeout(C,a),y(m)}return void 0===u&&(u=setTimeout(C,a)),p}return a=n(a)||0,e(s)&&(g=!!s.leading,d=(x="maxWait"in s)?o(n(s.maxWait)||0,a):d,f="trailing"in s?!!s.trailing:f),$.cancel=function(){void 0!==u&&clearTimeout(u),h=0,l=m=c=u=void 0},$.flush=function(){return void 0===u?p:b(t())},$},debounce_1}var debounceExports=requireDebounce();const debounce=getDefaultExportFromCjs(debounceExports);var DynamicConfigNamesCockpit=(e=>(e.cardsTabCockpitUser="cards_tab_cockpit_enabled_users",e.monthEndInsightsEnablement="month_end_insights_enablement",e.expenseAutomationEnablement="expense_automation_enablement",e.monthEndPreviewEnablement="month_end_preview_enablement",e.qboConnectionPoolEnablement="qbo_connection_pool_enablement",e.aiAccountantOnboardingConfig="ai_accountant_onboarding_config",e.creditAgentEnablement="credit_agent_enablement",e.cockpitControlsConfig="cockpit_controls_config",e))(DynamicConfigNamesCockpit||{}),DynamicConfigNamesWebApp=(e=>(e.treDynamicConfig="tre_dynamic_config",e.documentAiReceiptMaxSizeLimitBytesConfig="document_ai_receipt_max_size_limit_bytes_config",e.meetingLinksConfig="meeting_links_config",e.zeniAssistConfig="zeni_assist_config",e.zeniCardsConfig="zeni_cards_config",e.zeniAccountsConfig="deposit_accounts_config",e.expressPayConfig="express_pay_config",e.accountReconGLAccountsConfig="account_recon_gl_accounts_config",e.treasuryConfig="treasury_config",e.newTagOnMenuConfig="new_tag_on_menu_config",e.sameDayAchDisablementConfig="same_day_ach_disablement_config",e.aiCfoMessageDynamicConfig="ai_cfo_message_dynamic_config",e.aiCfoDiscoveryTipsConfig="ai_cfo_discovery_tips_config",e.webappPrefetchConfig="webapp_prefetch_config",e.expenseAutomationEnablementZeniUsers="expense_automation_enablement_zeni_users",e.approvalRuleV3Config="approval_rule_v3_config",e.transactionCategorizationConfig="transaction_categorization_config",e.zeniCardsVisibilityConfig="zeni_cards_visibility_config",e.updateTransactionTypeConfig="update_transaction_type_config",e.createTransactionTransactionTypeSupportedConfig="create_transaction_transaction_type_supported_config",e.resetKycKybConfig="reset_kyc_kyb_config",e))(DynamicConfigNamesWebApp||{}),DynamicConfigNamesShared=(e=>(e.sessionAutoLogoutConfig="session_auto_logout_config",e))(DynamicConfigNamesShared||{});const DynamicConfigNames={...DynamicConfigNamesCockpit,...DynamicConfigNamesWebApp,...DynamicConfigNamesShared};var noop_1,hasRequiredNoop;function requireNoop(){if(hasRequiredNoop)return noop_1;return hasRequiredNoop=1,noop_1=function(){}}var noopExports=requireNoop();const noop$9=getDefaultExportFromCjs(noopExports);var src$2={},src$1={},$_StatsigGlobal={},Log={},hasRequiredLog$1,hasRequired$_StatsigGlobal;function requireLog$1(){return hasRequiredLog$1||(hasRequiredLog$1=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Log=e.LogLevel=void 0;function t(e){return e.unshift("[Statsig]"),e}e.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class n{static info(...o){n.level>=e.LogLevel.Info&&console.info(" INFO ",...t(o))}static debug(...o){n.level>=e.LogLevel.Debug&&console.debug(" DEBUG ",...t(o))}static warn(...o){n.level>=e.LogLevel.Warn&&console.warn(" WARN ",...t(o))}static error(...o){n.level>=e.LogLevel.Error&&console.error(" ERROR ",...t(o))}}e.Log=n,n.level=e.LogLevel.Warn}(Log)),Log}function require$_StatsigGlobal(){return hasRequired$_StatsigGlobal||(hasRequired$_StatsigGlobal=1,function(e){var t,n,o;Object.defineProperty(e,"__esModule",{value:!0}),e._getInstance=e._getStatsigGlobalFlag=e._getStatsigGlobal=void 0;const i=requireLog$1();e._getStatsigGlobal=()=>{try{return"undefined"!=typeof __STATSIG__?__STATSIG__:c}catch(e){return c}};e._getStatsigGlobalFlag=t=>(0,e._getStatsigGlobal)()[t];e._getInstance=t=>{const n=(0,e._getStatsigGlobal)();return t?n.instances&&n.instances[t]:(n.instances&&Object.keys(n.instances).length>1&&i.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__",a="undefined"!=typeof window?window:{},s=void 0!==commonjsGlobal$1?commonjsGlobal$1:{},l="undefined"!=typeof globalThis?globalThis:{},c=null!==(o=null!==(n=null!==(t=a[r])&&void 0!==t?t:s[r])&&void 0!==n?n:l[r])&&void 0!==o?o:{instance:e._getInstance};a[r]=c,s[r]=c,l[r]=c}($_StatsigGlobal)),$_StatsigGlobal}var Diagnostics={},hasRequiredDiagnostics;function requireDiagnostics(){return hasRequiredDiagnostics||(hasRequiredDiagnostics=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Diagnostics=void 0;const t=new Map,n="start",o="end",i="statsig::diagnostics";function r(e,t,n,o){return Object.assign({key:n,action:t,step:o,timestamp:Date.now()},e)}function a(e,n){var o;const i=null!==(o=t.get(e))&&void 0!==o?o:[];i.push(n),t.set(e,i)}function s(e,t){if(t in e)return e[t]}e.Diagnostics={_getMarkers:e=>t.get(e),_markInitOverallStart:e=>{a(e,r({},n,"overall"))},_markInitOverallEnd:(e,t,n)=>{a(e,r({success:t,error:t?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:n},o,"overall"))},_markInitNetworkReqStart:(e,t)=>{a(e,r(t,n,"initialize","network_request"))},_markInitNetworkReqEnd:(e,t)=>{a(e,r(t,o,"initialize","network_request"))},_markInitProcessStart:e=>{a(e,r({},n,"initialize","process"))},_markInitProcessEnd:(e,t)=>{a(e,r(t,o,"initialize","process"))},_clearMarkers:e=>{t.delete(e)},_formatError(e){if(e&&"object"==typeof e)return{code:s(e,"code"),name:s(e,"name"),message:s(e,"message")}},_getDiagnosticsData(t,n,o,i){var r;return{success:!0===(null==t?void 0:t.ok),statusCode:null==t?void 0:t.status,sdkRegion:null===(r=null==t?void 0:t.headers)||void 0===r?void 0:r.get("x-statsig-region"),isDelta:!0===o.includes('"is_delta":true')||void 0,attempt:n,error:e.Diagnostics._formatError(i)}},_enqueueDiagnosticsEvent(t,n,o,r){const a=e.Diagnostics._getMarkers(o);if(null==a||a.length<=0)return-1;const s=a[a.length-1].timestamp-a[0].timestamp;e.Diagnostics._clearMarkers(o);const l=function(e,t){const n={eventName:i,user:e,value:null,metadata:t,time:Date.now()};return n}(t,{context:"initialize",markers:a.slice(),statsigOptions:r});return n.enqueue(l),s}}}(Diagnostics)),Diagnostics}var EventLogger={},BatchedEventsQueue={},EventBatch={},hasRequiredEventBatch;function requireEventBatch(){if(hasRequiredEventBatch)return EventBatch;hasRequiredEventBatch=1,Object.defineProperty(EventBatch,"__esModule",{value:!0}),EventBatch.EventBatch=void 0;return EventBatch.EventBatch=class{constructor(e){this.attempts=0,this.createdAt=Date.now(),this.events=e}incrementAttempts(){this.attempts++}},EventBatch}var EventRetryConstants={},hasRequiredEventRetryConstants,hasRequiredBatchedEventsQueue;function requireEventRetryConstants(){return hasRequiredEventRetryConstants||(hasRequiredEventRetryConstants=1,Object.defineProperty(EventRetryConstants,"__esModule",{value:!0}),EventRetryConstants.EventRetryConstants=void 0,EventRetryConstants.EventRetryConstants={MAX_RETRY_ATTEMPTS:8,DEFAULT_BATCH_SIZE:100,MAX_PENDING_BATCHES:40,TICK_INTERVAL_MS:1e3,QUICK_FLUSH_WINDOW_MS:200,MAX_LOCAL_STORAGE:500,get MAX_QUEUED_EVENTS(){return this.DEFAULT_BATCH_SIZE*this.MAX_PENDING_BATCHES}}),EventRetryConstants}function requireBatchedEventsQueue(){if(hasRequiredBatchedEventsQueue)return BatchedEventsQueue;hasRequiredBatchedEventsQueue=1,Object.defineProperty(BatchedEventsQueue,"__esModule",{value:!0}),BatchedEventsQueue.BatchQueue=void 0;const e=requireEventBatch(),t=requireEventRetryConstants();return BatchedEventsQueue.BatchQueue=class{constructor(e=t.EventRetryConstants.DEFAULT_BATCH_SIZE){this._batches=[],this._batchSize=e}batchSize(){return this._batchSize}requeueBatch(e){return this._enqueueBatch(e)}hasFullBatch(){return this._batches.some(e=>e.events.length>=this._batchSize)}takeNextBatch(){return this._batches.shift()}takeAllBatches(){const e=this._batches;return this._batches=[],e}createBatches(t){let n=0,o=0;for(;n<t.length;){const i=t.slice(n,n+this._batchSize);o+=this._enqueueBatch(new e.EventBatch(i)),n+=this._batchSize}return o}_enqueueBatch(e){this._batches.push(e);let n=0;for(;this._batches.length>t.EventRetryConstants.MAX_PENDING_BATCHES;){const e=this._batches.shift();e&&(n+=e.events.length)}return n}},BatchedEventsQueue}var CacheKey={},Hashing={},TypingUtils={},hasRequiredTypingUtils,hasRequiredHashing,hasRequiredCacheKey;function requireTypingUtils(){if(hasRequiredTypingUtils)return TypingUtils;return hasRequiredTypingUtils=1,Object.defineProperty(TypingUtils,"__esModule",{value:!0}),TypingUtils._isTypeMatch=TypingUtils._typeOf=void 0,TypingUtils._typeOf=function(e){return Array.isArray(e)?"array":typeof e},TypingUtils._isTypeMatch=function(e,t){const n=e=>Array.isArray(e)?"array":null===e?"null":typeof e;return n(e)===n(t)},TypingUtils}function requireHashing(){return hasRequiredHashing||(hasRequiredHashing=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._getSortedObject=e._DJB2Object=e._DJB2=void 0;const t=requireTypingUtils();e._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)};e._DJB2Object=(t,n)=>(0,e._DJB2)(JSON.stringify((0,e._getSortedObject)(t,n)));e._getSortedObject=(n,o)=>{if(null==n)return null;const i=Object.keys(n).sort(),r={};return i.forEach(i=>{const a=n[i];0!==o&&"object"===(0,t._typeOf)(a)?r[i]=(0,e._getSortedObject)(a,null!=o?o-1:o):r[i]=a}),r}}(Hashing)),Hashing}function requireCacheKey(){if(hasRequiredCacheKey)return CacheKey;hasRequiredCacheKey=1,Object.defineProperty(CacheKey,"__esModule",{value:!0}),CacheKey._getStorageKey=CacheKey._getUserStorageKey=void 0;const e=requireHashing();function t(t,n,o){var i;if(o)return o(t,n);const r=n&&n.customIDs?n.customIDs:{},a=[`uid:${null!==(i=null==n?void 0:n.userID)&&void 0!==i?i:""}`,`cids:${Object.keys(r).sort((e,t)=>e.localeCompare(t)).map(e=>`${e}-${r[e]}`).join(",")}`,`k:${t}`];return(0,e._DJB2)(a.join("|"))}return CacheKey._getUserStorageKey=t,CacheKey._getStorageKey=function(n,o,i){return o?t(n,o,i):(0,e._DJB2)(`k:${n}`)},CacheKey}var FlushCoordinator={},EventSender={},NetworkConfig={},hasRequiredNetworkConfig;function requireNetworkConfig(){return hasRequiredNetworkConfig||(hasRequiredNetworkConfig=1,e=NetworkConfig,Object.defineProperty(e,"__esModule",{value:!0}),e.NetworkParam=e.NetworkDefault=e.Endpoint=void 0,e.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},e.NetworkDefault={[e.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[e.Endpoint._initialize]:"https://featureassets.org/v1",[e.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},e.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}),NetworkConfig;var e}var SDKType={},hasRequiredSDKType;function requireSDKType(){if(hasRequiredSDKType)return SDKType;hasRequiredSDKType=1,Object.defineProperty(SDKType,"__esModule",{value:!0}),SDKType.SDKType=void 0;const e={};let t;return SDKType.SDKType={_get:n=>{var o;return(null!==(o=e[n])&&void 0!==o?o:"js-mono")+(null!=t?t:"")},_setClientType(t,n){e[t]=n},_setBindingType(e){t&&"-react"!==t||(t="-"+e)}},SDKType}var StatsigMetadata={},hasRequiredStatsigMetadata;function requireStatsigMetadata(){return hasRequiredStatsigMetadata||(hasRequiredStatsigMetadata=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigMetadataProvider=e.SDK_VERSION=void 0,e.SDK_VERSION="3.33.0";let t={sdkVersion:e.SDK_VERSION,sdkType:"js-mono"};e.StatsigMetadataProvider={get:()=>t,add:e=>{t=Object.assign(Object.assign({},t),e)}}}(StatsigMetadata)),StatsigMetadata}var VisibilityObserving={},SafeJs={},hasRequiredSafeJs,hasRequiredVisibilityObserving,hasRequiredEventSender;function requireSafeJs(){return hasRequiredSafeJs||(hasRequiredSafeJs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._cloneObject=e._getUnloadEvent=e._getCurrentPageUrlSafe=e._addDocumentEventListenerSafe=e._addWindowEventListenerSafe=e._isServerEnv=e._getDocumentSafe=e._getWindowSafe=void 0;const t=requireLog$1();e._getWindowSafe=()=>"undefined"!=typeof window?window:null;e._getDocumentSafe=()=>{var t;const n=(0,e._getWindowSafe)();return null!==(t=null==n?void 0:n.document)&&void 0!==t?t:null};e._isServerEnv=()=>{if(null!==(0,e._getDocumentSafe)())return!1;const t="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node;return"string"==typeof EdgeRuntime||t};e._addWindowEventListenerSafe=(t,n)=>{const o=(0,e._getWindowSafe)();"function"==typeof(null==o?void 0:o.addEventListener)&&o.addEventListener(t,n)};e._addDocumentEventListenerSafe=(t,n)=>{const o=(0,e._getDocumentSafe)();"function"==typeof(null==o?void 0:o.addEventListener)&&o.addEventListener(t,n)};e._getCurrentPageUrlSafe=()=>{var t;try{return null===(t=(0,e._getWindowSafe)())||void 0===t?void 0:t.location.href.split(/[?#]/)[0]}catch(n){return}};e._getUnloadEvent=()=>{const t=(0,e._getWindowSafe)();if(!t)return"beforeunload";return"onpagehide"in t?"pagehide":"beforeunload"};e._cloneObject=(e,n)=>{try{return JSON.parse(JSON.stringify(n))}catch(o){return t.Log.error(`Failed to clone object ${e}`),null}}}(SafeJs)),SafeJs}function requireVisibilityObserving(){return hasRequiredVisibilityObserving||(hasRequiredVisibilityObserving=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._notifyVisibilityChanged=e._subscribeToVisiblityChanged=e._isUnloading=e._isCurrentlyVisible=void 0;const t=requireSafeJs(),n="foreground",o="background",i=[];let r=n,a=!1;e._isCurrentlyVisible=()=>r===n;e._isUnloading=()=>a;e._subscribeToVisiblityChanged=e=>{i.unshift(e)};e._notifyVisibilityChanged=e=>{e!==r&&(r=e,i.forEach(t=>t(e)))},(0,t._addWindowEventListenerSafe)("focus",()=>{a=!1,(0,e._notifyVisibilityChanged)(n)}),(0,t._addWindowEventListenerSafe)("blur",()=>(0,e._notifyVisibilityChanged)(o)),(0,t._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,e._notifyVisibilityChanged)("visible"===document.visibilityState?n:o)}),(0,t._addWindowEventListenerSafe)((0,t._getUnloadEvent)(),()=>{a=!0,(0,e._notifyVisibilityChanged)(o)})}(VisibilityObserving)),VisibilityObserving}function requireEventSender(){if(hasRequiredEventSender)return EventSender;hasRequiredEventSender=1;var e=EventSender&&EventSender.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(EventSender,"__esModule",{value:!0}),EventSender.EventSender=void 0;const t=requireLog$1(),n=requireNetworkConfig(),o=requireSDKType(),i=requireStatsigMetadata(),r=requireVisibilityObserving();return EventSender.EventSender=class{constructor(e,t,n,o,i){this._sdkKey=e,this._network=t,this._emitter=n,this._options=i,this._logEventUrlConfig=o}setLogEventCompressionMode(e){this._network.setLogEventCompressionMode(e)}sendBatch(n){return e(this,void 0,void 0,function*(){var e,o,i;let a="event_sender_unexpected_exception";const s={};try{const t=(0,r._isUnloading)()&&this._network.isBeaconSupported()&&null==(null===(o=null===(e=this._options)||void 0===e?void 0:e.networkConfig)||void 0===o?void 0:o.networkOverrideFunc);a="event_sender_pre_logs_flushed_emitter_exception",this._emitter({name:"pre_logs_flushed",events:n.events}),a=t?"event_sender_unexpected_exception":"event_sender_post_exception";const i=t?this._sendEventsViaBeacon(n,s):yield this._sendEventsViaPost(n,s);return i.success?(a="event_sender_logs_flushed_emitter_exception",this._emitter({name:"logs_flushed",events:n.events}),i):Object.assign(Object.assign(Object.assign({success:!1,statusCode:i.statusCode,failurePath:i.failurePath},i.failureErrorMessage?{failureErrorMessage:i.failureErrorMessage}:{}),i.failureDiagnosticBucket?{failureDiagnosticBucket:i.failureDiagnosticBucket}:{}),i.failureDiagnosticMetadata?{failureDiagnosticMetadata:i.failureDiagnosticMetadata}:{})}catch(l){return t.Log.warn("Failed to send batch:",l),Object.assign(Object.assign(Object.assign({success:!1,statusCode:-1,failurePath:null!==(i=s.path)&&void 0!==i?i:a},s.errorMessage?{failureErrorMessage:s.errorMessage}:{}),s.diagnosticBucket?{failureDiagnosticBucket:s.diagnosticBucket}:{}),s.diagnosticMetadata?{failureDiagnosticMetadata:s.diagnosticMetadata}:{})}})}_sendEventsViaPost(t,n){return e(this,void 0,void 0,function*(){var e,o;const i=yield this._network.post(this._getRequestData(t),n),r=null!==(e=null==i?void 0:i.code)&&void 0!==e?e:-1;return-1===r?Object.assign(Object.assign(Object.assign({success:!1,statusCode:-1,failurePath:null!==(o=n.path)&&void 0!==o?o:void 0===i?"event_sender_post_returned_undefined":"event_sender_post_returned_null"},n.errorMessage?{failureErrorMessage:n.errorMessage}:{}),n.diagnosticBucket?{failureDiagnosticBucket:n.diagnosticBucket}:{}),n.diagnosticMetadata?{failureDiagnosticMetadata:n.diagnosticMetadata}:{}):{success:r>=200&&r<300,statusCode:r}})}_sendEventsViaBeacon(e,t){var n;const o=this._network.beacon(this._getRequestData(e),t);return Object.assign(Object.assign(Object.assign({success:o,statusCode:o?200:-1,failurePath:o?void 0:null!==(n=t.path)&&void 0!==n?n:"beacon_send_false"},!o&&t.errorMessage?{failureErrorMessage:t.errorMessage}:{}),!o&&t.diagnosticBucket?{failureDiagnosticBucket:t.diagnosticBucket}:{}),!o&&t.diagnosticMetadata?{failureDiagnosticMetadata:t.diagnosticMetadata}:{})}_getRequestData(e){return{sdkKey:this._sdkKey,data:{events:e.events},urlConfig:this._logEventUrlConfig,retries:3,preserveFailedStatusCode:!0,isCompressable:!0,params:{[n.NetworkParam.EventCount]:String(e.events.length)},headers:{"statsig-event-count":String(e.events.length),"statsig-retry-count":String(e.attempts),"statsig-sdk-type":o.SDKType._get(this._sdkKey),"statsig-sdk-version":i.SDK_VERSION},credentials:"same-origin"}}},EventSender}var FlushInterval={},hasRequiredFlushInterval;function requireFlushInterval(){if(hasRequiredFlushInterval)return FlushInterval;hasRequiredFlushInterval=1,Object.defineProperty(FlushInterval,"__esModule",{value:!0}),FlushInterval.FlushInterval=void 0;const e=1e3,t=6e4;return FlushInterval.FlushInterval=class{constructor(){this._currentIntervalMs=e,this._lastFlushAttemptTime=Date.now()}getCurrentIntervalMs(){return this._currentIntervalMs}markFlushAttempt(){this._lastFlushAttemptTime=Date.now()}getTimeSinceLastAttempt(){return Date.now()-this._lastFlushAttemptTime}hasReachedMaxInterval(){return this.getTimeSinceLastAttempt()>=t}getTimeTillMaxInterval(){return t-this.getTimeSinceLastAttempt()}hasCompletelyRecoveredFromBackoff(){return this._currentIntervalMs<=e}adjustForSuccess(){const t=this._currentIntervalMs;t!==e&&(this._currentIntervalMs=Math.max(e,Math.floor(t/2)))}adjustForFailure(){const e=this._currentIntervalMs;this._currentIntervalMs=Math.min(t,2*e)}getTimeUntilNextFlush(){return this.getCurrentIntervalMs()-this.getTimeSinceLastAttempt()}},FlushInterval}var FlushTypes={},hasRequiredFlushTypes;function requireFlushTypes(){return hasRequiredFlushTypes||(hasRequiredFlushTypes=1,Object.defineProperty(FlushTypes,"__esModule",{value:!0}),FlushTypes.FlushType=void 0,(t=e||(FlushTypes.FlushType=e={})).ScheduledMaxTime="scheduled:max_time",t.ScheduledFullBatch="scheduled:full_batch",t.Limit="limit",t.Manual="manual",t.Shutdown="shutdown"),FlushTypes;var e,t}var NetworkCore={},NetworkFallbackResolver={},DnsTxtQuery={},hasRequiredDnsTxtQuery;function requireDnsTxtQuery(){if(hasRequiredDnsTxtQuery)return DnsTxtQuery;hasRequiredDnsTxtQuery=1;var e=DnsTxtQuery&&DnsTxtQuery.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(DnsTxtQuery,"__esModule",{value:!0}),DnsTxtQuery._fetchTxtRecords=void 0;const t=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]),n=["i","e","d"];return DnsTxtQuery._fetchTxtRecords=function(o){return e(this,void 0,void 0,function*(){const e=yield o("https://cloudflare-dns.com/dns-query",{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:t});if(!e.ok){const e=new Error("Failed to fetch TXT records from DNS");throw e.name="DnsTxtFetchError",e}const i=yield e.arrayBuffer();return function(e){const t=e.findIndex((t,o)=>o<200&&"="===String.fromCharCode(t)&&n.includes(String.fromCharCode(e[o-1])));if(-1===t){const e=new Error("Failed to parse TXT records from DNS");throw e.name="DnsTxtParseError",e}let o="";for(let n=t-1;n<e.length;n++)o+=String.fromCharCode(e[n]);return o.split(",")}(new Uint8Array(i))})},DnsTxtQuery}var StorageProvider={},hasRequiredStorageProvider,hasRequiredNetworkFallbackResolver;function requireStorageProvider(){return hasRequiredStorageProvider||(hasRequiredStorageProvider=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._setObjectInStorage=e._getObjectFromStorage=e.Storage=void 0;const t=requireLog$1(),n=requireSafeJs(),o={},i={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:e=>o[e]?o[e]:null,setItem:(e,t)=>{o[e]=t},removeItem:e=>{delete o[e]},getAllKeys:()=>Object.keys(o)};let r=null;try{const e=(0,n._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(c){t.Log.warn("Failed to setup localStorageProvider.")}let a=null!=r?r:i,s=a;function l(t){try{return t()}catch(c){if(c instanceof Error&&"SecurityError"===c.name)return e.Storage._setProvider(i),null;throw c}}e.Storage={isReady:()=>s.isReady(),isReadyResolver:()=>s.isReadyResolver(),getProviderName:()=>s.getProviderName(),getItem:e=>l(()=>s.getItem(e)),setItem:(e,t)=>l(()=>s.setItem(e,t)),removeItem:e=>s.removeItem(e),getAllKeys:()=>s.getAllKeys(),_setProvider:e=>{a=e,s=e},_setDisabled:e=>{s=e?i:a}},e._getObjectFromStorage=function(n){const o=e.Storage.getItem(n);try{return JSON.parse(null!=o?o:"null")}catch(i){return t.Log.error(`Failed to parse value for key "${n}"`),null}},e._setObjectInStorage=function(t,n){e.Storage.setItem(t,JSON.stringify(n))}}(StorageProvider)),StorageProvider}function requireNetworkFallbackResolver(){if(hasRequiredNetworkFallbackResolver)return NetworkFallbackResolver;hasRequiredNetworkFallbackResolver=1;var e=NetworkFallbackResolver&&NetworkFallbackResolver.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(NetworkFallbackResolver,"__esModule",{value:!0}),NetworkFallbackResolver._isDomainFailure=NetworkFallbackResolver.NetworkFallbackResolver=void 0;const t=requireDnsTxtQuery(),n=requireHashing(),o=requireLog$1(),i=requireStorageProvider(),r=6048e5;function a(e,t){var n;const o=null!==(n=null==e?void 0:e.toLowerCase())&&void 0!==n?n:"";return t||o.includes("uncaught exception")||o.includes("failed to fetch")||o.includes("networkerror when attempting to fetch resource")}function s(e){return`statsig.network_fallback.${(0,n._DJB2)(e)}`}function l(e,t){const n=s(e);t&&0!==Object.keys(t).length?i.Storage.setItem(n,JSON.stringify(t)):i.Storage.removeItem(n)}return NetworkFallbackResolver.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 o=null===(n=this._fallbackInfo)||void 0===n?void 0:n[t.endpoint];o&&(o.expiryTime=Date.now()+r,l(e,Object.assign(Object.assign({},this._fallbackInfo),{[t.endpoint]:o})))}getActiveFallbackUrl(e,t){var n,r;if(null!=t.customUrl&&null!=t.fallbackUrls)return null;let a=this._fallbackInfo;null==a&&(a=null!==(n=function(e){const t=s(e),r=i.Storage.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch(n){return o.Log.error("Failed to parse FallbackInfo"),null}}(e))&&void 0!==n?n:{},this._fallbackInfo=a);const c=a[t.endpoint];return!c||Date.now()>(null!==(r=c.expiryTime)&&void 0!==r?r:0)||t.getChecksum()!==c.urlConfigChecksum?(delete a[t.endpoint],this._fallbackInfo=a,l(e,this._fallbackInfo),null):c.url?c.url:null}tryFetchUpdatedFallbackInfo(t,n,o,i){return e(this,void 0,void 0,function*(){var e,r;try{if(!a(o,i))return!1;const r=null==n.customUrl&&null==n.fallbackUrls?yield this._tryFetchFallbackUrlsFromNetwork(n):n.fallbackUrls,s=this._pickNewFallbackUrl(null===(e=this._fallbackInfo)||void 0===e?void 0:e[n.endpoint],r);return!!s&&(this._updateFallbackInfoWithNewUrl(t,n,s),!0)}catch(s){return null===(r=this._errorBoundary)||void 0===r||r.logError("tryFetchUpdatedFallbackInfo",s),!1}})}_updateFallbackInfoWithNewUrl(e,t,n){var o,i,a;const s={urlConfigChecksum:t.getChecksum(),url:n,expiryTime:Date.now()+r,previous:[]},c=t.endpoint,d=null===(o=this._fallbackInfo)||void 0===o?void 0:o[c];d&&s.previous.push(...d.previous),s.previous.length>10&&(s.previous=[]);const p=null===(a=null===(i=this._fallbackInfo)||void 0===i?void 0:i[c])||void 0===a?void 0:a.url;null!=p&&s.previous.push(p),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[c]:s}),l(e,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(n){return e(this,void 0,void 0,function*(){var e;const o=this._dnsQueryCooldowns[n.endpoint];if(o&&Date.now()<o)return null;this._dnsQueryCooldowns[n.endpoint]=Date.now()+144e5;const i=[],r=yield(0,t._fetchTxtRecords)(null!==(e=this._networkOverrideFunc)&&void 0!==e?e:fetch),a=function(e){try{return new URL(e).pathname}catch(t){return null}}(n.defaultUrl);for(const t of r){if(!t.startsWith(n.endpointDnsKey+"="))continue;const e=t.split("=");if(e.length>1){let t=e[1];t.endsWith("/")&&(t=t.slice(0,-1)),i.push(`https://${t}${a}`)}}return i})}_pickNewFallbackUrl(e,t){var n;if(null==t)return null;const o=new Set(null!==(n=null==e?void 0:e.previous)&&void 0!==n?n:[]),i=null==e?void 0:e.url;let r=null;for(const a of t){const e=a.endsWith("/")?a.slice(0,-1):a;if(!o.has(a)&&e!==i){r=e;break}}return r}},NetworkFallbackResolver._isDomainFailure=a,NetworkFallbackResolver}var SDKFlags={},hasRequiredSDKFlags;function requireSDKFlags(){if(hasRequiredSDKFlags)return SDKFlags;hasRequiredSDKFlags=1,Object.defineProperty(SDKFlags,"__esModule",{value:!0}),SDKFlags.SDKFlags=void 0;const e={};return SDKFlags.SDKFlags={setFlags:(t,n)=>{e[t]=n},get:(t,n)=>{var o,i;return null!==(i=null===(o=e[t])||void 0===o?void 0:o[n])&&void 0!==i&&i}},SDKFlags}var SessionID={},UUID={},hasRequiredUUID,hasRequiredSessionID;function requireUUID(){if(hasRequiredUUID)return UUID;return hasRequiredUUID=1,Object.defineProperty(UUID,"__esModule",{value:!0}),UUID.getUUID=void 0,UUID.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;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(4*Math.random())]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,n=>{let o=16*Math.random();return e>0?(o=(e+o)%16|0,e=Math.floor(e/16)):(o=(t+o)%16|0,t=Math.floor(t/16)),("x"===n?o:7&o|8).toString(16)})},UUID}function requireSessionID(){return hasRequiredSessionID||(hasRequiredSessionID=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigSession=e.SessionID=void 0;const t=requireCacheKey(),n=requireLog$1(),o=requireStorageProvider(),i=requireUUID(),r=requireVisibilityObserving(),a=18e5,s=144e5,l={};function c(e){var t;const n=e.data,o=function({lastUpdate:e}){return Date.now()-e>a}(n)||function({startTime:e}){return Date.now()-e>s}(n);return o&&(e.data=u(),null===(t=null===__STATSIG__||void 0===__STATSIG__?void 0:__STATSIG__.instance(e.sdkKey))||void 0===t||t.$emt({name:"session_expired"})),o}function d(e){return`statsig.session_id.${(0,t._getStorageKey)(e)}`}function p(e){try{(0,o._setObjectInStorage)(e.storageKey,e.data),e.lastPersistedAt=Date.now()}catch(t){n.Log.warn("Failed to save SessionID")}}function u(){return{sessionID:(0,i.getUUID)(),startTime:Date.now(),lastUpdate:Date.now()}}(0,r._subscribeToVisiblityChanged)(e=>{"background"===e&&Object.values(l).forEach(e=>p(e))}),e.SessionID={get:t=>e.StatsigSession.get(t).data.sessionID},e.StatsigSession={get:(e,t=!0)=>{null==l[e]&&(l[e]=function(e){const t=d(e),n=function(e){const t=(0,o._getObjectFromStorage)(e);return t}(t);if(n&&n.sessionID&&n.startTime&&n.lastUpdate)return{data:n,sdkKey:e,lastPersistedAt:0,storageKey:t};return{data:u(),sdkKey:e,lastPersistedAt:0,storageKey:t}}(e));return function(e,t){const n=Date.now(),o=c(e);o?p(e):t&&(e.data.lastUpdate=n,function(e){const t=Date.now();t-e.lastPersistedAt>15e3&&p(e)}(e));return e}(l[e],t)},overrideInitialSessionID:(e,t)=>{const n=Date.now(),o={data:{sessionID:e,startTime:n,lastUpdate:n},sdkKey:t,lastPersistedAt:Date.now(),storageKey:d(t)};p(o),l[t]=o},checkForIdleSession:e=>{const t=l[e];if(!t)return;c(t)&&p(t)}}}(SessionID)),SessionID}var StableID={},hasRequiredStableID;function requireStableID(){if(hasRequiredStableID)return StableID;hasRequiredStableID=1,Object.defineProperty(StableID,"__esModule",{value:!0}),StableID.getCookieName=StableID.StableID=void 0;const e=requireCacheKey(),t=requireLog$1(),n=requireSafeJs(),o=requireStorageProvider(),i=requireUUID(),r={},a={},s={};function l(t){return`statsig.stable_id.${(0,e._getStorageKey)(t)}`}function c(e,n){const i=l(n);try{(0,o._setObjectInStorage)(i,e)}catch(r){t.Log.warn("Failed to save StableID to storage")}}function d(e,t){if(!a[t]||null==(0,n._getDocumentSafe)())return;const o=new Date;o.setFullYear(o.getFullYear()+1),document.cookie=`${p(t)}=${encodeURIComponent(e)}; expires=${o.toUTCString()}; path=/`}function p(t){return`statsig.stable_id.${(0,e._getStorageKey)(t)}`}return StableID.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:e=>{if(s[e])return null;if(null!=r[e])return r[e];let t=null;return t=function(e){if(!a[e]||null==(0,n._getDocumentSafe)())return null;const t=document.cookie.split(";");for(const n of t){const[t,o]=n.trim().split("=");if(t===p(e))return decodeURIComponent(o)}return null}(e),null!=t?(r[e]=t,c(t,e),t):(t=function(e){const t=l(e);return(0,o._getObjectFromStorage)(t)}(e),null==t&&(t=(0,i.getUUID)()),c(t,e),d(t,e),r[e]=t,t)},setOverride:(e,t)=>{r[t]=e,c(e,t),d(e,t)},_setCookiesEnabled:(e,t)=>{a[e]=t},_setDisabled:(e,t)=>{s[e]=t}},StableID.getCookieName=p,StableID}var StatsigClientEventEmitter={},hasRequiredStatsigClientEventEmitter;function requireStatsigClientEventEmitter(){return hasRequiredStatsigClientEventEmitter||(hasRequiredStatsigClientEventEmitter=1,Object.defineProperty(StatsigClientEventEmitter,"__esModule",{value:!0}),StatsigClientEventEmitter.ErrorTag=void 0,StatsigClientEventEmitter.ErrorTag={NetworkError:"NetworkError"}),StatsigClientEventEmitter}var StatsigOptionsCommon={},hasRequiredStatsigOptionsCommon,hasRequiredNetworkCore,hasRequiredFlushCoordinator;function requireStatsigOptionsCommon(){return hasRequiredStatsigOptionsCommon||(hasRequiredStatsigOptionsCommon=1,Object.defineProperty(StatsigOptionsCommon,"__esModule",{value:!0}),StatsigOptionsCommon.LoggingEnabledOption=StatsigOptionsCommon.LogEventCompressionMode=void 0,StatsigOptionsCommon.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},StatsigOptionsCommon.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}),StatsigOptionsCommon}function requireNetworkCore(){return hasRequiredNetworkCore||(hasRequiredNetworkCore=1,function(e){var t=NetworkCore&&NetworkCore.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.NetworkCore=e.RETRYABLE_CODES=void 0,require$_StatsigGlobal();const n=require$_StatsigGlobal(),o=requireDiagnostics(),i=requireLog$1(),r=requireNetworkConfig(),a=requireNetworkFallbackResolver(),s=requireSDKFlags(),l=requireSDKType(),c=requireSafeJs(),d=requireSessionID(),p=requireStableID(),u=requireStatsigClientEventEmitter(),m=requireStatsigMetadata(),h=requireStatsigOptionsCommon(),g=requireVisibilityObserving();e.RETRYABLE_CODES=new Set([408,500,502,503,504,522,524,599]);e.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 a.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}getLastUsedInitUrlAndReset(){const e=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,e}beacon(e,t){if(!x(e))return t&&(t.path="beacon_invalid_sdk_key"),!1;const n=this._getInternalRequestArgs("POST",e),o=this._getPopulatedURL(n),i=navigator;try{const e=i.sendBeacon.bind(i)(o,n.body);return e||t&&(t.path="beacon_send_false"),e}catch(r){throw t&&(t.path="beacon_send_exception"),r}}post(e,n){return t(this,void 0,void 0,function*(){const t=this._getInternalRequestArgs("POST",e);return this._tryEncodeBody(t),yield this._tryToCompressBody(t),this._sendRequest(t,n)})}get(e){const t=this._getInternalRequestArgs("GET",e);return this._sendRequest(t)}_sendRequest(n,a){return t(this,void 0,void 0,function*(){var s,l,d,p;if(!x(n))return a&&(a.path="network_invalid_sdk_key"),null;if(this._netConfig.preventAllNetworkTraffic)return a&&(a.path="network_prevent_all_network_traffic"),null;const{method:m,body:h,retries:f,attempt:C}=n,b=n.urlConfig.endpoint;if(this._isRateLimited(b))return i.Log.warn(`Request to ${b} was blocked because you are making requests too frequently.`),a&&(a.path="network_rate_limited"),null;const $=null!=C?C:1;let v=!1;const E=this._getPopulatedURL(n),A=Date.now();let w=null;const R=(0,g._isUnloading)();try{const e={method:m,body:h,headers:Object.assign({},n.headers),priority:n.priority,keepalive:R};!function(e,t){if(e.urlConfig.endpoint!==r.Endpoint._initialize)return;o.Diagnostics._markInitNetworkReqStart(e.sdkKey,{attempt:t})}(n,$);const t=this._leakyBucket[b];t&&(t.lastRequestTime=Date.now(),this._leakyBucket[b]=t);const i=null!==(s=this._netConfig.networkOverrideFunc)&&void 0!==s?s:fetch;let a;if(w=yield Promise.race([i(E,e).finally(()=>clearTimeout(a)),new Promise((e,t)=>{a=setTimeout(()=>{v=!0,t(new Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})]),!w.ok){const e=yield w.text().catch(()=>"No Text"),t=new Error(`NetworkError: ${E} ${e}`);throw t.name="NetworkError",t}const l=yield w.text();return S(n,w,$,l),this._fallbackResolver.tryBumpExpiryTime(n.sdkKey,n.urlConfig),{body:l,code:w.status}}catch(T){const o=function(e){if("string"==typeof e)return e;if(e instanceof Error)return`${e.name}: ${e.message}`;return"Unknown Error"}(T),r=(j=v,(null!=o?o:"").includes("Timeout")||j);S(n,w,$,"",T);if((yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(n.sdkKey,n.urlConfig,o,r))&&(n.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(n.sdkKey,n.urlConfig)),!f||$>f||!e.RETRYABLE_CODES.has(null!==(l=null==w?void 0:w.status)&&void 0!==l?l:500)){null===(d=this._emitter)||void 0===d||d.call(this,{name:"error",error:T,tag:u.ErrorTag.NetworkError,requestArgs:n});const e=`A networking error occurred during ${m} request to ${E}.`;if(i.Log.error(e,o,T),null===(p=this._errorBoundary)||void 0===p||p.attachErrorIfNoneExists(e),n.preserveFailedStatusCode&&null!=w)return{body:null,code:w.status};if(null==w&&a){a.path=r?"network_request_timed_out_no_response":"network_request_exception_no_response",o&&(a.errorMessage=o);try{const e=function(e,t,n,o){var i,r,a;const s=(0,c._getWindowSafe)(),l=null==s?void 0:s.document,d="undefined"!=typeof navigator?navigator:null,p=(0,g._isUnloading)(),u=d&&"boolean"==typeof d.onLine?String(d.onLine):"unknown",m=null!==(i=null==l?void 0:l.visibilityState)&&void 0!==i?i:"unknown",h=Object.keys(null!==(r=e.headers)&&void 0!==r?r:{}).length>0,x=function(e,t){if(!t)return!0;return!e.startsWith(`${t}/`)&&!e.startsWith(`${t}?`)&&e!==t}(t,null===(a=null==s?void 0:s.location)||void 0===a?void 0:a.origin),f=null!=e.urlConfig.customUrl,S=null!=e.fallbackUrl,C=y(o,[250,1e3,5e3,1e4]),b=y(function(e){if(null==e)return 0;if("string"==typeof e)return e.length;if(e instanceof Uint8Array)return e.byteLength;if("undefined"!=typeof Blob&&e instanceof Blob)return e.size;return-1}(e.body),[16384,65536,262144,1048576]);let $="unknown_no_response";n?$="timeout":"false"===u?$="browser_offline":p?$="page_unloading":"hidden"===m?$="page_hidden":x&&h?$="cross_origin_custom_headers_preflight_risk":f||S?$="custom_url_no_response":o<250&&($="immediate_network_rejection");return{bucket:$,metadata:{elapsedMsBucket:C,bodySizeBucket:b,online:u,visibilityState:m,isUnloading:String(p),crossOrigin:String(x),hasCustomUrl:String(f)}}}(n,E,r,Date.now()-A);a.diagnosticBucket=e.bucket,a.diagnosticMetadata=e.metadata}catch(I){}}return null}return yield function(e){return t(this,void 0,void 0,function*(){yield new Promise(t=>setTimeout(t,Math.min(e*e*500,3e4)))})}($),this._sendRequest(Object.assign(Object.assign({},n),{retries:f,attempt:$+1}),a)}var j})}_getLogEventCompressionMode(e){let t=null==e?void 0:e.logEventCompressionMode;return t||!0!==(null==e?void 0:e.disableCompression)||(t=h.LogEventCompressionMode.Disabled),t||(t=h.LogEventCompressionMode.Enabled),t}_isRateLimited(e){var t;const n=Date.now(),o=null!==(t=this._leakyBucket[e])&&void 0!==t?t:{count:0,lastRequestTime:n},i=n-o.lastRequestTime,r=Math.floor(.05*i);return o.count=Math.max(0,o.count-r),o.count>=50||(o.count+=1,o.lastRequestTime=n,this._leakyBucket[e]=o,!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 o=Object.assign({[r.NetworkParam.SdkKey]:e.sdkKey,[r.NetworkParam.SdkType]:l.SDKType._get(e.sdkKey),[r.NetworkParam.SdkVersion]:m.SDK_VERSION,[r.NetworkParam.Time]:String(Date.now()),[r.NetworkParam.SessionID]:d.SessionID.get(e.sdkKey)},e.params),i=Object.keys(o).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(o[e])}`).join("&");return`${n}${i?`?${i}`:""}`}_tryEncodeBody(e){var t;const o=(0,c._getWindowSafe)(),a=e.body;if(e.isStatsigEncodable&&!this._options.disableStatsigEncoding&&"string"==typeof a&&null==(0,n._getStatsigGlobalFlag)("no-encode")&&(null==o?void 0:o.btoa))try{e.body=o.btoa(a).split("").reverse().join(""),e.params=Object.assign(Object.assign({},null!==(t=e.params)&&void 0!==t?t:{}),{[r.NetworkParam.StatsigEncoded]:"1"})}catch(s){i.Log.warn(`Request encoding failed for ${e.urlConfig.getUrl()}`,s)}}_tryToCompressBody(e){return t(this,void 0,void 0,function*(){var t;const o=e.body;if("string"==typeof o&&function(e,t){if(!e.isCompressable)return!1;if(null!=(0,n._getStatsigGlobalFlag)("no-compress")||"undefined"==typeof CompressionStream||"undefined"==typeof TextEncoder)return!1;const o=null!=e.urlConfig.customUrl||null!=e.urlConfig.fallbackUrls,i=!0===s.SDKFlags.get(e.sdkKey,"enable_log_event_compression");switch(t.logEventCompressionMode){case h.LogEventCompressionMode.Disabled:return!1;case h.LogEventCompressionMode.Enabled:return!(o&&!i);case h.LogEventCompressionMode.Forced:return!0;default:return!1}}(e,this._options))try{const n=(new TextEncoder).encode(o),a=new CompressionStream("gzip"),s=a.writable.getWriter();s.write(n).catch(i.Log.error),s.close().catch(i.Log.error);const l=a.readable.getReader(),c=[];let d;for(;!(d=yield l.read()).done;)c.push(d.value);const p=c.reduce((e,t)=>e+t.length,0),u=new Uint8Array(p);let m=0;for(const e of c)u.set(e,m),m+=e.length;e.body=u,e.params=Object.assign(Object.assign({},null!==(t=e.params)&&void 0!==t?t:{}),{[r.NetworkParam.IsGzipped]:"1"})}catch(a){i.Log.warn(`Request compression failed for ${e.urlConfig.getUrl()}`,a)}})}_getInternalRequestArgs(e,t){const n=this._fallbackResolver.getActiveFallbackUrl(t.sdkKey,t.urlConfig),o=Object.assign(Object.assign({},t),{method:e,fallbackUrl:n});return"data"in t&&f(o,t.data),o}};const x=e=>!!e.sdkKey||(i.Log.warn("Unable to make request without an SDK key"),!1),f=(e,t)=>{const{sdkKey:n,fallbackUrl:o}=e,i=p.StableID.get(n),r=d.SessionID.get(n),a=l.SDKType._get(n);e.body=JSON.stringify(Object.assign(Object.assign({},t),{statsigMetadata:Object.assign(Object.assign({},m.StatsigMetadataProvider.get()),{stableID:i,sessionID:r,sdkType:a,fallbackUrl:o})}))};function y(e,t){if(e<0)return"unknown";for(const n of t)if(e<n)return`<${n}`;return`>=${t[t.length-1]}`}function S(e,t,n,i,a){e.urlConfig.endpoint===r.Endpoint._initialize&&o.Diagnostics._markInitNetworkReqEnd(e.sdkKey,o.Diagnostics._getDiagnosticsData(t,n,i,a))}}(NetworkCore)),NetworkCore}function requireFlushCoordinator(){if(hasRequiredFlushCoordinator)return FlushCoordinator;hasRequiredFlushCoordinator=1;var e=FlushCoordinator&&FlushCoordinator.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(FlushCoordinator,"__esModule",{value:!0}),FlushCoordinator.FlushCoordinator=void 0;const t=requireEventRetryConstants(),n=requireEventSender(),o=requireFlushInterval(),i=requireFlushTypes(),r=requireHashing(),a=requireLog$1(),s=requireNetworkCore(),l=requireSafeJs(),c=requireSessionID(),d=requireStatsigOptionsCommon(),p=requireStorageProvider(),u=new Set(["network_request_timed_out_no_response","network_request_exception_no_response","event_sender_post_returned_null","event_sender_post_returned_undefined","event_sender_post_exception"]);return FlushCoordinator.FlushCoordinator=class{constructor(e,t,i,r,a,s,l,c,d,p){this._cooldownTimer=null,this._maxIntervalTimer=null,this._hasRunQuickFlush=!1,this._currentFlushPromise=null,this._creationTime=Date.now(),this._isShuttingDown=!1,this._storageKey=null,this._flushInterval=new o.FlushInterval,this._batchQueue=e,this._pendingEvents=t,this._onPrepareFlush=i,this._errorBoundary=p,this._sdkKey=r,this._loggingEnabled=d,this._eventSender=new n.EventSender(r,a,s,l,c)}setLoggingEnabled(e){this._loggingEnabled=e}setLogEventCompressionMode(e){this._eventSender.setLogEventCompressionMode(e)}startScheduledFlushCycle(){this._scheduleNextFlush()}stopScheduledFlushCycle(){this._clearAllTimers()}addEvent(e){this._pendingEvents.addToPendingEventsQueue(e),this._currentFlushPromise||this._pendingEvents.hasEventsForFullBatch()&&this.processLimitFlush()}processManualFlush(){return e(this,void 0,void 0,function*(){return this._currentFlushPromise&&(yield this._currentFlushPromise),this._currentFlushPromise=this._executeFlush(i.FlushType.Manual).finally(()=>{this._currentFlushPromise=null,this._scheduleNextFlush()}),this._currentFlushPromise})}processShutdown(){return e(this,void 0,void 0,function*(){return this._isShuttingDown=!0,this._clearAllTimers(),this._currentFlushPromise&&(yield this._currentFlushPromise),this._currentFlushPromise=this._executeFlush(i.FlushType.Shutdown).catch(e=>{a.Log.error(`Error during shutdown flush: ${e}`)}).finally(()=>{this._currentFlushPromise=null}),this._currentFlushPromise})}_executeFlush(t){return e(this,void 0,void 0,function*(){this._clearAllTimers();try{this._prepareQueueForFlush(t);const e=this._batchQueue.takeAllBatches();if(0===e.length)return;yield Promise.all(e.map(e=>this._processOneBatch(e,t)))}finally{this._isShuttingDown||this._scheduleNextFlush()}})}checkQuickFlush(){this._hasRunQuickFlush||Date.now()-this._creationTime>t.EventRetryConstants.QUICK_FLUSH_WINDOW_MS||(this._hasRunQuickFlush=!0,setTimeout(()=>{this.processManualFlush().catch(e=>{a.Log.warn("Quick flush failed:",e)})},t.EventRetryConstants.QUICK_FLUSH_WINDOW_MS))}_attemptScheduledFlush(){if(this._currentFlushPromise)return void this._scheduleNextFlush();const e=this.containsAtLeastOneFullBatch(),t=this._flushInterval.hasReachedMaxInterval();if(!e&&!t)return void this._scheduleNoopPollTick();let n;this._flushInterval.markFlushAttempt(),n=e?i.FlushType.ScheduledFullBatch:i.FlushType.ScheduledMaxTime,this._currentFlushPromise=this._processNextBatch(n).then(()=>{}).catch(e=>{a.Log.error("Error during scheduled flush:",e)}).finally(()=>{this._currentFlushPromise=null,this._scheduleNextFlush()})}processLimitFlush(){this._flushInterval.hasCompletelyRecoveredFromBackoff()&&(this._currentFlushPromise||(this._currentFlushPromise=this._processLimitFlushInternal().catch(e=>{a.Log.error("Error during limit flush",e)}).finally(()=>{this._currentFlushPromise=null,this._scheduleNextFlush()})))}_processLimitFlushInternal(){return e(this,void 0,void 0,function*(){if(yield this._processNextBatch(i.FlushType.Limit))for(;this._flushInterval.hasCompletelyRecoveredFromBackoff()&&this.containsAtLeastOneFullBatch();){if(!(yield this._processNextBatch(i.FlushType.Limit)))break}})}_scheduleNextFlush(){if(this._clearAllTimers(),this._isShuttingDown)return;const e=Math.max(0,this._flushInterval.getTimeUntilNextFlush());this._cooldownTimer=setTimeout(()=>{this._cooldownTimer=null,c.StatsigSession.checkForIdleSession(this._sdkKey),this._attemptScheduledFlush()},e);const t=Math.max(0,this._flushInterval.getTimeTillMaxInterval());this._maxIntervalTimer=setTimeout(()=>{this._maxIntervalTimer=null,c.StatsigSession.checkForIdleSession(this._sdkKey),this._attemptScheduledFlush()},t)}_clearAllTimers(){null!==this._cooldownTimer&&(clearTimeout(this._cooldownTimer),this._cooldownTimer=null),null!==this._maxIntervalTimer&&(clearTimeout(this._maxIntervalTimer),this._maxIntervalTimer=null)}_scheduleNoopPollTick(){if(this._clearAllTimers(),this._isShuttingDown)return;this._cooldownTimer=setTimeout(()=>{this._cooldownTimer=null,c.StatsigSession.checkForIdleSession(this._sdkKey),this._attemptScheduledFlush()},t.EventRetryConstants.TICK_INTERVAL_MS);const e=Math.max(0,this._flushInterval.getTimeTillMaxInterval());this._maxIntervalTimer=setTimeout(()=>{this._maxIntervalTimer=null,c.StatsigSession.checkForIdleSession(this._sdkKey),this._attemptScheduledFlush()},e)}_processNextBatch(t){return e(this,void 0,void 0,function*(){this._prepareQueueForFlush(t);const e=this._batchQueue.takeNextBatch();return!!e&&this._processOneBatch(e,t)})}_processOneBatch(t,n){return e(this,void 0,void 0,function*(){if(this._loggingEnabled!==d.LoggingEnabledOption.always&&(0,l._isServerEnv)())return this._flushInterval.adjustForSuccess(),!0;const e=yield this._eventSender.sendBatch(t);return e.success?(this._flushInterval.adjustForSuccess(),!0):(this._flushInterval.adjustForFailure(),this._handleFailure(t,n,e.statusCode,e.failurePath,e.failureErrorMessage,e.failureDiagnosticBucket,e.failureDiagnosticMetadata),!1)})}_prepareQueueForFlush(e){this._onPrepareFlush();const n=this.convertPendingEventsToBatches();n>0&&(a.Log.warn(`Dropped ${n} events`),this._errorBoundary.logDroppedEvents(n,"Batch queue limit reached during batching",{loggingInterval:this._flushInterval.getCurrentIntervalMs(),batchSize:this._batchQueue.batchSize(),maxPendingBatches:t.EventRetryConstants.MAX_PENDING_BATCHES,flushType:e,retries:"dropped before batching"}))}containsAtLeastOneFullBatch(){return this._pendingEvents.hasEventsForFullBatch()||this._batchQueue.hasFullBatch()}convertPendingEventsToBatches(){if(this._pendingEvents.isEmpty())return 0;const e=this._pendingEvents.takeAll();return this._batchQueue.createBatches(e)}_isRetryableBatch(e,t){return!!s.RETRYABLE_CODES.has(e)||!(-1!==e||!t||!u.has(t))}_handleFailure(e,n,o,r,s,l,c){if(n===i.FlushType.Shutdown)return a.Log.warn(`${n} flush failed during shutdown. ${e.events.length} event(s) will be saved to storage for retry in next session.`),void this._saveShutdownFailedEventsToStorage(e.events);if(!this._isRetryableBatch(o,r)){const t="non-retryable error";return a.Log.warn(`${n} flush failed after ${e.attempts} attempt(s). ${e.events.length} event(s) will be dropped. Non-retryable error: ${o}`),void this._errorBoundary.logEventRequestFailure(e.events.length,t,n,o,e.attempts,r,s,l,c)}if(e.attempts>=t.EventRetryConstants.MAX_RETRY_ATTEMPTS){const t="max retry attempts exceeded";return a.Log.warn(`${n} flush failed after ${e.attempts} attempt(s). ${e.events.length} event(s) will be dropped.`),void this._errorBoundary.logEventRequestFailure(e.events.length,t,n,o,e.attempts,r,s,l,c)}e.incrementAttempts();const d=this._batchQueue.requeueBatch(e);d>0&&(a.Log.warn(`Failed to requeue batch : dropped ${d} events due to full queue`),this._errorBoundary.logDroppedEvents(d,"Batch queue limit reached during requeue",{loggingInterval:this._flushInterval.getCurrentIntervalMs(),batchSize:this._batchQueue.batchSize(),maxPendingBatches:t.EventRetryConstants.MAX_PENDING_BATCHES,flushType:n,retries:e.attempts}))}loadAndRetryShutdownFailedEvents(){return e(this,void 0,void 0,function*(){const e=this._getStorageKey();try{p.Storage.isReady()||(yield p.Storage.isReadyResolver());const t=this._getShutdownFailedEventsFromStorage(e);if(0===t.length)return;a.Log.debug(`Loading ${t.length} failed shutdown event(s) from storage for retry`),p.Storage.removeItem(e),t.forEach(e=>{this.addEvent(e)}),yield this.processManualFlush()}catch(t){a.Log.warn("Failed to load and retry failed shutdown events:",t)}})}_getStorageKey(){return this._storageKey||(this._storageKey=`statsig.failed_shutdown_events.${(0,r._DJB2)(this._sdkKey)}`),this._storageKey}_saveShutdownFailedEventsToStorage(e){const n=this._getStorageKey();try{let o=[...this._getShutdownFailedEventsFromStorage(n),...e];o.length>t.EventRetryConstants.MAX_LOCAL_STORAGE&&(o=o.slice(-t.EventRetryConstants.MAX_LOCAL_STORAGE)),(0,p._setObjectInStorage)(n,o),a.Log.debug(`Saved ${e.length} failed shutdown event(s) to storage (total stored: ${o.length})`)}catch(o){a.Log.warn("Unable to save failed shutdown events to storage:",o)}}_getShutdownFailedEventsFromStorage(e){try{const t=(0,p._getObjectFromStorage)(e);return Array.isArray(t)?t:[]}catch(t){return[]}}},FlushCoordinator}var PendingEvents={},hasRequiredPendingEvents;function requirePendingEvents(){if(hasRequiredPendingEvents)return PendingEvents;hasRequiredPendingEvents=1,Object.defineProperty(PendingEvents,"__esModule",{value:!0}),PendingEvents.PendingEvents=void 0;const e=requireLog$1();return PendingEvents.PendingEvents=class{constructor(e){this._pendingEvents=[],this._batchSize=e}addToPendingEventsQueue(t){this._pendingEvents.push(t),e.Log.debug("Enqueued Event:",t)}hasEventsForFullBatch(){return this._pendingEvents.length>=this._batchSize}takeAll(){const e=this._pendingEvents;return this._pendingEvents=[],e}isEmpty(){return 0===this._pendingEvents.length}},PendingEvents}var StatsigEvent={},hasRequiredStatsigEvent;function requireStatsigEvent(){if(hasRequiredStatsigEvent)return StatsigEvent;hasRequiredStatsigEvent=1,Object.defineProperty(StatsigEvent,"__esModule",{value:!0}),StatsigEvent._createLayerParameterExposure=StatsigEvent._createConfigExposure=StatsigEvent._mapExposures=StatsigEvent._createGateExposure=StatsigEvent._isExposureEvent=void 0;const e="statsig::config_exposure",t="statsig::gate_exposure",n="statsig::layer_exposure",o=(e,t,n,o,i)=>(n.bootstrapMetadata&&(o.bootstrapMetadata=n.bootstrapMetadata),{eventName:e,user:t,value:null,metadata:r(n,o),secondaryExposures:i,time:Date.now()});StatsigEvent._isExposureEvent=({eventName:o})=>o===t||o===e||o===n;function i(e,t){return e.map(e=>"string"==typeof e?(null!=t?t:{})[e]:e).filter(e=>null!=e)}StatsigEvent._createGateExposure=(e,n,r)=>{var a,s,l;const c={gate:n.name,gateValue:String(n.value),ruleID:n.ruleID};return null!=(null===(a=n.__evaluation)||void 0===a?void 0:a.version)&&(c.configVersion=n.__evaluation.version),o(t,e,n.details,c,i(null!==(l=null===(s=n.__evaluation)||void 0===s?void 0:s.secondary_exposures)&&void 0!==l?l:[],r))},StatsigEvent._mapExposures=i;StatsigEvent._createConfigExposure=(t,n,r)=>{var a,s,l,c;const d={config:n.name,ruleID:n.ruleID};return null!=(null===(a=n.__evaluation)||void 0===a?void 0:a.version)&&(d.configVersion=n.__evaluation.version),null!=(null===(s=n.__evaluation)||void 0===s?void 0:s.passed)&&(d.rulePassed=String(n.__evaluation.passed)),o(e,t,n.details,d,i(null!==(c=null===(l=n.__evaluation)||void 0===l?void 0:l.secondary_exposures)&&void 0!==c?c:[],r))};StatsigEvent._createLayerParameterExposure=(e,t,r,a)=>{var s,l,c,d,p,u,m;const h=t.__evaluation,g=!0===(null===(s=null==h?void 0:h.explicit_parameters)||void 0===s?void 0:s.includes(r));let x="",f=null!==(l=null==h?void 0:h.undelegated_secondary_exposures)&&void 0!==l?l:[];g&&(x=null!==(c=h.allocated_experiment_name)&&void 0!==c?c:"",f=null!==(d=h.secondary_exposures)&&void 0!==d?d:[]);const y=null===(p=t.__evaluation)||void 0===p?void 0:p.parameter_rule_ids,S={config:t.name,parameterName:r,ruleID:null!==(u=null==y?void 0:y[r])&&void 0!==u?u:t.ruleID,allocatedExperiment:x,isExplicitParameter:String(g)};return null!=(null===(m=t.__evaluation)||void 0===m?void 0:m.version)&&(S.configVersion=t.__evaluation.version),o(n,e,t.details,S,i(f,a))};const r=(e,t)=>(t.reason=e.reason,e.lcut&&(t.lcut=String(e.lcut)),e.receivedAt&&(t.receivedAt=String(e.receivedAt)),t);return StatsigEvent}var UrlConfiguration={},hasRequiredUrlConfiguration,hasRequiredEventLogger;function requireUrlConfiguration(){if(hasRequiredUrlConfiguration)return UrlConfiguration;hasRequiredUrlConfiguration=1,Object.defineProperty(UrlConfiguration,"__esModule",{value:!0}),UrlConfiguration.UrlConfiguration=void 0;const e=requireHashing(),t=requireNetworkConfig(),n={[t.Endpoint._initialize]:"i",[t.Endpoint._rgstr]:"e",[t.Endpoint._download_config_specs]:"d"};return UrlConfiguration.UrlConfiguration=class{constructor(e,o,i,r){this.customUrl=null,this.fallbackUrls=null,this.endpoint=e,this.endpointDnsKey=n[e],o&&(this.customUrl=o),!o&&i&&(this.customUrl=i.endsWith("/")?`${i}${e}`:`${i}/${e}`),r&&(this.fallbackUrls=r);const a=t.NetworkDefault[e];this.defaultUrl=`${a}/${e}`}getUrl(){var e;return null!==(e=this.customUrl)&&void 0!==e?e:this.defaultUrl}getChecksum(){var t;const n=(null!==(t=this.fallbackUrls)&&void 0!==t?t:[]).sort().join(",");return(0,e._DJB2)(this.customUrl+n)}},UrlConfiguration}function requireEventLogger(){if(hasRequiredEventLogger)return EventLogger;hasRequiredEventLogger=1;var e=EventLogger&&EventLogger.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(EventLogger,"__esModule",{value:!0}),EventLogger.EventLogger=void 0;const t=requireBatchedEventsQueue(),n=requireCacheKey(),o=requireEventRetryConstants(),i=requireFlushCoordinator(),r=requireHashing(),a=requireLog$1(),s=requireNetworkConfig(),l=requirePendingEvents(),c=requireSafeJs(),d=requireStatsigEvent(),p=requireStatsigOptionsCommon(),u=requireStorageProvider(),m=requireUrlConfiguration(),h=requireVisibilityObserving(),g={};return EventLogger.EventLogger=class x{static _safeFlushAndForget(e){var t;null===(t=g[e])||void 0===t||t.flush().catch(()=>{})}constructor(e,t,n,o,i){var r;this._sdkKey=e,this._emitter=t,this._network=n,this._options=o,this._errorBoundary=i,this._pendingEvents=null,this._batchQueue=null,this._flushCoordinator=null,this._lastExposureTimeMap={},this._nonExposedChecks={},this._isShuttingDown=!1,this._storageKey=null,this._pendingCompressionMode=null,this._loggingEnabled=null!==(r=null==o?void 0:o.loggingEnabled)&&void 0!==r?r:!0===(null==o?void 0:o.disableLogging)?p.LoggingEnabledOption.disabled:p.LoggingEnabledOption.browserOnly,(null==o?void 0:o.loggingEnabled)&&void 0!==o.disableLogging&&a.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging.");const l=null==o?void 0:o.networkConfig;this._logEventUrlConfig=new m.UrlConfiguration(s.Endpoint._rgstr,null==l?void 0:l.logEventUrl,null==l?void 0:l.api,null==l?void 0:l.logEventFallbackUrls)}setLogEventCompressionMode(e){this._flushCoordinator?this._flushCoordinator.setLogEventCompressionMode(e):this._pendingCompressionMode=e}setLoggingEnabled(e){const t="disabled"===this._loggingEnabled,n="disabled"!==e;if(this._loggingEnabled=e,this._flushCoordinator&&this._flushCoordinator.setLoggingEnabled(e),t&&n){const e=this._loadStoredEvents();a.Log.debug(`Loaded ${e.length} stored event(s) from storage`),e.length>0&&(e.forEach(e=>{this._initFlushCoordinator().addEvent(e)}),this.flush().catch(e=>{a.Log.warn("Failed to flush events after enabling logging:",e)}))}}enqueue(e){var t;if(!this._shouldLogEvent(e))return;const n=this._normalizeEvent(e);"disabled"!==this._loggingEnabled?(this._initFlushCoordinator().addEvent(n),null===(t=this._flushCoordinator)||void 0===t||t.checkQuickFlush()):this._storeEventToStorage(n)}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,c._isServerEnv)();if(t&&"always"!==(null===(e=this._options)||void 0===e?void 0:e.loggingEnabled))return;const n=this._initFlushCoordinator();g[this._sdkKey]=this,t||(0,h._subscribeToVisiblityChanged)(e=>{"background"===e?x._safeFlushAndForget(this._sdkKey):"foreground"===e&&n.startScheduledFlushCycle()}),n.loadAndRetryShutdownFailedEvents().catch(e=>{a.Log.warn("Failed to load failed shutdown events:",e)}),n.startScheduledFlushCycle()}stop(){return e(this,void 0,void 0,function*(){this._isShuttingDown=!0,this._flushCoordinator&&(yield this._flushCoordinator.processShutdown()),delete g[this._sdkKey],this._flushCoordinator=null,this._pendingEvents=null,this._batchQueue=null})}flush(){return e(this,void 0,void 0,function*(){if(this._flushCoordinator)return this._flushCoordinator.processManualFlush()})}appendAndResetNonExposedChecks(){if(0===Object.keys(this._nonExposedChecks).length)return;const e=Object.assign({},this._nonExposedChecks);this._nonExposedChecks={};const t=this._normalizeEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:e}});this._flushCoordinator&&this._flushCoordinator.addEvent(t)}_shouldLogEvent(e){var t;if("always"!==(null===(t=this._options)||void 0===t?void 0:t.loggingEnabled)&&(0,c._isServerEnv)())return!1;if(!(0,d._isExposureEvent)(e))return!0;const o=e.user?e.user:{statsigEnvironment:void 0},i=(0,n._getUserStorageKey)(this._sdkKey,o),r=e.metadata?e.metadata:{},a=[e.eventName,i,r.gate,r.config,r.ruleID,r.allocatedExperiment,r.parameterName,String(r.isExplicitParameter),r.reason].join("|"),s=this._lastExposureTimeMap[a],l=Date.now();return!(s&&l-s<6e5)&&(Object.keys(this._lastExposureTimeMap).length>1e3&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[a]=l,!0)}_getCurrentPageUrl(){var e;if(!1!==(null===(e=this._options)||void 0===e?void 0:e.includeCurrentPageUrlWithEvents))return(0,c._getCurrentPageUrlSafe)()}_getStorageKey(){return this._storageKey||(this._storageKey=`statsig.pending_events.${(0,r._DJB2)(this._sdkKey)}`),this._storageKey}_initFlushCoordinator(){var e,n;if(this._flushCoordinator)return this._flushCoordinator;const r=null!==(n=null===(e=this._options)||void 0===e?void 0:e.loggingBufferMaxSize)&&void 0!==n?n:o.EventRetryConstants.DEFAULT_BATCH_SIZE;return this._pendingEvents=new l.PendingEvents(r),this._batchQueue=new t.BatchQueue(r),this._flushCoordinator=new i.FlushCoordinator(this._batchQueue,this._pendingEvents,()=>this.appendAndResetNonExposedChecks(),this._sdkKey,this._network,this._emitter,this._logEventUrlConfig,this._options,this._loggingEnabled,this._errorBoundary),this._pendingCompressionMode&&(this._flushCoordinator.setLogEventCompressionMode(this._pendingCompressionMode),this._pendingCompressionMode=null),this._flushCoordinator}_storeEventToStorage(e){const t=this._getStorageKey();try{let n=this._getEventsFromStorage(t);n.push(e),n.length>o.EventRetryConstants.MAX_LOCAL_STORAGE&&(n=n.slice(-o.EventRetryConstants.MAX_LOCAL_STORAGE)),(0,u._setObjectInStorage)(t,n)}catch(n){a.Log.warn("Unable to save events to storage")}}_getEventsFromStorage(e){try{const t=(0,u._getObjectFromStorage)(e);return Array.isArray(t)?t:[]}catch(t){return[]}}_loadStoredEvents(){const e=this._getStorageKey(),t=this._getEventsFromStorage(e);return t.length>0&&u.Storage.removeItem(e),t}_normalizeEvent(e){e.user&&(e.user=Object.assign({},e.user),delete e.user.privateAttributes);const t={},n=this._getCurrentPageUrl();return n&&(t.statsigMetadata={currentPage:n}),Object.assign(Object.assign({},e),t)}},EventLogger}var ClientInterfaces={},hasRequiredClientInterfaces;function requireClientInterfaces(){if(hasRequiredClientInterfaces)return ClientInterfaces;hasRequiredClientInterfaces=1,Object.defineProperty(ClientInterfaces,"__esModule",{value:!0}),ClientInterfaces.PrecomputedEvaluationsContextHandle=void 0;const e=requireLog$1(),t=requireSafeJs(),n=requireSessionID(),o=requireStableID();return ClientInterfaces.PrecomputedEvaluationsContextHandle=class{constructor(e,t,n,o,i,r){this._sdkKey=e,this._getOptions=t,this._getErrorBoundary=n,this._getValues=o,this._getUser=i,this._getSdkInstanceID=r}get sdkKey(){return this._sdkKey}get options(){return this._getOptions()}get errorBoundary(){return this._getErrorBoundary()}get values(){return this._getValues()}get user(){let n=(0,t._cloneObject)("StatsigUser",this._getUser());return null==n&&(e.Log.error("Failed to clone user"),n={}),n}getSession(e=!0){return n.StatsigSession.get(this._sdkKey,e)}get stableID(){return o.StableID.get(this._sdkKey)}get sdkInstanceID(){return this._getSdkInstanceID()}toContext(e=!0){return{sdkKey:this.sdkKey,options:this.options,values:this.values,user:this.user,errorBoundary:this.errorBoundary,session:this.getSession(e),stableID:this.stableID,sdkInstanceID:this.sdkInstanceID}}},ClientInterfaces}var DataAdapterCore={},StatsigUser={},hasRequiredStatsigUser;function requireStatsigUser(){if(hasRequiredStatsigUser)return StatsigUser;hasRequiredStatsigUser=1,Object.defineProperty(StatsigUser,"__esModule",{value:!0}),StatsigUser._getUnitIDFromUser=StatsigUser._getFullUserHash=StatsigUser._normalizeUser=void 0;const e=requireHashing(),t=requireLog$1(),n=requireSafeJs();return StatsigUser._normalizeUser=function(e,o,i){const r=(0,n._cloneObject)("StatsigUser",e);return null==r?(t.Log.error("Failed to clone user"),{statsigEnvironment:void 0}):(null!=o&&null!=o.environment?r.statsigEnvironment=o.environment:null!=i&&(r.statsigEnvironment={tier:i}),r)},StatsigUser._getFullUserHash=function(t){return t?(0,e._DJB2Object)(t):null},StatsigUser._getUnitIDFromUser=function(e,t){var n,o,i;if("string"!=typeof t)return e.userID;const r=t.toLowerCase();return"userid"!==r?null!==(o=null===(n=e.customIDs)||void 0===n?void 0:n[t])&&void 0!==o?o:null===(i=e.customIDs)||void 0===i?void 0:i[r]:e.userID},StatsigUser}var TypedJsonParse={},hasRequiredTypedJsonParse,hasRequiredDataAdapterCore;function requireTypedJsonParse(){if(hasRequiredTypedJsonParse)return TypedJsonParse;hasRequiredTypedJsonParse=1,Object.defineProperty(TypedJsonParse,"__esModule",{value:!0}),TypedJsonParse._typedJsonParse=void 0;const e=requireLog$1();return TypedJsonParse._typedJsonParse=function(t,n,o){try{const e=JSON.parse(t);if(e&&"object"==typeof e&&n in e)return e}catch(i){}return e.Log.error(`Failed to parse ${o}`),null},TypedJsonParse}function requireDataAdapterCore(){if(hasRequiredDataAdapterCore)return DataAdapterCore;hasRequiredDataAdapterCore=1;var e=DataAdapterCore&&DataAdapterCore.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(DataAdapterCore,"__esModule",{value:!0}),DataAdapterCore._makeDataAdapterResult=DataAdapterCore.DataAdapterCore=void 0;const t=requireLog$1(),n=requireStableID(),o=requireStatsigUser(),i=requireStorageProvider(),r=requireTypedJsonParse();function a(e,t,n,i){return{source:e,data:t,receivedAt:Date.now(),stableID:n,fullUserHash:(0,o._getFullUserHash)(i)}}DataAdapterCore.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.${t}`,this._inMemoryCache=new s}attach(e,t,n){this._sdkKey=e,this._options=t}getDataSync(e){const t=e&&(0,o._normalizeUser)(e,this._options),n=this._getCacheKey(t),i=this._inMemoryCache.get(n,t);if(i&&this._getIsCacheValueValid(i))return i;const r=this._loadFromCache(n);return r&&this._getIsCacheValueValid(r)?(this._inMemoryCache.add(n,r,this._cacheLimit),this._inMemoryCache.get(n,t)):null}setData(e,t){const n=t&&(0,o._normalizeUser)(t,this._options),i=this._getCacheKey(n);this._inMemoryCache.add(i,a("Bootstrap",e,null,n),this._cacheLimit)}_getIsCacheValueValid(e){return null==e.stableID||e.stableID===n.StableID.get(this._getSdkKey())}_getDataAsyncImpl(n,o,r){return e(this,void 0,void 0,function*(){i.Storage.isReady()||(yield i.Storage.isReadyResolver());const e=null!=n?n:this.getDataSync(o),a=[this._fetchAndPrepFromNetwork(e,o,r)];return(null==r?void 0:r.timeoutMs)&&a.push(new Promise(e=>setTimeout(e,r.timeoutMs)).then(()=>(t.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(a)})}_prefetchDataImpl(t,n){return e(this,void 0,void 0,function*(){const e=t&&(0,o._normalizeUser)(t,this._options),i=this._getCacheKey(e),r=yield this._getDataAsyncImpl(null,e,n);r&&this._inMemoryCache.add(i,Object.assign(Object.assign({},r),{source:"Prefetch"}),this._cacheLimit)})}_fetchAndPrepFromNetwork(o,i,s){return e(this,void 0,void 0,function*(){var e;const l=null!==(e=null==o?void 0:o.data)&&void 0!==e?e:null,c=null!=o&&this._isCachedResultValidFor204(o,i),d=yield this._fetchFromNetwork(l,i,s,c);if(!d)return t.Log.debug("No response returned for latest value"),null;const p=(0,r._typedJsonParse)(d,"has_updates","Response"),u=this._getSdkKey(),m=n.StableID.get(u);let h=null;if(!0===(null==p?void 0:p.has_updates))h=a("Network",d,m,i);else{if(!l||!1!==(null==p?void 0:p.has_updates))return null;h=a("NetworkNotModified",l,m,i)}const g=this._getCacheKey(i);return this._inMemoryCache.add(g,h,this._cacheLimit),this._writeToCache(g,h),h})}_getSdkKey(){return null!=this._sdkKey?this._sdkKey:(t.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(e){var t;const n=null===(t=i.Storage.getItem)||void 0===t?void 0:t.call(i.Storage,e);if(null==n)return null;const o=(0,r._typedJsonParse)(n,"source","Cached Result");return o?Object.assign(Object.assign({},o),{source:"Cache"}):null}_writeToCache(e,t){const n=JSON.stringify(t);for(let r=0;r<8;r++)try{i.Storage.setItem(e,n);break}catch(o){if(!(o instanceof Error)||!o.toString().includes("QuotaExceededError")&&!o.toString().includes("QUOTA_EXCEEDED_ERR")||this._cacheLimit<=1)throw o;this._cacheLimit=Math.ceil(this._cacheLimit/2),this._runLocalStorageCacheEviction(e,this._cacheLimit-1)}this._runLocalStorageCacheEviction(e)}_runLocalStorageCacheEviction(e,t=this._cacheLimit){var n;const o=null!==(n=(0,i._getObjectFromStorage)(this._lastModifiedStoreKey))&&void 0!==n?n:{};o[e]=Date.now();const r=l(o,t);for(const a of r)delete o[a],i.Storage.removeItem(a);(0,i._setObjectInStorage)(this._lastModifiedStoreKey,o)}},DataAdapterCore._makeDataAdapterResult=a;class s{constructor(){this._data={}}get(e,n){var o;const i=this._data[e],r=null==i?void 0:i.stableID,a=null===(o=null==n?void 0:n.customIDs)||void 0===o?void 0:o.stableID;return a&&r&&a!==r?(t.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):i}add(e,t,n){const o=l(this._data,n-1);for(const i of o)delete this._data[i];this._data[e]=t}merge(e){this._data=Object.assign(Object.assign({},this._data),e)}}function l(e,t){const n=Object.keys(e);return n.length<=t?[]:0===t?n:n.sort((t,n)=>{const o=e[t],i=e[n];return"object"==typeof o&&"object"==typeof i?o.receivedAt-i.receivedAt:o-i}).slice(0,n.length-t)}return DataAdapterCore}var DownloadConfigSpecsResponse={},hasRequiredDownloadConfigSpecsResponse;function requireDownloadConfigSpecsResponse(){return hasRequiredDownloadConfigSpecsResponse||(hasRequiredDownloadConfigSpecsResponse=1,Object.defineProperty(DownloadConfigSpecsResponse,"__esModule",{value:!0})),DownloadConfigSpecsResponse}var ErrorBoundary={},hasRequiredErrorBoundary;function requireErrorBoundary(){return hasRequiredErrorBoundary||(hasRequiredErrorBoundary=1,function(e){var t=ErrorBoundary&&ErrorBoundary.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorBoundary=e.EXCEPTION_ENDPOINT=void 0;const n=requireLog$1(),o=requireSDKType(),i=requireStatsigMetadata();e.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";const r="[Statsig] UnknownError";function a(e){return e instanceof Error?e:"string"==typeof e?new Error(e):new Error("An unknown error occurred.")}function s(e){if(!e)return{};const t={};return Object.keys(e).forEach(n=>{const o=n,i=e[o];switch(typeof i){case"number":case"bigint":case"boolean":t[String(o)]=i;break;case"string":i.length<50?t[String(o)]=i:t[String(o)]="set";break;case"object":"environment"===o?t.environment=i:"networkConfig"===o?t.networkConfig=i:t[String(o)]=null!=i?"set":"unset"}}),t}e.ErrorBoundary=class{constructor(e,t,n,o){this._sdkKey=e,this._options=t,this._emitter=n,this._lastSeenError=o,this._seen=new Set}wrap(e,t){try{const n=e;(function(e){const t=new Set;let n=Object.getPrototypeOf(e);for(;n&&n!==Object.prototype;)Object.getOwnPropertyNames(n).filter(e=>"function"==typeof(null==n?void 0:n[e])).forEach(e=>t.add(e)),n=Object.getPrototypeOf(n);return Array.from(t)})(n).forEach(o=>{const i=n[o];"$EB"in i||(n[o]=(...n)=>this._capture(t?`${t}:${o}`:o,()=>i.apply(e,n)),n[o].$EB=!0)})}catch(n){this._onError("eb:wrap",n)}}logError(e,t){this._onError(e,t)}logDroppedEvents(e,t,n){const o={eventCount:String(e),reason:t};n&&Object.keys(n).forEach(e=>{o[e]=String(n[e])}),this._onError("statsig::log_event_dropped_event_count",new Error(t),!0,o)}logEventRequestFailure(e,t,n,o,i,r,a,s,l){const c={eventCount:String(e),flushType:n,statusCode:String(o),reason:t,retries:String(i)};r&&(c.failurePath=r),"string"==typeof a&&a.length>0&&(c.failureErrorMessage=a),"string"==typeof s&&s.length>0&&(c.failureDiagnosticBucket=s),l&&Object.keys(l).forEach(e=>{const t=l[e];t.length>0&&(c[`failureDiagnostic_${e}`]=t)}),this._onError("statsig::log_event_failed",new Error(t),!0,c)}getLastSeenErrorAndReset(){const e=this._lastSeenError;return this._lastSeenError=void 0,null!=e?e:null}attachErrorIfNoneExists(e){this._lastSeenError||(this._lastSeenError=a(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(l,c,d=!1,p){try{n.Log.warn(`Caught error in ${l}`,{error:c});(()=>t(this,void 0,void 0,function*(){var t,n,u,m,h,g,x;const f=c||Error(r),y=f instanceof Error,S=y?f.name:"No Name",C=a(f);if(this._lastSeenError=C,!d&&this._seen.has(S))return;if(this._seen.add(S),null===(n=null===(t=this._options)||void 0===t?void 0:t.networkConfig)||void 0===n?void 0:n.preventAllNetworkTraffic)return void(null===(u=this._emitter)||void 0===u||u.call(this,{name:"error",error:c,tag:l}));const b=o.SDKType._get(this._sdkKey),$=i.StatsigMetadataProvider.get(),v=y?f.stack:function(e){try{return JSON.stringify(e)}catch(t){return r}}(f),E=Object.assign(Object.assign({tag:l,exception:S,info:v,statsigOptions:s(this._options)},Object.assign(Object.assign({},$),{sdkType:b})),null!=p?p:{}),A=null===(m=this._options)||void 0===m?void 0:m.networkConfig,w=null!==(h=null==A?void 0:A.networkOverrideFunc)&&void 0!==h?h:fetch;yield w(null!==(g=null==A?void 0:A.sdkExceptionUrl)&&void 0!==g?g:e.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String(b),"STATSIG-SDK-VERSION":String($.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(E)}),null===(x=this._emitter)||void 0===x||x.call(this,{name:"error",error:c,tag:l})}))().then(()=>{}).catch(()=>{})}catch(u){}}}}(ErrorBoundary)),ErrorBoundary}var EvaluationOptions={},hasRequiredEvaluationOptions;function requireEvaluationOptions(){return hasRequiredEvaluationOptions||(hasRequiredEvaluationOptions=1,Object.defineProperty(EvaluationOptions,"__esModule",{value:!0})),EvaluationOptions}var EvaluationTypes={},hasRequiredEvaluationTypes;function requireEvaluationTypes(){return hasRequiredEvaluationTypes||(hasRequiredEvaluationTypes=1,Object.defineProperty(EvaluationTypes,"__esModule",{value:!0})),EvaluationTypes}var InitializeResponse={},hasRequiredInitializeResponse;function requireInitializeResponse(){return hasRequiredInitializeResponse||(hasRequiredInitializeResponse=1,Object.defineProperty(InitializeResponse,"__esModule",{value:!0})),InitializeResponse}var MemoKey={},hasRequiredMemoKey;function requireMemoKey(){if(hasRequiredMemoKey)return MemoKey;hasRequiredMemoKey=1,Object.defineProperty(MemoKey,"__esModule",{value:!0}),MemoKey.createMemoKey=MemoKey.MemoPrefix=void 0,MemoKey.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};const e=new Set([]),t=new Set(["userPersistedValues"]);return MemoKey.createMemoKey=function(n,o,i){let r=`${n}|${o}`;if(!i)return r;for(const a of Object.keys(i)){if(t.has(a))return;e.has(a)?r+=`|${a}=true`:r+=`|${a}=${i[a]}`}return r},MemoKey}var OverrideAdapter={},hasRequiredOverrideAdapter;function requireOverrideAdapter(){return hasRequiredOverrideAdapter||(hasRequiredOverrideAdapter=1,Object.defineProperty(OverrideAdapter,"__esModule",{value:!0})),OverrideAdapter}var ParamStoreTypes={},hasRequiredParamStoreTypes;function requireParamStoreTypes(){return hasRequiredParamStoreTypes||(hasRequiredParamStoreTypes=1,Object.defineProperty(ParamStoreTypes,"__esModule",{value:!0})),ParamStoreTypes}var SizeOf={},hasRequiredSizeOf;function requireSizeOf(){return hasRequiredSizeOf||(hasRequiredSizeOf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._fastApproxSizeOf=void 0;e._fastApproxSizeOf=(t,n)=>{let o=0;const i=Object.keys(t);for(let r=0;r<i.length;r++){const a=i[r],s=t[a];if(o+=a.length,o+="object"==typeof s&&null!==s?(0,e._fastApproxSizeOf)(s,n)+2:String(s).length+1,o>=n)return o}return o}}(SizeOf)),SizeOf}var StatsigClientBase={},hasRequiredStatsigClientBase;function requireStatsigClientBase(){if(hasRequiredStatsigClientBase)return StatsigClientBase;hasRequiredStatsigClientBase=1;var e=StatsigClientBase&&StatsigClientBase.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(StatsigClientBase,"__esModule",{value:!0}),StatsigClientBase.StatsigClientBase=void 0,require$_StatsigGlobal();const t=require$_StatsigGlobal(),n=requireErrorBoundary(),o=requireEventLogger(),i=requireLog$1(),r=requireMemoKey(),a=requireSafeJs(),s=requireSessionID(),l=requireStableID(),c=requireStatsigOptionsCommon(),d=requireStorageProvider();return StatsigClientBase.StatsigClientBase=class{constructor(e,r,c,p){var u,m,h,g;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};const x=this.$emt.bind(this);null!=(null==p?void 0:p.logLevel)&&(i.Log.level=p.logLevel),(null==p?void 0:p.disableStorage)&&d.Storage._setDisabled(!0),(null==p?void 0:p.initialSessionID)&&s.StatsigSession.overrideInitialSessionID(p.initialSessionID,e),(null==p?void 0:p.storageProvider)&&d.Storage._setProvider(p.storageProvider),(null==p?void 0:p.enableCookies)&&l.StableID._setCookiesEnabled(e,p.enableCookies),(null==p?void 0:p.disableStableID)&&l.StableID._setDisabled(e,!0),this._sdkKey=e,this._options=null!=p?p:{},this._memoCache={},this.overrideAdapter=null!==(u=null==p?void 0:p.overrideAdapter)&&void 0!==u?u:null,this._errorBoundary=new n.ErrorBoundary(e,p,x),this._logger=new o.EventLogger(e,x,c,p,this._errorBoundary),this._errorBoundary.wrap(this),this._errorBoundary.wrap(r),this._errorBoundary.wrap(this._logger),c.setErrorBoundary(this._errorBoundary),this.dataAdapter=r,this.dataAdapter.attach(e,p,c),this.storageProvider=d.Storage,null===(g=null===(h=null===(m=this.overrideAdapter)||void 0===m?void 0:m.loadFromStorage)||void 0===h?void 0:h.call(m))||void 0===g||g.catch(e=>this._errorBoundary.logError("OA::loadFromStorage",e)),this._primeReadyRipcord(),function(e,n){var o;if((0,a._isServerEnv)())return;const r=(0,t._getStatsigGlobal)(),s=null!==(o=r.instances)&&void 0!==o?o:{},l=n;null!=s[e]&&i.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys.");s[e]=l,r.firstInstance||(r.firstInstance=l);r.instances=s,__STATSIG__=r}(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,d.Storage._setDisabled(e.disableStorage)),null!=e.enableCookies&&(this._options.enableCookies=e.enableCookies,l.StableID._setCookiesEnabled(this._sdkKey,e.enableCookies)),e.logEventCompressionMode?this._logger.setLogEventCompressionMode(e.logEventCompressionMode):e.disableCompression&&this._logger.setLogEventCompressionMode(c.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return e(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:${e.name}`,n);i.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.disableExposureLog)?this._logger.enqueue(t):this._logger.incrementNonExposureCount(e)}_memoize(e,t){return(n,o)=>{if(this._options.disableEvaluationMemoization)return t(n,o);const i=(0,r.createMemoKey)(e,n,o);return i?(i in this._memoCache||(Object.keys(this._memoCache).length>=3e3&&(this._memoCache={}),this._memoCache[i]=t(n,o)),this._memoCache[i]):t(n,o)}}},StatsigClientBase}var StatsigDataAdapter={},hasRequiredStatsigDataAdapter;function requireStatsigDataAdapter(){return hasRequiredStatsigDataAdapter||(hasRequiredStatsigDataAdapter=1,Object.defineProperty(StatsigDataAdapter,"__esModule",{value:!0}),StatsigDataAdapter.DataAdapterCachePrefix=void 0,StatsigDataAdapter.DataAdapterCachePrefix="statsig.cached"),StatsigDataAdapter}var StatsigPlugin={},hasRequiredStatsigPlugin;function requireStatsigPlugin(){return hasRequiredStatsigPlugin||(hasRequiredStatsigPlugin=1,Object.defineProperty(StatsigPlugin,"__esModule",{value:!0})),StatsigPlugin}var StatsigTypeFactories={},hasRequiredStatsigTypeFactories;function requireStatsigTypeFactories(){if(hasRequiredStatsigTypeFactories)return StatsigTypeFactories;hasRequiredStatsigTypeFactories=1,Object.defineProperty(StatsigTypeFactories,"__esModule",{value:!0}),StatsigTypeFactories._makeTypedGet=StatsigTypeFactories._mergeOverride=StatsigTypeFactories._makeLayer=StatsigTypeFactories._makeExperiment=StatsigTypeFactories._makeDynamicConfig=StatsigTypeFactories._makeFeatureGate=void 0;const e=requireLog$1(),t=requireTypingUtils();function n(e,t,n,o){var i;return{name:e,details:t,ruleID:null!==(i=null==n?void 0:n.rule_id)&&void 0!==i?i:"",__evaluation:n,value:o}}function o(e,t,o){var r,a;const s=null!==(r=null==o?void 0:o.value)&&void 0!==r?r:{};return Object.assign(Object.assign({},n(e,t,o,s)),{idType:null!==(a=null==o?void 0:o.id_type)&&void 0!==a?a:null,get:i(e,null==o?void 0:o.value)})}function i(n,o,i){return(r,a)=>{var s;const l=null!==(s=null==o?void 0:o[r])&&void 0!==s?s:null;return null==l?null!=a?a:null:null==a||(0,t._isTypeMatch)(l,a)?(null==i||i(r),l):(e.Log.warn(`Parameter type mismatch. '${n}.${r}' was found to be type '${typeof l}' but fallback/return type is '${typeof a}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),null!=a?a:null)}}return StatsigTypeFactories._makeFeatureGate=function(e,t,o){var i;return Object.assign(Object.assign({},n(e,t,o,!0===(null==o?void 0:o.value))),{idType:null!==(i=null==o?void 0:o.id_type)&&void 0!==i?i:null})},StatsigTypeFactories._makeDynamicConfig=o,StatsigTypeFactories._makeExperiment=function(e,t,n){var i;const r=o(e,t,n);return Object.assign(Object.assign({},r),{groupName:null!==(i=null==n?void 0:n.group_name)&&void 0!==i?i:null})},StatsigTypeFactories._makeLayer=function(e,t,o,r){var a,s;return Object.assign(Object.assign({},n(e,t,o,void 0)),{get:i(e,null==o?void 0:o.value,r),groupName:null!==(a=null==o?void 0:o.group_name)&&void 0!==a?a:null,__value:null!==(s=null==o?void 0:o.value)&&void 0!==s?s:{}})},StatsigTypeFactories._mergeOverride=function(e,t,n,o){return Object.assign(Object.assign(Object.assign({},e),t),{get:i(e.name,n,o)})},StatsigTypeFactories._makeTypedGet=i,StatsigTypeFactories}var StatsigTypes={},hasRequiredStatsigTypes;function requireStatsigTypes(){return hasRequiredStatsigTypes||(hasRequiredStatsigTypes=1,Object.defineProperty(StatsigTypes,"__esModule",{value:!0})),StatsigTypes}var StatsigUpdateDetails={},hasRequiredStatsigUpdateDetails,hasRequiredSrc$2;function requireStatsigUpdateDetails(){if(hasRequiredStatsigUpdateDetails)return StatsigUpdateDetails;hasRequiredStatsigUpdateDetails=1,Object.defineProperty(StatsigUpdateDetails,"__esModule",{value:!0}),StatsigUpdateDetails.UPDATE_DETAIL_ERROR_MESSAGES=StatsigUpdateDetails.createUpdateDetails=void 0;return StatsigUpdateDetails.createUpdateDetails=(e,t,n,o,i,r)=>({duration:n,source:t,success:e,error:o,sourceUrl:i,warnings:r}),StatsigUpdateDetails.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."},StatsigUpdateDetails}function requireSrc$2(){return hasRequiredSrc$2||(hasRequiredSrc$2=1,function(e){var t=src$1&&src$1.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),n=src$1&&src$1.__exportStar||function(e,n){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(n,o)||t(n,e,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.Storage=e.Log=e.EventLogger=e.Diagnostics=void 0,require$_StatsigGlobal();const o=require$_StatsigGlobal(),i=requireDiagnostics();Object.defineProperty(e,"Diagnostics",{enumerable:!0,get:function(){return i.Diagnostics}});const r=requireEventLogger();Object.defineProperty(e,"EventLogger",{enumerable:!0,get:function(){return r.EventLogger}});const a=requireLog$1();Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return a.Log}});const s=requireStatsigMetadata(),l=requireStorageProvider();Object.defineProperty(e,"Storage",{enumerable:!0,get:function(){return l.Storage}}),n(require$_StatsigGlobal(),e),n(requireCacheKey(),e),n(requireClientInterfaces(),e),n(requireDataAdapterCore(),e),n(requireDiagnostics(),e),n(requireDownloadConfigSpecsResponse(),e),n(requireErrorBoundary(),e),n(requireEvaluationOptions(),e),n(requireEvaluationTypes(),e),n(requireHashing(),e),n(requireInitializeResponse(),e),n(requireLog$1(),e),n(requireMemoKey(),e),n(requireNetworkConfig(),e),n(requireNetworkCore(),e),n(requireOverrideAdapter(),e),n(requireParamStoreTypes(),e),n(requireSafeJs(),e),n(requireSDKType(),e),n(requireSessionID(),e),n(requireSizeOf(),e),n(requireStableID(),e),n(requireStatsigClientBase(),e),n(requireStatsigClientEventEmitter(),e),n(requireStatsigDataAdapter(),e),n(requireStatsigEvent(),e),n(requireStatsigMetadata(),e),n(requireStatsigOptionsCommon(),e),n(requireStatsigPlugin(),e),n(requireStatsigTypeFactories(),e),n(requireStatsigTypes(),e),n(requireStatsigUser(),e),n(requireStorageProvider(),e),n(requireTypedJsonParse(),e),n(requireTypingUtils(),e),n(requireUrlConfiguration(),e),n(requireUUID(),e),n(requireVisibilityObserving(),e),n(requireStatsigUpdateDetails(),e),n(requireSDKFlags(),e),Object.assign((0,o._getStatsigGlobal)(),{Log:a.Log,SDK_VERSION:s.SDK_VERSION})}(src$1)),src$1}var StatsigContext={},NoopEvaluationsClient={},hasRequiredNoopEvaluationsClient,hasRequiredStatsigContext;function requireNoopEvaluationsClient(){if(hasRequiredNoopEvaluationsClient)return NoopEvaluationsClient;hasRequiredNoopEvaluationsClient=1,Object.defineProperty(NoopEvaluationsClient,"__esModule",{value:!0}),NoopEvaluationsClient.isNoopClient=NoopEvaluationsClient.NoopEvaluationsClient=void 0;const e=requireSrc$2(),t={success:!1,error:Error("NoClient"),duration:0,source:"Uninitialized",sourceUrl:null},n=()=>{},o=()=>t,i=()=>Promise.resolve(),r=()=>Promise.resolve(t),a={reason:"Error:NoClient"},s=t=>(...n)=>{const o="string"==typeof n[0]?n[0]:n[1];switch(t){case"gate":return(0,e._makeFeatureGate)(o,a,null);case"config":return(0,e._makeDynamicConfig)(o,a,null);case"layer":return(0,e._makeLayer)(o,a,null);case"param_store":return{name:o}}},l={attach:n,getDataSync:()=>null,getDataAsync:()=>Promise.resolve(null),setData:n,setDataLegacy:n,prefetchData:i},c={sdkKey:"",options:{},values:null,user:{userID:""},errorBoundary:{},session:{data:{sessionID:"",startTime:0,lastUpdate:0},sdkKey:"",lastPersistedAt:0,storageKey:""},stableID:"",storageProvider:e.Storage,sdkInstanceID:""},d=new e.PrecomputedEvaluationsContextHandle("",()=>({}),()=>({}),()=>null,()=>({userID:""}),()=>""),p={isNoop:!0,loadingStatus:"Uninitialized",initializeSync:o,initializeAsync:r,shutdown:i,flush:i,updateRuntimeOptions:n,updateUserSync:o,updateUserAsync:r,getContext:()=>Object.assign({},c),getContextHandle:()=>d,checkGate:()=>!1,getFeatureGate:s("gate"),getDynamicConfig:s("config"),getExperiment:s("config"),getLayer:s("layer"),getParameterStore:s("param_store"),logEvent:n,on:n,off:n,$on:n,$emt:n,dataAdapter:l};return NoopEvaluationsClient.NoopEvaluationsClient=p,NoopEvaluationsClient.isNoopClient=function(e){return"isNoop"in e},NoopEvaluationsClient}function requireStatsigContext(){if(hasRequiredStatsigContext)return StatsigContext;hasRequiredStatsigContext=1,Object.defineProperty(StatsigContext,"__esModule",{value:!0});const e=React,t=requireNoopEvaluationsClient();return StatsigContext.default=(0,e.createContext)({renderVersion:0,client:t.NoopEvaluationsClient,isLoading:!0}),StatsigContext}var StatsigProvider={},useClientAsyncInit={},src={},StatsigClient={},EvaluationStore={},V1InitializeContainer={},hasRequiredV1InitializeContainer;function requireV1InitializeContainer(){if(hasRequiredV1InitializeContainer)return V1InitializeContainer;hasRequiredV1InitializeContainer=1,Object.defineProperty(V1InitializeContainer,"__esModule",{value:!0}),V1InitializeContainer.V1InitializeContainer=void 0;const e=requireSrc$2();return V1InitializeContainer.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(t,n){var o,i;return t&&null!==(i=null!==(o=t[n])&&void 0!==o?o:t[(0,e._DJB2)(n)])&&void 0!==i?i:null}},V1InitializeContainer}var V2InitializeContainer={},hasRequiredV2InitializeContainer,hasRequiredEvaluationStore;function requireV2InitializeContainer(){if(hasRequiredV2InitializeContainer)return V2InitializeContainer;hasRequiredV2InitializeContainer=1,Object.defineProperty(V2InitializeContainer,"__esModule",{value:!0}),V2InitializeContainer.V2InitializeContainer=void 0;const e=requireSrc$2();return V2InitializeContainer.V2InitializeContainer=class{constructor(e){this._values=e}getGate(e){var t,n,o;const i=this._getResultFromLookup(this._values.feature_gates,e);return i?{name:e,value:!0===i.v,rule_id:null!==(t=i.r)&&void 0!==t?t:"default",secondary_exposures:null!==(n=i.s)&&void 0!==n?n:[],id_type:null!==(o=i.i)&&void 0!==o?o:""}:null}getConfig(e){var t,n,o,i;const r=this._getResultFromLookup(this._values.dynamic_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:[],id_type:null!==(o=r.i)&&void 0!==o?o:"",is_user_in_experiment:!0===r.ue,passed:!0===r.p,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}:null}getLayer(e){var t,n,o,i,r,a;const s=this._getResultFromLookup(this._values.layer_configs,e);return s?{name:e,value:null!==(t=this._values.values[s.v])&&void 0!==t?t:{},rule_id:s.r,secondary_exposures:null!==(n=s.s)&&void 0!==n?n:[],is_user_in_experiment:!0===s.ue,group_name:null!==(o=s.gn)&&void 0!==o?o:void 0,is_experiment_active:!0===s.ea,group:s.r,is_device_based:"stableID"===s.i,allocated_experiment_name:null!==(i=s.ae)&&void 0!==i?i:"",explicit_parameters:null!==(r=s.ep)&&void 0!==r?r:[],undelegated_secondary_exposures:null!==(a=s.us)&&void 0!==a?a:[],parameter_rule_ids:s.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(t,n){var o,i;return t&&null!==(i=null!==(o=t[n])&&void 0!==o?o:t[(0,e._DJB2)(n)])&&void 0!==i?i:null}},V2InitializeContainer}function requireEvaluationStore(){if(hasRequiredEvaluationStore)return EvaluationStore;hasRequiredEvaluationStore=1,Object.defineProperty(EvaluationStore,"__esModule",{value:!0});const e=requireSrc$2(),t=requireV1InitializeContainer(),n=requireV2InitializeContainer();return EvaluationStore.default=class{constructor(e,t){this._sdkKey=e,this._options=t,this._valuesForExternalUse=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._valuesForExternalUse=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._valuesForExternalUse}setValues(o,i){var r,a;if(!o)return!1;const s=(0,e._typedJsonParse)(o.data,"has_updates","EvaluationResponse");if(null==s)return!1;if(this._source=o.source,!0!==(null==s?void 0:s.has_updates))return!0;return(null!==(r=s.time)&&void 0!==r?r:0)<this._lcut||(this._valuesForExternalUse=(0,e._typedJsonParse)(o.data,"has_updates","EvaluationResponse"),this._lcut=s.time,this._receivedAt=o.receivedAt,"init-v2"===s.response_format?this._values=new n.V2InitializeContainer(s):this._values=new t.V1InitializeContainer(s),this._bootstrapMetadata=this._extractBootstrapMetadata(o.source,s),o.source&&s.user&&this._setWarningState(i,s),e.SDKFlags.setFlags(this._sdkKey,null!==(a=s.sdk_flags)&&void 0!==a?a:{})),!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(t,n){var o,i,r;const a=e.StableID.get(this._sdkKey);if((null===(o=t.customIDs)||void 0===o?void 0:o.stableID)===a||!(null===(i=t.customIDs)||void 0===i?void 0:i.stableID)&&!a){if("user"in n){let o=n.user,i=Object.assign(Object.assign({},t),{analyticsOnlyMetadata:void 0,privateAttributes:void 0});(null===(r=this._options)||void 0===r?void 0:r.disableStableID)&&(i=Object.assign(Object.assign({},i),{customIDs:Object.assign(Object.assign({},i.customIDs),{stableID:void 0})}),o=Object.assign(Object.assign({},o),{customIDs:Object.assign(Object.assign({},o.customIDs),{stableID:void 0})})),(0,e._getFullUserHash)(i)!==(0,e._getFullUserHash)(o)&&this._warnings.add("PartialUserMatch")}}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 o=this.getCurrentSourceDetails();let i=o.reason;const r=null!==(t=o.warnings)&&void 0!==t?t:[];if("Bootstrap"===this._source&&r.length>0&&(i+=r[0]),"Uninitialized"!==i&&"NoValues"!==i){i=`${i}:${e?"Unrecognized":"Recognized"}`}const a="Bootstrap"===this._source&&null!==(n=this._bootstrapMetadata)&&void 0!==n?n:void 0;return a&&(o.bootstrapMetadata=a),Object.assign(Object.assign({},o),{reason:i})}},EvaluationStore}var Network={},EvaluationResponseDeltas={},hasRequiredEvaluationResponseDeltas,hasRequiredNetwork;function requireEvaluationResponseDeltas(){if(hasRequiredEvaluationResponseDeltas)return EvaluationResponseDeltas;hasRequiredEvaluationResponseDeltas=1,Object.defineProperty(EvaluationResponseDeltas,"__esModule",{value:!0}),EvaluationResponseDeltas._resolveDeltasResponse=void 0;const e=requireSrc$2();function t(e,t){null==e||e.forEach(e=>{delete t[e]})}return EvaluationResponseDeltas._resolveDeltasResponse=function(n,o){const i=(0,e._typedJsonParse)(o,"checksum","DeltasEvaluationResponse");if(!i)return{hadBadDeltaChecksum:!0};const r=function(e){const n=e;return t(e.deleted_gates,n.feature_gates),delete n.deleted_gates,t(e.deleted_configs,n.dynamic_configs),delete n.deleted_configs,t(e.deleted_layers,n.layer_configs),delete n.deleted_layers,n}(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)})}(n,i)),a=(0,e._DJB2Object)({feature_gates:r.feature_gates,dynamic_configs:r.dynamic_configs,layer_configs:r.layer_configs},2);return a===i.checksumV2?JSON.stringify(r):{hadBadDeltaChecksum:!0,badChecksum:a,badMergedConfigs:r,badFullResponse:i.deltas_full_response}},EvaluationResponseDeltas}function requireNetwork(){if(hasRequiredNetwork)return Network;hasRequiredNetwork=1;var e=Network&&Network.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(Network,"__esModule",{value:!0});const t=requireSrc$2(),n=requireEvaluationResponseDeltas();class o extends t.NetworkCore{constructor(e,n){super(e,n);const o=null==e?void 0:e.networkConfig;this._option=e,this._initializeUrlConfig=new t.UrlConfiguration(t.Endpoint._initialize,null==o?void 0:o.initializeUrl,null==o?void 0:o.api,null==o?void 0:o.initializeFallbackUrls)}fetchEvaluations(n,o,i,r,a){return e(this,void 0,void 0,function*(){var e,s,l,c,d,p;const u=o?(0,t._typedJsonParse)(o,"has_updates","InitializeResponse"):null;let m={user:r,hash:null!==(l=null===(s=null===(e=this._option)||void 0===e?void 0:e.networkConfig)||void 0===s?void 0:s.initializeHashAlgorithm)&&void 0!==l?l:"djb2",deltasResponseRequested:!1,full_checksum:null};if(null==u?void 0:u.has_updates){const e=(null==u?void 0:u.hash_used)!==(null!==(p=null===(d=null===(c=this._option)||void 0===c?void 0:c.networkConfig)||void 0===d?void 0:d.initializeHashAlgorithm)&&void 0!==p?p:"djb2");m=Object.assign(Object.assign({},m),{sinceTime:a&&!e?u.time:0,previousDerivedFields:"derived_fields"in u&&a?u.derived_fields:{},deltasResponseRequested:!0,full_checksum:u.full_checksum,partialUserMatchSinceTime:e?0:u.time})}return this._fetchEvaluations(n,u,m,i)})}_fetchEvaluations(t,o,i,r){return e(this,void 0,void 0,function*(){var e,a;const s=yield this.post({sdkKey:t,urlConfig:this._initializeUrlConfig,data:i,retries:2,isStatsigEncodable:!0,priority:r});if(204===(null==s?void 0:s.code))return'{"has_updates": false}';if(200!==(null==s?void 0:s.code))return null!==(e=null==s?void 0:s.body)&&void 0!==e?e:null;if(!0!==(null==o?void 0:o.has_updates)||!0!==(null===(a=s.body)||void 0===a?void 0:a.includes('"is_delta":true'))||!0!==i.deltasResponseRequested)return s.body;const l=(0,n._resolveDeltasResponse)(o,s.body);return"string"==typeof l?l:this._fetchEvaluations(t,o,Object.assign(Object.assign(Object.assign({},i),l),{deltasResponseRequested:!1}),r)})}}return Network.default=o,Network}var ParamStoreGetterFactory={},hasRequiredParamStoreGetterFactory;function requireParamStoreGetterFactory(){if(hasRequiredParamStoreGetterFactory)return ParamStoreGetterFactory;hasRequiredParamStoreGetterFactory=1,Object.defineProperty(ParamStoreGetterFactory,"__esModule",{value:!0}),ParamStoreGetterFactory._makeParamStoreGetter=void 0;const e=requireSrc$2(),t={disableExposureLog:!0};function n(e){return null==e||!1===e.disableExposureLog}function o(t,n){return null!=n&&!(0,e._isTypeMatch)(t,n)}return ParamStoreGetterFactory._makeParamStoreGetter=function(i,r,a){return(s,l)=>{if(null==r)return l;const c=r[s];if(null==c||null!=l&&(0,e._typeOf)(l)!==c.param_type)return l;switch(c.ref_type){case"static":return function(e){return e.value}(c);case"gate":return function(e,o,i){return e.getFeatureGate(o.gate_name,n(i)?void 0:t).value?o.pass_value:o.fail_value}(i,c,a);case"dynamic_config":return function(e,i,r,a){const s=e.getDynamicConfig(i.config_name,n(a)?void 0:t).get(i.param_name);return o(s,r)?r:s}(i,c,l,a);case"experiment":return function(e,i,r,a){const s=e.getExperiment(i.experiment_name,n(a)?void 0:t).get(i.param_name);return o(s,r)?r:s}(i,c,l,a);case"layer":return function(e,i,r,a){const s=e.getLayer(i.layer_name,n(a)?void 0:t).get(i.param_name);return o(s,r)?r:s}(i,c,l,a);default:return l}}},ParamStoreGetterFactory}var StatsigEvaluationsDataAdapter={},hasRequiredStatsigEvaluationsDataAdapter,hasRequiredStatsigClient,hasRequiredSrc$1;function requireStatsigEvaluationsDataAdapter(){if(hasRequiredStatsigEvaluationsDataAdapter)return StatsigEvaluationsDataAdapter;hasRequiredStatsigEvaluationsDataAdapter=1;var e=StatsigEvaluationsDataAdapter&&StatsigEvaluationsDataAdapter.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(StatsigEvaluationsDataAdapter,"__esModule",{value:!0}),StatsigEvaluationsDataAdapter.StatsigEvaluationsDataAdapter=void 0;const t=requireSrc$2(),n=requireNetwork();let o=class extends t.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(e,t,o){super.attach(e,t,o),null!==o&&o instanceof n.default?this._network=o:this._network=new n.default(null!=t?t:{})}getDataAsync(e,n,o){return this._getDataAsyncImpl(e,(0,t._normalizeUser)(n,this._options),o)}prefetchData(e,t){return this._prefetchDataImpl(e,t)}setData(e){const n=(0,t._typedJsonParse)(e,"has_updates","data");n&&"user"in n?super.setData(e,n.user):t.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(t,n,o,i){return e(this,void 0,void 0,function*(){var e;const r=yield null===(e=this._network)||void 0===e?void 0:e.fetchEvaluations(this._getSdkKey(),t,null==o?void 0:o.priority,n,i);return null!=r?r:null})}_getCacheKey(e){var n;const o=(0,t._getStorageKey)(this._getSdkKey(),e,null===(n=this._options)||void 0===n?void 0:n.customUserCacheKeyFunc);return`${t.DataAdapterCachePrefix}.${this._cacheSuffix}.${o}`}_isCachedResultValidFor204(e,n){return null!=e.fullUserHash&&e.fullUserHash===(0,t._getFullUserHash)(n)}};return StatsigEvaluationsDataAdapter.StatsigEvaluationsDataAdapter=o,StatsigEvaluationsDataAdapter}function requireStatsigClient(){if(hasRequiredStatsigClient)return StatsigClient;hasRequiredStatsigClient=1;var e=StatsigClient&&StatsigClient.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(StatsigClient,"__esModule",{value:!0});const t=requireSrc$2(),n=requireEvaluationStore(),o=requireNetwork(),i=requireParamStoreGetterFactory(),r=requireStatsigEvaluationsDataAdapter();let a=class a extends t.StatsigClientBase{static instance(e){const n=(0,t._getStatsigGlobal)().instance(e);return n instanceof a?n:(t.Log.warn((0,t._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new a(null!=e?e:"",{}))}constructor(e,i,a=null){var s,l;t.SDKType._setClientType(e,"javascript-client");const c=new o.default(a,e=>{this.$emt(e)});super(e,null!==(s=null==a?void 0:a.dataAdapter)&&void 0!==s?s:new r.StatsigEvaluationsDataAdapter,c,a),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(t.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(t.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(t.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(t.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(t.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(t.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new n.default(e,null!=a?a:null),this._network=c,this._user=this._configureUser(i,a),this._sdkInstanceID=(0,t.getUUID)(),this._contextHandle=new t.PrecomputedEvaluationsContextHandle(e,()=>this._options,()=>this._errorBoundary,()=>this._store.getValues(),()=>this._user,()=>this._sdkInstanceID);const d=null!==(l=null==a?void 0:a.plugins)&&void 0!==l?l:[];for(const t of d)t.bind(this)}initializeSync(e){var n;return"Uninitialized"!==this.loadingStatus?(0,t.createUpdateDetails)(!0,this._store.getSource(),-1,null,null,["MultipleInitializations",...null!==(n=this._store.getWarnings())&&void 0!==n?n:[]]):(this._logger.start(),this.updateUserSync(this._user,e))}initializeAsync(t){return e(this,void 0,void 0,function*(){return this._initializePromise||(this._initializePromise=this._initializeAsyncImpl(t)),this._initializePromise})}updateUserSync(e,t){const n=performance.now();try{return this._updateUserSyncImpl(e,t,n)}catch(o){const e=o instanceof Error?o:new Error(String(o));return this._createErrorUpdateDetails(e,n)}}_updateUserSyncImpl(e,n,o){var i;const r=[...null!==(i=this._store.getWarnings())&&void 0!==i?i:[]];this._resetForUser(e);const a=this.dataAdapter.getDataSync(this._user);null==a&&r.push("NoCachedValues"),this._store.setValues(a,this._user),this._finalizeUpdate(a);const s=null==n?void 0:n.disableBackgroundCacheRefresh;return!0===s||null==s&&"Bootstrap"===(null==a?void 0:a.source)||this._runPostUpdate(null!=a?a:null,this._user),(0,t.createUpdateDetails)(!0,this._store.getSource(),performance.now()-o,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),r)}updateUserAsync(t,n){return e(this,void 0,void 0,function*(){const e=performance.now();try{return yield this._updateUserAsyncImpl(t,n)}catch(o){const t=o instanceof Error?o:new Error(String(o));return this._createErrorUpdateDetails(t,e)}})}_updateUserAsyncImpl(n,o){return e(this,void 0,void 0,function*(){this._resetForUser(n);const e=this._user;t.Diagnostics._markInitOverallStart(this._sdkKey);let i=this.dataAdapter.getDataSync(e);if(this._store.setValues(i,this._user),this._setStatus("Loading",i),i=yield this.dataAdapter.getDataAsync(i,e,o),e!==this._user)return(0,t.createUpdateDetails)(!1,this._store.getSource(),-1,new Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let r=!1;null!=i&&(t.Diagnostics._markInitProcessStart(this._sdkKey),r=this._store.setValues(i,this._user),t.Diagnostics._markInitProcessEnd(this._sdkKey,{success:r})),this._finalizeUpdate(i),r||(this._errorBoundary.attachErrorIfNoneExists(t.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),t.Diagnostics._markInitOverallEnd(this._sdkKey,r,this._store.getCurrentSourceDetails());const a=t.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,t.createUpdateDetails)(r,this._store.getSource(),a,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){let e=(0,t._cloneObject)("StatsigUser",this._user);return null==e&&(t.Log.error("Failed to clone user"),e={}),{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:e,errorBoundary:this._errorBoundary,session:t.StatsigSession.get(this._sdkKey),stableID:t.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}getContextHandle(){return this._contextHandle}checkGate(e,t){return this.getFeatureGate(e,t).value}logEvent(e,t,n){const o="string"==typeof e?{eventName:e,value:t,metadata:n}:e;this.$emt({name:"log_event_called",event:o}),this._logger.enqueue(Object.assign(Object.assign({},o),{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(n){return e(this,void 0,void 0,function*(){return t.Storage.isReady()||(yield t.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,n)})}_createErrorUpdateDetails(e,n){var o;return(0,t.createUpdateDetails)(!1,this._store.getSource(),performance.now()-n,e,null,[...null!==(o=this._store.getWarnings())&&void 0!==o?o:[]])}_finalizeUpdate(e){this._store.finalize(),this._setStatus("Ready",e)}_runPostUpdate(e,n){this.dataAdapter.getDataAsync(e,n,{priority:"low"}).catch(e=>{t.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,n){var o,i,r;const a=(0,t._normalizeUser)(e,n),s=null===(o=a.customIDs)||void 0===o?void 0:o.stableID;if(s){const e=null===(r=(i=this.storageProvider).isReadyResolver)||void 0===r?void 0:r.call(i);e?e.then(()=>t.StableID.setOverride(s,this._sdkKey),()=>t.StableID.setOverride(s,this._sdkKey)):t.StableID.setOverride(s,this._sdkKey)}return Object.keys(this._possibleFirstTouchMetadata).length>0&&(a.analyticsOnlyMetadata=Object.assign(Object.assign({},a.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),a}_getFeatureGateImpl(e,n){var o,i;const{result:r,details:a}=this._store.getGate(e);this._checkUserHasIdForEvaluation(null==r?void 0:r.id_type,e,"Gate"),this._checkInitializationStatus(a.reason);const s=(0,t._makeFeatureGate)(e,a,r),l=null===(i=null===(o=this.overrideAdapter)||void 0===o?void 0:o.getGateOverride)||void 0===i?void 0:i.call(o,s,this._user,n),c=null!=l?l:s;return this._enqueueExposure(e,(0,t._createGateExposure)(this._user,c,this._store.getExposureMapping()),n),this.$emt({name:"gate_evaluation",gate:c}),c}_getDynamicConfigImpl(e,n){var o,i;const{result:r,details:a}=this._store.getConfig(e);this._checkUserHasIdForEvaluation(null==r?void 0:r.id_type,e,"Dynamic config"),this._checkInitializationStatus(a.reason);const s=(0,t._makeDynamicConfig)(e,a,r),l=null===(i=null===(o=this.overrideAdapter)||void 0===o?void 0:o.getDynamicConfigOverride)||void 0===i?void 0:i.call(o,s,this._user,n),c=null!=l?l:s;return this._enqueueExposure(e,(0,t._createConfigExposure)(this._user,c,this._store.getExposureMapping()),n),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:c}),c}_getExperimentImpl(e,n){var o,i,r,a;const{result:s,details:l}=this._store.getConfig(e);this._checkUserHasIdForEvaluation(null==s?void 0:s.id_type,e,"Experiment"),this._checkInitializationStatus(l.reason);const c=(0,t._makeExperiment)(e,l,s);null!=c.__evaluation&&(c.__evaluation.secondary_exposures=(0,t._mapExposures)(null!==(i=null===(o=c.__evaluation)||void 0===o?void 0:o.secondary_exposures)&&void 0!==i?i:[],this._store.getExposureMapping()));const d=null===(a=null===(r=this.overrideAdapter)||void 0===r?void 0:r.getExperimentOverride)||void 0===a?void 0:a.call(r,c,this._user,n),p=null!=d?d:c;return this._enqueueExposure(e,(0,t._createConfigExposure)(this._user,p,this._store.getExposureMapping()),n),this.$emt({name:"experiment_evaluation",experiment:p}),p}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(e,n){var o,i,r;const{result:a,details:s}=this._store.getLayer(e),l=(0,t._makeLayer)(e,s,a),c=null===(i=null===(o=this.overrideAdapter)||void 0===o?void 0:o.getLayerOverride)||void 0===i?void 0:i.call(o,l,this._user,n);(null==n?void 0:n.disableExposureLog)&&this._logger.incrementNonExposureCount(e);const d=(0,t._mergeOverride)(l,c,null!==(r=null==c?void 0:c.__value)&&void 0!==r?r:l.__value,o=>{(null==n?void 0:n.disableExposureLog)||this._enqueueExposure(e,(0,t._createLayerParameterExposure)(this._user,d,o,this._store.getExposureMapping()),n)});return this.$emt({name:"layer_evaluation",layer:d}),d}_getParameterStoreImpl(e,t){var n,o;const{result:r,details:a}=this._store.getParamStore(e);this._logger.incrementNonExposureCount(e);const s={name:e,details:a,__configuration:r,get:(0,i._makeParamStoreGetter)(this,r,t)},l=null===(o=null===(n=this.overrideAdapter)||void 0===n?void 0:n.getParamStoreOverride)||void 0===o?void 0:o.call(n,s,t);return null!=l&&(s.__configuration=l.config,s.details=l.details,s.get=(0,i._makeParamStoreGetter)(this,l.config,t)),s}_checkUserHasIdForEvaluation(e,n,o){e&&((0,t._getUnitIDFromUser)(this._user,e)||t.Log.warn(`The user does not have the required id_type "${e}" for ${o} "${n}"`))}_checkInitializationStatus(e){("Uninitialized"===e||e.startsWith("Loading"))&&t.Log.warn(`SDK initialization has not completed. Reason: ${e}`)}};return StatsigClient.default=a,StatsigClient}function requireSrc$1(){return hasRequiredSrc$1||(hasRequiredSrc$1=1,function(e){var t=src&&src.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),n=src&&src.__exportStar||function(e,n){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(n,o)||t(n,e,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigClient=void 0;const o=requireSrc$2(),i=requireStatsigClient();e.StatsigClient=i.default,n(requireSrc$2(),e);const r=Object.assign((0,o._getStatsigGlobal)(),{StatsigClient:i.default});e.default=r}(src)),src}var useStatsigInternalClientFactoryAsync={},hasRequiredUseStatsigInternalClientFactoryAsync,hasRequiredUseClientAsyncInit,hasRequiredStatsigProvider;function requireUseStatsigInternalClientFactoryAsync(){if(hasRequiredUseStatsigInternalClientFactoryAsync)return useStatsigInternalClientFactoryAsync;hasRequiredUseStatsigInternalClientFactoryAsync=1,Object.defineProperty(useStatsigInternalClientFactoryAsync,"__esModule",{value:!0}),useStatsigInternalClientFactoryAsync.useStatsigInternalClientFactoryAsync=void 0;const e=React,t=requireSrc$2();return useStatsigInternalClientFactoryAsync.useStatsigInternalClientFactoryAsync=function(n,o){const i=(0,e.useMemo)(()=>{var e;return null!==(e=(0,t._getInstance)(o.sdkKey))&&void 0!==e?e:n(o)},[]),[r,a]=(0,e.useState)("Ready"!==i.loadingStatus);return(0,e.useMemo)(()=>{"Ready"!==i.loadingStatus&&i.initializeAsync().catch(t.Log.error).finally(()=>a(!1))},[]),{client:i,isLoading:r}},useStatsigInternalClientFactoryAsync}function requireUseClientAsyncInit(){if(hasRequiredUseClientAsyncInit)return useClientAsyncInit;hasRequiredUseClientAsyncInit=1,Object.defineProperty(useClientAsyncInit,"__esModule",{value:!0}),useClientAsyncInit.useClientAsyncInit=void 0;const e=requireSrc$1(),t=requireUseStatsigInternalClientFactoryAsync();return useClientAsyncInit.useClientAsyncInit=function(n,o,i=null){return(0,t.useStatsigInternalClientFactoryAsync)(t=>new e.StatsigClient(t.sdkKey,t.initialUser,t.statsigOptions),{sdkKey:n,initialUser:o,statsigOptions:i})},useClientAsyncInit}function requireStatsigProvider(){if(hasRequiredStatsigProvider)return StatsigProvider;hasRequiredStatsigProvider=1,Object.defineProperty(StatsigProvider,"__esModule",{value:!0}),StatsigProvider.StatsigProvider=void 0;const e=requireJsxRuntime(),t=React,n=requireSrc$2(),o=requireStatsigContext(),i=requireUseClientAsyncInit();function r(n){const[r,a]=(0,t.useState)(0),c=(0,i.useClientAsyncInit)(n.sdkKey,n.user,n.options).client,[d,p]=(0,t.useState)(!l(c));s(c,a,p);const u=(0,t.useMemo)(()=>({renderVersion:r,client:c,isLoading:d}),[r,c,d]);return(0,e.jsx)(o.default.Provider,{value:u,children:null!=n.loadingComponent&&u.isLoading?n.loadingComponent:n.children})}function a(n){const[i,r]=(0,t.useState)(0),a=n.client,[c,d]=(0,t.useState)(!l(a));s(a,r,d);const p=(0,t.useMemo)(()=>({renderVersion:i,client:a,isLoading:c}),[i,a,c]);return(0,e.jsx)(o.default.Provider,{value:p,children:null!=n.loadingComponent&&p.isLoading?n.loadingComponent:n.children})}function s(e,o,i){(0,t.useEffect)(()=>{const t=()=>{o(e=>e+1),i(!l(e))};return n.SDKType._setBindingType("react"),e.$on("values_updated",t),()=>{e.flush().catch(e=>n.Log.error("An error occurred during flush",e)),e.off("values_updated",t)}},[e,o])}function l(e){return"isNoop"in e||"Ready"===e.loadingStatus}return StatsigProvider.StatsigProvider=function(t){return"client"in t?(("sdkKey"in t||"user"in t)&&n.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,e.jsx)(a,Object.assign({},t))):(0,e.jsx)(r,Object.assign({},t))},StatsigProvider}var useClientBootstrapInit={},useStatsigInternalClientFactoryBootstrap={},hasRequiredUseStatsigInternalClientFactoryBootstrap,hasRequiredUseClientBootstrapInit;function requireUseStatsigInternalClientFactoryBootstrap(){if(hasRequiredUseStatsigInternalClientFactoryBootstrap)return useStatsigInternalClientFactoryBootstrap;hasRequiredUseStatsigInternalClientFactoryBootstrap=1,Object.defineProperty(useStatsigInternalClientFactoryBootstrap,"__esModule",{value:!0}),useStatsigInternalClientFactoryBootstrap.useStatsigInternalClientFactoryBootstrap=void 0;const e=React,t=requireSrc$2();return useStatsigInternalClientFactoryBootstrap.useStatsigInternalClientFactoryBootstrap=function(n,o){const i=(0,e.useRef)((0,t._getInstance)(o.sdkKey));return(0,e.useMemo)(()=>{if(i.current)return i.current;const e=n(o);return i.current=e,o.useLegacyFormat?e.dataAdapter.setDataLegacy(o.initialValues,o.initialUser):e.dataAdapter.setData(o.initialValues),e.initializeSync(),e},[])},useStatsigInternalClientFactoryBootstrap}function requireUseClientBootstrapInit(){if(hasRequiredUseClientBootstrapInit)return useClientBootstrapInit;hasRequiredUseClientBootstrapInit=1,Object.defineProperty(useClientBootstrapInit,"__esModule",{value:!0}),useClientBootstrapInit.useClientBootstrapInit=void 0;const e=requireSrc$1(),t=requireUseStatsigInternalClientFactoryBootstrap();return useClientBootstrapInit.useClientBootstrapInit=function(n,o,i,r=null,a){return(0,t.useStatsigInternalClientFactoryBootstrap)(t=>new e.StatsigClient(t.sdkKey,t.initialUser,t.statsigOptions),{sdkKey:n,initialUser:o,initialValues:i,statsigOptions:r,useLegacyFormat:a})},useClientBootstrapInit}var useDynamicConfig={},hasRequiredUseDynamicConfig;function requireUseDynamicConfig(){if(hasRequiredUseDynamicConfig)return useDynamicConfig;hasRequiredUseDynamicConfig=1,Object.defineProperty(useDynamicConfig,"__esModule",{value:!0});const e=React,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useDynamicConfig.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useDynamicConfig hook failed to find a valid StatsigClient for dynamic config '${i}'.`),n.NoopEvaluationsClient.getDynamicConfig(i,r)):a.getDynamicConfig(i,r),[i,a,s,...r?Object.values(r):[]])},useDynamicConfig}var useExperiment={},hasRequiredUseExperiment;function requireUseExperiment(){if(hasRequiredUseExperiment)return useExperiment;hasRequiredUseExperiment=1,Object.defineProperty(useExperiment,"__esModule",{value:!0});const e=React,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useExperiment.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useExperiment hook failed to find a valid Statsig client for experiment '${i}'.`),n.NoopEvaluationsClient.getExperiment(i,r)):a.getExperiment(i,r),[i,a,s,...r?Object.values(r):[]])},useExperiment}var useFeatureGate={},hasRequiredUseFeatureGate;function requireUseFeatureGate(){if(hasRequiredUseFeatureGate)return useFeatureGate;hasRequiredUseFeatureGate=1,Object.defineProperty(useFeatureGate,"__esModule",{value:!0});const e=React,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useFeatureGate.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useFeatureGate hook failed to find a valid StatsigClient for gate '${i}'.`),n.NoopEvaluationsClient.getFeatureGate(i,r)):a.getFeatureGate(i,r),[i,a,s,...r?Object.values(r):[]])},useFeatureGate}var useGateValue={},hasRequiredUseGateValue;function requireUseGateValue(){if(hasRequiredUseGateValue)return useGateValue;hasRequiredUseGateValue=1,Object.defineProperty(useGateValue,"__esModule",{value:!0});const e=React,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useGateValue.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useGateValue hook failed to find a valid StatsigClient for gate '${i}'.`),n.NoopEvaluationsClient.checkGate(i,r)):a.checkGate(i,r),[i,a,s,...r?Object.values(r):[]])},useGateValue}var useLayer={},hasRequiredUseLayer;function requireUseLayer(){if(hasRequiredUseLayer)return useLayer;hasRequiredUseLayer=1,Object.defineProperty(useLayer,"__esModule",{value:!0});const e=React,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useLayer.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useLayer hook failed to find a valid Statsig client for layer '${i}'.`),n.NoopEvaluationsClient.getLayer(i,r)):a.getLayer(i,r),[i,a,s,...r?Object.values(r):[]])},useLayer}var useParameterStore={},hasRequiredUseParameterStore;function requireUseParameterStore(){if(hasRequiredUseParameterStore)return useParameterStore;hasRequiredUseParameterStore=1,Object.defineProperty(useParameterStore,"__esModule",{value:!0});const e=React,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useParameterStore.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useParameterStore hook failed to find a valid StatsigClient for parameter store '${i}'.`),n.NoopEvaluationsClient.getParameterStore(i,r)):a.getParameterStore(i,r),[i,a,s,...r?Object.values(r):[]])},useParameterStore}var useStatsigClient={},hasRequiredUseStatsigClient;function requireUseStatsigClient(){if(hasRequiredUseStatsigClient)return useStatsigClient;hasRequiredUseStatsigClient=1,Object.defineProperty(useStatsigClient,"__esModule",{value:!0}),useStatsigClient.useStatsigClient=void 0;const e=React,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useStatsigClient.useStatsigClient=function(){const{client:i,renderVersion:r,isLoading:a}=(0,e.useContext)(o.default),s=(0,e.useMemo)(()=>(0,n.isNoopClient)(i)?(t.Log.warn("Attempting to retrieve a StatsigClient but none was set."),n.NoopEvaluationsClient):i,[i,r]),l=[s,r],c=(0,e.useCallback)((e,t)=>s.checkGate(e,t),l),d=(0,e.useCallback)((e,t)=>s.getFeatureGate(e,t),l),p=(0,e.useCallback)((e,t)=>s.getDynamicConfig(e,t),l),u=(0,e.useCallback)((e,t)=>s.getExperiment(e,t),l),m=(0,e.useCallback)((e,t)=>s.getLayer(e,t),l),h=(0,e.useCallback)((e,t)=>s.getParameterStore(e,t),l),g=(0,e.useCallback)((e,t,n)=>"string"==typeof e?s.logEvent(e,t,n):s.logEvent(e),l);return(0,e.useMemo)(()=>({client:s,checkGate:c,getFeatureGate:d,getDynamicConfig:p,getExperiment:u,getLayer:m,getParameterStore:h,logEvent:g,isLoading:a}),[s,c,d,p,u,m,h,g,a])},useStatsigClient}var useStatsigUser={},hasRequiredUseStatsigUser,hasRequiredSrc;function requireUseStatsigUser(){if(hasRequiredUseStatsigUser)return useStatsigUser;hasRequiredUseStatsigUser=1,Object.defineProperty(useStatsigUser,"__esModule",{value:!0}),useStatsigUser.useStatsigUser=void 0;const e=React,t=requireStatsigContext(),n=requireUseStatsigClient();function o(e){return e.getContextHandle().user}return useStatsigUser.useStatsigUser=function(){const{client:i}=(0,n.useStatsigClient)(),{renderVersion:r}=(0,e.useContext)(t.default);return{user:(0,e.useMemo)(()=>o(i),[i,r]),updateUserSync:(0,e.useCallback)(e=>("function"==typeof e&&(e=e(o(i))),i.updateUserSync(e)),[i]),updateUserAsync:(0,e.useCallback)(e=>("function"==typeof e&&(e=e(o(i))),i.updateUserAsync(e)),[i])}},useStatsigUser}function requireSrc(){return hasRequiredSrc||(hasRequiredSrc=1,function(e){var t=src$2&&src$2.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),n=src$2&&src$2.__exportStar||function(e,n){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(n,o)||t(n,e,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.useStatsigUser=e.useStatsigInternalClientFactoryBootstrap=e.useStatsigInternalClientFactoryAsync=e.useStatsigClient=e.useParameterStore=e.useLayer=e.useGateValue=e.useFeatureGate=e.useExperiment=e.useDynamicConfig=e.useClientBootstrapInit=e.useClientAsyncInit=e.StatsigProvider=e.StatsigContext=void 0;const o=requireSrc$2(),i=requireStatsigContext();e.StatsigContext=i.default;const r=requireStatsigProvider();Object.defineProperty(e,"StatsigProvider",{enumerable:!0,get:function(){return r.StatsigProvider}});const a=requireUseClientAsyncInit();Object.defineProperty(e,"useClientAsyncInit",{enumerable:!0,get:function(){return a.useClientAsyncInit}});const s=requireUseClientBootstrapInit();Object.defineProperty(e,"useClientBootstrapInit",{enumerable:!0,get:function(){return s.useClientBootstrapInit}});const l=requireUseDynamicConfig();e.useDynamicConfig=l.default;const c=requireUseExperiment();e.useExperiment=c.default;const d=requireUseFeatureGate();e.useFeatureGate=d.default;const p=requireUseGateValue();e.useGateValue=p.default;const u=requireUseLayer();e.useLayer=u.default;const m=requireUseParameterStore();e.useParameterStore=m.default;const h=requireUseStatsigClient();Object.defineProperty(e,"useStatsigClient",{enumerable:!0,get:function(){return h.useStatsigClient}});const g=requireUseStatsigInternalClientFactoryAsync();Object.defineProperty(e,"useStatsigInternalClientFactoryAsync",{enumerable:!0,get:function(){return g.useStatsigInternalClientFactoryAsync}});const x=requireUseStatsigInternalClientFactoryBootstrap();Object.defineProperty(e,"useStatsigInternalClientFactoryBootstrap",{enumerable:!0,get:function(){return x.useStatsigInternalClientFactoryBootstrap}});const f=requireUseStatsigUser();Object.defineProperty(e,"useStatsigUser",{enumerable:!0,get:function(){return f.useStatsigUser}}),n(requireSrc$1(),e),Object.assign((0,o._getStatsigGlobal)(),{StatsigContext:i.default,StatsigProvider:r.StatsigProvider,useClientAsyncInit:a.useClientAsyncInit,useClientBootstrapInit:s.useClientBootstrapInit,useDynamicConfig:l.default,useExperiment:c.default,useFeatureGate:d.default,useGateValue:p.default,useLayer:u.default,useParameterStore:m.default,useStatsigClient:h.useStatsigClient,useStatsigInternalClientFactoryAsync:g.useStatsigInternalClientFactoryAsync,useStatsigInternalClientFactoryBootstrap:x.useStatsigInternalClientFactoryBootstrap,useStatsigUser:f.useStatsigUser})}(src$2)),src$2}var srcExports=requireSrc(),FeatureGatesNamesCockpit=(e=>(e.enableZeniGPTFeatureForMonthEndEmail="zeni_gpt_for_month_end_email_enabled",e.isBirdsEyeViewEnabled="is_birds_eye_view_enabled",e.isReviewTabVendorColumnEnabled="review_vendor_column_enabled",e.enableSendingMonthEndEmail="sending_month_end_email_enabled",e))(FeatureGatesNamesCockpit||{}),FeatureGatesNamesWebApp=(e=>(e.isVendorMagicLinkFeatureEnabled="is_vendor_magic_link_feature_enabled",e.billPaySetupShowInternationalPaymentByWise="bill_pay_setup_show_international_payment_by_wise",e.isDepositAccountsFeatureEnabled="is_deposit_accounts_feature_enabled",e.isLimitedCategoryForReimbursement="is_limited_category_for_reimbursements_enabled",e.isBillPayLocalCurrencyFeatureEnabled="is_bill_pay_local_currency_feature_enabled",e.isOpexByVendorFeatureEnabled="is_opex_by_vendor_feature_enabled",e.isInternationalPaymentShaVsOurFeatureEnabled="is_international_sha_vs_our_feature_enabled",e.isApAgingFeatureEnabled="is_ap_aging_feature_enabled",e.isArAgingFeatureEnabled="is_ar_aging_feature_enabled",e.isChargeCardFeatureEnabled="is_charge_card_feature_enabled",e.isEarlyPayFeatureEnabled="is_early_pay_feature_enabled",e.isVendorReviewFeatureEnabled="is_vendor_review_feature_enabled",e.isVendorRecommendationFeatureEnabled="is_vendor_recommendation_feature_enabled",e.isShowDeletedBillsFeatureEnabled="is_show_deleted_bills_feature_enabled",e.isShowDeletedReimbursementsFeatureEnabled="is_show_deleted_reimbursements_feature_enabled",e.isRecurringBillsFeatureEnabled="is_recurring_bills_feature_enabled",e.isScheduledJEPrepaidExpensesFeatureEnabled="is_scheduled_je_prepaid_expenses_feature_enabled",e.isScheduledJEFixedAssetsFeatureEnabled="is_scheduled_je_fixed_assets_feature_enabled",e.isScheduledJEAccruedExpensesFeatureEnabled="is_scheduled_je_accrued_expenses_feature_enabled",e.isReferralFeatureEnabled="is_referral_feature_enabled",e.isSettingsFeatureEnabled="is_settings_feature_enabled",e.isVendorBulkUpdateOnTransactionEnabled="is_vendor_bulk_update_on_transaction_enabled",e.isCashbackFeatureEnabled="is_cashback_feature_enabled",e.isBillPayBulkActionEnabled="is_bill_pay_bulk_action_enabled",e.isFiling1099FeatureEnabled="is_filing_1099_feature_enabled",e.isReimbursementBulkActionEnabled="is_reimbursement_bulk_action_enabled",e.isExpenseAutomationEnabled="is_expense_automation_enabled",e.isRevenueAutomationEnabled="is_revenue_automation_enabled",e.isIssuePhysicalCardEnabled="is_issue_physical_card_enabled",e.isTaskTemplatesEnabled="is_task_templates_enabled",e.isTaskManagerCustomerUserAccessEnabled="is_task_manager_customer_user_access_enabled",e.isShaDisabled="is_sha_disabled",e.isOurDisabled="is_our_disabled",e.isBillPayDetectInsufficientFundsEnabled="is_bill_pay_detect_insufficient_funds_enabled",e.isExpenseAutomationEnabledV2="is_expense_automation_enabled_v2",e.isDebitCardFeatureEnabled="is_debit_card_feature_enabled",e.isRealtimeInsightsFeatureEnabled="is_realtime_insights_feature_enabled",e.isTreasuryEnabled="is_treasury_enabled",e.isInvoicingFeatureEnabled="is_invoicing_feature_enabled",e.isChainOfThoughtEnabled="is_chain_of_thought_enabled",e.isRecommendationFeedbackEnabled="is_recommendation_feedback_enabled",e.isDashboardSidebarHalloweenAnimationEnabled="is_dashboard_sidebar_halloween_animation_enabled",e.isDashboardSidebarThanksGivingAnimationEnabled="is_dashboard_sidebar_thanksgiving_animation_enabled",e.isDashboardSidebarChristmasAnimationEnabled="is_dashboard_sidebar_christmas_animation_enabled",e.isDashboardSidebarNewYearAnimationEnabled="is_dashboard_sidebar_new_year_animation_enabled",e.isExpenseAutomationSearchAndFilterEnabled="is_expense_automation_search_and_filter_enabled",e.isChargeCardPaymentHistoryFeatureEnabled="is_charge_card_payment_history_feature_enabled",e.isIssuePhysicalDebitCardEnabled="is_issue_physical_debit_card_enabled",e.isAutoTransferRuleEnabled="is_auto_transfer_rule_enabled",e.isMissingReceiptsBulkUploadEnabled="is_missing_receipts_bulk_upload_enabled",e.isAiCfoFileUploadEnabled="is_ai_cfo_file_upload_enabled",e.isAiCfoAnswerExportEnabled="is_ai_cfo_answer_export_enabled",e.isAiCfoDiscoveryTipsEnabled="is_ai_cfo_discovery_tips_enabled",e.isAiCfoNavButtonEnabled="is_ai_cfo_nav_button_enabled",e.isTransactionDetailSplitViewEnabled="is_transaction_detail_split_view_enabled",e.isServiceWorkerPrefetchingEnabled="is_prefetching_enabled",e.isTransactionActivityEnabled="is_transaction_activity_enabled",e.isCreateTransferEntryFromExpenseEnabled="is_create_transfer_entry_from_expense_enabled",e.isCreateTransactionEnabled="is_create_transaction_enabled",e.isReportsHorizontalClassLayoutSwitchEnabled="is_reports_horizontal_class_layout_switch_enabled",e.isReportsCustomDateRangeEnabled="reports_custom_date_range",e.isAiCfoEnabled="is_ai_cfo_enabled",e.isProjectsTransactionsEnabled="is_projects_transactions_enabled",e.isAiCardCreationEnabled="is_ai_card_creation_enabled",e.isCardPolicyEnabled="is_card_policy_enabled",e.isTaskManagerNotificationControlsEnabled="is_task_manager_notification_controls_enabled",e.isTaskSnoozeEnabled="is_task_snooze_enabled",e.isTaskVisibilityEnabled="is_task_visibility_enabled",e.isTaskCannedResponsesEnabled="is_task_canned_responses_enabled",e.isTaskCategorizationEnabled="is_task_categorization_enabled",e.isTaskBulkResolutionEnabled="is_task_bulk_resolution_enabled",e.isTaskAssigneeSortingEnabled="is_task_assignee_sorting_enabled",e.isTaskRecurringParentEnabled="is_task_recurring_parent_enabled",e.isTaskGroupAssigneesEnabled="is_task_group_assignees_enabled",e.aiAuditScorePercentage="ai_audit_score_percentage",e.isReconV3Enabled="is_reconciliation_v3_enabled",e.isReconciliationCombinedStatementEnabled="is_reconciliation_combined_statement_enabled",e.isReconReportEnabled="is_recon_report_enabled",e.isTransactionSplitEnabled="transaction_split_enabled",e.isAccrualEnabled="is_accrual_enabled",e))(FeatureGatesNamesWebApp||{});const FeatureGatesNames={...FeatureGatesNamesCockpit,...FeatureGatesNamesWebApp},CONFIG_SYNC_INTERVAL_MS=18e5;Object.values(FeatureGatesNames),Object.values(DynamicConfigNames);const StatsigNetworkValuesContext=React.createContext(!0),useIsFeatureGateLoading=()=>!React.useContext(StatsigNetworkValuesContext),useZeniFeatureGate=e=>{const t=useIsFeatureGateLoading();try{return{isFeatureGateLoading:t,isFeatureEnabled:srcExports.useFeatureGate(e).value}}catch{return{isFeatureGateLoading:t,isFeatureEnabled:!1}}},useZeniDynamicConfig=e=>{const t=srcExports.useDynamicConfig(e);try{return{isDynamicConfigLoading:!1,configValue:t.value}}catch{return{isDynamicConfigLoading:!1,configValue:{}}}},ZeniFeatureProvider=e=>!0===e.zeniFeatureProviderConfig.nonBlockingInit?jsxRuntimeExports.jsx(NonBlockingZeniFeatureProvider,{...e}):jsxRuntimeExports.jsx(BlockingZeniFeatureProvider,{...e}),useZeniStatsigUser=e=>React.useMemo(()=>({...null!=e.userId?{userID:e.userId}:{},...null!=e.userEmail?{email:e.userEmail}:{},custom:{company_id:e.companyId??"",connected_account_provider:e.connectedAccountProvider??""}}),[e.companyId,e.connectedAccountProvider,e.userEmail,e.userId]),BlockingZeniFeatureProvider=({featureGateCustomFields:e,zeniFeatureProviderConfig:t,children:n})=>{const o=useZeniStatsigUser(e),i={networkConfig:{api:t.providerEndPoint,initializeUrl:`${t.providerEndPoint}/initialize`},environment:{tier:t.currentFeatureEnv},disableLogging:!0},{client:r,isLoading:a}=srcExports.useClientAsyncInit(t.featureClientSecret,o,i);return React.useEffect(()=>{null!=r&&!1===a&&r.updateUserAsync(o)},[r,o,a]),React.useEffect(()=>{if(null==r||a)return;const e=setInterval(()=>{r.updateUserAsync(o).catch(e=>{console.warn("[Statsig] Config refresh failed.",e)})},CONFIG_SYNC_INTERVAL_MS);return()=>clearInterval(e)},[r,o,a]),a?jsxRuntimeExports.jsx(InitializationComponent,{}):jsxRuntimeExports.jsx(srcExports.StatsigProvider,{client:r,children:n},e.companyId)},statsigIdentity=e=>[e.userID??"",e.custom?.company_id??""].join(":"),STATSIG_EVALUATIONS_CACHE_PREFIX="statsig.cached.evaluations",MAX_STORED_COMPANIES_PER_USER=2,statsigCacheKey=(e,t)=>srcExports._DJB2([e,t.userID??"",t.custom?.company_id??""].join("|"));function keepRecentCompaniesOnly(e,t){const n=t.custom?.company_id;if(null==t.userID||null==n||""===n)return;const o=`zeni.statsig.recent_companies.${t.userID}`;try{const i=JSON.parse(window.localStorage.getItem(o)??"[]"),r=Array.isArray(i)?i.filter(e=>"string"==typeof e&&e!==String(n)):[],a=[String(n),...r];a.slice(MAX_STORED_COMPANIES_PER_USER).forEach(n=>{window.localStorage.removeItem(`${STATSIG_EVALUATIONS_CACHE_PREFIX}.${statsigCacheKey(e,{...t,custom:{...t.custom,company_id:n}})}`)}),window.localStorage.setItem(o,JSON.stringify(a.slice(0,MAX_STORED_COMPANIES_PER_USER)))}catch{}}const nonBlockingClients=new Map;function startStatsigSession(e,t,n,o){const i=nonBlockingClients.get(e)??new srcExports.StatsigClient(e,t,n);nonBlockingClients.set(e,i),"Uninitialized"===i.loadingStatus&&i.initializeSync({disableBackgroundCacheRefresh:!0});let r=0;const a={client:i,hasSettledOnce:!1,hasStoredValues:!1,lastRequestedUser:t,refresh:t=>{r+=1;const n=r;statsigIdentity(t)!==statsigIdentity(a.lastRequestedUser)&&o(null),a.lastRequestedUser=t;const s=()=>{n===r&&(keepRecentCompaniesOnly(e,t),a.hasSettledOnce=!0,o(statsigIdentity(t)))};i.updateUserAsync(t).then(s,s)}};return a.refresh(t),a.hasStoredValues=null!=t.userID&&null!=i.getContext().values,a}const NonBlockingZeniFeatureProvider=({featureGateCustomFields:e,zeniFeatureProviderConfig:t,children:n})=>{const o=useZeniStatsigUser(e),[i,r]=React.useState(null),[a]=React.useState(()=>startStatsigSession(t.featureClientSecret,o,{networkConfig:{api:t.providerEndPoint,initializeUrl:`${t.providerEndPoint}/initialize`},environment:{tier:t.currentFeatureEnv},disableLogging:!0,customUserCacheKeyFunc:statsigCacheKey},r));if(React.useEffect(()=>{o!==a.lastRequestedUser&&a.refresh(o)},[a,o]),React.useEffect(()=>{const e=setInterval(()=>{a.client.updateUserAsync(o).catch(e=>{console.warn("[Statsig] Config refresh failed.",e)})},CONFIG_SYNC_INTERVAL_MS);return()=>clearInterval(e)},[a,o]),!a.hasStoredValues&&!a.hasSettledOnce)return jsxRuntimeExports.jsx(InitializationComponent,{});const s=null!=o.userID&&i===statsigIdentity(o);return jsxRuntimeExports.jsx(StatsigNetworkValuesContext.Provider,{value:s,children:jsxRuntimeExports.jsx(srcExports.StatsigProvider,{client:a.client,children:n},e.companyId)})},BusyContainer$i=styled$2.div`
|
|
2128
|
+
`;var now_1,hasRequiredNow,_trimmedEndIndex,hasRequired_trimmedEndIndex,_baseTrim,hasRequired_baseTrim,isSymbol_1,hasRequiredIsSymbol,toNumber_1,hasRequiredToNumber,debounce_1,hasRequiredDebounce;function requireNow(){if(hasRequiredNow)return now_1;hasRequiredNow=1;var e=require_root();return now_1=function(){return e.Date.now()}}function require_trimmedEndIndex(){if(hasRequired_trimmedEndIndex)return _trimmedEndIndex;hasRequired_trimmedEndIndex=1;var e=/\s/;return _trimmedEndIndex=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}}function require_baseTrim(){if(hasRequired_baseTrim)return _baseTrim;hasRequired_baseTrim=1;var e=require_trimmedEndIndex(),t=/^\s+/;return _baseTrim=function(n){return n?n.slice(0,e(n)+1).replace(t,""):n}}function requireIsSymbol(){if(hasRequiredIsSymbol)return isSymbol_1;hasRequiredIsSymbol=1;var e=require_baseGetTag(),t=requireIsObjectLike();return isSymbol_1=function(n){return"symbol"==typeof n||t(n)&&"[object Symbol]"==e(n)}}function requireToNumber(){if(hasRequiredToNumber)return toNumber_1;hasRequiredToNumber=1;var e=require_baseTrim(),t=requireIsObject(),n=requireIsSymbol(),o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,r=/^0o[0-7]+$/i,a=parseInt;return toNumber_1=function(s){if("number"==typeof s)return s;if(n(s))return NaN;if(t(s)){var l="function"==typeof s.valueOf?s.valueOf():s;s=t(l)?l+"":l}if("string"!=typeof s)return 0===s?s:+s;s=e(s);var c=i.test(s);return c||r.test(s)?a(s.slice(2),c?2:8):o.test(s)?NaN:+s}}function requireDebounce(){if(hasRequiredDebounce)return debounce_1;hasRequiredDebounce=1;var e=requireIsObject(),t=requireNow(),n=requireToNumber(),o=Math.max,i=Math.min;return debounce_1=function(r,a,s){var l,c,d,p,u,m,h=0,g=!1,x=!1,f=!0;if("function"!=typeof r)throw new TypeError("Expected a function");function y(e){var t=l,n=c;return l=c=void 0,h=e,p=r.apply(n,t)}function S(e){var t=e-m;return void 0===m||t>=a||t<0||x&&e-h>=d}function C(){var e=t();if(S(e))return b(e);u=setTimeout(C,function(e){var t=a-(e-m);return x?i(t,d-(e-h)):t}(e))}function b(e){return u=void 0,f&&l?y(e):(l=c=void 0,p)}function $(){var e=t(),n=S(e);if(l=arguments,c=this,m=e,n){if(void 0===u)return function(e){return h=e,u=setTimeout(C,a),g?y(e):p}(m);if(x)return clearTimeout(u),u=setTimeout(C,a),y(m)}return void 0===u&&(u=setTimeout(C,a)),p}return a=n(a)||0,e(s)&&(g=!!s.leading,d=(x="maxWait"in s)?o(n(s.maxWait)||0,a):d,f="trailing"in s?!!s.trailing:f),$.cancel=function(){void 0!==u&&clearTimeout(u),h=0,l=m=c=u=void 0},$.flush=function(){return void 0===u?p:b(t())},$},debounce_1}var debounceExports=requireDebounce();const debounce=getDefaultExportFromCjs(debounceExports);var DynamicConfigNamesCockpit=(e=>(e.cardsTabCockpitUser="cards_tab_cockpit_enabled_users",e.monthEndInsightsEnablement="month_end_insights_enablement",e.expenseAutomationEnablement="expense_automation_enablement",e.monthEndPreviewEnablement="month_end_preview_enablement",e.qboConnectionPoolEnablement="qbo_connection_pool_enablement",e.aiAccountantOnboardingConfig="ai_accountant_onboarding_config",e.creditAgentEnablement="credit_agent_enablement",e.cockpitControlsConfig="cockpit_controls_config",e))(DynamicConfigNamesCockpit||{}),DynamicConfigNamesWebApp=(e=>(e.treDynamicConfig="tre_dynamic_config",e.documentAiReceiptMaxSizeLimitBytesConfig="document_ai_receipt_max_size_limit_bytes_config",e.meetingLinksConfig="meeting_links_config",e.zeniAssistConfig="zeni_assist_config",e.zeniCardsConfig="zeni_cards_config",e.zeniAccountsConfig="deposit_accounts_config",e.expressPayConfig="express_pay_config",e.accountReconGLAccountsConfig="account_recon_gl_accounts_config",e.treasuryConfig="treasury_config",e.newTagOnMenuConfig="new_tag_on_menu_config",e.sameDayAchDisablementConfig="same_day_ach_disablement_config",e.aiCfoMessageDynamicConfig="ai_cfo_message_dynamic_config",e.aiCfoDiscoveryTipsConfig="ai_cfo_discovery_tips_config",e.webappPrefetchConfig="webapp_prefetch_config",e.expenseAutomationEnablementZeniUsers="expense_automation_enablement_zeni_users",e.approvalRuleV3Config="approval_rule_v3_config",e.transactionCategorizationConfig="transaction_categorization_config",e.zeniCardsVisibilityConfig="zeni_cards_visibility_config",e.updateTransactionTypeConfig="update_transaction_type_config",e.createTransactionTransactionTypeSupportedConfig="create_transaction_transaction_type_supported_config",e.resetKycKybConfig="reset_kyc_kyb_config",e))(DynamicConfigNamesWebApp||{}),DynamicConfigNamesShared=(e=>(e.sessionAutoLogoutConfig="session_auto_logout_config",e))(DynamicConfigNamesShared||{});const DynamicConfigNames={...DynamicConfigNamesCockpit,...DynamicConfigNamesWebApp,...DynamicConfigNamesShared};var noop_1,hasRequiredNoop;function requireNoop(){if(hasRequiredNoop)return noop_1;return hasRequiredNoop=1,noop_1=function(){}}var noopExports=requireNoop();const noop$9=getDefaultExportFromCjs(noopExports);var src$2={},src$1={},$_StatsigGlobal={},Log={},hasRequiredLog$1,hasRequired$_StatsigGlobal;function requireLog$1(){return hasRequiredLog$1||(hasRequiredLog$1=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Log=e.LogLevel=void 0;function t(e){return e.unshift("[Statsig]"),e}e.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class n{static info(...o){n.level>=e.LogLevel.Info&&console.info(" INFO ",...t(o))}static debug(...o){n.level>=e.LogLevel.Debug&&console.debug(" DEBUG ",...t(o))}static warn(...o){n.level>=e.LogLevel.Warn&&console.warn(" WARN ",...t(o))}static error(...o){n.level>=e.LogLevel.Error&&console.error(" ERROR ",...t(o))}}e.Log=n,n.level=e.LogLevel.Warn}(Log)),Log}function require$_StatsigGlobal(){return hasRequired$_StatsigGlobal||(hasRequired$_StatsigGlobal=1,function(e){var t,n,o;Object.defineProperty(e,"__esModule",{value:!0}),e._getInstance=e._getStatsigGlobalFlag=e._getStatsigGlobal=void 0;const i=requireLog$1();e._getStatsigGlobal=()=>{try{return"undefined"!=typeof __STATSIG__?__STATSIG__:c}catch(e){return c}};e._getStatsigGlobalFlag=t=>(0,e._getStatsigGlobal)()[t];e._getInstance=t=>{const n=(0,e._getStatsigGlobal)();return t?n.instances&&n.instances[t]:(n.instances&&Object.keys(n.instances).length>1&&i.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__",a="undefined"!=typeof window?window:{},s=void 0!==commonjsGlobal$1?commonjsGlobal$1:{},l="undefined"!=typeof globalThis?globalThis:{},c=null!==(o=null!==(n=null!==(t=a[r])&&void 0!==t?t:s[r])&&void 0!==n?n:l[r])&&void 0!==o?o:{instance:e._getInstance};a[r]=c,s[r]=c,l[r]=c}($_StatsigGlobal)),$_StatsigGlobal}var Diagnostics={},hasRequiredDiagnostics;function requireDiagnostics(){return hasRequiredDiagnostics||(hasRequiredDiagnostics=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Diagnostics=void 0;const t=new Map,n="start",o="end",i="statsig::diagnostics";function r(e,t,n,o){return Object.assign({key:n,action:t,step:o,timestamp:Date.now()},e)}function a(e,n){var o;const i=null!==(o=t.get(e))&&void 0!==o?o:[];i.push(n),t.set(e,i)}function s(e,t){if(t in e)return e[t]}e.Diagnostics={_getMarkers:e=>t.get(e),_markInitOverallStart:e=>{a(e,r({},n,"overall"))},_markInitOverallEnd:(e,t,n)=>{a(e,r({success:t,error:t?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:n},o,"overall"))},_markInitNetworkReqStart:(e,t)=>{a(e,r(t,n,"initialize","network_request"))},_markInitNetworkReqEnd:(e,t)=>{a(e,r(t,o,"initialize","network_request"))},_markInitProcessStart:e=>{a(e,r({},n,"initialize","process"))},_markInitProcessEnd:(e,t)=>{a(e,r(t,o,"initialize","process"))},_clearMarkers:e=>{t.delete(e)},_formatError(e){if(e&&"object"==typeof e)return{code:s(e,"code"),name:s(e,"name"),message:s(e,"message")}},_getDiagnosticsData(t,n,o,i){var r;return{success:!0===(null==t?void 0:t.ok),statusCode:null==t?void 0:t.status,sdkRegion:null===(r=null==t?void 0:t.headers)||void 0===r?void 0:r.get("x-statsig-region"),isDelta:!0===o.includes('"is_delta":true')||void 0,attempt:n,error:e.Diagnostics._formatError(i)}},_enqueueDiagnosticsEvent(t,n,o,r){const a=e.Diagnostics._getMarkers(o);if(null==a||a.length<=0)return-1;const s=a[a.length-1].timestamp-a[0].timestamp;e.Diagnostics._clearMarkers(o);const l=function(e,t){const n={eventName:i,user:e,value:null,metadata:t,time:Date.now()};return n}(t,{context:"initialize",markers:a.slice(),statsigOptions:r});return n.enqueue(l),s}}}(Diagnostics)),Diagnostics}var EventLogger={},BatchedEventsQueue={},EventBatch={},hasRequiredEventBatch;function requireEventBatch(){if(hasRequiredEventBatch)return EventBatch;hasRequiredEventBatch=1,Object.defineProperty(EventBatch,"__esModule",{value:!0}),EventBatch.EventBatch=void 0;return EventBatch.EventBatch=class{constructor(e){this.attempts=0,this.createdAt=Date.now(),this.events=e}incrementAttempts(){this.attempts++}},EventBatch}var EventRetryConstants={},hasRequiredEventRetryConstants,hasRequiredBatchedEventsQueue;function requireEventRetryConstants(){return hasRequiredEventRetryConstants||(hasRequiredEventRetryConstants=1,Object.defineProperty(EventRetryConstants,"__esModule",{value:!0}),EventRetryConstants.EventRetryConstants=void 0,EventRetryConstants.EventRetryConstants={MAX_RETRY_ATTEMPTS:8,DEFAULT_BATCH_SIZE:100,MAX_PENDING_BATCHES:40,TICK_INTERVAL_MS:1e3,QUICK_FLUSH_WINDOW_MS:200,MAX_LOCAL_STORAGE:500,get MAX_QUEUED_EVENTS(){return this.DEFAULT_BATCH_SIZE*this.MAX_PENDING_BATCHES}}),EventRetryConstants}function requireBatchedEventsQueue(){if(hasRequiredBatchedEventsQueue)return BatchedEventsQueue;hasRequiredBatchedEventsQueue=1,Object.defineProperty(BatchedEventsQueue,"__esModule",{value:!0}),BatchedEventsQueue.BatchQueue=void 0;const e=requireEventBatch(),t=requireEventRetryConstants();return BatchedEventsQueue.BatchQueue=class{constructor(e=t.EventRetryConstants.DEFAULT_BATCH_SIZE){this._batches=[],this._batchSize=e}batchSize(){return this._batchSize}requeueBatch(e){return this._enqueueBatch(e)}hasFullBatch(){return this._batches.some(e=>e.events.length>=this._batchSize)}takeNextBatch(){return this._batches.shift()}takeAllBatches(){const e=this._batches;return this._batches=[],e}createBatches(t){let n=0,o=0;for(;n<t.length;){const i=t.slice(n,n+this._batchSize);o+=this._enqueueBatch(new e.EventBatch(i)),n+=this._batchSize}return o}_enqueueBatch(e){this._batches.push(e);let n=0;for(;this._batches.length>t.EventRetryConstants.MAX_PENDING_BATCHES;){const e=this._batches.shift();e&&(n+=e.events.length)}return n}},BatchedEventsQueue}var CacheKey={},Hashing={},TypingUtils={},hasRequiredTypingUtils,hasRequiredHashing,hasRequiredCacheKey;function requireTypingUtils(){if(hasRequiredTypingUtils)return TypingUtils;return hasRequiredTypingUtils=1,Object.defineProperty(TypingUtils,"__esModule",{value:!0}),TypingUtils._isTypeMatch=TypingUtils._typeOf=void 0,TypingUtils._typeOf=function(e){return Array.isArray(e)?"array":typeof e},TypingUtils._isTypeMatch=function(e,t){const n=e=>Array.isArray(e)?"array":null===e?"null":typeof e;return n(e)===n(t)},TypingUtils}function requireHashing(){return hasRequiredHashing||(hasRequiredHashing=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._getSortedObject=e._DJB2Object=e._DJB2=void 0;const t=requireTypingUtils();e._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)};e._DJB2Object=(t,n)=>(0,e._DJB2)(JSON.stringify((0,e._getSortedObject)(t,n)));e._getSortedObject=(n,o)=>{if(null==n)return null;const i=Object.keys(n).sort(),r={};return i.forEach(i=>{const a=n[i];0!==o&&"object"===(0,t._typeOf)(a)?r[i]=(0,e._getSortedObject)(a,null!=o?o-1:o):r[i]=a}),r}}(Hashing)),Hashing}function requireCacheKey(){if(hasRequiredCacheKey)return CacheKey;hasRequiredCacheKey=1,Object.defineProperty(CacheKey,"__esModule",{value:!0}),CacheKey._getStorageKey=CacheKey._getUserStorageKey=void 0;const e=requireHashing();function t(t,n,o){var i;if(o)return o(t,n);const r=n&&n.customIDs?n.customIDs:{},a=[`uid:${null!==(i=null==n?void 0:n.userID)&&void 0!==i?i:""}`,`cids:${Object.keys(r).sort((e,t)=>e.localeCompare(t)).map(e=>`${e}-${r[e]}`).join(",")}`,`k:${t}`];return(0,e._DJB2)(a.join("|"))}return CacheKey._getUserStorageKey=t,CacheKey._getStorageKey=function(n,o,i){return o?t(n,o,i):(0,e._DJB2)(`k:${n}`)},CacheKey}var FlushCoordinator={},EventSender={},NetworkConfig={},hasRequiredNetworkConfig;function requireNetworkConfig(){return hasRequiredNetworkConfig||(hasRequiredNetworkConfig=1,e=NetworkConfig,Object.defineProperty(e,"__esModule",{value:!0}),e.NetworkParam=e.NetworkDefault=e.Endpoint=void 0,e.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},e.NetworkDefault={[e.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[e.Endpoint._initialize]:"https://featureassets.org/v1",[e.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},e.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}),NetworkConfig;var e}var SDKType={},hasRequiredSDKType;function requireSDKType(){if(hasRequiredSDKType)return SDKType;hasRequiredSDKType=1,Object.defineProperty(SDKType,"__esModule",{value:!0}),SDKType.SDKType=void 0;const e={};let t;return SDKType.SDKType={_get:n=>{var o;return(null!==(o=e[n])&&void 0!==o?o:"js-mono")+(null!=t?t:"")},_setClientType(t,n){e[t]=n},_setBindingType(e){t&&"-react"!==t||(t="-"+e)}},SDKType}var StatsigMetadata={},hasRequiredStatsigMetadata;function requireStatsigMetadata(){return hasRequiredStatsigMetadata||(hasRequiredStatsigMetadata=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigMetadataProvider=e.SDK_VERSION=void 0,e.SDK_VERSION="3.33.0";let t={sdkVersion:e.SDK_VERSION,sdkType:"js-mono"};e.StatsigMetadataProvider={get:()=>t,add:e=>{t=Object.assign(Object.assign({},t),e)}}}(StatsigMetadata)),StatsigMetadata}var VisibilityObserving={},SafeJs={},hasRequiredSafeJs,hasRequiredVisibilityObserving,hasRequiredEventSender;function requireSafeJs(){return hasRequiredSafeJs||(hasRequiredSafeJs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._cloneObject=e._getUnloadEvent=e._getCurrentPageUrlSafe=e._addDocumentEventListenerSafe=e._addWindowEventListenerSafe=e._isServerEnv=e._getDocumentSafe=e._getWindowSafe=void 0;const t=requireLog$1();e._getWindowSafe=()=>"undefined"!=typeof window?window:null;e._getDocumentSafe=()=>{var t;const n=(0,e._getWindowSafe)();return null!==(t=null==n?void 0:n.document)&&void 0!==t?t:null};e._isServerEnv=()=>{if(null!==(0,e._getDocumentSafe)())return!1;const t="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node;return"string"==typeof EdgeRuntime||t};e._addWindowEventListenerSafe=(t,n)=>{const o=(0,e._getWindowSafe)();"function"==typeof(null==o?void 0:o.addEventListener)&&o.addEventListener(t,n)};e._addDocumentEventListenerSafe=(t,n)=>{const o=(0,e._getDocumentSafe)();"function"==typeof(null==o?void 0:o.addEventListener)&&o.addEventListener(t,n)};e._getCurrentPageUrlSafe=()=>{var t;try{return null===(t=(0,e._getWindowSafe)())||void 0===t?void 0:t.location.href.split(/[?#]/)[0]}catch(n){return}};e._getUnloadEvent=()=>{const t=(0,e._getWindowSafe)();if(!t)return"beforeunload";return"onpagehide"in t?"pagehide":"beforeunload"};e._cloneObject=(e,n)=>{try{return JSON.parse(JSON.stringify(n))}catch(o){return t.Log.error(`Failed to clone object ${e}`),null}}}(SafeJs)),SafeJs}function requireVisibilityObserving(){return hasRequiredVisibilityObserving||(hasRequiredVisibilityObserving=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._notifyVisibilityChanged=e._subscribeToVisiblityChanged=e._isUnloading=e._isCurrentlyVisible=void 0;const t=requireSafeJs(),n="foreground",o="background",i=[];let r=n,a=!1;e._isCurrentlyVisible=()=>r===n;e._isUnloading=()=>a;e._subscribeToVisiblityChanged=e=>{i.unshift(e)};e._notifyVisibilityChanged=e=>{e!==r&&(r=e,i.forEach(t=>t(e)))},(0,t._addWindowEventListenerSafe)("focus",()=>{a=!1,(0,e._notifyVisibilityChanged)(n)}),(0,t._addWindowEventListenerSafe)("blur",()=>(0,e._notifyVisibilityChanged)(o)),(0,t._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,e._notifyVisibilityChanged)("visible"===document.visibilityState?n:o)}),(0,t._addWindowEventListenerSafe)((0,t._getUnloadEvent)(),()=>{a=!0,(0,e._notifyVisibilityChanged)(o)})}(VisibilityObserving)),VisibilityObserving}function requireEventSender(){if(hasRequiredEventSender)return EventSender;hasRequiredEventSender=1;var e=EventSender&&EventSender.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(EventSender,"__esModule",{value:!0}),EventSender.EventSender=void 0;const t=requireLog$1(),n=requireNetworkConfig(),o=requireSDKType(),i=requireStatsigMetadata(),r=requireVisibilityObserving();return EventSender.EventSender=class{constructor(e,t,n,o,i){this._sdkKey=e,this._network=t,this._emitter=n,this._options=i,this._logEventUrlConfig=o}setLogEventCompressionMode(e){this._network.setLogEventCompressionMode(e)}sendBatch(n){return e(this,void 0,void 0,function*(){var e,o,i;let a="event_sender_unexpected_exception";const s={};try{const t=(0,r._isUnloading)()&&this._network.isBeaconSupported()&&null==(null===(o=null===(e=this._options)||void 0===e?void 0:e.networkConfig)||void 0===o?void 0:o.networkOverrideFunc);a="event_sender_pre_logs_flushed_emitter_exception",this._emitter({name:"pre_logs_flushed",events:n.events}),a=t?"event_sender_unexpected_exception":"event_sender_post_exception";const i=t?this._sendEventsViaBeacon(n,s):yield this._sendEventsViaPost(n,s);return i.success?(a="event_sender_logs_flushed_emitter_exception",this._emitter({name:"logs_flushed",events:n.events}),i):Object.assign(Object.assign(Object.assign({success:!1,statusCode:i.statusCode,failurePath:i.failurePath},i.failureErrorMessage?{failureErrorMessage:i.failureErrorMessage}:{}),i.failureDiagnosticBucket?{failureDiagnosticBucket:i.failureDiagnosticBucket}:{}),i.failureDiagnosticMetadata?{failureDiagnosticMetadata:i.failureDiagnosticMetadata}:{})}catch(l){return t.Log.warn("Failed to send batch:",l),Object.assign(Object.assign(Object.assign({success:!1,statusCode:-1,failurePath:null!==(i=s.path)&&void 0!==i?i:a},s.errorMessage?{failureErrorMessage:s.errorMessage}:{}),s.diagnosticBucket?{failureDiagnosticBucket:s.diagnosticBucket}:{}),s.diagnosticMetadata?{failureDiagnosticMetadata:s.diagnosticMetadata}:{})}})}_sendEventsViaPost(t,n){return e(this,void 0,void 0,function*(){var e,o;const i=yield this._network.post(this._getRequestData(t),n),r=null!==(e=null==i?void 0:i.code)&&void 0!==e?e:-1;return-1===r?Object.assign(Object.assign(Object.assign({success:!1,statusCode:-1,failurePath:null!==(o=n.path)&&void 0!==o?o:void 0===i?"event_sender_post_returned_undefined":"event_sender_post_returned_null"},n.errorMessage?{failureErrorMessage:n.errorMessage}:{}),n.diagnosticBucket?{failureDiagnosticBucket:n.diagnosticBucket}:{}),n.diagnosticMetadata?{failureDiagnosticMetadata:n.diagnosticMetadata}:{}):{success:r>=200&&r<300,statusCode:r}})}_sendEventsViaBeacon(e,t){var n;const o=this._network.beacon(this._getRequestData(e),t);return Object.assign(Object.assign(Object.assign({success:o,statusCode:o?200:-1,failurePath:o?void 0:null!==(n=t.path)&&void 0!==n?n:"beacon_send_false"},!o&&t.errorMessage?{failureErrorMessage:t.errorMessage}:{}),!o&&t.diagnosticBucket?{failureDiagnosticBucket:t.diagnosticBucket}:{}),!o&&t.diagnosticMetadata?{failureDiagnosticMetadata:t.diagnosticMetadata}:{})}_getRequestData(e){return{sdkKey:this._sdkKey,data:{events:e.events},urlConfig:this._logEventUrlConfig,retries:3,preserveFailedStatusCode:!0,isCompressable:!0,params:{[n.NetworkParam.EventCount]:String(e.events.length)},headers:{"statsig-event-count":String(e.events.length),"statsig-retry-count":String(e.attempts),"statsig-sdk-type":o.SDKType._get(this._sdkKey),"statsig-sdk-version":i.SDK_VERSION},credentials:"same-origin"}}},EventSender}var FlushInterval={},hasRequiredFlushInterval;function requireFlushInterval(){if(hasRequiredFlushInterval)return FlushInterval;hasRequiredFlushInterval=1,Object.defineProperty(FlushInterval,"__esModule",{value:!0}),FlushInterval.FlushInterval=void 0;const e=1e3,t=6e4;return FlushInterval.FlushInterval=class{constructor(){this._currentIntervalMs=e,this._lastFlushAttemptTime=Date.now()}getCurrentIntervalMs(){return this._currentIntervalMs}markFlushAttempt(){this._lastFlushAttemptTime=Date.now()}getTimeSinceLastAttempt(){return Date.now()-this._lastFlushAttemptTime}hasReachedMaxInterval(){return this.getTimeSinceLastAttempt()>=t}getTimeTillMaxInterval(){return t-this.getTimeSinceLastAttempt()}hasCompletelyRecoveredFromBackoff(){return this._currentIntervalMs<=e}adjustForSuccess(){const t=this._currentIntervalMs;t!==e&&(this._currentIntervalMs=Math.max(e,Math.floor(t/2)))}adjustForFailure(){const e=this._currentIntervalMs;this._currentIntervalMs=Math.min(t,2*e)}getTimeUntilNextFlush(){return this.getCurrentIntervalMs()-this.getTimeSinceLastAttempt()}},FlushInterval}var FlushTypes={},hasRequiredFlushTypes;function requireFlushTypes(){return hasRequiredFlushTypes||(hasRequiredFlushTypes=1,Object.defineProperty(FlushTypes,"__esModule",{value:!0}),FlushTypes.FlushType=void 0,(t=e||(FlushTypes.FlushType=e={})).ScheduledMaxTime="scheduled:max_time",t.ScheduledFullBatch="scheduled:full_batch",t.Limit="limit",t.Manual="manual",t.Shutdown="shutdown"),FlushTypes;var e,t}var NetworkCore={},NetworkFallbackResolver={},DnsTxtQuery={},hasRequiredDnsTxtQuery;function requireDnsTxtQuery(){if(hasRequiredDnsTxtQuery)return DnsTxtQuery;hasRequiredDnsTxtQuery=1;var e=DnsTxtQuery&&DnsTxtQuery.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(DnsTxtQuery,"__esModule",{value:!0}),DnsTxtQuery._fetchTxtRecords=void 0;const t=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]),n=["i","e","d"];return DnsTxtQuery._fetchTxtRecords=function(o){return e(this,void 0,void 0,function*(){const e=yield o("https://cloudflare-dns.com/dns-query",{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:t});if(!e.ok){const e=new Error("Failed to fetch TXT records from DNS");throw e.name="DnsTxtFetchError",e}const i=yield e.arrayBuffer();return function(e){const t=e.findIndex((t,o)=>o<200&&"="===String.fromCharCode(t)&&n.includes(String.fromCharCode(e[o-1])));if(-1===t){const e=new Error("Failed to parse TXT records from DNS");throw e.name="DnsTxtParseError",e}let o="";for(let n=t-1;n<e.length;n++)o+=String.fromCharCode(e[n]);return o.split(",")}(new Uint8Array(i))})},DnsTxtQuery}var StorageProvider={},hasRequiredStorageProvider,hasRequiredNetworkFallbackResolver;function requireStorageProvider(){return hasRequiredStorageProvider||(hasRequiredStorageProvider=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._setObjectInStorage=e._getObjectFromStorage=e.Storage=void 0;const t=requireLog$1(),n=requireSafeJs(),o={},i={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:e=>o[e]?o[e]:null,setItem:(e,t)=>{o[e]=t},removeItem:e=>{delete o[e]},getAllKeys:()=>Object.keys(o)};let r=null;try{const e=(0,n._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(c){t.Log.warn("Failed to setup localStorageProvider.")}let a=null!=r?r:i,s=a;function l(t){try{return t()}catch(c){if(c instanceof Error&&"SecurityError"===c.name)return e.Storage._setProvider(i),null;throw c}}e.Storage={isReady:()=>s.isReady(),isReadyResolver:()=>s.isReadyResolver(),getProviderName:()=>s.getProviderName(),getItem:e=>l(()=>s.getItem(e)),setItem:(e,t)=>l(()=>s.setItem(e,t)),removeItem:e=>s.removeItem(e),getAllKeys:()=>s.getAllKeys(),_setProvider:e=>{a=e,s=e},_setDisabled:e=>{s=e?i:a}},e._getObjectFromStorage=function(n){const o=e.Storage.getItem(n);try{return JSON.parse(null!=o?o:"null")}catch(i){return t.Log.error(`Failed to parse value for key "${n}"`),null}},e._setObjectInStorage=function(t,n){e.Storage.setItem(t,JSON.stringify(n))}}(StorageProvider)),StorageProvider}function requireNetworkFallbackResolver(){if(hasRequiredNetworkFallbackResolver)return NetworkFallbackResolver;hasRequiredNetworkFallbackResolver=1;var e=NetworkFallbackResolver&&NetworkFallbackResolver.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(NetworkFallbackResolver,"__esModule",{value:!0}),NetworkFallbackResolver._isDomainFailure=NetworkFallbackResolver.NetworkFallbackResolver=void 0;const t=requireDnsTxtQuery(),n=requireHashing(),o=requireLog$1(),i=requireStorageProvider(),r=6048e5;function a(e,t){var n;const o=null!==(n=null==e?void 0:e.toLowerCase())&&void 0!==n?n:"";return t||o.includes("uncaught exception")||o.includes("failed to fetch")||o.includes("networkerror when attempting to fetch resource")}function s(e){return`statsig.network_fallback.${(0,n._DJB2)(e)}`}function l(e,t){const n=s(e);t&&0!==Object.keys(t).length?i.Storage.setItem(n,JSON.stringify(t)):i.Storage.removeItem(n)}return NetworkFallbackResolver.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 o=null===(n=this._fallbackInfo)||void 0===n?void 0:n[t.endpoint];o&&(o.expiryTime=Date.now()+r,l(e,Object.assign(Object.assign({},this._fallbackInfo),{[t.endpoint]:o})))}getActiveFallbackUrl(e,t){var n,r;if(null!=t.customUrl&&null!=t.fallbackUrls)return null;let a=this._fallbackInfo;null==a&&(a=null!==(n=function(e){const t=s(e),r=i.Storage.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch(n){return o.Log.error("Failed to parse FallbackInfo"),null}}(e))&&void 0!==n?n:{},this._fallbackInfo=a);const c=a[t.endpoint];return!c||Date.now()>(null!==(r=c.expiryTime)&&void 0!==r?r:0)||t.getChecksum()!==c.urlConfigChecksum?(delete a[t.endpoint],this._fallbackInfo=a,l(e,this._fallbackInfo),null):c.url?c.url:null}tryFetchUpdatedFallbackInfo(t,n,o,i){return e(this,void 0,void 0,function*(){var e,r;try{if(!a(o,i))return!1;const r=null==n.customUrl&&null==n.fallbackUrls?yield this._tryFetchFallbackUrlsFromNetwork(n):n.fallbackUrls,s=this._pickNewFallbackUrl(null===(e=this._fallbackInfo)||void 0===e?void 0:e[n.endpoint],r);return!!s&&(this._updateFallbackInfoWithNewUrl(t,n,s),!0)}catch(s){return null===(r=this._errorBoundary)||void 0===r||r.logError("tryFetchUpdatedFallbackInfo",s),!1}})}_updateFallbackInfoWithNewUrl(e,t,n){var o,i,a;const s={urlConfigChecksum:t.getChecksum(),url:n,expiryTime:Date.now()+r,previous:[]},c=t.endpoint,d=null===(o=this._fallbackInfo)||void 0===o?void 0:o[c];d&&s.previous.push(...d.previous),s.previous.length>10&&(s.previous=[]);const p=null===(a=null===(i=this._fallbackInfo)||void 0===i?void 0:i[c])||void 0===a?void 0:a.url;null!=p&&s.previous.push(p),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[c]:s}),l(e,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(n){return e(this,void 0,void 0,function*(){var e;const o=this._dnsQueryCooldowns[n.endpoint];if(o&&Date.now()<o)return null;this._dnsQueryCooldowns[n.endpoint]=Date.now()+144e5;const i=[],r=yield(0,t._fetchTxtRecords)(null!==(e=this._networkOverrideFunc)&&void 0!==e?e:fetch),a=function(e){try{return new URL(e).pathname}catch(t){return null}}(n.defaultUrl);for(const t of r){if(!t.startsWith(n.endpointDnsKey+"="))continue;const e=t.split("=");if(e.length>1){let t=e[1];t.endsWith("/")&&(t=t.slice(0,-1)),i.push(`https://${t}${a}`)}}return i})}_pickNewFallbackUrl(e,t){var n;if(null==t)return null;const o=new Set(null!==(n=null==e?void 0:e.previous)&&void 0!==n?n:[]),i=null==e?void 0:e.url;let r=null;for(const a of t){const e=a.endsWith("/")?a.slice(0,-1):a;if(!o.has(a)&&e!==i){r=e;break}}return r}},NetworkFallbackResolver._isDomainFailure=a,NetworkFallbackResolver}var SDKFlags={},hasRequiredSDKFlags;function requireSDKFlags(){if(hasRequiredSDKFlags)return SDKFlags;hasRequiredSDKFlags=1,Object.defineProperty(SDKFlags,"__esModule",{value:!0}),SDKFlags.SDKFlags=void 0;const e={};return SDKFlags.SDKFlags={setFlags:(t,n)=>{e[t]=n},get:(t,n)=>{var o,i;return null!==(i=null===(o=e[t])||void 0===o?void 0:o[n])&&void 0!==i&&i}},SDKFlags}var SessionID={},UUID={},hasRequiredUUID,hasRequiredSessionID;function requireUUID(){if(hasRequiredUUID)return UUID;return hasRequiredUUID=1,Object.defineProperty(UUID,"__esModule",{value:!0}),UUID.getUUID=void 0,UUID.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;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(4*Math.random())]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,n=>{let o=16*Math.random();return e>0?(o=(e+o)%16|0,e=Math.floor(e/16)):(o=(t+o)%16|0,t=Math.floor(t/16)),("x"===n?o:7&o|8).toString(16)})},UUID}function requireSessionID(){return hasRequiredSessionID||(hasRequiredSessionID=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigSession=e.SessionID=void 0;const t=requireCacheKey(),n=requireLog$1(),o=requireStorageProvider(),i=requireUUID(),r=requireVisibilityObserving(),a=18e5,s=144e5,l={};function c(e){var t;const n=e.data,o=function({lastUpdate:e}){return Date.now()-e>a}(n)||function({startTime:e}){return Date.now()-e>s}(n);return o&&(e.data=u(),null===(t=null===__STATSIG__||void 0===__STATSIG__?void 0:__STATSIG__.instance(e.sdkKey))||void 0===t||t.$emt({name:"session_expired"})),o}function d(e){return`statsig.session_id.${(0,t._getStorageKey)(e)}`}function p(e){try{(0,o._setObjectInStorage)(e.storageKey,e.data),e.lastPersistedAt=Date.now()}catch(t){n.Log.warn("Failed to save SessionID")}}function u(){return{sessionID:(0,i.getUUID)(),startTime:Date.now(),lastUpdate:Date.now()}}(0,r._subscribeToVisiblityChanged)(e=>{"background"===e&&Object.values(l).forEach(e=>p(e))}),e.SessionID={get:t=>e.StatsigSession.get(t).data.sessionID},e.StatsigSession={get:(e,t=!0)=>{null==l[e]&&(l[e]=function(e){const t=d(e),n=function(e){const t=(0,o._getObjectFromStorage)(e);return t}(t);if(n&&n.sessionID&&n.startTime&&n.lastUpdate)return{data:n,sdkKey:e,lastPersistedAt:0,storageKey:t};return{data:u(),sdkKey:e,lastPersistedAt:0,storageKey:t}}(e));return function(e,t){const n=Date.now(),o=c(e);o?p(e):t&&(e.data.lastUpdate=n,function(e){const t=Date.now();t-e.lastPersistedAt>15e3&&p(e)}(e));return e}(l[e],t)},overrideInitialSessionID:(e,t)=>{const n=Date.now(),o={data:{sessionID:e,startTime:n,lastUpdate:n},sdkKey:t,lastPersistedAt:Date.now(),storageKey:d(t)};p(o),l[t]=o},checkForIdleSession:e=>{const t=l[e];if(!t)return;c(t)&&p(t)}}}(SessionID)),SessionID}var StableID={},hasRequiredStableID;function requireStableID(){if(hasRequiredStableID)return StableID;hasRequiredStableID=1,Object.defineProperty(StableID,"__esModule",{value:!0}),StableID.getCookieName=StableID.StableID=void 0;const e=requireCacheKey(),t=requireLog$1(),n=requireSafeJs(),o=requireStorageProvider(),i=requireUUID(),r={},a={},s={};function l(t){return`statsig.stable_id.${(0,e._getStorageKey)(t)}`}function c(e,n){const i=l(n);try{(0,o._setObjectInStorage)(i,e)}catch(r){t.Log.warn("Failed to save StableID to storage")}}function d(e,t){if(!a[t]||null==(0,n._getDocumentSafe)())return;const o=new Date;o.setFullYear(o.getFullYear()+1),document.cookie=`${p(t)}=${encodeURIComponent(e)}; expires=${o.toUTCString()}; path=/`}function p(t){return`statsig.stable_id.${(0,e._getStorageKey)(t)}`}return StableID.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:e=>{if(s[e])return null;if(null!=r[e])return r[e];let t=null;return t=function(e){if(!a[e]||null==(0,n._getDocumentSafe)())return null;const t=document.cookie.split(";");for(const n of t){const[t,o]=n.trim().split("=");if(t===p(e))return decodeURIComponent(o)}return null}(e),null!=t?(r[e]=t,c(t,e),t):(t=function(e){const t=l(e);return(0,o._getObjectFromStorage)(t)}(e),null==t&&(t=(0,i.getUUID)()),c(t,e),d(t,e),r[e]=t,t)},setOverride:(e,t)=>{r[t]=e,c(e,t),d(e,t)},_setCookiesEnabled:(e,t)=>{a[e]=t},_setDisabled:(e,t)=>{s[e]=t}},StableID.getCookieName=p,StableID}var StatsigClientEventEmitter={},hasRequiredStatsigClientEventEmitter;function requireStatsigClientEventEmitter(){return hasRequiredStatsigClientEventEmitter||(hasRequiredStatsigClientEventEmitter=1,Object.defineProperty(StatsigClientEventEmitter,"__esModule",{value:!0}),StatsigClientEventEmitter.ErrorTag=void 0,StatsigClientEventEmitter.ErrorTag={NetworkError:"NetworkError"}),StatsigClientEventEmitter}var StatsigOptionsCommon={},hasRequiredStatsigOptionsCommon,hasRequiredNetworkCore,hasRequiredFlushCoordinator;function requireStatsigOptionsCommon(){return hasRequiredStatsigOptionsCommon||(hasRequiredStatsigOptionsCommon=1,Object.defineProperty(StatsigOptionsCommon,"__esModule",{value:!0}),StatsigOptionsCommon.LoggingEnabledOption=StatsigOptionsCommon.LogEventCompressionMode=void 0,StatsigOptionsCommon.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},StatsigOptionsCommon.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}),StatsigOptionsCommon}function requireNetworkCore(){return hasRequiredNetworkCore||(hasRequiredNetworkCore=1,function(e){var t=NetworkCore&&NetworkCore.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.NetworkCore=e.RETRYABLE_CODES=void 0,require$_StatsigGlobal();const n=require$_StatsigGlobal(),o=requireDiagnostics(),i=requireLog$1(),r=requireNetworkConfig(),a=requireNetworkFallbackResolver(),s=requireSDKFlags(),l=requireSDKType(),c=requireSafeJs(),d=requireSessionID(),p=requireStableID(),u=requireStatsigClientEventEmitter(),m=requireStatsigMetadata(),h=requireStatsigOptionsCommon(),g=requireVisibilityObserving();e.RETRYABLE_CODES=new Set([408,500,502,503,504,522,524,599]);e.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 a.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}getLastUsedInitUrlAndReset(){const e=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,e}beacon(e,t){if(!x(e))return t&&(t.path="beacon_invalid_sdk_key"),!1;const n=this._getInternalRequestArgs("POST",e),o=this._getPopulatedURL(n),i=navigator;try{const e=i.sendBeacon.bind(i)(o,n.body);return e||t&&(t.path="beacon_send_false"),e}catch(r){throw t&&(t.path="beacon_send_exception"),r}}post(e,n){return t(this,void 0,void 0,function*(){const t=this._getInternalRequestArgs("POST",e);return this._tryEncodeBody(t),yield this._tryToCompressBody(t),this._sendRequest(t,n)})}get(e){const t=this._getInternalRequestArgs("GET",e);return this._sendRequest(t)}_sendRequest(n,a){return t(this,void 0,void 0,function*(){var s,l,d,p;if(!x(n))return a&&(a.path="network_invalid_sdk_key"),null;if(this._netConfig.preventAllNetworkTraffic)return a&&(a.path="network_prevent_all_network_traffic"),null;const{method:m,body:h,retries:f,attempt:C}=n,b=n.urlConfig.endpoint;if(this._isRateLimited(b))return i.Log.warn(`Request to ${b} was blocked because you are making requests too frequently.`),a&&(a.path="network_rate_limited"),null;const $=null!=C?C:1;let v=!1;const E=this._getPopulatedURL(n),A=Date.now();let w=null;const R=(0,g._isUnloading)();try{const e={method:m,body:h,headers:Object.assign({},n.headers),priority:n.priority,keepalive:R};!function(e,t){if(e.urlConfig.endpoint!==r.Endpoint._initialize)return;o.Diagnostics._markInitNetworkReqStart(e.sdkKey,{attempt:t})}(n,$);const t=this._leakyBucket[b];t&&(t.lastRequestTime=Date.now(),this._leakyBucket[b]=t);const i=null!==(s=this._netConfig.networkOverrideFunc)&&void 0!==s?s:fetch;let a;if(w=yield Promise.race([i(E,e).finally(()=>clearTimeout(a)),new Promise((e,t)=>{a=setTimeout(()=>{v=!0,t(new Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})]),!w.ok){const e=yield w.text().catch(()=>"No Text"),t=new Error(`NetworkError: ${E} ${e}`);throw t.name="NetworkError",t}const l=yield w.text();return S(n,w,$,l),this._fallbackResolver.tryBumpExpiryTime(n.sdkKey,n.urlConfig),{body:l,code:w.status}}catch(T){const o=function(e){if("string"==typeof e)return e;if(e instanceof Error)return`${e.name}: ${e.message}`;return"Unknown Error"}(T),r=(j=v,(null!=o?o:"").includes("Timeout")||j);S(n,w,$,"",T);if((yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(n.sdkKey,n.urlConfig,o,r))&&(n.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(n.sdkKey,n.urlConfig)),!f||$>f||!e.RETRYABLE_CODES.has(null!==(l=null==w?void 0:w.status)&&void 0!==l?l:500)){null===(d=this._emitter)||void 0===d||d.call(this,{name:"error",error:T,tag:u.ErrorTag.NetworkError,requestArgs:n});const e=`A networking error occurred during ${m} request to ${E}.`;if(i.Log.error(e,o,T),null===(p=this._errorBoundary)||void 0===p||p.attachErrorIfNoneExists(e),n.preserveFailedStatusCode&&null!=w)return{body:null,code:w.status};if(null==w&&a){a.path=r?"network_request_timed_out_no_response":"network_request_exception_no_response",o&&(a.errorMessage=o);try{const e=function(e,t,n,o){var i,r,a;const s=(0,c._getWindowSafe)(),l=null==s?void 0:s.document,d="undefined"!=typeof navigator?navigator:null,p=(0,g._isUnloading)(),u=d&&"boolean"==typeof d.onLine?String(d.onLine):"unknown",m=null!==(i=null==l?void 0:l.visibilityState)&&void 0!==i?i:"unknown",h=Object.keys(null!==(r=e.headers)&&void 0!==r?r:{}).length>0,x=function(e,t){if(!t)return!0;return!e.startsWith(`${t}/`)&&!e.startsWith(`${t}?`)&&e!==t}(t,null===(a=null==s?void 0:s.location)||void 0===a?void 0:a.origin),f=null!=e.urlConfig.customUrl,S=null!=e.fallbackUrl,C=y(o,[250,1e3,5e3,1e4]),b=y(function(e){if(null==e)return 0;if("string"==typeof e)return e.length;if(e instanceof Uint8Array)return e.byteLength;if("undefined"!=typeof Blob&&e instanceof Blob)return e.size;return-1}(e.body),[16384,65536,262144,1048576]);let $="unknown_no_response";n?$="timeout":"false"===u?$="browser_offline":p?$="page_unloading":"hidden"===m?$="page_hidden":x&&h?$="cross_origin_custom_headers_preflight_risk":f||S?$="custom_url_no_response":o<250&&($="immediate_network_rejection");return{bucket:$,metadata:{elapsedMsBucket:C,bodySizeBucket:b,online:u,visibilityState:m,isUnloading:String(p),crossOrigin:String(x),hasCustomUrl:String(f)}}}(n,E,r,Date.now()-A);a.diagnosticBucket=e.bucket,a.diagnosticMetadata=e.metadata}catch(I){}}return null}return yield function(e){return t(this,void 0,void 0,function*(){yield new Promise(t=>setTimeout(t,Math.min(e*e*500,3e4)))})}($),this._sendRequest(Object.assign(Object.assign({},n),{retries:f,attempt:$+1}),a)}var j})}_getLogEventCompressionMode(e){let t=null==e?void 0:e.logEventCompressionMode;return t||!0!==(null==e?void 0:e.disableCompression)||(t=h.LogEventCompressionMode.Disabled),t||(t=h.LogEventCompressionMode.Enabled),t}_isRateLimited(e){var t;const n=Date.now(),o=null!==(t=this._leakyBucket[e])&&void 0!==t?t:{count:0,lastRequestTime:n},i=n-o.lastRequestTime,r=Math.floor(.05*i);return o.count=Math.max(0,o.count-r),o.count>=50||(o.count+=1,o.lastRequestTime=n,this._leakyBucket[e]=o,!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 o=Object.assign({[r.NetworkParam.SdkKey]:e.sdkKey,[r.NetworkParam.SdkType]:l.SDKType._get(e.sdkKey),[r.NetworkParam.SdkVersion]:m.SDK_VERSION,[r.NetworkParam.Time]:String(Date.now()),[r.NetworkParam.SessionID]:d.SessionID.get(e.sdkKey)},e.params),i=Object.keys(o).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(o[e])}`).join("&");return`${n}${i?`?${i}`:""}`}_tryEncodeBody(e){var t;const o=(0,c._getWindowSafe)(),a=e.body;if(e.isStatsigEncodable&&!this._options.disableStatsigEncoding&&"string"==typeof a&&null==(0,n._getStatsigGlobalFlag)("no-encode")&&(null==o?void 0:o.btoa))try{e.body=o.btoa(a).split("").reverse().join(""),e.params=Object.assign(Object.assign({},null!==(t=e.params)&&void 0!==t?t:{}),{[r.NetworkParam.StatsigEncoded]:"1"})}catch(s){i.Log.warn(`Request encoding failed for ${e.urlConfig.getUrl()}`,s)}}_tryToCompressBody(e){return t(this,void 0,void 0,function*(){var t;const o=e.body;if("string"==typeof o&&function(e,t){if(!e.isCompressable)return!1;if(null!=(0,n._getStatsigGlobalFlag)("no-compress")||"undefined"==typeof CompressionStream||"undefined"==typeof TextEncoder)return!1;const o=null!=e.urlConfig.customUrl||null!=e.urlConfig.fallbackUrls,i=!0===s.SDKFlags.get(e.sdkKey,"enable_log_event_compression");switch(t.logEventCompressionMode){case h.LogEventCompressionMode.Disabled:return!1;case h.LogEventCompressionMode.Enabled:return!(o&&!i);case h.LogEventCompressionMode.Forced:return!0;default:return!1}}(e,this._options))try{const n=(new TextEncoder).encode(o),a=new CompressionStream("gzip"),s=a.writable.getWriter();s.write(n).catch(i.Log.error),s.close().catch(i.Log.error);const l=a.readable.getReader(),c=[];let d;for(;!(d=yield l.read()).done;)c.push(d.value);const p=c.reduce((e,t)=>e+t.length,0),u=new Uint8Array(p);let m=0;for(const e of c)u.set(e,m),m+=e.length;e.body=u,e.params=Object.assign(Object.assign({},null!==(t=e.params)&&void 0!==t?t:{}),{[r.NetworkParam.IsGzipped]:"1"})}catch(a){i.Log.warn(`Request compression failed for ${e.urlConfig.getUrl()}`,a)}})}_getInternalRequestArgs(e,t){const n=this._fallbackResolver.getActiveFallbackUrl(t.sdkKey,t.urlConfig),o=Object.assign(Object.assign({},t),{method:e,fallbackUrl:n});return"data"in t&&f(o,t.data),o}};const x=e=>!!e.sdkKey||(i.Log.warn("Unable to make request without an SDK key"),!1),f=(e,t)=>{const{sdkKey:n,fallbackUrl:o}=e,i=p.StableID.get(n),r=d.SessionID.get(n),a=l.SDKType._get(n);e.body=JSON.stringify(Object.assign(Object.assign({},t),{statsigMetadata:Object.assign(Object.assign({},m.StatsigMetadataProvider.get()),{stableID:i,sessionID:r,sdkType:a,fallbackUrl:o})}))};function y(e,t){if(e<0)return"unknown";for(const n of t)if(e<n)return`<${n}`;return`>=${t[t.length-1]}`}function S(e,t,n,i,a){e.urlConfig.endpoint===r.Endpoint._initialize&&o.Diagnostics._markInitNetworkReqEnd(e.sdkKey,o.Diagnostics._getDiagnosticsData(t,n,i,a))}}(NetworkCore)),NetworkCore}function requireFlushCoordinator(){if(hasRequiredFlushCoordinator)return FlushCoordinator;hasRequiredFlushCoordinator=1;var e=FlushCoordinator&&FlushCoordinator.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(FlushCoordinator,"__esModule",{value:!0}),FlushCoordinator.FlushCoordinator=void 0;const t=requireEventRetryConstants(),n=requireEventSender(),o=requireFlushInterval(),i=requireFlushTypes(),r=requireHashing(),a=requireLog$1(),s=requireNetworkCore(),l=requireSafeJs(),c=requireSessionID(),d=requireStatsigOptionsCommon(),p=requireStorageProvider(),u=new Set(["network_request_timed_out_no_response","network_request_exception_no_response","event_sender_post_returned_null","event_sender_post_returned_undefined","event_sender_post_exception"]);return FlushCoordinator.FlushCoordinator=class{constructor(e,t,i,r,a,s,l,c,d,p){this._cooldownTimer=null,this._maxIntervalTimer=null,this._hasRunQuickFlush=!1,this._currentFlushPromise=null,this._creationTime=Date.now(),this._isShuttingDown=!1,this._storageKey=null,this._flushInterval=new o.FlushInterval,this._batchQueue=e,this._pendingEvents=t,this._onPrepareFlush=i,this._errorBoundary=p,this._sdkKey=r,this._loggingEnabled=d,this._eventSender=new n.EventSender(r,a,s,l,c)}setLoggingEnabled(e){this._loggingEnabled=e}setLogEventCompressionMode(e){this._eventSender.setLogEventCompressionMode(e)}startScheduledFlushCycle(){this._scheduleNextFlush()}stopScheduledFlushCycle(){this._clearAllTimers()}addEvent(e){this._pendingEvents.addToPendingEventsQueue(e),this._currentFlushPromise||this._pendingEvents.hasEventsForFullBatch()&&this.processLimitFlush()}processManualFlush(){return e(this,void 0,void 0,function*(){return this._currentFlushPromise&&(yield this._currentFlushPromise),this._currentFlushPromise=this._executeFlush(i.FlushType.Manual).finally(()=>{this._currentFlushPromise=null,this._scheduleNextFlush()}),this._currentFlushPromise})}processShutdown(){return e(this,void 0,void 0,function*(){return this._isShuttingDown=!0,this._clearAllTimers(),this._currentFlushPromise&&(yield this._currentFlushPromise),this._currentFlushPromise=this._executeFlush(i.FlushType.Shutdown).catch(e=>{a.Log.error(`Error during shutdown flush: ${e}`)}).finally(()=>{this._currentFlushPromise=null}),this._currentFlushPromise})}_executeFlush(t){return e(this,void 0,void 0,function*(){this._clearAllTimers();try{this._prepareQueueForFlush(t);const e=this._batchQueue.takeAllBatches();if(0===e.length)return;yield Promise.all(e.map(e=>this._processOneBatch(e,t)))}finally{this._isShuttingDown||this._scheduleNextFlush()}})}checkQuickFlush(){this._hasRunQuickFlush||Date.now()-this._creationTime>t.EventRetryConstants.QUICK_FLUSH_WINDOW_MS||(this._hasRunQuickFlush=!0,setTimeout(()=>{this.processManualFlush().catch(e=>{a.Log.warn("Quick flush failed:",e)})},t.EventRetryConstants.QUICK_FLUSH_WINDOW_MS))}_attemptScheduledFlush(){if(this._currentFlushPromise)return void this._scheduleNextFlush();const e=this.containsAtLeastOneFullBatch(),t=this._flushInterval.hasReachedMaxInterval();if(!e&&!t)return void this._scheduleNoopPollTick();let n;this._flushInterval.markFlushAttempt(),n=e?i.FlushType.ScheduledFullBatch:i.FlushType.ScheduledMaxTime,this._currentFlushPromise=this._processNextBatch(n).then(()=>{}).catch(e=>{a.Log.error("Error during scheduled flush:",e)}).finally(()=>{this._currentFlushPromise=null,this._scheduleNextFlush()})}processLimitFlush(){this._flushInterval.hasCompletelyRecoveredFromBackoff()&&(this._currentFlushPromise||(this._currentFlushPromise=this._processLimitFlushInternal().catch(e=>{a.Log.error("Error during limit flush",e)}).finally(()=>{this._currentFlushPromise=null,this._scheduleNextFlush()})))}_processLimitFlushInternal(){return e(this,void 0,void 0,function*(){if(yield this._processNextBatch(i.FlushType.Limit))for(;this._flushInterval.hasCompletelyRecoveredFromBackoff()&&this.containsAtLeastOneFullBatch();){if(!(yield this._processNextBatch(i.FlushType.Limit)))break}})}_scheduleNextFlush(){if(this._clearAllTimers(),this._isShuttingDown)return;const e=Math.max(0,this._flushInterval.getTimeUntilNextFlush());this._cooldownTimer=setTimeout(()=>{this._cooldownTimer=null,c.StatsigSession.checkForIdleSession(this._sdkKey),this._attemptScheduledFlush()},e);const t=Math.max(0,this._flushInterval.getTimeTillMaxInterval());this._maxIntervalTimer=setTimeout(()=>{this._maxIntervalTimer=null,c.StatsigSession.checkForIdleSession(this._sdkKey),this._attemptScheduledFlush()},t)}_clearAllTimers(){null!==this._cooldownTimer&&(clearTimeout(this._cooldownTimer),this._cooldownTimer=null),null!==this._maxIntervalTimer&&(clearTimeout(this._maxIntervalTimer),this._maxIntervalTimer=null)}_scheduleNoopPollTick(){if(this._clearAllTimers(),this._isShuttingDown)return;this._cooldownTimer=setTimeout(()=>{this._cooldownTimer=null,c.StatsigSession.checkForIdleSession(this._sdkKey),this._attemptScheduledFlush()},t.EventRetryConstants.TICK_INTERVAL_MS);const e=Math.max(0,this._flushInterval.getTimeTillMaxInterval());this._maxIntervalTimer=setTimeout(()=>{this._maxIntervalTimer=null,c.StatsigSession.checkForIdleSession(this._sdkKey),this._attemptScheduledFlush()},e)}_processNextBatch(t){return e(this,void 0,void 0,function*(){this._prepareQueueForFlush(t);const e=this._batchQueue.takeNextBatch();return!!e&&this._processOneBatch(e,t)})}_processOneBatch(t,n){return e(this,void 0,void 0,function*(){if(this._loggingEnabled!==d.LoggingEnabledOption.always&&(0,l._isServerEnv)())return this._flushInterval.adjustForSuccess(),!0;const e=yield this._eventSender.sendBatch(t);return e.success?(this._flushInterval.adjustForSuccess(),!0):(this._flushInterval.adjustForFailure(),this._handleFailure(t,n,e.statusCode,e.failurePath,e.failureErrorMessage,e.failureDiagnosticBucket,e.failureDiagnosticMetadata),!1)})}_prepareQueueForFlush(e){this._onPrepareFlush();const n=this.convertPendingEventsToBatches();n>0&&(a.Log.warn(`Dropped ${n} events`),this._errorBoundary.logDroppedEvents(n,"Batch queue limit reached during batching",{loggingInterval:this._flushInterval.getCurrentIntervalMs(),batchSize:this._batchQueue.batchSize(),maxPendingBatches:t.EventRetryConstants.MAX_PENDING_BATCHES,flushType:e,retries:"dropped before batching"}))}containsAtLeastOneFullBatch(){return this._pendingEvents.hasEventsForFullBatch()||this._batchQueue.hasFullBatch()}convertPendingEventsToBatches(){if(this._pendingEvents.isEmpty())return 0;const e=this._pendingEvents.takeAll();return this._batchQueue.createBatches(e)}_isRetryableBatch(e,t){return!!s.RETRYABLE_CODES.has(e)||!(-1!==e||!t||!u.has(t))}_handleFailure(e,n,o,r,s,l,c){if(n===i.FlushType.Shutdown)return a.Log.warn(`${n} flush failed during shutdown. ${e.events.length} event(s) will be saved to storage for retry in next session.`),void this._saveShutdownFailedEventsToStorage(e.events);if(!this._isRetryableBatch(o,r)){const t="non-retryable error";return a.Log.warn(`${n} flush failed after ${e.attempts} attempt(s). ${e.events.length} event(s) will be dropped. Non-retryable error: ${o}`),void this._errorBoundary.logEventRequestFailure(e.events.length,t,n,o,e.attempts,r,s,l,c)}if(e.attempts>=t.EventRetryConstants.MAX_RETRY_ATTEMPTS){const t="max retry attempts exceeded";return a.Log.warn(`${n} flush failed after ${e.attempts} attempt(s). ${e.events.length} event(s) will be dropped.`),void this._errorBoundary.logEventRequestFailure(e.events.length,t,n,o,e.attempts,r,s,l,c)}e.incrementAttempts();const d=this._batchQueue.requeueBatch(e);d>0&&(a.Log.warn(`Failed to requeue batch : dropped ${d} events due to full queue`),this._errorBoundary.logDroppedEvents(d,"Batch queue limit reached during requeue",{loggingInterval:this._flushInterval.getCurrentIntervalMs(),batchSize:this._batchQueue.batchSize(),maxPendingBatches:t.EventRetryConstants.MAX_PENDING_BATCHES,flushType:n,retries:e.attempts}))}loadAndRetryShutdownFailedEvents(){return e(this,void 0,void 0,function*(){const e=this._getStorageKey();try{p.Storage.isReady()||(yield p.Storage.isReadyResolver());const t=this._getShutdownFailedEventsFromStorage(e);if(0===t.length)return;a.Log.debug(`Loading ${t.length} failed shutdown event(s) from storage for retry`),p.Storage.removeItem(e),t.forEach(e=>{this.addEvent(e)}),yield this.processManualFlush()}catch(t){a.Log.warn("Failed to load and retry failed shutdown events:",t)}})}_getStorageKey(){return this._storageKey||(this._storageKey=`statsig.failed_shutdown_events.${(0,r._DJB2)(this._sdkKey)}`),this._storageKey}_saveShutdownFailedEventsToStorage(e){const n=this._getStorageKey();try{let o=[...this._getShutdownFailedEventsFromStorage(n),...e];o.length>t.EventRetryConstants.MAX_LOCAL_STORAGE&&(o=o.slice(-t.EventRetryConstants.MAX_LOCAL_STORAGE)),(0,p._setObjectInStorage)(n,o),a.Log.debug(`Saved ${e.length} failed shutdown event(s) to storage (total stored: ${o.length})`)}catch(o){a.Log.warn("Unable to save failed shutdown events to storage:",o)}}_getShutdownFailedEventsFromStorage(e){try{const t=(0,p._getObjectFromStorage)(e);return Array.isArray(t)?t:[]}catch(t){return[]}}},FlushCoordinator}var PendingEvents={},hasRequiredPendingEvents;function requirePendingEvents(){if(hasRequiredPendingEvents)return PendingEvents;hasRequiredPendingEvents=1,Object.defineProperty(PendingEvents,"__esModule",{value:!0}),PendingEvents.PendingEvents=void 0;const e=requireLog$1();return PendingEvents.PendingEvents=class{constructor(e){this._pendingEvents=[],this._batchSize=e}addToPendingEventsQueue(t){this._pendingEvents.push(t),e.Log.debug("Enqueued Event:",t)}hasEventsForFullBatch(){return this._pendingEvents.length>=this._batchSize}takeAll(){const e=this._pendingEvents;return this._pendingEvents=[],e}isEmpty(){return 0===this._pendingEvents.length}},PendingEvents}var StatsigEvent={},hasRequiredStatsigEvent;function requireStatsigEvent(){if(hasRequiredStatsigEvent)return StatsigEvent;hasRequiredStatsigEvent=1,Object.defineProperty(StatsigEvent,"__esModule",{value:!0}),StatsigEvent._createLayerParameterExposure=StatsigEvent._createConfigExposure=StatsigEvent._mapExposures=StatsigEvent._createGateExposure=StatsigEvent._isExposureEvent=void 0;const e="statsig::config_exposure",t="statsig::gate_exposure",n="statsig::layer_exposure",o=(e,t,n,o,i)=>(n.bootstrapMetadata&&(o.bootstrapMetadata=n.bootstrapMetadata),{eventName:e,user:t,value:null,metadata:r(n,o),secondaryExposures:i,time:Date.now()});StatsigEvent._isExposureEvent=({eventName:o})=>o===t||o===e||o===n;function i(e,t){return e.map(e=>"string"==typeof e?(null!=t?t:{})[e]:e).filter(e=>null!=e)}StatsigEvent._createGateExposure=(e,n,r)=>{var a,s,l;const c={gate:n.name,gateValue:String(n.value),ruleID:n.ruleID};return null!=(null===(a=n.__evaluation)||void 0===a?void 0:a.version)&&(c.configVersion=n.__evaluation.version),o(t,e,n.details,c,i(null!==(l=null===(s=n.__evaluation)||void 0===s?void 0:s.secondary_exposures)&&void 0!==l?l:[],r))},StatsigEvent._mapExposures=i;StatsigEvent._createConfigExposure=(t,n,r)=>{var a,s,l,c;const d={config:n.name,ruleID:n.ruleID};return null!=(null===(a=n.__evaluation)||void 0===a?void 0:a.version)&&(d.configVersion=n.__evaluation.version),null!=(null===(s=n.__evaluation)||void 0===s?void 0:s.passed)&&(d.rulePassed=String(n.__evaluation.passed)),o(e,t,n.details,d,i(null!==(c=null===(l=n.__evaluation)||void 0===l?void 0:l.secondary_exposures)&&void 0!==c?c:[],r))};StatsigEvent._createLayerParameterExposure=(e,t,r,a)=>{var s,l,c,d,p,u,m;const h=t.__evaluation,g=!0===(null===(s=null==h?void 0:h.explicit_parameters)||void 0===s?void 0:s.includes(r));let x="",f=null!==(l=null==h?void 0:h.undelegated_secondary_exposures)&&void 0!==l?l:[];g&&(x=null!==(c=h.allocated_experiment_name)&&void 0!==c?c:"",f=null!==(d=h.secondary_exposures)&&void 0!==d?d:[]);const y=null===(p=t.__evaluation)||void 0===p?void 0:p.parameter_rule_ids,S={config:t.name,parameterName:r,ruleID:null!==(u=null==y?void 0:y[r])&&void 0!==u?u:t.ruleID,allocatedExperiment:x,isExplicitParameter:String(g)};return null!=(null===(m=t.__evaluation)||void 0===m?void 0:m.version)&&(S.configVersion=t.__evaluation.version),o(n,e,t.details,S,i(f,a))};const r=(e,t)=>(t.reason=e.reason,e.lcut&&(t.lcut=String(e.lcut)),e.receivedAt&&(t.receivedAt=String(e.receivedAt)),t);return StatsigEvent}var UrlConfiguration={},hasRequiredUrlConfiguration,hasRequiredEventLogger;function requireUrlConfiguration(){if(hasRequiredUrlConfiguration)return UrlConfiguration;hasRequiredUrlConfiguration=1,Object.defineProperty(UrlConfiguration,"__esModule",{value:!0}),UrlConfiguration.UrlConfiguration=void 0;const e=requireHashing(),t=requireNetworkConfig(),n={[t.Endpoint._initialize]:"i",[t.Endpoint._rgstr]:"e",[t.Endpoint._download_config_specs]:"d"};return UrlConfiguration.UrlConfiguration=class{constructor(e,o,i,r){this.customUrl=null,this.fallbackUrls=null,this.endpoint=e,this.endpointDnsKey=n[e],o&&(this.customUrl=o),!o&&i&&(this.customUrl=i.endsWith("/")?`${i}${e}`:`${i}/${e}`),r&&(this.fallbackUrls=r);const a=t.NetworkDefault[e];this.defaultUrl=`${a}/${e}`}getUrl(){var e;return null!==(e=this.customUrl)&&void 0!==e?e:this.defaultUrl}getChecksum(){var t;const n=(null!==(t=this.fallbackUrls)&&void 0!==t?t:[]).sort().join(",");return(0,e._DJB2)(this.customUrl+n)}},UrlConfiguration}function requireEventLogger(){if(hasRequiredEventLogger)return EventLogger;hasRequiredEventLogger=1;var e=EventLogger&&EventLogger.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(EventLogger,"__esModule",{value:!0}),EventLogger.EventLogger=void 0;const t=requireBatchedEventsQueue(),n=requireCacheKey(),o=requireEventRetryConstants(),i=requireFlushCoordinator(),r=requireHashing(),a=requireLog$1(),s=requireNetworkConfig(),l=requirePendingEvents(),c=requireSafeJs(),d=requireStatsigEvent(),p=requireStatsigOptionsCommon(),u=requireStorageProvider(),m=requireUrlConfiguration(),h=requireVisibilityObserving(),g={};return EventLogger.EventLogger=class x{static _safeFlushAndForget(e){var t;null===(t=g[e])||void 0===t||t.flush().catch(()=>{})}constructor(e,t,n,o,i){var r;this._sdkKey=e,this._emitter=t,this._network=n,this._options=o,this._errorBoundary=i,this._pendingEvents=null,this._batchQueue=null,this._flushCoordinator=null,this._lastExposureTimeMap={},this._nonExposedChecks={},this._isShuttingDown=!1,this._storageKey=null,this._pendingCompressionMode=null,this._loggingEnabled=null!==(r=null==o?void 0:o.loggingEnabled)&&void 0!==r?r:!0===(null==o?void 0:o.disableLogging)?p.LoggingEnabledOption.disabled:p.LoggingEnabledOption.browserOnly,(null==o?void 0:o.loggingEnabled)&&void 0!==o.disableLogging&&a.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging.");const l=null==o?void 0:o.networkConfig;this._logEventUrlConfig=new m.UrlConfiguration(s.Endpoint._rgstr,null==l?void 0:l.logEventUrl,null==l?void 0:l.api,null==l?void 0:l.logEventFallbackUrls)}setLogEventCompressionMode(e){this._flushCoordinator?this._flushCoordinator.setLogEventCompressionMode(e):this._pendingCompressionMode=e}setLoggingEnabled(e){const t="disabled"===this._loggingEnabled,n="disabled"!==e;if(this._loggingEnabled=e,this._flushCoordinator&&this._flushCoordinator.setLoggingEnabled(e),t&&n){const e=this._loadStoredEvents();a.Log.debug(`Loaded ${e.length} stored event(s) from storage`),e.length>0&&(e.forEach(e=>{this._initFlushCoordinator().addEvent(e)}),this.flush().catch(e=>{a.Log.warn("Failed to flush events after enabling logging:",e)}))}}enqueue(e){var t;if(!this._shouldLogEvent(e))return;const n=this._normalizeEvent(e);"disabled"!==this._loggingEnabled?(this._initFlushCoordinator().addEvent(n),null===(t=this._flushCoordinator)||void 0===t||t.checkQuickFlush()):this._storeEventToStorage(n)}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,c._isServerEnv)();if(t&&"always"!==(null===(e=this._options)||void 0===e?void 0:e.loggingEnabled))return;const n=this._initFlushCoordinator();g[this._sdkKey]=this,t||(0,h._subscribeToVisiblityChanged)(e=>{"background"===e?x._safeFlushAndForget(this._sdkKey):"foreground"===e&&n.startScheduledFlushCycle()}),n.loadAndRetryShutdownFailedEvents().catch(e=>{a.Log.warn("Failed to load failed shutdown events:",e)}),n.startScheduledFlushCycle()}stop(){return e(this,void 0,void 0,function*(){this._isShuttingDown=!0,this._flushCoordinator&&(yield this._flushCoordinator.processShutdown()),delete g[this._sdkKey],this._flushCoordinator=null,this._pendingEvents=null,this._batchQueue=null})}flush(){return e(this,void 0,void 0,function*(){if(this._flushCoordinator)return this._flushCoordinator.processManualFlush()})}appendAndResetNonExposedChecks(){if(0===Object.keys(this._nonExposedChecks).length)return;const e=Object.assign({},this._nonExposedChecks);this._nonExposedChecks={};const t=this._normalizeEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:e}});this._flushCoordinator&&this._flushCoordinator.addEvent(t)}_shouldLogEvent(e){var t;if("always"!==(null===(t=this._options)||void 0===t?void 0:t.loggingEnabled)&&(0,c._isServerEnv)())return!1;if(!(0,d._isExposureEvent)(e))return!0;const o=e.user?e.user:{statsigEnvironment:void 0},i=(0,n._getUserStorageKey)(this._sdkKey,o),r=e.metadata?e.metadata:{},a=[e.eventName,i,r.gate,r.config,r.ruleID,r.allocatedExperiment,r.parameterName,String(r.isExplicitParameter),r.reason].join("|"),s=this._lastExposureTimeMap[a],l=Date.now();return!(s&&l-s<6e5)&&(Object.keys(this._lastExposureTimeMap).length>1e3&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[a]=l,!0)}_getCurrentPageUrl(){var e;if(!1!==(null===(e=this._options)||void 0===e?void 0:e.includeCurrentPageUrlWithEvents))return(0,c._getCurrentPageUrlSafe)()}_getStorageKey(){return this._storageKey||(this._storageKey=`statsig.pending_events.${(0,r._DJB2)(this._sdkKey)}`),this._storageKey}_initFlushCoordinator(){var e,n;if(this._flushCoordinator)return this._flushCoordinator;const r=null!==(n=null===(e=this._options)||void 0===e?void 0:e.loggingBufferMaxSize)&&void 0!==n?n:o.EventRetryConstants.DEFAULT_BATCH_SIZE;return this._pendingEvents=new l.PendingEvents(r),this._batchQueue=new t.BatchQueue(r),this._flushCoordinator=new i.FlushCoordinator(this._batchQueue,this._pendingEvents,()=>this.appendAndResetNonExposedChecks(),this._sdkKey,this._network,this._emitter,this._logEventUrlConfig,this._options,this._loggingEnabled,this._errorBoundary),this._pendingCompressionMode&&(this._flushCoordinator.setLogEventCompressionMode(this._pendingCompressionMode),this._pendingCompressionMode=null),this._flushCoordinator}_storeEventToStorage(e){const t=this._getStorageKey();try{let n=this._getEventsFromStorage(t);n.push(e),n.length>o.EventRetryConstants.MAX_LOCAL_STORAGE&&(n=n.slice(-o.EventRetryConstants.MAX_LOCAL_STORAGE)),(0,u._setObjectInStorage)(t,n)}catch(n){a.Log.warn("Unable to save events to storage")}}_getEventsFromStorage(e){try{const t=(0,u._getObjectFromStorage)(e);return Array.isArray(t)?t:[]}catch(t){return[]}}_loadStoredEvents(){const e=this._getStorageKey(),t=this._getEventsFromStorage(e);return t.length>0&&u.Storage.removeItem(e),t}_normalizeEvent(e){e.user&&(e.user=Object.assign({},e.user),delete e.user.privateAttributes);const t={},n=this._getCurrentPageUrl();return n&&(t.statsigMetadata={currentPage:n}),Object.assign(Object.assign({},e),t)}},EventLogger}var ClientInterfaces={},hasRequiredClientInterfaces;function requireClientInterfaces(){if(hasRequiredClientInterfaces)return ClientInterfaces;hasRequiredClientInterfaces=1,Object.defineProperty(ClientInterfaces,"__esModule",{value:!0}),ClientInterfaces.PrecomputedEvaluationsContextHandle=void 0;const e=requireLog$1(),t=requireSafeJs(),n=requireSessionID(),o=requireStableID();return ClientInterfaces.PrecomputedEvaluationsContextHandle=class{constructor(e,t,n,o,i,r){this._sdkKey=e,this._getOptions=t,this._getErrorBoundary=n,this._getValues=o,this._getUser=i,this._getSdkInstanceID=r}get sdkKey(){return this._sdkKey}get options(){return this._getOptions()}get errorBoundary(){return this._getErrorBoundary()}get values(){return this._getValues()}get user(){let n=(0,t._cloneObject)("StatsigUser",this._getUser());return null==n&&(e.Log.error("Failed to clone user"),n={}),n}getSession(e=!0){return n.StatsigSession.get(this._sdkKey,e)}get stableID(){return o.StableID.get(this._sdkKey)}get sdkInstanceID(){return this._getSdkInstanceID()}toContext(e=!0){return{sdkKey:this.sdkKey,options:this.options,values:this.values,user:this.user,errorBoundary:this.errorBoundary,session:this.getSession(e),stableID:this.stableID,sdkInstanceID:this.sdkInstanceID}}},ClientInterfaces}var DataAdapterCore={},StatsigUser={},hasRequiredStatsigUser;function requireStatsigUser(){if(hasRequiredStatsigUser)return StatsigUser;hasRequiredStatsigUser=1,Object.defineProperty(StatsigUser,"__esModule",{value:!0}),StatsigUser._getUnitIDFromUser=StatsigUser._getFullUserHash=StatsigUser._normalizeUser=void 0;const e=requireHashing(),t=requireLog$1(),n=requireSafeJs();return StatsigUser._normalizeUser=function(e,o,i){const r=(0,n._cloneObject)("StatsigUser",e);return null==r?(t.Log.error("Failed to clone user"),{statsigEnvironment:void 0}):(null!=o&&null!=o.environment?r.statsigEnvironment=o.environment:null!=i&&(r.statsigEnvironment={tier:i}),r)},StatsigUser._getFullUserHash=function(t){return t?(0,e._DJB2Object)(t):null},StatsigUser._getUnitIDFromUser=function(e,t){var n,o,i;if("string"!=typeof t)return e.userID;const r=t.toLowerCase();return"userid"!==r?null!==(o=null===(n=e.customIDs)||void 0===n?void 0:n[t])&&void 0!==o?o:null===(i=e.customIDs)||void 0===i?void 0:i[r]:e.userID},StatsigUser}var TypedJsonParse={},hasRequiredTypedJsonParse,hasRequiredDataAdapterCore;function requireTypedJsonParse(){if(hasRequiredTypedJsonParse)return TypedJsonParse;hasRequiredTypedJsonParse=1,Object.defineProperty(TypedJsonParse,"__esModule",{value:!0}),TypedJsonParse._typedJsonParse=void 0;const e=requireLog$1();return TypedJsonParse._typedJsonParse=function(t,n,o){try{const e=JSON.parse(t);if(e&&"object"==typeof e&&n in e)return e}catch(i){}return e.Log.error(`Failed to parse ${o}`),null},TypedJsonParse}function requireDataAdapterCore(){if(hasRequiredDataAdapterCore)return DataAdapterCore;hasRequiredDataAdapterCore=1;var e=DataAdapterCore&&DataAdapterCore.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(DataAdapterCore,"__esModule",{value:!0}),DataAdapterCore._makeDataAdapterResult=DataAdapterCore.DataAdapterCore=void 0;const t=requireLog$1(),n=requireStableID(),o=requireStatsigUser(),i=requireStorageProvider(),r=requireTypedJsonParse();function a(e,t,n,i){return{source:e,data:t,receivedAt:Date.now(),stableID:n,fullUserHash:(0,o._getFullUserHash)(i)}}DataAdapterCore.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.${t}`,this._inMemoryCache=new s}attach(e,t,n){this._sdkKey=e,this._options=t}getDataSync(e){const t=e&&(0,o._normalizeUser)(e,this._options),n=this._getCacheKey(t),i=this._inMemoryCache.get(n,t);if(i&&this._getIsCacheValueValid(i))return i;const r=this._loadFromCache(n);return r&&this._getIsCacheValueValid(r)?(this._inMemoryCache.add(n,r,this._cacheLimit),this._inMemoryCache.get(n,t)):null}setData(e,t){const n=t&&(0,o._normalizeUser)(t,this._options),i=this._getCacheKey(n);this._inMemoryCache.add(i,a("Bootstrap",e,null,n),this._cacheLimit)}_getIsCacheValueValid(e){return null==e.stableID||e.stableID===n.StableID.get(this._getSdkKey())}_getDataAsyncImpl(n,o,r){return e(this,void 0,void 0,function*(){i.Storage.isReady()||(yield i.Storage.isReadyResolver());const e=null!=n?n:this.getDataSync(o),a=[this._fetchAndPrepFromNetwork(e,o,r)];return(null==r?void 0:r.timeoutMs)&&a.push(new Promise(e=>setTimeout(e,r.timeoutMs)).then(()=>(t.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(a)})}_prefetchDataImpl(t,n){return e(this,void 0,void 0,function*(){const e=t&&(0,o._normalizeUser)(t,this._options),i=this._getCacheKey(e),r=yield this._getDataAsyncImpl(null,e,n);r&&this._inMemoryCache.add(i,Object.assign(Object.assign({},r),{source:"Prefetch"}),this._cacheLimit)})}_fetchAndPrepFromNetwork(o,i,s){return e(this,void 0,void 0,function*(){var e;const l=null!==(e=null==o?void 0:o.data)&&void 0!==e?e:null,c=null!=o&&this._isCachedResultValidFor204(o,i),d=yield this._fetchFromNetwork(l,i,s,c);if(!d)return t.Log.debug("No response returned for latest value"),null;const p=(0,r._typedJsonParse)(d,"has_updates","Response"),u=this._getSdkKey(),m=n.StableID.get(u);let h=null;if(!0===(null==p?void 0:p.has_updates))h=a("Network",d,m,i);else{if(!l||!1!==(null==p?void 0:p.has_updates))return null;h=a("NetworkNotModified",l,m,i)}const g=this._getCacheKey(i);return this._inMemoryCache.add(g,h,this._cacheLimit),this._writeToCache(g,h),h})}_getSdkKey(){return null!=this._sdkKey?this._sdkKey:(t.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(e){var t;const n=null===(t=i.Storage.getItem)||void 0===t?void 0:t.call(i.Storage,e);if(null==n)return null;const o=(0,r._typedJsonParse)(n,"source","Cached Result");return o?Object.assign(Object.assign({},o),{source:"Cache"}):null}_writeToCache(e,t){const n=JSON.stringify(t);for(let r=0;r<8;r++)try{i.Storage.setItem(e,n);break}catch(o){if(!(o instanceof Error)||!o.toString().includes("QuotaExceededError")&&!o.toString().includes("QUOTA_EXCEEDED_ERR")||this._cacheLimit<=1)throw o;this._cacheLimit=Math.ceil(this._cacheLimit/2),this._runLocalStorageCacheEviction(e,this._cacheLimit-1)}this._runLocalStorageCacheEviction(e)}_runLocalStorageCacheEviction(e,t=this._cacheLimit){var n;const o=null!==(n=(0,i._getObjectFromStorage)(this._lastModifiedStoreKey))&&void 0!==n?n:{};o[e]=Date.now();const r=l(o,t);for(const a of r)delete o[a],i.Storage.removeItem(a);(0,i._setObjectInStorage)(this._lastModifiedStoreKey,o)}},DataAdapterCore._makeDataAdapterResult=a;class s{constructor(){this._data={}}get(e,n){var o;const i=this._data[e],r=null==i?void 0:i.stableID,a=null===(o=null==n?void 0:n.customIDs)||void 0===o?void 0:o.stableID;return a&&r&&a!==r?(t.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):i}add(e,t,n){const o=l(this._data,n-1);for(const i of o)delete this._data[i];this._data[e]=t}merge(e){this._data=Object.assign(Object.assign({},this._data),e)}}function l(e,t){const n=Object.keys(e);return n.length<=t?[]:0===t?n:n.sort((t,n)=>{const o=e[t],i=e[n];return"object"==typeof o&&"object"==typeof i?o.receivedAt-i.receivedAt:o-i}).slice(0,n.length-t)}return DataAdapterCore}var DownloadConfigSpecsResponse={},hasRequiredDownloadConfigSpecsResponse;function requireDownloadConfigSpecsResponse(){return hasRequiredDownloadConfigSpecsResponse||(hasRequiredDownloadConfigSpecsResponse=1,Object.defineProperty(DownloadConfigSpecsResponse,"__esModule",{value:!0})),DownloadConfigSpecsResponse}var ErrorBoundary={},hasRequiredErrorBoundary;function requireErrorBoundary(){return hasRequiredErrorBoundary||(hasRequiredErrorBoundary=1,function(e){var t=ErrorBoundary&&ErrorBoundary.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorBoundary=e.EXCEPTION_ENDPOINT=void 0;const n=requireLog$1(),o=requireSDKType(),i=requireStatsigMetadata();e.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";const r="[Statsig] UnknownError";function a(e){return e instanceof Error?e:"string"==typeof e?new Error(e):new Error("An unknown error occurred.")}function s(e){if(!e)return{};const t={};return Object.keys(e).forEach(n=>{const o=n,i=e[o];switch(typeof i){case"number":case"bigint":case"boolean":t[String(o)]=i;break;case"string":i.length<50?t[String(o)]=i:t[String(o)]="set";break;case"object":"environment"===o?t.environment=i:"networkConfig"===o?t.networkConfig=i:t[String(o)]=null!=i?"set":"unset"}}),t}e.ErrorBoundary=class{constructor(e,t,n,o){this._sdkKey=e,this._options=t,this._emitter=n,this._lastSeenError=o,this._seen=new Set}wrap(e,t){try{const n=e;(function(e){const t=new Set;let n=Object.getPrototypeOf(e);for(;n&&n!==Object.prototype;)Object.getOwnPropertyNames(n).filter(e=>"function"==typeof(null==n?void 0:n[e])).forEach(e=>t.add(e)),n=Object.getPrototypeOf(n);return Array.from(t)})(n).forEach(o=>{const i=n[o];"$EB"in i||(n[o]=(...n)=>this._capture(t?`${t}:${o}`:o,()=>i.apply(e,n)),n[o].$EB=!0)})}catch(n){this._onError("eb:wrap",n)}}logError(e,t){this._onError(e,t)}logDroppedEvents(e,t,n){const o={eventCount:String(e),reason:t};n&&Object.keys(n).forEach(e=>{o[e]=String(n[e])}),this._onError("statsig::log_event_dropped_event_count",new Error(t),!0,o)}logEventRequestFailure(e,t,n,o,i,r,a,s,l){const c={eventCount:String(e),flushType:n,statusCode:String(o),reason:t,retries:String(i)};r&&(c.failurePath=r),"string"==typeof a&&a.length>0&&(c.failureErrorMessage=a),"string"==typeof s&&s.length>0&&(c.failureDiagnosticBucket=s),l&&Object.keys(l).forEach(e=>{const t=l[e];t.length>0&&(c[`failureDiagnostic_${e}`]=t)}),this._onError("statsig::log_event_failed",new Error(t),!0,c)}getLastSeenErrorAndReset(){const e=this._lastSeenError;return this._lastSeenError=void 0,null!=e?e:null}attachErrorIfNoneExists(e){this._lastSeenError||(this._lastSeenError=a(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(l,c,d=!1,p){try{n.Log.warn(`Caught error in ${l}`,{error:c});(()=>t(this,void 0,void 0,function*(){var t,n,u,m,h,g,x;const f=c||Error(r),y=f instanceof Error,S=y?f.name:"No Name",C=a(f);if(this._lastSeenError=C,!d&&this._seen.has(S))return;if(this._seen.add(S),null===(n=null===(t=this._options)||void 0===t?void 0:t.networkConfig)||void 0===n?void 0:n.preventAllNetworkTraffic)return void(null===(u=this._emitter)||void 0===u||u.call(this,{name:"error",error:c,tag:l}));const b=o.SDKType._get(this._sdkKey),$=i.StatsigMetadataProvider.get(),v=y?f.stack:function(e){try{return JSON.stringify(e)}catch(t){return r}}(f),E=Object.assign(Object.assign({tag:l,exception:S,info:v,statsigOptions:s(this._options)},Object.assign(Object.assign({},$),{sdkType:b})),null!=p?p:{}),A=null===(m=this._options)||void 0===m?void 0:m.networkConfig,w=null!==(h=null==A?void 0:A.networkOverrideFunc)&&void 0!==h?h:fetch;yield w(null!==(g=null==A?void 0:A.sdkExceptionUrl)&&void 0!==g?g:e.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String(b),"STATSIG-SDK-VERSION":String($.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(E)}),null===(x=this._emitter)||void 0===x||x.call(this,{name:"error",error:c,tag:l})}))().then(()=>{}).catch(()=>{})}catch(u){}}}}(ErrorBoundary)),ErrorBoundary}var EvaluationOptions={},hasRequiredEvaluationOptions;function requireEvaluationOptions(){return hasRequiredEvaluationOptions||(hasRequiredEvaluationOptions=1,Object.defineProperty(EvaluationOptions,"__esModule",{value:!0})),EvaluationOptions}var EvaluationTypes={},hasRequiredEvaluationTypes;function requireEvaluationTypes(){return hasRequiredEvaluationTypes||(hasRequiredEvaluationTypes=1,Object.defineProperty(EvaluationTypes,"__esModule",{value:!0})),EvaluationTypes}var InitializeResponse={},hasRequiredInitializeResponse;function requireInitializeResponse(){return hasRequiredInitializeResponse||(hasRequiredInitializeResponse=1,Object.defineProperty(InitializeResponse,"__esModule",{value:!0})),InitializeResponse}var MemoKey={},hasRequiredMemoKey;function requireMemoKey(){if(hasRequiredMemoKey)return MemoKey;hasRequiredMemoKey=1,Object.defineProperty(MemoKey,"__esModule",{value:!0}),MemoKey.createMemoKey=MemoKey.MemoPrefix=void 0,MemoKey.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};const e=new Set([]),t=new Set(["userPersistedValues"]);return MemoKey.createMemoKey=function(n,o,i){let r=`${n}|${o}`;if(!i)return r;for(const a of Object.keys(i)){if(t.has(a))return;e.has(a)?r+=`|${a}=true`:r+=`|${a}=${i[a]}`}return r},MemoKey}var OverrideAdapter={},hasRequiredOverrideAdapter;function requireOverrideAdapter(){return hasRequiredOverrideAdapter||(hasRequiredOverrideAdapter=1,Object.defineProperty(OverrideAdapter,"__esModule",{value:!0})),OverrideAdapter}var ParamStoreTypes={},hasRequiredParamStoreTypes;function requireParamStoreTypes(){return hasRequiredParamStoreTypes||(hasRequiredParamStoreTypes=1,Object.defineProperty(ParamStoreTypes,"__esModule",{value:!0})),ParamStoreTypes}var SizeOf={},hasRequiredSizeOf;function requireSizeOf(){return hasRequiredSizeOf||(hasRequiredSizeOf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._fastApproxSizeOf=void 0;e._fastApproxSizeOf=(t,n)=>{let o=0;const i=Object.keys(t);for(let r=0;r<i.length;r++){const a=i[r],s=t[a];if(o+=a.length,o+="object"==typeof s&&null!==s?(0,e._fastApproxSizeOf)(s,n)+2:String(s).length+1,o>=n)return o}return o}}(SizeOf)),SizeOf}var StatsigClientBase={},hasRequiredStatsigClientBase;function requireStatsigClientBase(){if(hasRequiredStatsigClientBase)return StatsigClientBase;hasRequiredStatsigClientBase=1;var e=StatsigClientBase&&StatsigClientBase.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(StatsigClientBase,"__esModule",{value:!0}),StatsigClientBase.StatsigClientBase=void 0,require$_StatsigGlobal();const t=require$_StatsigGlobal(),n=requireErrorBoundary(),o=requireEventLogger(),i=requireLog$1(),r=requireMemoKey(),a=requireSafeJs(),s=requireSessionID(),l=requireStableID(),c=requireStatsigOptionsCommon(),d=requireStorageProvider();return StatsigClientBase.StatsigClientBase=class{constructor(e,r,c,p){var u,m,h,g;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};const x=this.$emt.bind(this);null!=(null==p?void 0:p.logLevel)&&(i.Log.level=p.logLevel),(null==p?void 0:p.disableStorage)&&d.Storage._setDisabled(!0),(null==p?void 0:p.initialSessionID)&&s.StatsigSession.overrideInitialSessionID(p.initialSessionID,e),(null==p?void 0:p.storageProvider)&&d.Storage._setProvider(p.storageProvider),(null==p?void 0:p.enableCookies)&&l.StableID._setCookiesEnabled(e,p.enableCookies),(null==p?void 0:p.disableStableID)&&l.StableID._setDisabled(e,!0),this._sdkKey=e,this._options=null!=p?p:{},this._memoCache={},this.overrideAdapter=null!==(u=null==p?void 0:p.overrideAdapter)&&void 0!==u?u:null,this._errorBoundary=new n.ErrorBoundary(e,p,x),this._logger=new o.EventLogger(e,x,c,p,this._errorBoundary),this._errorBoundary.wrap(this),this._errorBoundary.wrap(r),this._errorBoundary.wrap(this._logger),c.setErrorBoundary(this._errorBoundary),this.dataAdapter=r,this.dataAdapter.attach(e,p,c),this.storageProvider=d.Storage,null===(g=null===(h=null===(m=this.overrideAdapter)||void 0===m?void 0:m.loadFromStorage)||void 0===h?void 0:h.call(m))||void 0===g||g.catch(e=>this._errorBoundary.logError("OA::loadFromStorage",e)),this._primeReadyRipcord(),function(e,n){var o;if((0,a._isServerEnv)())return;const r=(0,t._getStatsigGlobal)(),s=null!==(o=r.instances)&&void 0!==o?o:{},l=n;null!=s[e]&&i.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys.");s[e]=l,r.firstInstance||(r.firstInstance=l);r.instances=s,__STATSIG__=r}(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,d.Storage._setDisabled(e.disableStorage)),null!=e.enableCookies&&(this._options.enableCookies=e.enableCookies,l.StableID._setCookiesEnabled(this._sdkKey,e.enableCookies)),e.logEventCompressionMode?this._logger.setLogEventCompressionMode(e.logEventCompressionMode):e.disableCompression&&this._logger.setLogEventCompressionMode(c.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return e(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:${e.name}`,n);i.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.disableExposureLog)?this._logger.enqueue(t):this._logger.incrementNonExposureCount(e)}_memoize(e,t){return(n,o)=>{if(this._options.disableEvaluationMemoization)return t(n,o);const i=(0,r.createMemoKey)(e,n,o);return i?(i in this._memoCache||(Object.keys(this._memoCache).length>=3e3&&(this._memoCache={}),this._memoCache[i]=t(n,o)),this._memoCache[i]):t(n,o)}}},StatsigClientBase}var StatsigDataAdapter={},hasRequiredStatsigDataAdapter;function requireStatsigDataAdapter(){return hasRequiredStatsigDataAdapter||(hasRequiredStatsigDataAdapter=1,Object.defineProperty(StatsigDataAdapter,"__esModule",{value:!0}),StatsigDataAdapter.DataAdapterCachePrefix=void 0,StatsigDataAdapter.DataAdapterCachePrefix="statsig.cached"),StatsigDataAdapter}var StatsigPlugin={},hasRequiredStatsigPlugin;function requireStatsigPlugin(){return hasRequiredStatsigPlugin||(hasRequiredStatsigPlugin=1,Object.defineProperty(StatsigPlugin,"__esModule",{value:!0})),StatsigPlugin}var StatsigTypeFactories={},hasRequiredStatsigTypeFactories;function requireStatsigTypeFactories(){if(hasRequiredStatsigTypeFactories)return StatsigTypeFactories;hasRequiredStatsigTypeFactories=1,Object.defineProperty(StatsigTypeFactories,"__esModule",{value:!0}),StatsigTypeFactories._makeTypedGet=StatsigTypeFactories._mergeOverride=StatsigTypeFactories._makeLayer=StatsigTypeFactories._makeExperiment=StatsigTypeFactories._makeDynamicConfig=StatsigTypeFactories._makeFeatureGate=void 0;const e=requireLog$1(),t=requireTypingUtils();function n(e,t,n,o){var i;return{name:e,details:t,ruleID:null!==(i=null==n?void 0:n.rule_id)&&void 0!==i?i:"",__evaluation:n,value:o}}function o(e,t,o){var r,a;const s=null!==(r=null==o?void 0:o.value)&&void 0!==r?r:{};return Object.assign(Object.assign({},n(e,t,o,s)),{idType:null!==(a=null==o?void 0:o.id_type)&&void 0!==a?a:null,get:i(e,null==o?void 0:o.value)})}function i(n,o,i){return(r,a)=>{var s;const l=null!==(s=null==o?void 0:o[r])&&void 0!==s?s:null;return null==l?null!=a?a:null:null==a||(0,t._isTypeMatch)(l,a)?(null==i||i(r),l):(e.Log.warn(`Parameter type mismatch. '${n}.${r}' was found to be type '${typeof l}' but fallback/return type is '${typeof a}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),null!=a?a:null)}}return StatsigTypeFactories._makeFeatureGate=function(e,t,o){var i;return Object.assign(Object.assign({},n(e,t,o,!0===(null==o?void 0:o.value))),{idType:null!==(i=null==o?void 0:o.id_type)&&void 0!==i?i:null})},StatsigTypeFactories._makeDynamicConfig=o,StatsigTypeFactories._makeExperiment=function(e,t,n){var i;const r=o(e,t,n);return Object.assign(Object.assign({},r),{groupName:null!==(i=null==n?void 0:n.group_name)&&void 0!==i?i:null})},StatsigTypeFactories._makeLayer=function(e,t,o,r){var a,s;return Object.assign(Object.assign({},n(e,t,o,void 0)),{get:i(e,null==o?void 0:o.value,r),groupName:null!==(a=null==o?void 0:o.group_name)&&void 0!==a?a:null,__value:null!==(s=null==o?void 0:o.value)&&void 0!==s?s:{}})},StatsigTypeFactories._mergeOverride=function(e,t,n,o){return Object.assign(Object.assign(Object.assign({},e),t),{get:i(e.name,n,o)})},StatsigTypeFactories._makeTypedGet=i,StatsigTypeFactories}var StatsigTypes={},hasRequiredStatsigTypes;function requireStatsigTypes(){return hasRequiredStatsigTypes||(hasRequiredStatsigTypes=1,Object.defineProperty(StatsigTypes,"__esModule",{value:!0})),StatsigTypes}var StatsigUpdateDetails={},hasRequiredStatsigUpdateDetails,hasRequiredSrc$2;function requireStatsigUpdateDetails(){if(hasRequiredStatsigUpdateDetails)return StatsigUpdateDetails;hasRequiredStatsigUpdateDetails=1,Object.defineProperty(StatsigUpdateDetails,"__esModule",{value:!0}),StatsigUpdateDetails.UPDATE_DETAIL_ERROR_MESSAGES=StatsigUpdateDetails.createUpdateDetails=void 0;return StatsigUpdateDetails.createUpdateDetails=(e,t,n,o,i,r)=>({duration:n,source:t,success:e,error:o,sourceUrl:i,warnings:r}),StatsigUpdateDetails.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."},StatsigUpdateDetails}function requireSrc$2(){return hasRequiredSrc$2||(hasRequiredSrc$2=1,function(e){var t=src$1&&src$1.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),n=src$1&&src$1.__exportStar||function(e,n){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(n,o)||t(n,e,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.Storage=e.Log=e.EventLogger=e.Diagnostics=void 0,require$_StatsigGlobal();const o=require$_StatsigGlobal(),i=requireDiagnostics();Object.defineProperty(e,"Diagnostics",{enumerable:!0,get:function(){return i.Diagnostics}});const r=requireEventLogger();Object.defineProperty(e,"EventLogger",{enumerable:!0,get:function(){return r.EventLogger}});const a=requireLog$1();Object.defineProperty(e,"Log",{enumerable:!0,get:function(){return a.Log}});const s=requireStatsigMetadata(),l=requireStorageProvider();Object.defineProperty(e,"Storage",{enumerable:!0,get:function(){return l.Storage}}),n(require$_StatsigGlobal(),e),n(requireCacheKey(),e),n(requireClientInterfaces(),e),n(requireDataAdapterCore(),e),n(requireDiagnostics(),e),n(requireDownloadConfigSpecsResponse(),e),n(requireErrorBoundary(),e),n(requireEvaluationOptions(),e),n(requireEvaluationTypes(),e),n(requireHashing(),e),n(requireInitializeResponse(),e),n(requireLog$1(),e),n(requireMemoKey(),e),n(requireNetworkConfig(),e),n(requireNetworkCore(),e),n(requireOverrideAdapter(),e),n(requireParamStoreTypes(),e),n(requireSafeJs(),e),n(requireSDKType(),e),n(requireSessionID(),e),n(requireSizeOf(),e),n(requireStableID(),e),n(requireStatsigClientBase(),e),n(requireStatsigClientEventEmitter(),e),n(requireStatsigDataAdapter(),e),n(requireStatsigEvent(),e),n(requireStatsigMetadata(),e),n(requireStatsigOptionsCommon(),e),n(requireStatsigPlugin(),e),n(requireStatsigTypeFactories(),e),n(requireStatsigTypes(),e),n(requireStatsigUser(),e),n(requireStorageProvider(),e),n(requireTypedJsonParse(),e),n(requireTypingUtils(),e),n(requireUrlConfiguration(),e),n(requireUUID(),e),n(requireVisibilityObserving(),e),n(requireStatsigUpdateDetails(),e),n(requireSDKFlags(),e),Object.assign((0,o._getStatsigGlobal)(),{Log:a.Log,SDK_VERSION:s.SDK_VERSION})}(src$1)),src$1}var StatsigContext={},NoopEvaluationsClient={},hasRequiredNoopEvaluationsClient,hasRequiredStatsigContext;function requireNoopEvaluationsClient(){if(hasRequiredNoopEvaluationsClient)return NoopEvaluationsClient;hasRequiredNoopEvaluationsClient=1,Object.defineProperty(NoopEvaluationsClient,"__esModule",{value:!0}),NoopEvaluationsClient.isNoopClient=NoopEvaluationsClient.NoopEvaluationsClient=void 0;const e=requireSrc$2(),t={success:!1,error:Error("NoClient"),duration:0,source:"Uninitialized",sourceUrl:null},n=()=>{},o=()=>t,i=()=>Promise.resolve(),r=()=>Promise.resolve(t),a={reason:"Error:NoClient"},s=t=>(...n)=>{const o="string"==typeof n[0]?n[0]:n[1];switch(t){case"gate":return(0,e._makeFeatureGate)(o,a,null);case"config":return(0,e._makeDynamicConfig)(o,a,null);case"layer":return(0,e._makeLayer)(o,a,null);case"param_store":return{name:o}}},l={attach:n,getDataSync:()=>null,getDataAsync:()=>Promise.resolve(null),setData:n,setDataLegacy:n,prefetchData:i},c={sdkKey:"",options:{},values:null,user:{userID:""},errorBoundary:{},session:{data:{sessionID:"",startTime:0,lastUpdate:0},sdkKey:"",lastPersistedAt:0,storageKey:""},stableID:"",storageProvider:e.Storage,sdkInstanceID:""},d=new e.PrecomputedEvaluationsContextHandle("",()=>({}),()=>({}),()=>null,()=>({userID:""}),()=>""),p={isNoop:!0,loadingStatus:"Uninitialized",initializeSync:o,initializeAsync:r,shutdown:i,flush:i,updateRuntimeOptions:n,updateUserSync:o,updateUserAsync:r,getContext:()=>Object.assign({},c),getContextHandle:()=>d,checkGate:()=>!1,getFeatureGate:s("gate"),getDynamicConfig:s("config"),getExperiment:s("config"),getLayer:s("layer"),getParameterStore:s("param_store"),logEvent:n,on:n,off:n,$on:n,$emt:n,dataAdapter:l};return NoopEvaluationsClient.NoopEvaluationsClient=p,NoopEvaluationsClient.isNoopClient=function(e){return"isNoop"in e},NoopEvaluationsClient}function requireStatsigContext(){if(hasRequiredStatsigContext)return StatsigContext;hasRequiredStatsigContext=1,Object.defineProperty(StatsigContext,"__esModule",{value:!0});const e=React,t=requireNoopEvaluationsClient();return StatsigContext.default=(0,e.createContext)({renderVersion:0,client:t.NoopEvaluationsClient,isLoading:!0}),StatsigContext}var StatsigProvider={},useClientAsyncInit={},src={},StatsigClient={},EvaluationStore={},V1InitializeContainer={},hasRequiredV1InitializeContainer;function requireV1InitializeContainer(){if(hasRequiredV1InitializeContainer)return V1InitializeContainer;hasRequiredV1InitializeContainer=1,Object.defineProperty(V1InitializeContainer,"__esModule",{value:!0}),V1InitializeContainer.V1InitializeContainer=void 0;const e=requireSrc$2();return V1InitializeContainer.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(t,n){var o,i;return t&&null!==(i=null!==(o=t[n])&&void 0!==o?o:t[(0,e._DJB2)(n)])&&void 0!==i?i:null}},V1InitializeContainer}var V2InitializeContainer={},hasRequiredV2InitializeContainer,hasRequiredEvaluationStore;function requireV2InitializeContainer(){if(hasRequiredV2InitializeContainer)return V2InitializeContainer;hasRequiredV2InitializeContainer=1,Object.defineProperty(V2InitializeContainer,"__esModule",{value:!0}),V2InitializeContainer.V2InitializeContainer=void 0;const e=requireSrc$2();return V2InitializeContainer.V2InitializeContainer=class{constructor(e){this._values=e}getGate(e){var t,n,o;const i=this._getResultFromLookup(this._values.feature_gates,e);return i?{name:e,value:!0===i.v,rule_id:null!==(t=i.r)&&void 0!==t?t:"default",secondary_exposures:null!==(n=i.s)&&void 0!==n?n:[],id_type:null!==(o=i.i)&&void 0!==o?o:""}:null}getConfig(e){var t,n,o,i;const r=this._getResultFromLookup(this._values.dynamic_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:[],id_type:null!==(o=r.i)&&void 0!==o?o:"",is_user_in_experiment:!0===r.ue,passed:!0===r.p,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}:null}getLayer(e){var t,n,o,i,r,a;const s=this._getResultFromLookup(this._values.layer_configs,e);return s?{name:e,value:null!==(t=this._values.values[s.v])&&void 0!==t?t:{},rule_id:s.r,secondary_exposures:null!==(n=s.s)&&void 0!==n?n:[],is_user_in_experiment:!0===s.ue,group_name:null!==(o=s.gn)&&void 0!==o?o:void 0,is_experiment_active:!0===s.ea,group:s.r,is_device_based:"stableID"===s.i,allocated_experiment_name:null!==(i=s.ae)&&void 0!==i?i:"",explicit_parameters:null!==(r=s.ep)&&void 0!==r?r:[],undelegated_secondary_exposures:null!==(a=s.us)&&void 0!==a?a:[],parameter_rule_ids:s.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(t,n){var o,i;return t&&null!==(i=null!==(o=t[n])&&void 0!==o?o:t[(0,e._DJB2)(n)])&&void 0!==i?i:null}},V2InitializeContainer}function requireEvaluationStore(){if(hasRequiredEvaluationStore)return EvaluationStore;hasRequiredEvaluationStore=1,Object.defineProperty(EvaluationStore,"__esModule",{value:!0});const e=requireSrc$2(),t=requireV1InitializeContainer(),n=requireV2InitializeContainer();return EvaluationStore.default=class{constructor(e,t){this._sdkKey=e,this._options=t,this._valuesForExternalUse=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._valuesForExternalUse=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._valuesForExternalUse}setValues(o,i){var r,a;if(!o)return!1;const s=(0,e._typedJsonParse)(o.data,"has_updates","EvaluationResponse");if(null==s)return!1;if(this._source=o.source,!0!==(null==s?void 0:s.has_updates))return!0;return(null!==(r=s.time)&&void 0!==r?r:0)<this._lcut||(this._valuesForExternalUse=(0,e._typedJsonParse)(o.data,"has_updates","EvaluationResponse"),this._lcut=s.time,this._receivedAt=o.receivedAt,"init-v2"===s.response_format?this._values=new n.V2InitializeContainer(s):this._values=new t.V1InitializeContainer(s),this._bootstrapMetadata=this._extractBootstrapMetadata(o.source,s),o.source&&s.user&&this._setWarningState(i,s),e.SDKFlags.setFlags(this._sdkKey,null!==(a=s.sdk_flags)&&void 0!==a?a:{})),!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(t,n){var o,i,r;const a=e.StableID.get(this._sdkKey);if((null===(o=t.customIDs)||void 0===o?void 0:o.stableID)===a||!(null===(i=t.customIDs)||void 0===i?void 0:i.stableID)&&!a){if("user"in n){let o=n.user,i=Object.assign(Object.assign({},t),{analyticsOnlyMetadata:void 0,privateAttributes:void 0});(null===(r=this._options)||void 0===r?void 0:r.disableStableID)&&(i=Object.assign(Object.assign({},i),{customIDs:Object.assign(Object.assign({},i.customIDs),{stableID:void 0})}),o=Object.assign(Object.assign({},o),{customIDs:Object.assign(Object.assign({},o.customIDs),{stableID:void 0})})),(0,e._getFullUserHash)(i)!==(0,e._getFullUserHash)(o)&&this._warnings.add("PartialUserMatch")}}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 o=this.getCurrentSourceDetails();let i=o.reason;const r=null!==(t=o.warnings)&&void 0!==t?t:[];if("Bootstrap"===this._source&&r.length>0&&(i+=r[0]),"Uninitialized"!==i&&"NoValues"!==i){i=`${i}:${e?"Unrecognized":"Recognized"}`}const a="Bootstrap"===this._source&&null!==(n=this._bootstrapMetadata)&&void 0!==n?n:void 0;return a&&(o.bootstrapMetadata=a),Object.assign(Object.assign({},o),{reason:i})}},EvaluationStore}var Network={},EvaluationResponseDeltas={},hasRequiredEvaluationResponseDeltas,hasRequiredNetwork;function requireEvaluationResponseDeltas(){if(hasRequiredEvaluationResponseDeltas)return EvaluationResponseDeltas;hasRequiredEvaluationResponseDeltas=1,Object.defineProperty(EvaluationResponseDeltas,"__esModule",{value:!0}),EvaluationResponseDeltas._resolveDeltasResponse=void 0;const e=requireSrc$2();function t(e,t){null==e||e.forEach(e=>{delete t[e]})}return EvaluationResponseDeltas._resolveDeltasResponse=function(n,o){const i=(0,e._typedJsonParse)(o,"checksum","DeltasEvaluationResponse");if(!i)return{hadBadDeltaChecksum:!0};const r=function(e){const n=e;return t(e.deleted_gates,n.feature_gates),delete n.deleted_gates,t(e.deleted_configs,n.dynamic_configs),delete n.deleted_configs,t(e.deleted_layers,n.layer_configs),delete n.deleted_layers,n}(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)})}(n,i)),a=(0,e._DJB2Object)({feature_gates:r.feature_gates,dynamic_configs:r.dynamic_configs,layer_configs:r.layer_configs},2);return a===i.checksumV2?JSON.stringify(r):{hadBadDeltaChecksum:!0,badChecksum:a,badMergedConfigs:r,badFullResponse:i.deltas_full_response}},EvaluationResponseDeltas}function requireNetwork(){if(hasRequiredNetwork)return Network;hasRequiredNetwork=1;var e=Network&&Network.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(Network,"__esModule",{value:!0});const t=requireSrc$2(),n=requireEvaluationResponseDeltas();class o extends t.NetworkCore{constructor(e,n){super(e,n);const o=null==e?void 0:e.networkConfig;this._option=e,this._initializeUrlConfig=new t.UrlConfiguration(t.Endpoint._initialize,null==o?void 0:o.initializeUrl,null==o?void 0:o.api,null==o?void 0:o.initializeFallbackUrls)}fetchEvaluations(n,o,i,r,a){return e(this,void 0,void 0,function*(){var e,s,l,c,d,p;const u=o?(0,t._typedJsonParse)(o,"has_updates","InitializeResponse"):null;let m={user:r,hash:null!==(l=null===(s=null===(e=this._option)||void 0===e?void 0:e.networkConfig)||void 0===s?void 0:s.initializeHashAlgorithm)&&void 0!==l?l:"djb2",deltasResponseRequested:!1,full_checksum:null};if(null==u?void 0:u.has_updates){const e=(null==u?void 0:u.hash_used)!==(null!==(p=null===(d=null===(c=this._option)||void 0===c?void 0:c.networkConfig)||void 0===d?void 0:d.initializeHashAlgorithm)&&void 0!==p?p:"djb2");m=Object.assign(Object.assign({},m),{sinceTime:a&&!e?u.time:0,previousDerivedFields:"derived_fields"in u&&a?u.derived_fields:{},deltasResponseRequested:!0,full_checksum:u.full_checksum,partialUserMatchSinceTime:e?0:u.time})}return this._fetchEvaluations(n,u,m,i)})}_fetchEvaluations(t,o,i,r){return e(this,void 0,void 0,function*(){var e,a;const s=yield this.post({sdkKey:t,urlConfig:this._initializeUrlConfig,data:i,retries:2,isStatsigEncodable:!0,priority:r});if(204===(null==s?void 0:s.code))return'{"has_updates": false}';if(200!==(null==s?void 0:s.code))return null!==(e=null==s?void 0:s.body)&&void 0!==e?e:null;if(!0!==(null==o?void 0:o.has_updates)||!0!==(null===(a=s.body)||void 0===a?void 0:a.includes('"is_delta":true'))||!0!==i.deltasResponseRequested)return s.body;const l=(0,n._resolveDeltasResponse)(o,s.body);return"string"==typeof l?l:this._fetchEvaluations(t,o,Object.assign(Object.assign(Object.assign({},i),l),{deltasResponseRequested:!1}),r)})}}return Network.default=o,Network}var ParamStoreGetterFactory={},hasRequiredParamStoreGetterFactory;function requireParamStoreGetterFactory(){if(hasRequiredParamStoreGetterFactory)return ParamStoreGetterFactory;hasRequiredParamStoreGetterFactory=1,Object.defineProperty(ParamStoreGetterFactory,"__esModule",{value:!0}),ParamStoreGetterFactory._makeParamStoreGetter=void 0;const e=requireSrc$2(),t={disableExposureLog:!0};function n(e){return null==e||!1===e.disableExposureLog}function o(t,n){return null!=n&&!(0,e._isTypeMatch)(t,n)}return ParamStoreGetterFactory._makeParamStoreGetter=function(i,r,a){return(s,l)=>{if(null==r)return l;const c=r[s];if(null==c||null!=l&&(0,e._typeOf)(l)!==c.param_type)return l;switch(c.ref_type){case"static":return function(e){return e.value}(c);case"gate":return function(e,o,i){return e.getFeatureGate(o.gate_name,n(i)?void 0:t).value?o.pass_value:o.fail_value}(i,c,a);case"dynamic_config":return function(e,i,r,a){const s=e.getDynamicConfig(i.config_name,n(a)?void 0:t).get(i.param_name);return o(s,r)?r:s}(i,c,l,a);case"experiment":return function(e,i,r,a){const s=e.getExperiment(i.experiment_name,n(a)?void 0:t).get(i.param_name);return o(s,r)?r:s}(i,c,l,a);case"layer":return function(e,i,r,a){const s=e.getLayer(i.layer_name,n(a)?void 0:t).get(i.param_name);return o(s,r)?r:s}(i,c,l,a);default:return l}}},ParamStoreGetterFactory}var StatsigEvaluationsDataAdapter={},hasRequiredStatsigEvaluationsDataAdapter,hasRequiredStatsigClient,hasRequiredSrc$1;function requireStatsigEvaluationsDataAdapter(){if(hasRequiredStatsigEvaluationsDataAdapter)return StatsigEvaluationsDataAdapter;hasRequiredStatsigEvaluationsDataAdapter=1;var e=StatsigEvaluationsDataAdapter&&StatsigEvaluationsDataAdapter.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(StatsigEvaluationsDataAdapter,"__esModule",{value:!0}),StatsigEvaluationsDataAdapter.StatsigEvaluationsDataAdapter=void 0;const t=requireSrc$2(),n=requireNetwork();let o=class extends t.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(e,t,o){super.attach(e,t,o),null!==o&&o instanceof n.default?this._network=o:this._network=new n.default(null!=t?t:{})}getDataAsync(e,n,o){return this._getDataAsyncImpl(e,(0,t._normalizeUser)(n,this._options),o)}prefetchData(e,t){return this._prefetchDataImpl(e,t)}setData(e){const n=(0,t._typedJsonParse)(e,"has_updates","data");n&&"user"in n?super.setData(e,n.user):t.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(t,n,o,i){return e(this,void 0,void 0,function*(){var e;const r=yield null===(e=this._network)||void 0===e?void 0:e.fetchEvaluations(this._getSdkKey(),t,null==o?void 0:o.priority,n,i);return null!=r?r:null})}_getCacheKey(e){var n;const o=(0,t._getStorageKey)(this._getSdkKey(),e,null===(n=this._options)||void 0===n?void 0:n.customUserCacheKeyFunc);return`${t.DataAdapterCachePrefix}.${this._cacheSuffix}.${o}`}_isCachedResultValidFor204(e,n){return null!=e.fullUserHash&&e.fullUserHash===(0,t._getFullUserHash)(n)}};return StatsigEvaluationsDataAdapter.StatsigEvaluationsDataAdapter=o,StatsigEvaluationsDataAdapter}function requireStatsigClient(){if(hasRequiredStatsigClient)return StatsigClient;hasRequiredStatsigClient=1;var e=StatsigClient&&StatsigClient.__awaiter||function(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{l(o.next(e))}catch(t){r(t)}}function s(e){try{l(o.throw(e))}catch(t){r(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((o=o.apply(e,t||[])).next())})};Object.defineProperty(StatsigClient,"__esModule",{value:!0});const t=requireSrc$2(),n=requireEvaluationStore(),o=requireNetwork(),i=requireParamStoreGetterFactory(),r=requireStatsigEvaluationsDataAdapter();let a=class a extends t.StatsigClientBase{static instance(e){const n=(0,t._getStatsigGlobal)().instance(e);return n instanceof a?n:(t.Log.warn((0,t._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new a(null!=e?e:"",{}))}constructor(e,i,a=null){var s,l;t.SDKType._setClientType(e,"javascript-client");const c=new o.default(a,e=>{this.$emt(e)});super(e,null!==(s=null==a?void 0:a.dataAdapter)&&void 0!==s?s:new r.StatsigEvaluationsDataAdapter,c,a),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(t.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(t.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(t.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(t.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(t.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(t.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new n.default(e,null!=a?a:null),this._network=c,this._user=this._configureUser(i,a),this._sdkInstanceID=(0,t.getUUID)(),this._contextHandle=new t.PrecomputedEvaluationsContextHandle(e,()=>this._options,()=>this._errorBoundary,()=>this._store.getValues(),()=>this._user,()=>this._sdkInstanceID);const d=null!==(l=null==a?void 0:a.plugins)&&void 0!==l?l:[];for(const t of d)t.bind(this)}initializeSync(e){var n;return"Uninitialized"!==this.loadingStatus?(0,t.createUpdateDetails)(!0,this._store.getSource(),-1,null,null,["MultipleInitializations",...null!==(n=this._store.getWarnings())&&void 0!==n?n:[]]):(this._logger.start(),this.updateUserSync(this._user,e))}initializeAsync(t){return e(this,void 0,void 0,function*(){return this._initializePromise||(this._initializePromise=this._initializeAsyncImpl(t)),this._initializePromise})}updateUserSync(e,t){const n=performance.now();try{return this._updateUserSyncImpl(e,t,n)}catch(o){const e=o instanceof Error?o:new Error(String(o));return this._createErrorUpdateDetails(e,n)}}_updateUserSyncImpl(e,n,o){var i;const r=[...null!==(i=this._store.getWarnings())&&void 0!==i?i:[]];this._resetForUser(e);const a=this.dataAdapter.getDataSync(this._user);null==a&&r.push("NoCachedValues"),this._store.setValues(a,this._user),this._finalizeUpdate(a);const s=null==n?void 0:n.disableBackgroundCacheRefresh;return!0===s||null==s&&"Bootstrap"===(null==a?void 0:a.source)||this._runPostUpdate(null!=a?a:null,this._user),(0,t.createUpdateDetails)(!0,this._store.getSource(),performance.now()-o,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),r)}updateUserAsync(t,n){return e(this,void 0,void 0,function*(){const e=performance.now();try{return yield this._updateUserAsyncImpl(t,n)}catch(o){const t=o instanceof Error?o:new Error(String(o));return this._createErrorUpdateDetails(t,e)}})}_updateUserAsyncImpl(n,o){return e(this,void 0,void 0,function*(){this._resetForUser(n);const e=this._user;t.Diagnostics._markInitOverallStart(this._sdkKey);let i=this.dataAdapter.getDataSync(e);if(this._store.setValues(i,this._user),this._setStatus("Loading",i),i=yield this.dataAdapter.getDataAsync(i,e,o),e!==this._user)return(0,t.createUpdateDetails)(!1,this._store.getSource(),-1,new Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let r=!1;null!=i&&(t.Diagnostics._markInitProcessStart(this._sdkKey),r=this._store.setValues(i,this._user),t.Diagnostics._markInitProcessEnd(this._sdkKey,{success:r})),this._finalizeUpdate(i),r||(this._errorBoundary.attachErrorIfNoneExists(t.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),t.Diagnostics._markInitOverallEnd(this._sdkKey,r,this._store.getCurrentSourceDetails());const a=t.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,t.createUpdateDetails)(r,this._store.getSource(),a,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){let e=(0,t._cloneObject)("StatsigUser",this._user);return null==e&&(t.Log.error("Failed to clone user"),e={}),{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:e,errorBoundary:this._errorBoundary,session:t.StatsigSession.get(this._sdkKey),stableID:t.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}getContextHandle(){return this._contextHandle}checkGate(e,t){return this.getFeatureGate(e,t).value}logEvent(e,t,n){const o="string"==typeof e?{eventName:e,value:t,metadata:n}:e;this.$emt({name:"log_event_called",event:o}),this._logger.enqueue(Object.assign(Object.assign({},o),{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(n){return e(this,void 0,void 0,function*(){return t.Storage.isReady()||(yield t.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,n)})}_createErrorUpdateDetails(e,n){var o;return(0,t.createUpdateDetails)(!1,this._store.getSource(),performance.now()-n,e,null,[...null!==(o=this._store.getWarnings())&&void 0!==o?o:[]])}_finalizeUpdate(e){this._store.finalize(),this._setStatus("Ready",e)}_runPostUpdate(e,n){this.dataAdapter.getDataAsync(e,n,{priority:"low"}).catch(e=>{t.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,n){var o,i,r;const a=(0,t._normalizeUser)(e,n),s=null===(o=a.customIDs)||void 0===o?void 0:o.stableID;if(s){const e=null===(r=(i=this.storageProvider).isReadyResolver)||void 0===r?void 0:r.call(i);e?e.then(()=>t.StableID.setOverride(s,this._sdkKey),()=>t.StableID.setOverride(s,this._sdkKey)):t.StableID.setOverride(s,this._sdkKey)}return Object.keys(this._possibleFirstTouchMetadata).length>0&&(a.analyticsOnlyMetadata=Object.assign(Object.assign({},a.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),a}_getFeatureGateImpl(e,n){var o,i;const{result:r,details:a}=this._store.getGate(e);this._checkUserHasIdForEvaluation(null==r?void 0:r.id_type,e,"Gate"),this._checkInitializationStatus(a.reason);const s=(0,t._makeFeatureGate)(e,a,r),l=null===(i=null===(o=this.overrideAdapter)||void 0===o?void 0:o.getGateOverride)||void 0===i?void 0:i.call(o,s,this._user,n),c=null!=l?l:s;return this._enqueueExposure(e,(0,t._createGateExposure)(this._user,c,this._store.getExposureMapping()),n),this.$emt({name:"gate_evaluation",gate:c}),c}_getDynamicConfigImpl(e,n){var o,i;const{result:r,details:a}=this._store.getConfig(e);this._checkUserHasIdForEvaluation(null==r?void 0:r.id_type,e,"Dynamic config"),this._checkInitializationStatus(a.reason);const s=(0,t._makeDynamicConfig)(e,a,r),l=null===(i=null===(o=this.overrideAdapter)||void 0===o?void 0:o.getDynamicConfigOverride)||void 0===i?void 0:i.call(o,s,this._user,n),c=null!=l?l:s;return this._enqueueExposure(e,(0,t._createConfigExposure)(this._user,c,this._store.getExposureMapping()),n),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:c}),c}_getExperimentImpl(e,n){var o,i,r,a;const{result:s,details:l}=this._store.getConfig(e);this._checkUserHasIdForEvaluation(null==s?void 0:s.id_type,e,"Experiment"),this._checkInitializationStatus(l.reason);const c=(0,t._makeExperiment)(e,l,s);null!=c.__evaluation&&(c.__evaluation.secondary_exposures=(0,t._mapExposures)(null!==(i=null===(o=c.__evaluation)||void 0===o?void 0:o.secondary_exposures)&&void 0!==i?i:[],this._store.getExposureMapping()));const d=null===(a=null===(r=this.overrideAdapter)||void 0===r?void 0:r.getExperimentOverride)||void 0===a?void 0:a.call(r,c,this._user,n),p=null!=d?d:c;return this._enqueueExposure(e,(0,t._createConfigExposure)(this._user,p,this._store.getExposureMapping()),n),this.$emt({name:"experiment_evaluation",experiment:p}),p}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(e,n){var o,i,r;const{result:a,details:s}=this._store.getLayer(e),l=(0,t._makeLayer)(e,s,a),c=null===(i=null===(o=this.overrideAdapter)||void 0===o?void 0:o.getLayerOverride)||void 0===i?void 0:i.call(o,l,this._user,n);(null==n?void 0:n.disableExposureLog)&&this._logger.incrementNonExposureCount(e);const d=(0,t._mergeOverride)(l,c,null!==(r=null==c?void 0:c.__value)&&void 0!==r?r:l.__value,o=>{(null==n?void 0:n.disableExposureLog)||this._enqueueExposure(e,(0,t._createLayerParameterExposure)(this._user,d,o,this._store.getExposureMapping()),n)});return this.$emt({name:"layer_evaluation",layer:d}),d}_getParameterStoreImpl(e,t){var n,o;const{result:r,details:a}=this._store.getParamStore(e);this._logger.incrementNonExposureCount(e);const s={name:e,details:a,__configuration:r,get:(0,i._makeParamStoreGetter)(this,r,t)},l=null===(o=null===(n=this.overrideAdapter)||void 0===n?void 0:n.getParamStoreOverride)||void 0===o?void 0:o.call(n,s,t);return null!=l&&(s.__configuration=l.config,s.details=l.details,s.get=(0,i._makeParamStoreGetter)(this,l.config,t)),s}_checkUserHasIdForEvaluation(e,n,o){e&&((0,t._getUnitIDFromUser)(this._user,e)||t.Log.warn(`The user does not have the required id_type "${e}" for ${o} "${n}"`))}_checkInitializationStatus(e){("Uninitialized"===e||e.startsWith("Loading"))&&t.Log.warn(`SDK initialization has not completed. Reason: ${e}`)}};return StatsigClient.default=a,StatsigClient}function requireSrc$1(){return hasRequiredSrc$1||(hasRequiredSrc$1=1,function(e){var t=src&&src.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),n=src&&src.__exportStar||function(e,n){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(n,o)||t(n,e,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.StatsigClient=void 0;const o=requireSrc$2(),i=requireStatsigClient();e.StatsigClient=i.default,n(requireSrc$2(),e);const r=Object.assign((0,o._getStatsigGlobal)(),{StatsigClient:i.default});e.default=r}(src)),src}var useStatsigInternalClientFactoryAsync={},hasRequiredUseStatsigInternalClientFactoryAsync,hasRequiredUseClientAsyncInit,hasRequiredStatsigProvider;function requireUseStatsigInternalClientFactoryAsync(){if(hasRequiredUseStatsigInternalClientFactoryAsync)return useStatsigInternalClientFactoryAsync;hasRequiredUseStatsigInternalClientFactoryAsync=1,Object.defineProperty(useStatsigInternalClientFactoryAsync,"__esModule",{value:!0}),useStatsigInternalClientFactoryAsync.useStatsigInternalClientFactoryAsync=void 0;const e=React,t=requireSrc$2();return useStatsigInternalClientFactoryAsync.useStatsigInternalClientFactoryAsync=function(n,o){const i=(0,e.useMemo)(()=>{var e;return null!==(e=(0,t._getInstance)(o.sdkKey))&&void 0!==e?e:n(o)},[]),[r,a]=(0,e.useState)("Ready"!==i.loadingStatus);return(0,e.useMemo)(()=>{"Ready"!==i.loadingStatus&&i.initializeAsync().catch(t.Log.error).finally(()=>a(!1))},[]),{client:i,isLoading:r}},useStatsigInternalClientFactoryAsync}function requireUseClientAsyncInit(){if(hasRequiredUseClientAsyncInit)return useClientAsyncInit;hasRequiredUseClientAsyncInit=1,Object.defineProperty(useClientAsyncInit,"__esModule",{value:!0}),useClientAsyncInit.useClientAsyncInit=void 0;const e=requireSrc$1(),t=requireUseStatsigInternalClientFactoryAsync();return useClientAsyncInit.useClientAsyncInit=function(n,o,i=null){return(0,t.useStatsigInternalClientFactoryAsync)(t=>new e.StatsigClient(t.sdkKey,t.initialUser,t.statsigOptions),{sdkKey:n,initialUser:o,statsigOptions:i})},useClientAsyncInit}function requireStatsigProvider(){if(hasRequiredStatsigProvider)return StatsigProvider;hasRequiredStatsigProvider=1,Object.defineProperty(StatsigProvider,"__esModule",{value:!0}),StatsigProvider.StatsigProvider=void 0;const e=requireJsxRuntime(),t=React,n=requireSrc$2(),o=requireStatsigContext(),i=requireUseClientAsyncInit();function r(n){const[r,a]=(0,t.useState)(0),c=(0,i.useClientAsyncInit)(n.sdkKey,n.user,n.options).client,[d,p]=(0,t.useState)(!l(c));s(c,a,p);const u=(0,t.useMemo)(()=>({renderVersion:r,client:c,isLoading:d}),[r,c,d]);return(0,e.jsx)(o.default.Provider,{value:u,children:null!=n.loadingComponent&&u.isLoading?n.loadingComponent:n.children})}function a(n){const[i,r]=(0,t.useState)(0),a=n.client,[c,d]=(0,t.useState)(!l(a));s(a,r,d);const p=(0,t.useMemo)(()=>({renderVersion:i,client:a,isLoading:c}),[i,a,c]);return(0,e.jsx)(o.default.Provider,{value:p,children:null!=n.loadingComponent&&p.isLoading?n.loadingComponent:n.children})}function s(e,o,i){(0,t.useEffect)(()=>{const t=()=>{o(e=>e+1),i(!l(e))};return n.SDKType._setBindingType("react"),e.$on("values_updated",t),()=>{e.flush().catch(e=>n.Log.error("An error occurred during flush",e)),e.off("values_updated",t)}},[e,o])}function l(e){return"isNoop"in e||"Ready"===e.loadingStatus}return StatsigProvider.StatsigProvider=function(t){return"client"in t?(("sdkKey"in t||"user"in t)&&n.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,e.jsx)(a,Object.assign({},t))):(0,e.jsx)(r,Object.assign({},t))},StatsigProvider}var useClientBootstrapInit={},useStatsigInternalClientFactoryBootstrap={},hasRequiredUseStatsigInternalClientFactoryBootstrap,hasRequiredUseClientBootstrapInit;function requireUseStatsigInternalClientFactoryBootstrap(){if(hasRequiredUseStatsigInternalClientFactoryBootstrap)return useStatsigInternalClientFactoryBootstrap;hasRequiredUseStatsigInternalClientFactoryBootstrap=1,Object.defineProperty(useStatsigInternalClientFactoryBootstrap,"__esModule",{value:!0}),useStatsigInternalClientFactoryBootstrap.useStatsigInternalClientFactoryBootstrap=void 0;const e=React,t=requireSrc$2();return useStatsigInternalClientFactoryBootstrap.useStatsigInternalClientFactoryBootstrap=function(n,o){const i=(0,e.useRef)((0,t._getInstance)(o.sdkKey));return(0,e.useMemo)(()=>{if(i.current)return i.current;const e=n(o);return i.current=e,o.useLegacyFormat?e.dataAdapter.setDataLegacy(o.initialValues,o.initialUser):e.dataAdapter.setData(o.initialValues),e.initializeSync(),e},[])},useStatsigInternalClientFactoryBootstrap}function requireUseClientBootstrapInit(){if(hasRequiredUseClientBootstrapInit)return useClientBootstrapInit;hasRequiredUseClientBootstrapInit=1,Object.defineProperty(useClientBootstrapInit,"__esModule",{value:!0}),useClientBootstrapInit.useClientBootstrapInit=void 0;const e=requireSrc$1(),t=requireUseStatsigInternalClientFactoryBootstrap();return useClientBootstrapInit.useClientBootstrapInit=function(n,o,i,r=null,a){return(0,t.useStatsigInternalClientFactoryBootstrap)(t=>new e.StatsigClient(t.sdkKey,t.initialUser,t.statsigOptions),{sdkKey:n,initialUser:o,initialValues:i,statsigOptions:r,useLegacyFormat:a})},useClientBootstrapInit}var useDynamicConfig={},hasRequiredUseDynamicConfig;function requireUseDynamicConfig(){if(hasRequiredUseDynamicConfig)return useDynamicConfig;hasRequiredUseDynamicConfig=1,Object.defineProperty(useDynamicConfig,"__esModule",{value:!0});const e=React,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useDynamicConfig.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useDynamicConfig hook failed to find a valid StatsigClient for dynamic config '${i}'.`),n.NoopEvaluationsClient.getDynamicConfig(i,r)):a.getDynamicConfig(i,r),[i,a,s,...r?Object.values(r):[]])},useDynamicConfig}var useExperiment={},hasRequiredUseExperiment;function requireUseExperiment(){if(hasRequiredUseExperiment)return useExperiment;hasRequiredUseExperiment=1,Object.defineProperty(useExperiment,"__esModule",{value:!0});const e=React,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useExperiment.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useExperiment hook failed to find a valid Statsig client for experiment '${i}'.`),n.NoopEvaluationsClient.getExperiment(i,r)):a.getExperiment(i,r),[i,a,s,...r?Object.values(r):[]])},useExperiment}var useFeatureGate={},hasRequiredUseFeatureGate;function requireUseFeatureGate(){if(hasRequiredUseFeatureGate)return useFeatureGate;hasRequiredUseFeatureGate=1,Object.defineProperty(useFeatureGate,"__esModule",{value:!0});const e=React,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useFeatureGate.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useFeatureGate hook failed to find a valid StatsigClient for gate '${i}'.`),n.NoopEvaluationsClient.getFeatureGate(i,r)):a.getFeatureGate(i,r),[i,a,s,...r?Object.values(r):[]])},useFeatureGate}var useGateValue={},hasRequiredUseGateValue;function requireUseGateValue(){if(hasRequiredUseGateValue)return useGateValue;hasRequiredUseGateValue=1,Object.defineProperty(useGateValue,"__esModule",{value:!0});const e=React,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useGateValue.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useGateValue hook failed to find a valid StatsigClient for gate '${i}'.`),n.NoopEvaluationsClient.checkGate(i,r)):a.checkGate(i,r),[i,a,s,...r?Object.values(r):[]])},useGateValue}var useLayer={},hasRequiredUseLayer;function requireUseLayer(){if(hasRequiredUseLayer)return useLayer;hasRequiredUseLayer=1,Object.defineProperty(useLayer,"__esModule",{value:!0});const e=React,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useLayer.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useLayer hook failed to find a valid Statsig client for layer '${i}'.`),n.NoopEvaluationsClient.getLayer(i,r)):a.getLayer(i,r),[i,a,s,...r?Object.values(r):[]])},useLayer}var useParameterStore={},hasRequiredUseParameterStore;function requireUseParameterStore(){if(hasRequiredUseParameterStore)return useParameterStore;hasRequiredUseParameterStore=1,Object.defineProperty(useParameterStore,"__esModule",{value:!0});const e=React,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useParameterStore.default=function(i,r){const{client:a,renderVersion:s}=(0,e.useContext)(o.default);return(0,e.useMemo)(()=>(0,n.isNoopClient)(a)?(t.Log.warn(`useParameterStore hook failed to find a valid StatsigClient for parameter store '${i}'.`),n.NoopEvaluationsClient.getParameterStore(i,r)):a.getParameterStore(i,r),[i,a,s,...r?Object.values(r):[]])},useParameterStore}var useStatsigClient={},hasRequiredUseStatsigClient;function requireUseStatsigClient(){if(hasRequiredUseStatsigClient)return useStatsigClient;hasRequiredUseStatsigClient=1,Object.defineProperty(useStatsigClient,"__esModule",{value:!0}),useStatsigClient.useStatsigClient=void 0;const e=React,t=requireSrc$2(),n=requireNoopEvaluationsClient(),o=requireStatsigContext();return useStatsigClient.useStatsigClient=function(){const{client:i,renderVersion:r,isLoading:a}=(0,e.useContext)(o.default),s=(0,e.useMemo)(()=>(0,n.isNoopClient)(i)?(t.Log.warn("Attempting to retrieve a StatsigClient but none was set."),n.NoopEvaluationsClient):i,[i,r]),l=[s,r],c=(0,e.useCallback)((e,t)=>s.checkGate(e,t),l),d=(0,e.useCallback)((e,t)=>s.getFeatureGate(e,t),l),p=(0,e.useCallback)((e,t)=>s.getDynamicConfig(e,t),l),u=(0,e.useCallback)((e,t)=>s.getExperiment(e,t),l),m=(0,e.useCallback)((e,t)=>s.getLayer(e,t),l),h=(0,e.useCallback)((e,t)=>s.getParameterStore(e,t),l),g=(0,e.useCallback)((e,t,n)=>"string"==typeof e?s.logEvent(e,t,n):s.logEvent(e),l);return(0,e.useMemo)(()=>({client:s,checkGate:c,getFeatureGate:d,getDynamicConfig:p,getExperiment:u,getLayer:m,getParameterStore:h,logEvent:g,isLoading:a}),[s,c,d,p,u,m,h,g,a])},useStatsigClient}var useStatsigUser={},hasRequiredUseStatsigUser,hasRequiredSrc;function requireUseStatsigUser(){if(hasRequiredUseStatsigUser)return useStatsigUser;hasRequiredUseStatsigUser=1,Object.defineProperty(useStatsigUser,"__esModule",{value:!0}),useStatsigUser.useStatsigUser=void 0;const e=React,t=requireStatsigContext(),n=requireUseStatsigClient();function o(e){return e.getContextHandle().user}return useStatsigUser.useStatsigUser=function(){const{client:i}=(0,n.useStatsigClient)(),{renderVersion:r}=(0,e.useContext)(t.default);return{user:(0,e.useMemo)(()=>o(i),[i,r]),updateUserSync:(0,e.useCallback)(e=>("function"==typeof e&&(e=e(o(i))),i.updateUserSync(e)),[i]),updateUserAsync:(0,e.useCallback)(e=>("function"==typeof e&&(e=e(o(i))),i.updateUserAsync(e)),[i])}},useStatsigUser}function requireSrc(){return hasRequiredSrc||(hasRequiredSrc=1,function(e){var t=src$2&&src$2.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),n=src$2&&src$2.__exportStar||function(e,n){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(n,o)||t(n,e,o)};Object.defineProperty(e,"__esModule",{value:!0}),e.useStatsigUser=e.useStatsigInternalClientFactoryBootstrap=e.useStatsigInternalClientFactoryAsync=e.useStatsigClient=e.useParameterStore=e.useLayer=e.useGateValue=e.useFeatureGate=e.useExperiment=e.useDynamicConfig=e.useClientBootstrapInit=e.useClientAsyncInit=e.StatsigProvider=e.StatsigContext=void 0;const o=requireSrc$2(),i=requireStatsigContext();e.StatsigContext=i.default;const r=requireStatsigProvider();Object.defineProperty(e,"StatsigProvider",{enumerable:!0,get:function(){return r.StatsigProvider}});const a=requireUseClientAsyncInit();Object.defineProperty(e,"useClientAsyncInit",{enumerable:!0,get:function(){return a.useClientAsyncInit}});const s=requireUseClientBootstrapInit();Object.defineProperty(e,"useClientBootstrapInit",{enumerable:!0,get:function(){return s.useClientBootstrapInit}});const l=requireUseDynamicConfig();e.useDynamicConfig=l.default;const c=requireUseExperiment();e.useExperiment=c.default;const d=requireUseFeatureGate();e.useFeatureGate=d.default;const p=requireUseGateValue();e.useGateValue=p.default;const u=requireUseLayer();e.useLayer=u.default;const m=requireUseParameterStore();e.useParameterStore=m.default;const h=requireUseStatsigClient();Object.defineProperty(e,"useStatsigClient",{enumerable:!0,get:function(){return h.useStatsigClient}});const g=requireUseStatsigInternalClientFactoryAsync();Object.defineProperty(e,"useStatsigInternalClientFactoryAsync",{enumerable:!0,get:function(){return g.useStatsigInternalClientFactoryAsync}});const x=requireUseStatsigInternalClientFactoryBootstrap();Object.defineProperty(e,"useStatsigInternalClientFactoryBootstrap",{enumerable:!0,get:function(){return x.useStatsigInternalClientFactoryBootstrap}});const f=requireUseStatsigUser();Object.defineProperty(e,"useStatsigUser",{enumerable:!0,get:function(){return f.useStatsigUser}}),n(requireSrc$1(),e),Object.assign((0,o._getStatsigGlobal)(),{StatsigContext:i.default,StatsigProvider:r.StatsigProvider,useClientAsyncInit:a.useClientAsyncInit,useClientBootstrapInit:s.useClientBootstrapInit,useDynamicConfig:l.default,useExperiment:c.default,useFeatureGate:d.default,useGateValue:p.default,useLayer:u.default,useParameterStore:m.default,useStatsigClient:h.useStatsigClient,useStatsigInternalClientFactoryAsync:g.useStatsigInternalClientFactoryAsync,useStatsigInternalClientFactoryBootstrap:x.useStatsigInternalClientFactoryBootstrap,useStatsigUser:f.useStatsigUser})}(src$2)),src$2}var srcExports=requireSrc(),FeatureGatesNamesCockpit=(e=>(e.enableZeniGPTFeatureForMonthEndEmail="zeni_gpt_for_month_end_email_enabled",e.isBirdsEyeViewEnabled="is_birds_eye_view_enabled",e.isReviewTabVendorColumnEnabled="review_vendor_column_enabled",e.enableSendingMonthEndEmail="sending_month_end_email_enabled",e))(FeatureGatesNamesCockpit||{}),FeatureGatesNamesWebApp=(e=>(e.isVendorMagicLinkFeatureEnabled="is_vendor_magic_link_feature_enabled",e.billPaySetupShowInternationalPaymentByWise="bill_pay_setup_show_international_payment_by_wise",e.isDepositAccountsFeatureEnabled="is_deposit_accounts_feature_enabled",e.isLimitedCategoryForReimbursement="is_limited_category_for_reimbursements_enabled",e.isBillPayLocalCurrencyFeatureEnabled="is_bill_pay_local_currency_feature_enabled",e.isOpexByVendorFeatureEnabled="is_opex_by_vendor_feature_enabled",e.isInternationalPaymentShaVsOurFeatureEnabled="is_international_sha_vs_our_feature_enabled",e.isApAgingFeatureEnabled="is_ap_aging_feature_enabled",e.isArAgingFeatureEnabled="is_ar_aging_feature_enabled",e.isChargeCardFeatureEnabled="is_charge_card_feature_enabled",e.isEarlyPayFeatureEnabled="is_early_pay_feature_enabled",e.isVendorReviewFeatureEnabled="is_vendor_review_feature_enabled",e.isVendorRecommendationFeatureEnabled="is_vendor_recommendation_feature_enabled",e.isShowDeletedBillsFeatureEnabled="is_show_deleted_bills_feature_enabled",e.isShowDeletedReimbursementsFeatureEnabled="is_show_deleted_reimbursements_feature_enabled",e.isRecurringBillsFeatureEnabled="is_recurring_bills_feature_enabled",e.isScheduledJEPrepaidExpensesFeatureEnabled="is_scheduled_je_prepaid_expenses_feature_enabled",e.isScheduledJEFixedAssetsFeatureEnabled="is_scheduled_je_fixed_assets_feature_enabled",e.isScheduledJEAccruedExpensesFeatureEnabled="is_scheduled_je_accrued_expenses_feature_enabled",e.isReferralFeatureEnabled="is_referral_feature_enabled",e.isSettingsFeatureEnabled="is_settings_feature_enabled",e.isVendorBulkUpdateOnTransactionEnabled="is_vendor_bulk_update_on_transaction_enabled",e.isCashbackFeatureEnabled="is_cashback_feature_enabled",e.isBillPayBulkActionEnabled="is_bill_pay_bulk_action_enabled",e.isFiling1099FeatureEnabled="is_filing_1099_feature_enabled",e.isReimbursementBulkActionEnabled="is_reimbursement_bulk_action_enabled",e.isExpenseAutomationEnabled="is_expense_automation_enabled",e.isRevenueAutomationEnabled="is_revenue_automation_enabled",e.isIssuePhysicalCardEnabled="is_issue_physical_card_enabled",e.isTaskTemplatesEnabled="is_task_templates_enabled",e.isTaskManagerCustomerUserAccessEnabled="is_task_manager_customer_user_access_enabled",e.isShaDisabled="is_sha_disabled",e.isOurDisabled="is_our_disabled",e.isBillPayDetectInsufficientFundsEnabled="is_bill_pay_detect_insufficient_funds_enabled",e.isExpenseAutomationEnabledV2="is_expense_automation_enabled_v2",e.isDebitCardFeatureEnabled="is_debit_card_feature_enabled",e.isRealtimeInsightsFeatureEnabled="is_realtime_insights_feature_enabled",e.isTreasuryEnabled="is_treasury_enabled",e.isInvoicingFeatureEnabled="is_invoicing_feature_enabled",e.isChainOfThoughtEnabled="is_chain_of_thought_enabled",e.isRecommendationFeedbackEnabled="is_recommendation_feedback_enabled",e.isDashboardSidebarHalloweenAnimationEnabled="is_dashboard_sidebar_halloween_animation_enabled",e.isDashboardSidebarThanksGivingAnimationEnabled="is_dashboard_sidebar_thanksgiving_animation_enabled",e.isDashboardSidebarChristmasAnimationEnabled="is_dashboard_sidebar_christmas_animation_enabled",e.isDashboardSidebarNewYearAnimationEnabled="is_dashboard_sidebar_new_year_animation_enabled",e.isExpenseAutomationSearchAndFilterEnabled="is_expense_automation_search_and_filter_enabled",e.isChargeCardPaymentHistoryFeatureEnabled="is_charge_card_payment_history_feature_enabled",e.isIssuePhysicalDebitCardEnabled="is_issue_physical_debit_card_enabled",e.isAutoTransferRuleEnabled="is_auto_transfer_rule_enabled",e.isMissingReceiptsBulkUploadEnabled="is_missing_receipts_bulk_upload_enabled",e.isAiCfoFileUploadEnabled="is_ai_cfo_file_upload_enabled",e.isAiCfoAnswerExportEnabled="is_ai_cfo_answer_export_enabled",e.isAiCfoDiscoveryTipsEnabled="is_ai_cfo_discovery_tips_enabled",e.isAiCfoNavButtonEnabled="is_ai_cfo_nav_button_enabled",e.isTransactionDetailSplitViewEnabled="is_transaction_detail_split_view_enabled",e.isServiceWorkerPrefetchingEnabled="is_prefetching_enabled",e.isTransactionActivityEnabled="is_transaction_activity_enabled",e.isCreateTransferEntryFromExpenseEnabled="is_create_transfer_entry_from_expense_enabled",e.isCreateTransactionEnabled="is_create_transaction_enabled",e.isReportsHorizontalClassLayoutSwitchEnabled="is_reports_horizontal_class_layout_switch_enabled",e.isReportsCustomDateRangeEnabled="reports_custom_date_range",e.isAiCfoEnabled="is_ai_cfo_enabled",e.isProjectsTransactionsEnabled="is_projects_transactions_enabled",e.isAiCardCreationEnabled="is_ai_card_creation_enabled",e.isCardPolicyEnabled="is_card_policy_enabled",e.isTaskManagerNotificationControlsEnabled="is_task_manager_notification_controls_enabled",e.isTaskSnoozeEnabled="is_task_snooze_enabled",e.isTaskVisibilityEnabled="is_task_visibility_enabled",e.isTaskCannedResponsesEnabled="is_task_canned_responses_enabled",e.isTaskCategorizationEnabled="is_task_categorization_enabled",e.isTaskBulkResolutionEnabled="is_task_bulk_resolution_enabled",e.isTaskAssigneeSortingEnabled="is_task_assignee_sorting_enabled",e.isTaskRecurringParentEnabled="is_task_recurring_parent_enabled",e.isTaskGroupAssigneesEnabled="is_task_group_assignees_enabled",e.aiAuditScorePercentage="ai_audit_score_percentage",e.isReconV3Enabled="is_reconciliation_v3_enabled",e.isReconciliationCombinedStatementEnabled="is_reconciliation_combined_statement_enabled",e.isReconReportEnabled="is_recon_report_enabled",e.isTransactionSplitEnabled="transaction_split_enabled",e.isAccrualEnabled="is_accrual_enabled",e))(FeatureGatesNamesWebApp||{});const FeatureGatesNames={...FeatureGatesNamesCockpit,...FeatureGatesNamesWebApp},CONFIG_SYNC_INTERVAL_MS=18e5;Object.values(FeatureGatesNames),Object.values(DynamicConfigNames);const StatsigNetworkValuesContext=React.createContext(!0),useIsFeatureGateLoading=()=>!React.useContext(StatsigNetworkValuesContext),useZeniFeatureGate=e=>{const t=useIsFeatureGateLoading();try{return{isFeatureGateLoading:t,isFeatureEnabled:srcExports.useFeatureGate(e).value}}catch{return{isFeatureGateLoading:t,isFeatureEnabled:!1}}},useZeniDynamicConfig=e=>{const t=srcExports.useDynamicConfig(e);try{return{isDynamicConfigLoading:!1,configValue:t.value}}catch{return{isDynamicConfigLoading:!1,configValue:{}}}},ZeniFeatureProvider=e=>!0===e.zeniFeatureProviderConfig.nonBlockingInit?jsxRuntimeExports.jsx(NonBlockingZeniFeatureProvider,{...e}):jsxRuntimeExports.jsx(BlockingZeniFeatureProvider,{...e}),useZeniStatsigUser=e=>React.useMemo(()=>({...null!=e.userId?{userID:e.userId}:{},...null!=e.userEmail?{email:e.userEmail}:{},custom:{company_id:e.companyId??"",connected_account_provider:e.connectedAccountProvider??""}}),[e.companyId,e.connectedAccountProvider,e.userEmail,e.userId]),BlockingZeniFeatureProvider=({featureGateCustomFields:e,zeniFeatureProviderConfig:t,children:n})=>{const o=useZeniStatsigUser(e),i={networkConfig:{api:t.providerEndPoint,initializeUrl:`${t.providerEndPoint}/initialize`},environment:{tier:t.currentFeatureEnv},disableLogging:!0},{client:r,isLoading:a}=srcExports.useClientAsyncInit(t.featureClientSecret,o,i);return React.useEffect(()=>{null!=r&&!1===a&&r.updateUserAsync(o)},[r,o,a]),React.useEffect(()=>{if(null==r||a)return;const e=setInterval(()=>{r.updateUserAsync(o).catch(e=>{console.warn("[Statsig] Config refresh failed.",e)})},CONFIG_SYNC_INTERVAL_MS);return()=>clearInterval(e)},[r,o,a]),a?jsxRuntimeExports.jsx(InitializationComponent,{}):jsxRuntimeExports.jsx(srcExports.StatsigProvider,{client:r,children:n},e.companyId)},statsigIdentity=e=>[e.userID??"",e.custom?.company_id??""].join(":"),STATSIG_EVALUATIONS_CACHE_PREFIX="statsig.cached.evaluations",MAX_STORED_COMPANIES_PER_USER=2,statsigCacheKey=(e,t)=>[e,t.userID??"",t.custom?.company_id??""].join("|");function keepRecentCompaniesOnly(e,t){const n=t.custom?.company_id;if(null==t.userID||null==n||""===n)return;const o=`zeni.statsig.recent_companies.${t.userID}`;try{const i=JSON.parse(window.localStorage.getItem(o)??"[]"),r=Array.isArray(i)?i.filter(e=>"string"==typeof e&&e!==String(n)):[],a=[String(n),...r];a.slice(MAX_STORED_COMPANIES_PER_USER).forEach(n=>{window.localStorage.removeItem(`${STATSIG_EVALUATIONS_CACHE_PREFIX}.${statsigCacheKey(e,{...t,custom:{...t.custom,company_id:n}})}`)}),window.localStorage.setItem(o,JSON.stringify(a.slice(0,MAX_STORED_COMPANIES_PER_USER)))}catch{}}const nonBlockingClients=new Map;function startStatsigSession(e,t,n,o){const i=nonBlockingClients.get(e)??new srcExports.StatsigClient(e,t,n);nonBlockingClients.set(e,i),"Uninitialized"===i.loadingStatus&&i.initializeSync({disableBackgroundCacheRefresh:!0});let r=0;const a={client:i,hasSettledOnce:!1,hasStoredValues:!1,lastRequestedUser:t,refresh:t=>{r+=1;const n=r;statsigIdentity(t)!==statsigIdentity(a.lastRequestedUser)&&o(null),a.lastRequestedUser=t;const s=i=>{n===r&&(i&&keepRecentCompaniesOnly(e,t),a.hasSettledOnce=!0,o(statsigIdentity(t)))};i.updateUserAsync(t).then(e=>s(e.success),()=>s(!1))}};return a.refresh(t),a.hasStoredValues=null!=t.userID&&null!=i.getContext().values,a}const NonBlockingZeniFeatureProvider=({featureGateCustomFields:e,zeniFeatureProviderConfig:t,children:n})=>{const o=useZeniStatsigUser(e),[i,r]=React.useState(null),[a]=React.useState(()=>startStatsigSession(t.featureClientSecret,o,{networkConfig:{api:t.providerEndPoint,initializeUrl:`${t.providerEndPoint}/initialize`},environment:{tier:t.currentFeatureEnv},disableLogging:!0,customUserCacheKeyFunc:statsigCacheKey},r));if(React.useEffect(()=>{o!==a.lastRequestedUser&&a.refresh(o)},[a,o]),React.useEffect(()=>{const e=setInterval(()=>{a.client.updateUserAsync(o).catch(e=>{console.warn("[Statsig] Config refresh failed.",e)})},CONFIG_SYNC_INTERVAL_MS);return()=>clearInterval(e)},[a,o]),!a.hasStoredValues&&!a.hasSettledOnce)return jsxRuntimeExports.jsx(InitializationComponent,{});const s=null!=o.userID&&i===statsigIdentity(o);return jsxRuntimeExports.jsx(StatsigNetworkValuesContext.Provider,{value:s,children:jsxRuntimeExports.jsx(srcExports.StatsigProvider,{client:a.client,children:n},e.companyId)})},BusyContainer$i=styled$2.div`
|
|
2129
2129
|
background-color: ${e=>e.theme.colors.background};
|
|
2130
2130
|
height: 100vh;
|
|
2131
2131
|
width: 100%;
|
|
@@ -10274,7 +10274,7 @@
|
|
|
10274
10274
|
padding-top: ${e=>D$4W.ButtonContainerPaddingTop.valuePx(e.windowSize)};
|
|
10275
10275
|
`,StyledDiv$Y=styled$2.div``,StyledSSNCardTemplate=styled$2(SvgSsnCardFront)`
|
|
10276
10276
|
transform: scale(1, 0.9);
|
|
10277
|
-
`,BottomHeader=styled$2(H6Medium)``;function _mergeNamespaces$1(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}function copyExifWithoutOrientation(e,t){return new Promise(function(n,o){let i;return getApp1Segment(e).then(function(e){try{return i=e,n(new Blob([t.slice(0,2),i,t.slice(2)],{type:"image/jpeg"}))}catch(r){return o(r)}},o)})}const getApp1Segment=e=>new Promise((t,n)=>{const o=new FileReader;o.addEventListener("load",({target:{result:e}})=>{const o=new DataView(e);let i=0;if(65496!==o.getUint16(i))return n("not a valid JPEG");for(i+=2;;){const r=o.getUint16(i);if(65498===r)break;const a=o.getUint16(i+2);if(65505===r&&1165519206===o.getUint32(i+4)){const r=i+10;let s;switch(o.getUint16(r)){case 18761:s=!0;break;case 19789:s=!1;break;default:return n("TIFF header contains invalid endian")}if(42!==o.getUint16(r+2,s))return n("TIFF header contains invalid version");const l=o.getUint32(r+4,s),c=r+l+2+12*o.getUint16(r+l,s);for(let e=r+l+2;e<c;e+=12)if(274==o.getUint16(e,s)){if(3!==o.getUint16(e+2,s))return n("Orientation data type is invalid");if(1!==o.getUint32(e+4,s))return n("Orientation data count is invalid");o.setUint16(e+8,1,s);break}return t(e.slice(i,i+2+a))}i+=2+a}return t(new Blob)}),o.readAsArrayBuffer(e)});var e={},t={get exports(){return e},set exports(t){e=t}},r2,i3,UZIP2;UZIP2={},t.exports=UZIP2,UZIP2.parse=function(e,t){for(var n=UZIP2.bin.readUshort,o=UZIP2.bin.readUint,i=0,r={},a=new Uint8Array(e),s=a.length-4;101010256!=o(a,s);)s--;i=s,i+=4;var l=n(a,i+=4);n(a,i+=2);var c=o(a,i+=2),d=o(a,i+=4);i+=4,i=d;for(var p=0;p<l;p++){o(a,i),i+=4,i+=4,i+=4,o(a,i+=4),c=o(a,i+=4);var u=o(a,i+=4),m=n(a,i+=4),h=n(a,i+2),g=n(a,i+4);i+=6;var x=o(a,i+=8);i+=4,i+=m+h+g,UZIP2._readLocal(a,x,r,c,u,t)}return r},UZIP2._readLocal=function(e,t,n,o,i,r){var a=UZIP2.bin.readUshort,s=UZIP2.bin.readUint;s(e,t),a(e,t+=4),a(e,t+=2);var l=a(e,t+=2);s(e,t+=2),s(e,t+=4),t+=4;var c=a(e,t+=8),d=a(e,t+=2);t+=2;var p=UZIP2.bin.readUTF8(e,t,c);if(t+=c,t+=d,r)n[p]={size:i,csize:o};else{var u=new Uint8Array(e.buffer,t);if(0==l)n[p]=new Uint8Array(u.buffer.slice(t,t+o));else{if(8!=l)throw"unknown compression method: "+l;var m=new Uint8Array(i);UZIP2.inflateRaw(u,m),n[p]=m}}},UZIP2.inflateRaw=function(e,t){return UZIP2.F.inflate(e,t)},UZIP2.inflate=function(e,t){return e[0],e[1],UZIP2.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),t)},UZIP2.deflate=function(e,t){null==t&&(t={level:6});var n=0,o=new Uint8Array(50+Math.floor(1.1*e.length));o[n]=120,o[n+1]=156,n+=2,n=UZIP2.F.deflateRaw(e,o,n,t.level);var i=UZIP2.adler(e,0,e.length);return o[n+0]=i>>>24&255,o[n+1]=i>>>16&255,o[n+2]=i>>>8&255,o[n+3]=i>>>0&255,new Uint8Array(o.buffer,0,n+4)},UZIP2.deflateRaw=function(e,t){null==t&&(t={level:6});var n=new Uint8Array(50+Math.floor(1.1*e.length)),o=UZIP2.F.deflateRaw(e,n,o,t.level);return new Uint8Array(n.buffer,0,o)},UZIP2.encode=function(e,t){null==t&&(t=!1);var n=0,o=UZIP2.bin.writeUint,i=UZIP2.bin.writeUshort,r={};for(var a in e){var s=!UZIP2._noNeed(a)&&!t,l=e[a],c=UZIP2.crc.crc(l,0,l.length);r[a]={cpr:s,usize:l.length,crc:c,file:s?UZIP2.deflateRaw(l):l}}for(var a in r)n+=r[a].file.length+30+46+2*UZIP2.bin.sizeUTF8(a);n+=22;var d=new Uint8Array(n),p=0,u=[];for(var a in r){var m=r[a];u.push(p),p=UZIP2._writeHeader(d,p,a,m,0)}var h=0,g=p;for(var a in r)m=r[a],u.push(p),p=UZIP2._writeHeader(d,p,a,m,1,u[h++]);var x=p-g;return o(d,p,101010256),p+=4,i(d,p+=4,h),i(d,p+=2,h),o(d,p+=2,x),o(d,p+=4,g),p+=4,p+=2,d.buffer},UZIP2._noNeed=function(e){var t=e.split(".").pop().toLowerCase();return-1!="png,jpg,jpeg,zip".indexOf(t)},UZIP2._writeHeader=function(e,t,n,o,i,r){var a=UZIP2.bin.writeUint,s=UZIP2.bin.writeUshort,l=o.file;return a(e,t,0==i?67324752:33639248),t+=4,1==i&&(t+=2),s(e,t,20),s(e,t+=2,0),s(e,t+=2,o.cpr?8:0),a(e,t+=2,0),a(e,t+=4,o.crc),a(e,t+=4,l.length),a(e,t+=4,o.usize),s(e,t+=4,UZIP2.bin.sizeUTF8(n)),s(e,t+=2,0),t+=2,1==i&&(t+=2,t+=2,a(e,t+=6,r),t+=4),t+=UZIP2.bin.writeUTF8(e,t,n),0==i&&(e.set(l,t),t+=l.length),t},UZIP2.crc={table:function(){for(var e=new Uint32Array(256),t=0;t<256;t++){for(var n=t,o=0;o<8;o++)1&n?n=3988292384^n>>>1:n>>>=1;e[t]=n}return e}(),update:function(e,t,n,o){for(var i=0;i<o;i++)e=UZIP2.crc.table[255&(e^t[n+i])]^e>>>8;return e},crc:function(e,t,n){return 4294967295^UZIP2.crc.update(4294967295,e,t,n)}},UZIP2.adler=function(e,t,n){for(var o=1,i=0,r=t,a=t+n;r<a;){for(var s=Math.min(r+5552,a);r<s;)i+=o+=e[r++];o%=65521,i%=65521}return i<<16|o},UZIP2.bin={readUshort:function(e,t){return e[t]|e[t+1]<<8},writeUshort:function(e,t,n){e[t]=255&n,e[t+1]=n>>8&255},readUint:function(e,t){return 16777216*e[t+3]+(e[t+2]<<16|e[t+1]<<8|e[t])},writeUint:function(e,t,n){e[t]=255&n,e[t+1]=n>>8&255,e[t+2]=n>>16&255,e[t+3]=n>>24&255},readASCII:function(e,t,n){for(var o="",i=0;i<n;i++)o+=String.fromCharCode(e[t+i]);return o},writeASCII:function(e,t,n){for(var o=0;o<n.length;o++)e[t+o]=n.charCodeAt(o)},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,t,n){for(var o,i="",r=0;r<n;r++)i+="%"+UZIP2.bin.pad(e[t+r].toString(16));try{o=decodeURIComponent(i)}catch(a){return UZIP2.bin.readASCII(e,t,n)}return o},writeUTF8:function(e,t,n){for(var o=n.length,i=0,r=0;r<o;r++){var a=n.charCodeAt(r);if(4294967168&a)if(4294965248&a)if(4294901760&a){if(4292870144&a)throw"e";e[t+i]=240|a>>18,e[t+i+1]=128|a>>12&63,e[t+i+2]=128|a>>6&63,e[t+i+3]=128|63&a,i+=4}else e[t+i]=224|a>>12,e[t+i+1]=128|a>>6&63,e[t+i+2]=128|63&a,i+=3;else e[t+i]=192|a>>6,e[t+i+1]=128|63&a,i+=2;else e[t+i]=a,i++}return i},sizeUTF8:function(e){for(var t=e.length,n=0,o=0;o<t;o++){var i=e.charCodeAt(o);if(4294967168&i)if(4294965248&i)if(4294901760&i){if(4292870144&i)throw"e";n+=4}else n+=3;else n+=2;else n++}return n}},UZIP2.F={},UZIP2.F.deflateRaw=function(e,t,n,o){var i=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][o],r=UZIP2.F.U,a=UZIP2.F._goodIndex;UZIP2.F._hash;var s=UZIP2.F._putsE,l=0,c=n<<3,d=0,p=e.length;if(0==o){for(;l<p;)s(t,c,l+(v=Math.min(65535,p-l))==p?1:0),c=UZIP2.F._copyExact(e,l,v,t,c+8),l+=v;return c>>>3}var u=r.lits,m=r.strt,h=r.prev,g=0,x=0,f=0,y=0,S=0,C=0;for(p>2&&(m[C=UZIP2.F._hash(e,0)]=0),l=0;l<p;l++){if(S=C,l+1<p-2){C=UZIP2.F._hash(e,l+1);var b=l+1&32767;h[b]=m[C],m[C]=b}if(d<=l){(g>14e3||x>26697)&&p-l>100&&(d<l&&(u[g]=l-d,g+=2,d=l),c=UZIP2.F._writeBlock(l==p-1||d==p?1:0,u,g,y,e,f,l-f,t,c),g=x=y=0,f=l);var $=0;l<p-2&&($=UZIP2.F._bestMatch(e,l,h,S,Math.min(i[2],p-l),i[3]));var v=$>>>16,E=65535&$;if(0!=$){E=65535&$;var A=a(v=$>>>16,r.of0);r.lhst[257+A]++;var w=a(E,r.df0);r.dhst[w]++,y+=r.exb[A]+r.dxb[w],u[g]=v<<23|l-d,u[g+1]=E<<16|A<<8|w,g+=2,d=l+v}else r.lhst[e[l]]++;x++}}for(f==l&&0!=e.length||(d<l&&(u[g]=l-d,g+=2,d=l),c=UZIP2.F._writeBlock(1,u,g,y,e,f,l-f,t,c),g=0,x=0,g=x=y=0,f=l);7&c;)c++;return c>>>3},UZIP2.F._bestMatch=function(e,t,n,o,i,r){var a=32767&t,s=n[a],l=a-s+32768&32767;if(s==a||o!=UZIP2.F._hash(e,t-l))return 0;for(var c=0,d=0,p=Math.min(32767,t);l<=p&&0!=--r&&s!=a;){if(0==c||e[t+c]==e[t+c-l]){var u=UZIP2.F._howLong(e,t,l);if(u>c){if(d=l,(c=u)>=i)break;l+2<u&&(u=l+2);for(var m=0,h=0;h<u-2;h++){var g=t-l+h+32768&32767,x=g-n[g]+32768&32767;x>m&&(m=x,s=g)}}}l+=(a=s)-(s=n[a])+32768&32767}return c<<16|d},UZIP2.F._howLong=function(e,t,n){if(e[t]!=e[t-n]||e[t+1]!=e[t+1-n]||e[t+2]!=e[t+2-n])return 0;var o=t,i=Math.min(e.length,t+258);for(t+=3;t<i&&e[t]==e[t-n];)t++;return t-o},UZIP2.F._hash=function(e,t){return(e[t]<<8|e[t+1])+(e[t+2]<<4)&65535},UZIP2.saved=0,UZIP2.F._writeBlock=function(e,t,n,o,i,r,a,s,l){var c,d,p,u,m,h,g,x,f,y=UZIP2.F.U,S=UZIP2.F._putsF,C=UZIP2.F._putsE;y.lhst[256]++,d=(c=UZIP2.F.getTrees())[0],p=c[1],u=c[2],m=c[3],h=c[4],g=c[5],x=c[6],f=c[7];var b=32+(l+3&7?8-(l+3&7):0)+(a<<3),$=o+UZIP2.F.contSize(y.fltree,y.lhst)+UZIP2.F.contSize(y.fdtree,y.dhst),v=o+UZIP2.F.contSize(y.ltree,y.lhst)+UZIP2.F.contSize(y.dtree,y.dhst);v+=14+3*g+UZIP2.F.contSize(y.itree,y.ihst)+(2*y.ihst[16]+3*y.ihst[17]+7*y.ihst[18]);for(var E=0;E<286;E++)y.lhst[E]=0;for(E=0;E<30;E++)y.dhst[E]=0;for(E=0;E<19;E++)y.ihst[E]=0;var A=b<$&&b<v?0:$<v?1:2;if(S(s,l,e),S(s,l+1,A),l+=3,0==A){for(;7&l;)l++;l=UZIP2.F._copyExact(i,r,a,s,l)}else{var w,R;if(1==A&&(w=y.fltree,R=y.fdtree),2==A){UZIP2.F.makeCodes(y.ltree,d),UZIP2.F.revCodes(y.ltree,d),UZIP2.F.makeCodes(y.dtree,p),UZIP2.F.revCodes(y.dtree,p),UZIP2.F.makeCodes(y.itree,u),UZIP2.F.revCodes(y.itree,u),w=y.ltree,R=y.dtree,C(s,l,m-257),C(s,l+=5,h-1),C(s,l+=5,g-4),l+=4;for(var j=0;j<g;j++)C(s,l+3*j,y.itree[1+(y.ordr[j]<<1)]);l+=3*g,l=UZIP2.F._codeTiny(x,y.itree,s,l),l=UZIP2.F._codeTiny(f,y.itree,s,l)}for(var T=r,I=0;I<n;I+=2){for(var k=t[I],L=k>>>23,D=T+(8388607&k);T<D;)l=UZIP2.F._writeLit(i[T++],w,s,l);if(0!=L){var _=t[I+1],P=_>>16,B=_>>8&255,M=255&_;C(s,l=UZIP2.F._writeLit(257+B,w,s,l),L-y.of0[B]),l+=y.exb[B],S(s,l=UZIP2.F._writeLit(M,R,s,l),P-y.df0[M]),l+=y.dxb[M],T+=L}}l=UZIP2.F._writeLit(256,w,s,l)}return l},UZIP2.F._copyExact=function(e,t,n,o,i){var r=i>>>3;return o[r]=n,o[r+1]=n>>>8,o[r+2]=255-o[r],o[r+3]=255-o[r+1],r+=4,o.set(new Uint8Array(e.buffer,t,n),r),i+(n+4<<3)},UZIP2.F.getTrees=function(){for(var e=UZIP2.F.U,t=UZIP2.F._hufTree(e.lhst,e.ltree,15),n=UZIP2.F._hufTree(e.dhst,e.dtree,15),o=[],i=UZIP2.F._lenCodes(e.ltree,o),r=[],a=UZIP2.F._lenCodes(e.dtree,r),s=0;s<o.length;s+=2)e.ihst[o[s]]++;for(s=0;s<r.length;s+=2)e.ihst[r[s]]++;for(var l=UZIP2.F._hufTree(e.ihst,e.itree,7),c=19;c>4&&0==e.itree[1+(e.ordr[c-1]<<1)];)c--;return[t,n,l,i,a,c,o,r]},UZIP2.F.getSecond=function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(e[n+1]);return t},UZIP2.F.nonZero=function(e){for(var t="",n=0;n<e.length;n+=2)0!=e[n+1]&&(t+=(n>>1)+",");return t},UZIP2.F.contSize=function(e,t){for(var n=0,o=0;o<t.length;o++)n+=t[o]*e[1+(o<<1)];return n},UZIP2.F._codeTiny=function(e,t,n,o){for(var i=0;i<e.length;i+=2){var r=e[i],a=e[i+1];o=UZIP2.F._writeLit(r,t,n,o);var s=16==r?2:17==r?3:7;r>15&&(UZIP2.F._putsE(n,o,a,s),o+=s)}return o},UZIP2.F._lenCodes=function(e,t){for(var n=e.length;2!=n&&0==e[n-1];)n-=2;for(var o=0;o<n;o+=2){var i=e[o+1],r=o+3<n?e[o+3]:-1,a=o+5<n?e[o+5]:-1,s=0==o?-1:e[o-1];if(0==i&&r==i&&a==i){for(var l=o+5;l+2<n&&e[l+2]==i;)l+=2;(c=Math.min(l+1-o>>>1,138))<11?t.push(17,c-3):t.push(18,c-11),o+=2*c-2}else if(i==s&&r==i&&a==i){for(l=o+5;l+2<n&&e[l+2]==i;)l+=2;var c=Math.min(l+1-o>>>1,6);t.push(16,c-3),o+=2*c-2}else t.push(i,0)}return n>>>1},UZIP2.F._hufTree=function(e,t,n){var o=[],i=e.length,r=t.length,a=0;for(a=0;a<r;a+=2)t[a]=0,t[a+1]=0;for(a=0;a<i;a++)0!=e[a]&&o.push({lit:a,f:e[a]});var s=o.length,l=o.slice(0);if(0==s)return 0;if(1==s){var c=o[0].lit;return l=0==c?1:0,t[1+(c<<1)]=1,t[1+(l<<1)]=1,1}o.sort(function(e,t){return e.f-t.f});var d=o[0],p=o[1],u=0,m=1,h=2;for(o[0]={lit:-1,f:d.f+p.f,l:d,r:p,d:0};m!=s-1;)d=u!=m&&(h==s||o[u].f<o[h].f)?o[u++]:o[h++],p=u!=m&&(h==s||o[u].f<o[h].f)?o[u++]:o[h++],o[m++]={lit:-1,f:d.f+p.f,l:d,r:p};var g=UZIP2.F.setDepth(o[m-1],0);for(g>n&&(UZIP2.F.restrictDepth(l,n,g),g=n),a=0;a<s;a++)t[1+(l[a].lit<<1)]=l[a].d;return g},UZIP2.F.setDepth=function(e,t){return-1!=e.lit?(e.d=t,t):Math.max(UZIP2.F.setDepth(e.l,t+1),UZIP2.F.setDepth(e.r,t+1))},UZIP2.F.restrictDepth=function(e,t,n){var o=0,i=1<<n-t,r=0;for(e.sort(function(e,t){return t.d==e.d?e.f-t.f:t.d-e.d}),o=0;o<e.length&&e[o].d>t;o++){var a=e[o].d;e[o].d=t,r+=i-(1<<n-a)}for(r>>>=n-t;r>0;)(a=e[o].d)<t?(e[o].d++,r-=1<<t-a-1):o++;for(;o>=0;o--)e[o].d==t&&r<0&&(e[o].d--,r++);0!=r&&console.log("debt left")},UZIP2.F._goodIndex=function(e,t){var n=0;return t[16|n]<=e&&(n|=16),t[8|n]<=e&&(n|=8),t[4|n]<=e&&(n|=4),t[2|n]<=e&&(n|=2),t[1|n]<=e&&(n|=1),n},UZIP2.F._writeLit=function(e,t,n,o){return UZIP2.F._putsF(n,o,t[e<<1]),o+t[1+(e<<1)]},UZIP2.F.inflate=function(e,t){var n=Uint8Array;if(3==e[0]&&0==e[1])return t||new n(0);var o=UZIP2.F,i=o._bitsF,r=o._bitsE,a=o._decodeTiny,s=o.makeCodes,l=o.codes2map,c=o._get17,d=o.U,p=null==t;p&&(t=new n(e.length>>>2<<3));for(var u,m,h=0,g=0,x=0,f=0,y=0,S=0,C=0,b=0,$=0;0==h;)if(h=i(e,$,1),g=i(e,$+1,2),$+=3,0!=g){if(p&&(t=UZIP2.F._check(t,b+(1<<17))),1==g&&(u=d.flmap,m=d.fdmap,S=511,C=31),2==g){x=r(e,$,5)+257,f=r(e,$+5,5)+1,y=r(e,$+10,4)+4,$+=14;for(var v=0;v<38;v+=2)d.itree[v]=0,d.itree[v+1]=0;var E=1;for(v=0;v<y;v++){var A=r(e,$+3*v,3);d.itree[1+(d.ordr[v]<<1)]=A,A>E&&(E=A)}$+=3*y,s(d.itree,E),l(d.itree,E,d.imap),u=d.lmap,m=d.dmap,$=a(d.imap,(1<<E)-1,x+f,e,$,d.ttree);var w=o._copyOut(d.ttree,0,x,d.ltree);S=(1<<w)-1;var R=o._copyOut(d.ttree,x,f,d.dtree);C=(1<<R)-1,s(d.ltree,w),l(d.ltree,w,u),s(d.dtree,R),l(d.dtree,R,m)}for(;;){var j=u[c(e,$)&S];$+=15&j;var T=j>>>4;if(T>>>8==0)t[b++]=T;else{if(256==T)break;var I=b+T-254;if(T>264){var k=d.ldef[T-257];I=b+(k>>>3)+r(e,$,7&k),$+=7&k}var L=m[c(e,$)&C];$+=15&L;var D=L>>>4,_=d.ddef[D],P=(_>>>4)+i(e,$,15&_);for($+=15&_,p&&(t=UZIP2.F._check(t,b+(1<<17)));b<I;)t[b]=t[b++-P],t[b]=t[b++-P],t[b]=t[b++-P],t[b]=t[b++-P];b=I}}}else{7&$&&($+=8-(7&$));var B=4+($>>>3),M=e[B-4]|e[B-3]<<8;p&&(t=UZIP2.F._check(t,b+M)),t.set(new n(e.buffer,e.byteOffset+B,M),b),$=B+M<<3,b+=M}return t.length==b?t:t.slice(0,b)},UZIP2.F._check=function(e,t){var n=e.length;if(t<=n)return e;var o=new Uint8Array(Math.max(n<<1,t));return o.set(e,0),o},UZIP2.F._decodeTiny=function(e,t,n,o,i,r){for(var a=UZIP2.F._bitsE,s=UZIP2.F._get17,l=0;l<n;){var c=e[s(o,i)&t];i+=15&c;var d=c>>>4;if(d<=15)r[l]=d,l++;else{var p=0,u=0;16==d?(u=3+a(o,i,2),i+=2,p=r[l-1]):17==d?(u=3+a(o,i,3),i+=3):18==d&&(u=11+a(o,i,7),i+=7);for(var m=l+u;l<m;)r[l]=p,l++}}return i},UZIP2.F._copyOut=function(e,t,n,o){for(var i=0,r=0,a=o.length>>>1;r<n;){var s=e[r+t];o[r<<1]=0,o[1+(r<<1)]=s,s>i&&(i=s),r++}for(;r<a;)o[r<<1]=0,o[1+(r<<1)]=0,r++;return i},UZIP2.F.makeCodes=function(e,t){for(var n,o,i,r,a=UZIP2.F.U,s=e.length,l=a.bl_count,c=0;c<=t;c++)l[c]=0;for(c=1;c<s;c+=2)l[e[c]]++;var d=a.next_code;for(n=0,l[0]=0,o=1;o<=t;o++)n=n+l[o-1]<<1,d[o]=n;for(i=0;i<s;i+=2)0!=(r=e[i+1])&&(e[i]=d[r],d[r]++)},UZIP2.F.codes2map=function(e,t,n){for(var o=e.length,i=UZIP2.F.U.rev15,r=0;r<o;r+=2)if(0!=e[r+1])for(var a=r>>1,s=e[r+1],l=a<<4|s,c=t-s,d=e[r]<<c,p=d+(1<<c);d!=p;)n[i[d]>>>15-t]=l,d++},UZIP2.F.revCodes=function(e,t){for(var n=UZIP2.F.U.rev15,o=15-t,i=0;i<e.length;i+=2){var r=e[i]<<t-e[i+1];e[i]=n[r]>>>o}},UZIP2.F._putsE=function(e,t,n){n<<=7&t;var o=t>>>3;e[o]|=n,e[o+1]|=n>>>8},UZIP2.F._putsF=function(e,t,n){n<<=7&t;var o=t>>>3;e[o]|=n,e[o+1]|=n>>>8,e[o+2]|=n>>>16},UZIP2.F._bitsE=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<n)-1},UZIP2.F._bitsF=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<n)-1},UZIP2.F._get17=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},UZIP2.F._get25=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},UZIP2.F.U=(r2=Uint16Array,i3=Uint32Array,{next_code:new r2(16),bl_count:new r2(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new r2(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new i3(32),flmap:new r2(512),fltree:[],fdmap:new r2(32),fdtree:[],lmap:new r2(32768),ltree:[],ttree:[],dmap:new r2(32768),dtree:[],imap:new r2(512),itree:[],rev15:new r2(32768),lhst:new i3(286),dhst:new i3(30),ihst:new i3(19),lits:new i3(15e3),strt:new r2(65536),prev:new r2(32768)}),function(){for(var e=UZIP2.F.U,t=0;t<32768;t++){var n=t;n=(4278255360&(n=(4042322160&(n=(3435973836&(n=(2863311530&n)>>>1|(1431655765&n)<<1))>>>2|(858993459&n)<<2))>>>4|(252645135&n)<<4))>>>8|(16711935&n)<<8,e.rev15[t]=(n>>>16|n<<16)>>>17}function o(e,t,n){for(;0!=t--;)e.push(0,n)}for(t=0;t<32;t++)e.ldef[t]=e.of0[t]<<3|e.exb[t],e.ddef[t]=e.df0[t]<<4|e.dxb[t];o(e.fltree,144,8),o(e.fltree,112,9),o(e.fltree,24,7),o(e.fltree,8,8),UZIP2.F.makeCodes(e.fltree,9),UZIP2.F.codes2map(e.fltree,9,e.flmap),UZIP2.F.revCodes(e.fltree,9),o(e.fdtree,32,5),UZIP2.F.makeCodes(e.fdtree,5),UZIP2.F.codes2map(e.fdtree,5,e.fdmap),UZIP2.F.revCodes(e.fdtree,5),o(e.itree,19,0),o(e.ltree,286,0),o(e.dtree,30,0),o(e.ttree,320,0)}();var UZIP=_mergeNamespaces$1({__proto__:null,default:e},[e]);const UPNG=function(){var e={nextZero(e,t){for(;0!=e[t];)t++;return t},readUshort:(e,t)=>e[t]<<8|e[t+1],writeUshort(e,t,n){e[t]=n>>8&255,e[t+1]=255&n},readUint:(e,t)=>16777216*e[t]+(e[t+1]<<16|e[t+2]<<8|e[t+3]),writeUint(e,t,n){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n},readASCII(e,t,n){let o="";for(let i=0;i<n;i++)o+=String.fromCharCode(e[t+i]);return o},writeASCII(e,t,n){for(let o=0;o<n.length;o++)e[t+o]=n.charCodeAt(o)},readBytes(e,t,n){const o=[];for(let i=0;i<n;i++)o.push(e[t+i]);return o},pad:e=>e.length<2?`0${e}`:e,readUTF8(t,n,o){let i,r="";for(let s=0;s<o;s++)r+=`%${e.pad(t[n+s].toString(16))}`;try{i=decodeURIComponent(r)}catch(a){return e.readASCII(t,n,o)}return i}};function t(t,n,o,i){const a=n*o,s=r(i),l=Math.ceil(n*s/8),c=new Uint8Array(4*a),d=new Uint32Array(c.buffer),{ctype:p}=i,{depth:u}=i,m=e.readUshort;if(6==p){const e=a<<2;if(8==u)for(var h=0;h<e;h+=4)c[h]=t[h],c[h+1]=t[h+1],c[h+2]=t[h+2],c[h+3]=t[h+3];if(16==u)for(h=0;h<e;h++)c[h]=t[h<<1]}else if(2==p){const e=i.tabs.tRNS;if(null==e){if(8==u)for(h=0;h<a;h++){var g=3*h;d[h]=255<<24|t[g+2]<<16|t[g+1]<<8|t[g]}if(16==u)for(h=0;h<a;h++)g=6*h,d[h]=255<<24|t[g+4]<<16|t[g+2]<<8|t[g]}else{var x=e[0];const n=e[1],o=e[2];if(8==u)for(h=0;h<a;h++){var f=h<<2;g=3*h,d[h]=255<<24|t[g+2]<<16|t[g+1]<<8|t[g],t[g]==x&&t[g+1]==n&&t[g+2]==o&&(c[f+3]=0)}if(16==u)for(h=0;h<a;h++)f=h<<2,g=6*h,d[h]=255<<24|t[g+4]<<16|t[g+2]<<8|t[g],m(t,g)==x&&m(t,g+2)==n&&m(t,g+4)==o&&(c[f+3]=0)}}else if(3==p){const e=i.tabs.PLTE,r=i.tabs.tRNS,s=r?r.length:0;if(1==u)for(var y=0;y<o;y++){var S=y*l,C=y*n;for(h=0;h<n;h++){f=C+h<<2;var b=3*($=t[S+(h>>3)]>>7-(7&h)&1);c[f]=e[b],c[f+1]=e[b+1],c[f+2]=e[b+2],c[f+3]=$<s?r[$]:255}}if(2==u)for(y=0;y<o;y++)for(S=y*l,C=y*n,h=0;h<n;h++)f=C+h<<2,b=3*($=t[S+(h>>2)]>>6-((3&h)<<1)&3),c[f]=e[b],c[f+1]=e[b+1],c[f+2]=e[b+2],c[f+3]=$<s?r[$]:255;if(4==u)for(y=0;y<o;y++)for(S=y*l,C=y*n,h=0;h<n;h++)f=C+h<<2,b=3*($=t[S+(h>>1)]>>4-((1&h)<<2)&15),c[f]=e[b],c[f+1]=e[b+1],c[f+2]=e[b+2],c[f+3]=$<s?r[$]:255;if(8==u)for(h=0;h<a;h++){var $;f=h<<2,b=3*($=t[h]),c[f]=e[b],c[f+1]=e[b+1],c[f+2]=e[b+2],c[f+3]=$<s?r[$]:255}}else if(4==p){if(8==u)for(h=0;h<a;h++){f=h<<2;var v=t[E=h<<1];c[f]=v,c[f+1]=v,c[f+2]=v,c[f+3]=t[E+1]}if(16==u)for(h=0;h<a;h++){var E;f=h<<2,v=t[E=h<<2],c[f]=v,c[f+1]=v,c[f+2]=v,c[f+3]=t[E+2]}}else if(0==p)for(x=i.tabs.tRNS?i.tabs.tRNS:-1,y=0;y<o;y++){const e=y*l,o=y*n;if(1==u)for(var A=0;A<n;A++){var w=(v=255*(t[e+(A>>>3)]>>>7-(7&A)&1))==255*x?0:255;d[o+A]=w<<24|v<<16|v<<8|v}else if(2==u)for(A=0;A<n;A++)w=(v=85*(t[e+(A>>>2)]>>>6-((3&A)<<1)&3))==85*x?0:255,d[o+A]=w<<24|v<<16|v<<8|v;else if(4==u)for(A=0;A<n;A++)w=(v=17*(t[e+(A>>>1)]>>>4-((1&A)<<2)&15))==17*x?0:255,d[o+A]=w<<24|v<<16|v<<8|v;else if(8==u)for(A=0;A<n;A++)w=(v=t[e+A])==x?0:255,d[o+A]=w<<24|v<<16|v<<8|v;else if(16==u)for(A=0;A<n;A++)v=t[e+(A<<1)],w=m(t,e+(A<<1))==x?0:255,d[o+A]=w<<24|v<<16|v<<8|v}return c}function n(e,t,n,s){const l=r(e),c=Math.ceil(n*l/8),d=new Uint8Array((c+1+e.interlace)*s);return t=e.tabs.CgBI?i(t,d):o(t,d),0==e.interlace?t=a(t,e,0,n,s):1==e.interlace&&(t=function(e,t){const n=t.width,o=t.height,i=r(t),s=i>>3,l=Math.ceil(n*i/8),c=new Uint8Array(o*l);let d=0;const p=[0,0,4,0,2,0,1],u=[0,4,0,2,0,1,0],m=[8,8,8,4,4,2,2],h=[8,8,4,4,2,2,1];let g=0;for(;g<7;){const r=m[g],f=h[g];let y=0,S=0,C=p[g];for(;C<o;)C+=r,S++;let b=u[g];for(;b<n;)b+=f,y++;const $=Math.ceil(y*i/8);a(e,t,d,y,S);let v=0,E=p[g];for(;E<o;){let t=u[g],o=d+v*$<<3;for(;t<n;){var x;if(1==i&&(x=(x=e[o>>3])>>7-(7&o)&1,c[E*l+(t>>3)]|=x<<7-(7&t)),2==i&&(x=(x=e[o>>3])>>6-(7&o)&3,c[E*l+(t>>2)]|=x<<6-((3&t)<<1)),4==i&&(x=(x=e[o>>3])>>4-(7&o)&15,c[E*l+(t>>1)]|=x<<4-((1&t)<<2)),i>=8){const n=E*l+t*s;for(let t=0;t<s;t++)c[n+t]=e[(o>>3)+t]}o+=i,t+=f}v++,E+=r}y*S!=0&&(d+=S*(1+$)),g+=1}return c}(t,e)),t}function o(e,t){return i(new Uint8Array(e.buffer,2,e.length-6),t)}var i=function(){const e={H:{}};return e.H.N=function(t,n){const o=Uint8Array;let i,r,a=0,s=0,l=0,c=0,d=0,p=0,u=0,m=0,h=0;if(3==t[0]&&0==t[1])return n||new o(0);const g=e.H,x=g.b,f=g.e,y=g.R,S=g.n,C=g.A,b=g.Z,$=g.m,v=null==n;for(v&&(n=new o(t.length>>>2<<5));0==a;)if(a=x(t,h,1),s=x(t,h+1,2),h+=3,0!=s){if(v&&(n=e.H.W(n,m+(1<<17))),1==s&&(i=$.J,r=$.h,p=511,u=31),2==s){l=f(t,h,5)+257,c=f(t,h+5,5)+1,d=f(t,h+10,4)+4,h+=14;let e=1;for(var E=0;E<38;E+=2)$.Q[E]=0,$.Q[E+1]=0;for(E=0;E<d;E++){const n=f(t,h+3*E,3);$.Q[1+($.X[E]<<1)]=n,n>e&&(e=n)}h+=3*d,S($.Q,e),C($.Q,e,$.u),i=$.w,r=$.d,h=y($.u,(1<<e)-1,l+c,t,h,$.v);const n=g.V($.v,0,l,$.C);p=(1<<n)-1;const o=g.V($.v,l,c,$.D);u=(1<<o)-1,S($.C,n),C($.C,n,i),S($.D,o),C($.D,o,r)}for(;;){const e=i[b(t,h)&p];h+=15&e;const o=e>>>4;if(o>>>8==0)n[m++]=o;else{if(256==o)break;{let e=m+o-254;if(o>264){const n=$.q[o-257];e=m+(n>>>3)+f(t,h,7&n),h+=7&n}const i=r[b(t,h)&u];h+=15&i;const a=i>>>4,s=$.c[a],l=(s>>>4)+x(t,h,15&s);for(h+=15&s;m<e;)n[m]=n[m++-l],n[m]=n[m++-l],n[m]=n[m++-l],n[m]=n[m++-l];m=e}}}}else{7&h&&(h+=8-(7&h));const i=4+(h>>>3),r=t[i-4]|t[i-3]<<8;v&&(n=e.H.W(n,m+r)),n.set(new o(t.buffer,t.byteOffset+i,r),m),h=i+r<<3,m+=r}return n.length==m?n:n.slice(0,m)},e.H.W=function(e,t){const n=e.length;if(t<=n)return e;const o=new Uint8Array(n<<1);return o.set(e,0),o},e.H.R=function(t,n,o,i,r,a){const s=e.H.e,l=e.H.Z;let c=0;for(;c<o;){const e=t[l(i,r)&n];r+=15&e;const o=e>>>4;if(o<=15)a[c]=o,c++;else{let e=0,t=0;16==o?(t=3+s(i,r,2),r+=2,e=a[c-1]):17==o?(t=3+s(i,r,3),r+=3):18==o&&(t=11+s(i,r,7),r+=7);const n=c+t;for(;c<n;)a[c]=e,c++}}return r},e.H.V=function(e,t,n,o){let i=0,r=0;const a=o.length>>>1;for(;r<n;){const n=e[r+t];o[r<<1]=0,o[1+(r<<1)]=n,n>i&&(i=n),r++}for(;r<a;)o[r<<1]=0,o[1+(r<<1)]=0,r++;return i},e.H.n=function(t,n){const o=e.H.m,i=t.length;let r,a,s,l;const c=o.j;for(var d=0;d<=n;d++)c[d]=0;for(d=1;d<i;d+=2)c[t[d]]++;const p=o.K;for(r=0,c[0]=0,a=1;a<=n;a++)r=r+c[a-1]<<1,p[a]=r;for(s=0;s<i;s+=2)l=t[s+1],0!=l&&(t[s]=p[l],p[l]++)},e.H.A=function(t,n,o){const i=t.length,r=e.H.m.r;for(let e=0;e<i;e+=2)if(0!=t[e+1]){const i=e>>1,a=t[e+1],s=i<<4|a,l=n-a;let c=t[e]<<l;const d=c+(1<<l);for(;c!=d;)o[r[c]>>>15-n]=s,c++}},e.H.l=function(t,n){const o=e.H.m.r,i=15-n;for(let e=0;e<t.length;e+=2){const r=t[e]<<n-t[e+1];t[e]=o[r]>>>i}},e.H.M=function(e,t,n){n<<=7&t;const o=t>>>3;e[o]|=n,e[o+1]|=n>>>8},e.H.I=function(e,t,n){n<<=7&t;const o=t>>>3;e[o]|=n,e[o+1]|=n>>>8,e[o+2]|=n>>>16},e.H.e=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<n)-1},e.H.b=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<n)-1},e.H.Z=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},e.H.i=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},e.H.m=function(){const e=Uint16Array,t=Uint32Array;return{K:new e(16),j:new e(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new e(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new t(32),J:new e(512),_:[],h:new e(32),$:[],w:new e(32768),C:[],v:[],d:new e(32768),D:[],u:new e(512),Q:[],r:new e(32768),s:new t(286),Y:new t(30),a:new t(19),t:new t(15e3),k:new e(65536),g:new e(32768)}}(),function(){const t=e.H.m;for(var n=0;n<32768;n++){let e=n;e=(2863311530&e)>>>1|(1431655765&e)<<1,e=(3435973836&e)>>>2|(858993459&e)<<2,e=(4042322160&e)>>>4|(252645135&e)<<4,e=(4278255360&e)>>>8|(16711935&e)<<8,t.r[n]=(e>>>16|e<<16)>>>17}function o(e,t,n){for(;0!=t--;)e.push(0,n)}for(n=0;n<32;n++)t.q[n]=t.S[n]<<3|t.T[n],t.c[n]=t.p[n]<<4|t.z[n];o(t._,144,8),o(t._,112,9),o(t._,24,7),o(t._,8,8),e.H.n(t._,9),e.H.A(t._,9,t.J),e.H.l(t._,9),o(t.$,32,5),e.H.n(t.$,5),e.H.A(t.$,5,t.h),e.H.l(t.$,5),o(t.Q,19,0),o(t.C,286,0),o(t.D,30,0),o(t.v,320,0)}(),e.H.N}();function r(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth}function a(e,t,n,o,i){let a=r(t);const l=Math.ceil(o*a/8);let c,d;a=Math.ceil(a/8);let p=e[n],u=0;if(p>1&&(e[n]=[0,0,1][p-2]),3==p)for(u=a;u<l;u++)e[u+1]=e[u+1]+(e[u+1-a]>>>1)&255;for(let r=0;r<i;r++)if(c=n+r*l,d=c+r+1,p=e[d-1],u=0,0==p)for(;u<l;u++)e[c+u]=e[d+u];else if(1==p){for(;u<a;u++)e[c+u]=e[d+u];for(;u<l;u++)e[c+u]=e[d+u]+e[c+u-a]}else if(2==p)for(;u<l;u++)e[c+u]=e[d+u]+e[c+u-l];else if(3==p){for(;u<a;u++)e[c+u]=e[d+u]+(e[c+u-l]>>>1);for(;u<l;u++)e[c+u]=e[d+u]+(e[c+u-l]+e[c+u-a]>>>1)}else{for(;u<a;u++)e[c+u]=e[d+u]+s(0,e[c+u-l],0);for(;u<l;u++)e[c+u]=e[d+u]+s(e[c+u-a],e[c+u-l],e[c+u-a-l])}return e}function s(e,t,n){const o=e+t-n,i=o-e,r=o-t,a=o-n;return i*i<=r*r&&i*i<=a*a?e:r*r<=a*a?t:n}function l(t,n,o){o.width=e.readUint(t,n),n+=4,o.height=e.readUint(t,n),n+=4,o.depth=t[n],n++,o.ctype=t[n],n++,o.compress=t[n],n++,o.filter=t[n],n++,o.interlace=t[n],n++}function c(e,t,n,o,i,r,a,s,l){const c=Math.min(t,i),d=Math.min(n,r);let p=0,u=0;for(let b=0;b<d;b++)for(let n=0;n<c;n++)if(a>=0&&s>=0?(p=b*t+n<<2,u=(s+b)*i+a+n<<2):(p=(-s+b)*t-a+n<<2,u=b*i+n<<2),0==l)o[u]=e[p],o[u+1]=e[p+1],o[u+2]=e[p+2],o[u+3]=e[p+3];else if(1==l){var m=e[p+3]*(1/255),h=e[p]*m,g=e[p+1]*m,x=e[p+2]*m,f=o[u+3]*(1/255),y=o[u]*f,S=o[u+1]*f,C=o[u+2]*f;const t=1-m,n=m+f*t,i=0==n?0:1/n;o[u+3]=255*n,o[u+0]=(h+y*t)*i,o[u+1]=(g+S*t)*i,o[u+2]=(x+C*t)*i}else if(2==l)m=e[p+3],h=e[p],g=e[p+1],x=e[p+2],f=o[u+3],y=o[u],S=o[u+1],C=o[u+2],m==f&&h==y&&g==S&&x==C?(o[u]=0,o[u+1]=0,o[u+2]=0,o[u+3]=0):(o[u]=h,o[u+1]=g,o[u+2]=x,o[u+3]=m);else if(3==l){if(m=e[p+3],h=e[p],g=e[p+1],x=e[p+2],f=o[u+3],y=o[u],S=o[u+1],C=o[u+2],m==f&&h==y&&g==S&&x==C)continue;if(m<220&&f>20)return!1}return!0}return{decode:function(t){const r=new Uint8Array(t);let a=8;const s=e,c=s.readUshort,d=s.readUint,p={tabs:{},frames:[]},u=new Uint8Array(r.length);let m,h=0,g=0;const x=[137,80,78,71,13,10,26,10];for(var f=0;f<8;f++)if(r[f]!=x[f])throw"The input is not a PNG file!";for(;a<r.length;){const e=s.readUint(r,a);a+=4;const t=s.readASCII(r,a,4);if(a+=4,"IHDR"==t)l(r,a,p);else if("iCCP"==t){for(var y=a;0!=r[y];)y++;s.readASCII(r,a,y-a),r[y+1];const n=r.slice(y+2,a+e);let l=null;try{l=o(n)}catch(A){l=i(n)}p.tabs[t]=l}else if("CgBI"==t)p.tabs[t]=r.slice(a,a+4);else if("IDAT"==t){for(f=0;f<e;f++)u[h+f]=r[a+f];h+=e}else if("acTL"==t)p.tabs[t]={num_frames:d(r,a),num_plays:d(r,a+4)},m=new Uint8Array(r.length);else if("fcTL"==t){0!=g&&((E=p.frames[p.frames.length-1]).data=n(p,m.slice(0,g),E.rect.width,E.rect.height),g=0);const e={x:d(r,a+12),y:d(r,a+16),width:d(r,a+4),height:d(r,a+8)};let t=c(r,a+22);t=c(r,a+20)/(0==t?100:t);const o={rect:e,delay:Math.round(1e3*t),dispose:r[a+24],blend:r[a+25]};p.frames.push(o)}else if("fdAT"==t){for(f=0;f<e-4;f++)m[g+f]=r[a+f+4];g+=e-4}else if("pHYs"==t)p.tabs[t]=[s.readUint(r,a),s.readUint(r,a+4),r[a+8]];else if("cHRM"==t)for(p.tabs[t]=[],f=0;f<8;f++)p.tabs[t].push(s.readUint(r,a+4*f));else if("tEXt"==t||"zTXt"==t){null==p.tabs[t]&&(p.tabs[t]={});var S=s.nextZero(r,a),C=s.readASCII(r,a,S-a),b=a+e-S-1;if("tEXt"==t)v=s.readASCII(r,S+1,b);else{var $=o(r.slice(S+2,S+2+b));v=s.readUTF8($,0,$.length)}p.tabs[t][C]=v}else if("iTXt"==t){null==p.tabs[t]&&(p.tabs[t]={}),S=0,y=a,S=s.nextZero(r,y),C=s.readASCII(r,y,S-y);const n=r[y=S+1];var v;r[y+1],y+=2,S=s.nextZero(r,y),s.readASCII(r,y,S-y),y=S+1,S=s.nextZero(r,y),s.readUTF8(r,y,S-y),b=e-((y=S+1)-a),0==n?v=s.readUTF8(r,y,b):($=o(r.slice(y,y+b)),v=s.readUTF8($,0,$.length)),p.tabs[t][C]=v}else if("PLTE"==t)p.tabs[t]=s.readBytes(r,a,e);else if("hIST"==t){const e=p.tabs.PLTE.length/3;for(p.tabs[t]=[],f=0;f<e;f++)p.tabs[t].push(c(r,a+2*f))}else if("tRNS"==t)3==p.ctype?p.tabs[t]=s.readBytes(r,a,e):0==p.ctype?p.tabs[t]=c(r,a):2==p.ctype&&(p.tabs[t]=[c(r,a),c(r,a+2),c(r,a+4)]);else if("gAMA"==t)p.tabs[t]=s.readUint(r,a)/1e5;else if("sRGB"==t)p.tabs[t]=r[a];else if("bKGD"==t)0==p.ctype||4==p.ctype?p.tabs[t]=[c(r,a)]:2==p.ctype||6==p.ctype?p.tabs[t]=[c(r,a),c(r,a+2),c(r,a+4)]:3==p.ctype&&(p.tabs[t]=r[a]);else if("IEND"==t)break;a+=e,s.readUint(r,a),a+=4}var E;return 0!=g&&((E=p.frames[p.frames.length-1]).data=n(p,m.slice(0,g),E.rect.width,E.rect.height)),p.data=n(p,u,p.width,p.height),delete p.compress,delete p.interlace,delete p.filter,p},toRGBA8:function(e){const n=e.width,o=e.height;if(null==e.tabs.acTL)return[t(e.data,n,o,e).buffer];const i=[];null==e.frames[0].data&&(e.frames[0].data=e.data);const r=n*o*4,a=new Uint8Array(r),s=new Uint8Array(r),l=new Uint8Array(r);for(let p=0;p<e.frames.length;p++){const u=e.frames[p],m=u.rect.x,h=u.rect.y,g=u.rect.width,x=u.rect.height,f=t(u.data,g,x,e);if(0!=p)for(var d=0;d<r;d++)l[d]=a[d];if(0==u.blend?c(f,g,x,a,n,o,m,h,0):1==u.blend&&c(f,g,x,a,n,o,m,h,1),i.push(a.buffer.slice(0)),0==u.dispose);else if(1==u.dispose)c(s,g,x,a,n,o,m,h,0);else if(2==u.dispose)for(d=0;d<r;d++)a[d]=l[d]}return i},_paeth:s,_copyTile:c,_bin:e}}();!function(){const{_copyTile:e}=UPNG,{_bin:t}=UPNG,n=UPNG._paeth;var o={table:function(){const e=new Uint32Array(256);for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)1&n?n=3988292384^n>>>1:n>>>=1;e[t]=n}return e}(),update(e,t,n,i){for(let r=0;r<i;r++)e=o.table[255&(e^t[n+r])]^e>>>8;return e},crc:(e,t,n)=>4294967295^o.update(4294967295,e,t,n)};function i(e,t,n,o){t[n]+=e[0]*o>>4,t[n+1]+=e[1]*o>>4,t[n+2]+=e[2]*o>>4,t[n+3]+=e[3]*o>>4}function r(e){return Math.max(0,Math.min(255,e))}function a(e,t){const n=e[0]-t[0],o=e[1]-t[1],i=e[2]-t[2],r=e[3]-t[3];return n*n+o*o+i*i+r*r}function s(e,t,n,o,s,l,c){null==c&&(c=1);const d=o.length,p=[];for(var u=0;u<d;u++){const e=o[u];p.push([e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255])}for(u=0;u<d;u++){let e=4294967295;for(var m=0,h=0;h<d;h++){var g=a(p[u],p[h]);h!=u&&g<e&&(e=g,m=h)}}const x=new Uint32Array(s.buffer),f=new Int16Array(t*n*4),y=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(u=0;u<y.length;u++)y[u]=255*((y[u]+.5)/16-.5);for(let C=0;C<n;C++)for(let s=0;s<t;s++){var S;u=4*(C*t+s),2!=c?S=[r(e[u]+f[u]),r(e[u+1]+f[u+1]),r(e[u+2]+f[u+2]),r(e[u+3]+f[u+3])]:(g=y[4*(3&C)+(3&s)],S=[r(e[u]+g),r(e[u+1]+g),r(e[u+2]+g),r(e[u+3]+g)]),m=0;let b=16777215;for(h=0;h<d;h++){const e=a(S,p[h]);e<b&&(b=e,m=h)}const $=p[m],v=[S[0]-$[0],S[1]-$[1],S[2]-$[2],S[3]-$[3]];1==c&&(s!=t-1&&i(v,f,u+4,7),C!=n-1&&(0!=s&&i(v,f,u+4*t-4,3),i(v,f,u+4*t,5),s!=t-1&&i(v,f,u+4*t+4,1))),l[u>>2]=m,x[u>>2]=o[m]}}function l(e,n,i,r,a){null==a&&(a={});const{crc:s}=o,l=t.writeUint,c=t.writeUshort,d=t.writeASCII;let p=8;const u=e.frames.length>1;let m,h=!1,g=33+(u?20:0);if(null!=a.sRGB&&(g+=13),null!=a.pHYs&&(g+=21),null!=a.iCCP&&(m=pako.deflate(a.iCCP),g+=21+m.length+4),3==e.ctype){for(var x=e.plte.length,f=0;f<x;f++)e.plte[f]>>>24!=255&&(h=!0);g+=8+3*x+4+(h?8+1*x+4:0)}for(var y=0;y<e.frames.length;y++)u&&(g+=38),g+=($=e.frames[y]).cimg.length+12,0!=y&&(g+=4);g+=12;const S=new Uint8Array(g),C=[137,80,78,71,13,10,26,10];for(f=0;f<8;f++)S[f]=C[f];if(l(S,p,13),p+=4,d(S,p,"IHDR"),p+=4,l(S,p,n),p+=4,l(S,p,i),p+=4,S[p]=e.depth,p++,S[p]=e.ctype,p++,S[p]=0,p++,S[p]=0,p++,S[p]=0,p++,l(S,p,s(S,p-17,17)),p+=4,null!=a.sRGB&&(l(S,p,1),p+=4,d(S,p,"sRGB"),p+=4,S[p]=a.sRGB,p++,l(S,p,s(S,p-5,5)),p+=4),null!=a.iCCP){const e=13+m.length;l(S,p,e),p+=4,d(S,p,"iCCP"),p+=4,d(S,p,"ICC profile"),p+=11,p+=2,S.set(m,p),p+=m.length,l(S,p,s(S,p-(e+4),e+4)),p+=4}if(null!=a.pHYs&&(l(S,p,9),p+=4,d(S,p,"pHYs"),p+=4,l(S,p,a.pHYs[0]),p+=4,l(S,p,a.pHYs[1]),p+=4,S[p]=a.pHYs[2],p++,l(S,p,s(S,p-13,13)),p+=4),u&&(l(S,p,8),p+=4,d(S,p,"acTL"),p+=4,l(S,p,e.frames.length),p+=4,l(S,p,null!=a.loop?a.loop:0),p+=4,l(S,p,s(S,p-12,12)),p+=4),3==e.ctype){for(l(S,p,3*(x=e.plte.length)),p+=4,d(S,p,"PLTE"),p+=4,f=0;f<x;f++){const t=3*f,n=e.plte[f],o=255&n,i=n>>>8&255,r=n>>>16&255;S[p+t+0]=o,S[p+t+1]=i,S[p+t+2]=r}if(p+=3*x,l(S,p,s(S,p-3*x-4,3*x+4)),p+=4,h){for(l(S,p,x),p+=4,d(S,p,"tRNS"),p+=4,f=0;f<x;f++)S[p+f]=e.plte[f]>>>24&255;p+=x,l(S,p,s(S,p-x-4,x+4)),p+=4}}let b=0;for(y=0;y<e.frames.length;y++){var $=e.frames[y];u&&(l(S,p,26),p+=4,d(S,p,"fcTL"),p+=4,l(S,p,b++),p+=4,l(S,p,$.rect.width),p+=4,l(S,p,$.rect.height),p+=4,l(S,p,$.rect.x),p+=4,l(S,p,$.rect.y),p+=4,c(S,p,r[y]),p+=2,c(S,p,1e3),p+=2,S[p]=$.dispose,p++,S[p]=$.blend,p++,l(S,p,s(S,p-30,30)),p+=4);const t=$.cimg;l(S,p,(x=t.length)+(0==y?0:4)),p+=4;const n=p;d(S,p,0==y?"IDAT":"fdAT"),p+=4,0!=y&&(l(S,p,b++),p+=4),S.set(t,p),p+=x,l(S,p,s(S,n,p-n)),p+=4}return l(S,p,0),p+=4,d(S,p,"IEND"),p+=4,l(S,p,s(S,p-4,4)),p+=4,S.buffer}function c(e,t,n){for(let o=0;o<e.frames.length;o++){const i=e.frames[o];i.rect.width;const r=i.rect.height,a=new Uint8Array(r*i.bpl+r);i.cimg=m(i.img,r,i.bpp,i.bpl,a,t,n)}}function d(t,n,o,i,r){const a=r[0],l=r[1],c=r[2],d=r[3],m=r[4],h=r[5];let x=6,f=8,y=255;for(var S=0;S<t.length;S++){const e=new Uint8Array(t[S]);for(var C=e.length,b=0;b<C;b+=4)y&=e[b+3]}const $=255!=y,v=function(t,n,o,i,r,a){const s=[];for(var l=0;l<t.length;l++){const p=new Uint8Array(t[l]),m=new Uint32Array(p.buffer);var c;let g=0,x=0,f=n,y=o,S=i?1:0;if(0!=l){const C=a||i||1==l||0!=s[l-2].dispose?1:2;let b=0,$=1e9;for(let e=0;e<C;e++){var d=new Uint8Array(t[l-1-e]);const i=new Uint32Array(t[l-1-e]);let a=n,s=o,c=-1,p=-1;for(let e=0;e<o;e++)for(let t=0;t<n;t++)m[h=e*n+t]!=i[h]&&(t<a&&(a=t),t>c&&(c=t),e<s&&(s=e),e>p&&(p=e));-1==c&&(a=s=c=p=0),r&&(!(1&~a)&&a--,!(1&~s)&&s--);const u=(c-a+1)*(p-s+1);u<$&&($=u,b=e,g=a,x=s,f=c-a+1,y=p-s+1)}d=new Uint8Array(t[l-1-b]),1==b&&(s[l-1].dispose=2),c=new Uint8Array(f*y*4),e(d,n,o,c,f,y,-g,-x,0),S=e(p,n,o,c,f,y,-g,-x,3)?1:0,1==S?u(p,n,o,c,{x:g,y:x,width:f,height:y}):e(p,n,o,c,f,y,-g,-x,0)}else c=p.slice(0);s.push({rect:{x:g,y:x,width:f,height:y},img:c,blend:S,dispose:0})}if(i)for(l=0;l<s.length;l++){if(1==(g=s[l]).blend)continue;const e=g.rect,i=s[l-1].rect,a=Math.min(e.x,i.x),c=Math.min(e.y,i.y),d={x:a,y:c,width:Math.max(e.x+e.width,i.x+i.width)-a,height:Math.max(e.y+e.height,i.y+i.height)-c};s[l-1].dispose=1,l-1!=0&&p(t,n,o,s,l-1,d,r),p(t,n,o,s,l,d,r)}let m=0;if(1!=t.length)for(var h=0;h<s.length;h++){var g;m+=(g=s[h]).rect.width*g.rect.height}return s}(t,n,o,a,l,c),E={},A=[],w=[];if(0!=i){const e=[];for(b=0;b<v.length;b++)e.push(v[b].img.buffer);const t=g(function(e){let t=0;for(var n=0;n<e.length;n++)t+=e[n].byteLength;const o=new Uint8Array(t);let i=0;for(n=0;n<e.length;n++){const t=new Uint8Array(e[n]),r=t.length;for(let e=0;e<r;e+=4){let n=t[e],r=t[e+1],a=t[e+2];const s=t[e+3];0==s&&(n=r=a=0),o[i+e]=n,o[i+e+1]=r,o[i+e+2]=a,o[i+e+3]=s}i+=r}return o.buffer}(e),i);for(b=0;b<t.plte.length;b++)A.push(t.plte[b].est.rgba);let n=0;for(b=0;b<v.length;b++){const e=(j=v[b]).img.length;var R=new Uint8Array(t.inds.buffer,n>>2,e>>2);w.push(R);const o=new Uint8Array(t.abuf,n,e);h&&s(j.img,j.rect.width,j.rect.height,A,o,R),j.img.set(o),n+=e}}else for(S=0;S<v.length;S++){var j=v[S];const e=new Uint32Array(j.img.buffer);var T=j.rect.width;for(C=e.length,R=new Uint8Array(C),w.push(R),b=0;b<C;b++){const t=e[b];if(0!=b&&t==e[b-1])R[b]=R[b-1];else if(b>T&&t==e[b-T])R[b]=R[b-T];else{let e=E[t];if(null==e&&(E[t]=e=A.length,A.push(t),A.length>=300))break;R[b]=e}}}const I=A.length;for(I<=256&&0==m&&(f=I<=2?1:I<=4?2:I<=16?4:8,f=Math.max(f,d)),S=0;S<v.length;S++){(j=v[S]).rect.x,j.rect.y,T=j.rect.width;const e=j.rect.height;let t=j.img;new Uint32Array(t.buffer);let n=4*T,o=4;if(I<=256&&0==m){n=Math.ceil(f*T/8);var k=new Uint8Array(n*e);const i=w[S];for(let t=0;t<e;t++){b=t*n;const e=t*T;if(8==f)for(var L=0;L<T;L++)k[b+L]=i[e+L];else if(4==f)for(L=0;L<T;L++)k[b+(L>>1)]|=i[e+L]<<4-4*(1&L);else if(2==f)for(L=0;L<T;L++)k[b+(L>>2)]|=i[e+L]<<6-2*(3&L);else if(1==f)for(L=0;L<T;L++)k[b+(L>>3)]|=i[e+L]<<7-1*(7&L)}t=k,x=3,o=1}else if(0==$&&1==v.length){k=new Uint8Array(T*e*3);const i=T*e;for(b=0;b<i;b++){const e=3*b,n=4*b;k[e]=t[n],k[e+1]=t[n+1],k[e+2]=t[n+2]}t=k,x=2,o=3,n=3*T}j.img=t,j.bpl=n,j.bpp=o}return{ctype:x,depth:f,plte:A,frames:v}}function p(t,n,o,i,r,a,s){const l=Uint8Array,c=Uint32Array,d=new l(t[r-1]),p=new c(t[r-1]),m=r+1<t.length?new l(t[r+1]):null,h=new l(t[r]),g=new c(h.buffer);let x=n,f=o,y=-1,S=-1;for(let e=0;e<a.height;e++)for(let t=0;t<a.width;t++){const o=a.x+t,s=a.y+e,l=s*n+o,c=g[l];0==c||0==i[r-1].dispose&&p[l]==c&&(null==m||0!=m[4*l+3])||(o<x&&(x=o),o>y&&(y=o),s<f&&(f=s),s>S&&(S=s))}-1==y&&(x=f=y=S=0),s&&(!(1&~x)&&x--,!(1&~f)&&f--),a={x:x,y:f,width:y-x+1,height:S-f+1};const C=i[r];C.rect=a,C.blend=1,C.img=new Uint8Array(a.width*a.height*4),0==i[r-1].dispose?(e(d,n,o,C.img,a.width,a.height,-a.x,-a.y,0),u(h,n,o,C.img,a)):e(h,n,o,C.img,a.width,a.height,-a.x,-a.y,0)}function u(t,n,o,i,r){e(t,n,o,i,r.width,r.height,-r.x,-r.y,2)}function m(e,t,n,o,i,r,a){const s=[];let l,c=[0,1,2,3,4];-1!=r?c=[r]:(t*o>5e5||1==n)&&(c=[0]),a&&(l={level:0});const d=UZIP;for(var p=0;p<c.length;p++){for(let r=0;r<t;r++)h(i,e,r,o,n,c[p]);s.push(d.deflate(i,l))}let u,m=1e9;for(p=0;p<s.length;p++)s[p].length<m&&(u=p,m=s[p].length);return s[u]}function h(e,t,o,i,r,a){const s=o*i;let l=s+o;if(e[l]=a,l++,0==a)if(i<500)for(var c=0;c<i;c++)e[l+c]=t[s+c];else e.set(new Uint8Array(t.buffer,s,i),l);else if(1==a){for(c=0;c<r;c++)e[l+c]=t[s+c];for(c=r;c<i;c++)e[l+c]=t[s+c]-t[s+c-r]+256&255}else if(0==o){for(c=0;c<r;c++)e[l+c]=t[s+c];if(2==a)for(c=r;c<i;c++)e[l+c]=t[s+c];if(3==a)for(c=r;c<i;c++)e[l+c]=t[s+c]-(t[s+c-r]>>1)+256&255;if(4==a)for(c=r;c<i;c++)e[l+c]=t[s+c]-n(t[s+c-r],0,0)+256&255}else{if(2==a)for(c=0;c<i;c++)e[l+c]=t[s+c]+256-t[s+c-i]&255;if(3==a){for(c=0;c<r;c++)e[l+c]=t[s+c]+256-(t[s+c-i]>>1)&255;for(c=r;c<i;c++)e[l+c]=t[s+c]+256-(t[s+c-i]+t[s+c-r]>>1)&255}if(4==a){for(c=0;c<r;c++)e[l+c]=t[s+c]+256-n(0,t[s+c-i],0)&255;for(c=r;c<i;c++)e[l+c]=t[s+c]+256-n(t[s+c-r],t[s+c-i],t[s+c-r-i])&255}}}function g(e,t){const n=new Uint8Array(e),o=n.slice(0),i=new Uint32Array(o.buffer),r=x(o,t),a=r[0],s=r[1],l=n.length,c=new Uint8Array(l>>2);let d;if(n.length<2e7)for(var p=0;p<l;p+=4)d=f(a,u=n[p]*(1/255),m=n[p+1]*(1/255),h=n[p+2]*(1/255),g=n[p+3]*(1/255)),c[p>>2]=d.ind,i[p>>2]=d.est.rgba;else for(p=0;p<l;p+=4){var u=n[p]*(1/255),m=n[p+1]*(1/255),h=n[p+2]*(1/255),g=n[p+3]*(1/255);for(d=a;d.left;)d=y(d.est,u,m,h,g)<=0?d.left:d.right;c[p>>2]=d.ind,i[p>>2]=d.est.rgba}return{abuf:o.buffer,inds:c,plte:s}}function x(e,t,n){null==n&&(n=1e-4);const o=new Uint32Array(e.buffer),i={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};i.bst=b(e,i.i0,i.i1),i.est=$(i.bst);const r=[i];for(;r.length<t;){let t=0,i=0;for(var a=0;a<r.length;a++)r[a].est.L>t&&(t=r[a].est.L,i=a);if(t<n)break;const s=r[i],l=S(e,o,s.i0,s.i1,s.est.e,s.est.eMq255);if(s.i0>=l||s.i1<=l){s.est.L=0;continue}const c={i0:s.i0,i1:l,bst:null,est:null,tdst:0,left:null,right:null};c.bst=b(e,c.i0,c.i1),c.est=$(c.bst);const d={i0:l,i1:s.i1,bst:null,est:null,tdst:0,left:null,right:null};for(d.bst={R:[],m:[],N:s.bst.N-c.bst.N},a=0;a<16;a++)d.bst.R[a]=s.bst.R[a]-c.bst.R[a];for(a=0;a<4;a++)d.bst.m[a]=s.bst.m[a]-c.bst.m[a];d.est=$(d.bst),s.left=c,s.right=d,r[i]=c,r.push(d)}for(r.sort((e,t)=>t.bst.N-e.bst.N),a=0;a<r.length;a++)r[a].ind=a;return[i,r]}function f(e,t,n,o,i){if(null==e.left)return e.tdst=function(e,t,n,o,i){const r=t-e[0],a=n-e[1],s=o-e[2],l=i-e[3];return r*r+a*a+s*s+l*l}(e.est.q,t,n,o,i),e;const r=y(e.est,t,n,o,i);let a=e.left,s=e.right;r>0&&(a=e.right,s=e.left);const l=f(a,t,n,o,i);if(l.tdst<=r*r)return l;const c=f(s,t,n,o,i);return c.tdst<l.tdst?c:l}function y(e,t,n,o,i){const{e:r}=e;return r[0]*t+r[1]*n+r[2]*o+r[3]*i-e.eMq}function S(e,t,n,o,i,r){for(o-=4;n<o;){for(;C(e,n,i)<=r;)n+=4;for(;C(e,o,i)>r;)o-=4;if(n>=o)break;const a=t[n>>2];t[n>>2]=t[o>>2],t[o>>2]=a,n+=4,o-=4}for(;C(e,n,i)>r;)n-=4;return n+4}function C(e,t,n){return e[t]*n[0]+e[t+1]*n[1]+e[t+2]*n[2]+e[t+3]*n[3]}function b(e,t,n){const o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],r=n-t>>2;for(let a=t;a<n;a+=4){const t=e[a]*(1/255),n=e[a+1]*(1/255),r=e[a+2]*(1/255),s=e[a+3]*(1/255);i[0]+=t,i[1]+=n,i[2]+=r,i[3]+=s,o[0]+=t*t,o[1]+=t*n,o[2]+=t*r,o[3]+=t*s,o[5]+=n*n,o[6]+=n*r,o[7]+=n*s,o[10]+=r*r,o[11]+=r*s,o[15]+=s*s}return o[4]=o[1],o[8]=o[2],o[9]=o[6],o[12]=o[3],o[13]=o[7],o[14]=o[11],{R:o,m:i,N:r}}function $(e){const{R:t}=e,{m:n}=e,{N:o}=e,i=n[0],r=n[1],a=n[2],s=n[3],l=0==o?0:1/o,c=[t[0]-i*i*l,t[1]-i*r*l,t[2]-i*a*l,t[3]-i*s*l,t[4]-r*i*l,t[5]-r*r*l,t[6]-r*a*l,t[7]-r*s*l,t[8]-a*i*l,t[9]-a*r*l,t[10]-a*a*l,t[11]-a*s*l,t[12]-s*i*l,t[13]-s*r*l,t[14]-s*a*l,t[15]-s*s*l],d=c,p=v;let u=[Math.random(),Math.random(),Math.random(),Math.random()],m=0,h=0;if(0!=o)for(let x=0;x<16&&(u=p.multVec(d,u),h=Math.sqrt(p.dot(u,u)),u=p.sml(1/h,u),!(0!=x&&Math.abs(h-m)<1e-9));x++)m=h;const g=[i*l,r*l,a*l,s*l];return{Cov:c,q:g,e:u,L:m,eMq255:p.dot(p.sml(255,g),u),eMq:p.dot(u,g),rgba:(Math.round(255*g[3])<<24|Math.round(255*g[2])<<16|Math.round(255*g[1])<<8|Math.round(255*g[0]))>>>0}}var v={multVec:(e,t)=>[e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],e[4]*t[0]+e[5]*t[1]+e[6]*t[2]+e[7]*t[3],e[8]*t[0]+e[9]*t[1]+e[10]*t[2]+e[11]*t[3],e[12]*t[0]+e[13]*t[1]+e[14]*t[2]+e[15]*t[3]],dot:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],sml:(e,t)=>[e*t[0],e*t[1],e*t[2],e*t[3]]};UPNG.encode=function(e,t,n,o,i,r,a){null==o&&(o=0),null==a&&(a=!1);const s=d(e,t,n,o,[!1,!1,!1,0,a,!1]);return c(s,-1),l(s,t,n,i,r)},UPNG.encodeLL=function(e,t,n,o,i,r,a,s){const d={ctype:0+(1==o?0:2)+(0==i?0:4),depth:r,frames:[]},p=(o+i)*r,u=p*t;for(let l=0;l<e.length;l++)d.frames.push({rect:{x:0,y:0,width:t,height:n},img:new Uint8Array(e[l]),blend:0,dispose:1,bpp:Math.ceil(p/8),bpl:Math.ceil(u/8)});return c(d,0,!0),l(d,t,n,a,s)},UPNG.encode.compress=d,UPNG.encode.dither=s,UPNG.quantize=g,UPNG.quantize.getKDtree=x,UPNG.quantize.getNearest=f}();const r={toArrayBuffer(e,t){const n=e.width,o=e.height,i=n<<2,a=e.getContext("2d").getImageData(0,0,n,o),s=new Uint32Array(a.data.buffer),l=(32*n+31)/32<<2,c=l*o,d=122+c,p=new ArrayBuffer(d),u=new DataView(p),m=1<<20;let h,g,x,f,y=m,S=0,C=0,b=0;function $(e){u.setUint16(C,e,!0),C+=2}function v(e){u.setUint32(C,e,!0),C+=4}function E(e){C+=e}$(19778),v(d),E(4),v(122),v(108),v(n),v(-o>>>0),$(1),$(32),v(3),v(c),v(2835),v(2835),E(8),v(16711680),v(65280),v(255),v(4278190080),v(1466527264),function e(){for(;S<o&&y>0;){for(f=122+S*l,h=0;h<i;)y--,g=s[b++],x=g>>>24,u.setUint32(f+h,g<<8|x),h+=4;S++}b<s.length?(y=m,setTimeout(e,r._dly)):t(p)}()},toBlob(e,t){this.toArrayBuffer(e,e=>{t(new Blob([e],{type:"image/bmp"}))})},_dly:9};var i={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},o={[i.CHROME]:16384,[i.FIREFOX]:11180,[i.DESKTOP_SAFARI]:16384,[i.IE]:8192,[i.IOS]:4096,[i.ETC]:8192};const a="undefined"!=typeof window,s="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,f=a&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),CustomFile=(a||s)&&(f&&f.getOriginalSymbol(window,"File")||"undefined"!=typeof File&&File),CustomFileReader=(a||s)&&(f&&f.getOriginalSymbol(window,"FileReader")||"undefined"!=typeof FileReader&&FileReader);function getFilefromDataUrl(e,t,n=Date.now()){return new Promise(o=>{const i=e.split(","),r=i[0].match(/:(.*?);/)[1],a=globalThis.atob(i[1]);let s=a.length;const l=new Uint8Array(s);for(;s--;)l[s]=a.charCodeAt(s);const c=new Blob([l],{type:r});c.name=t,c.lastModified=n,o(c)})}function getDataUrlFromFile(e){return new Promise((t,n)=>{const o=new CustomFileReader;o.onload=()=>t(o.result),o.onerror=e=>n(e),o.readAsDataURL(e)})}function loadImage(e){return new Promise((t,n)=>{const o=new Image;o.onload=()=>t(o),o.onerror=e=>n(e),o.src=e})}function getBrowserName(){if(void 0!==getBrowserName.cachedResult)return getBrowserName.cachedResult;let e=i.ETC;const{userAgent:t}=navigator;return/Chrom(e|ium)/i.test(t)?e=i.CHROME:/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)?e=i.IOS:/Safari/i.test(t)?e=i.DESKTOP_SAFARI:/Firefox/i.test(t)?e=i.FIREFOX:(/MSIE/i.test(t)||1==!!document.documentMode)&&(e=i.IE),getBrowserName.cachedResult=e,getBrowserName.cachedResult}function approximateBelowMaximumCanvasSizeOfBrowser(e,t){const n=getBrowserName(),i=o[n];let r=e,a=t,s=r*a;const l=r>a?a/r:r/a;for(;s>i*i;){const e=(i+r)/2,t=(i+a)/2;e<t?(a=t,r=t*l):(a=e*l,r=e),s=r*a}return{width:r,height:a}}function getNewCanvasAndCtx(e,t){let n,o;try{if(n=new OffscreenCanvas(e,t),o=n.getContext("2d"),null===o)throw new Error("getContext of OffscreenCanvas returns null")}catch(i){n=document.createElement("canvas"),o=n.getContext("2d")}return n.width=e,n.height=t,[n,o]}function drawImageInCanvas(e,t){const{width:n,height:o}=approximateBelowMaximumCanvasSizeOfBrowser(e.width,e.height),[i,r]=getNewCanvasAndCtx(n,o);return t&&/jpe?g/.test(t)&&(r.fillStyle="white",r.fillRect(0,0,i.width,i.height)),r.drawImage(e,0,0,i.width,i.height),i}function isIOS(){return void 0!==isIOS.cachedResult||(isIOS.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"undefined"!=typeof document&&"ontouchend"in document),isIOS.cachedResult}function drawFileInCanvas(e,t={}){return new Promise(function(n,o){let r,a;var s=function(){try{return a=drawImageInCanvas(r,t.fileType||e.type),n([r,a])}catch(i){return o(i)}},l=function(t){try{var n=function(e){try{throw e}catch(t){return o(t)}};try{let t;return getDataUrlFromFile(e).then(function(e){try{return t=e,loadImage(t).then(function(e){try{return r=e,function(){try{return s()}catch(e){return o(e)}}()}catch(t){return n(t)}},n)}catch(i){return n(i)}},n)}catch(i){n(i)}}catch(i){return o(i)}};try{if(isIOS()||[i.DESKTOP_SAFARI,i.MOBILE_SAFARI].includes(getBrowserName()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(e).then(function(e){try{return r=e,s()}catch(t){return l()}},l)}catch(c){l()}})}function canvasToFile(e,t,n,o,i=1){return new Promise(function(a,s){let l;if("image/png"===t){let r,a,s;return r=e.getContext("2d"),({data:a}=r.getImageData(0,0,e.width,e.height)),s=UPNG.encode([a.buffer],e.width,e.height,4096*i),l=new Blob([s],{type:t}),l.name=n,l.lastModified=o,c.call(this)}{let a=function(){return c.call(this)};if("image/bmp"===t)return new Promise(t=>r.toBlob(e,t)).then(function(e){try{return l=e,l.name=n,l.lastModified=o,a.call(this)}catch(t){return s(t)}}.bind(this),s);{let r=function(){return a.call(this)};if("function"==typeof OffscreenCanvas&&e instanceof OffscreenCanvas)return e.convertToBlob({type:t,quality:i}).then(function(e){try{return l=e,l.name=n,l.lastModified=o,r.call(this)}catch(t){return s(t)}}.bind(this),s);{let a;return a=e.toDataURL(t,i),getFilefromDataUrl(a,n,o).then(function(e){try{return l=e,r.call(this)}catch(t){return s(t)}}.bind(this),s)}}}function c(){return a(l)}})}function cleanupCanvasMemory(e){e.width=0,e.height=0}function isAutoOrientationInBrowser(){return new Promise(function(e,t){let n,o,i,r;return void 0!==isAutoOrientationInBrowser.cachedResult?e(isAutoOrientationInBrowser.cachedResult):getFilefromDataUrl("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then(function(a){try{return n=a,drawFileInCanvas(n).then(function(a){try{return o=a[1],canvasToFile(o,n.type,n.name,n.lastModified).then(function(n){try{return i=n,cleanupCanvasMemory(o),drawFileInCanvas(i).then(function(n){try{return r=n[0],isAutoOrientationInBrowser.cachedResult=1===r.width&&2===r.height,e(isAutoOrientationInBrowser.cachedResult)}catch(o){return t(o)}},t)}catch(a){return t(a)}},t)}catch(s){return t(s)}},t)}catch(s){return t(s)}},t)})}function getExifOrientation(e){return new Promise((t,n)=>{const o=new CustomFileReader;o.onload=e=>{const n=new DataView(e.target.result);if(65496!=n.getUint16(0,!1))return t(-2);const o=n.byteLength;let i=2;for(;i<o;){if(n.getUint16(i+2,!1)<=8)return t(-1);const e=n.getUint16(i,!1);if(i+=2,65505==e){if(1165519206!=n.getUint32(i+=2,!1))return t(-1);const e=18761==n.getUint16(i+=6,!1);i+=n.getUint32(i+4,e);const o=n.getUint16(i,e);i+=2;for(let r=0;r<o;r++)if(274==n.getUint16(i+12*r,e))return t(n.getUint16(i+12*r+8,e))}else{if(65280&~e)break;i+=n.getUint16(i,!1)}}return t(-1)},o.onerror=e=>n(e),o.readAsArrayBuffer(e)})}function handleMaxWidthOrHeight(e,t){const{width:n}=e,{height:o}=e,{maxWidthOrHeight:i}=t;let r,a=e;return isFinite(i)&&(n>i||o>i)&&([a,r]=getNewCanvasAndCtx(n,o),n>o?(a.width=i,a.height=o/n*i):(a.width=n/o*i,a.height=i),r.drawImage(e,0,0,a.width,a.height),cleanupCanvasMemory(e)),a}function followExifOrientation(e,t){const{width:n}=e,{height:o}=e,[i,r]=getNewCanvasAndCtx(n,o);switch(t>4&&t<9?(i.width=o,i.height=n):(i.width=n,i.height=o),t){case 2:r.transform(-1,0,0,1,n,0);break;case 3:r.transform(-1,0,0,-1,n,o);break;case 4:r.transform(1,0,0,-1,0,o);break;case 5:r.transform(0,1,1,0,0,0);break;case 6:r.transform(0,1,-1,0,o,0);break;case 7:r.transform(0,-1,-1,0,o,n);break;case 8:r.transform(0,-1,1,0,0,n)}return r.drawImage(e,0,0,n,o),cleanupCanvasMemory(e),i}function compress(e,t,n=0){return new Promise(function(o,i){let r,a,s,l,c,d,p,u,m,h,g,x,f,y,S,C,b,$,v,E;function A(e=5){if(t.signal&&t.signal.aborted)throw t.signal.reason;r+=e,t.onProgress(Math.min(r,100))}function w(e){if(t.signal&&t.signal.aborted)throw t.signal.reason;r=Math.min(Math.max(e,r),100),t.onProgress(r)}return r=n,a=t.maxIteration||10,s=1024*t.maxSizeMB*1024,A(),drawFileInCanvas(e,t).then(function(n){try{return[,l]=n,A(),c=handleMaxWidthOrHeight(l,t),A(),new Promise(function(n,o){var i;if(!(i=t.exifOrientation))return getExifOrientation(e).then(function(e){try{return i=e,r.call(this)}catch(t){return o(t)}}.bind(this),o);function r(){return n(i)}return r.call(this)}).then(function(n){try{return d=n,A(),isAutoOrientationInBrowser().then(function(n){try{return p=n?c:followExifOrientation(c,d),A(),u=t.initialQuality||1,m=t.fileType||e.type,canvasToFile(p,m,e.name,e.lastModified,u).then(function(n){try{{let d=function(){if(a--&&(S>s||S>f)){let t,n;return t=E?.95*v.width:v.width,n=E?.95*v.height:v.height,[b,$]=getNewCanvasAndCtx(t,n),$.drawImage(v,0,0,t,n),u*="image/png"===m?.85:.95,canvasToFile(b,m,e.name,e.lastModified,u).then(function(e){try{return C=e,cleanupCanvasMemory(v),v=b,S=C.size,w(Math.min(99,Math.floor((y-S)/(y-s)*100))),d}catch(t){return i(t)}},i)}return[1]},R=function(){return cleanupCanvasMemory(v),cleanupCanvasMemory(b),cleanupCanvasMemory(c),cleanupCanvasMemory(p),cleanupCanvasMemory(l),w(100),o(C)};return h=n,A(),g=h.size>s,x=h.size>e.size,g||x?(f=e.size,y=h.size,S=y,v=p,E=!t.alwaysKeepResolution&&g,(r=function(e){for(;e;){if(e.then)return void e.then(r,i);try{if(e.pop){if(e.length)return e.pop()?R.call(this):e;e=d}else e=e.call(this)}catch(t){return i(t)}}}.bind(this))(d)):(w(100),o(h));var r}}catch(d){return i(d)}}.bind(this),i)}catch(r){return i(r)}}.bind(this),i)}catch(r){return i(r)}}.bind(this),i)}catch(r){return i(r)}}.bind(this),i)})}const l="\nlet scriptImported = false\nself.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\n' + e.stack, id })\n }\n})\n";let c;function compressOnWebWorker(e,t){return new Promise((n,o)=>{c||(c=function(e){const t=[];return t.push(e),URL.createObjectURL(new Blob(t))}(l));const i=new Worker(c);i.addEventListener("message",function(e){if(t.signal&&t.signal.aborted)i.terminate();else if(void 0===e.data.progress){if(e.data.error)return o(new Error(e.data.error)),void i.terminate();n(e.data.file),i.terminate()}else t.onProgress(e.data.progress)}),i.addEventListener("error",o),t.signal&&t.signal.addEventListener("abort",()=>{o(t.signal.reason),i.terminate()}),i.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})})}function imageCompression(e,t){return new Promise(function(n,o){let i,r,a,s,l,c;if(i={...t},a=0,({onProgress:s}=i),i.maxSizeMB=i.maxSizeMB||Number.POSITIVE_INFINITY,l="boolean"!=typeof i.useWebWorker||i.useWebWorker,delete i.useWebWorker,i.onProgress=e=>{a=e,"function"==typeof s&&s(a)},!(e instanceof Blob||e instanceof CustomFile))return o(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return o(new Error("The file given is not an image"));if(c="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,!l||"function"!=typeof Worker||c)return compress(e,i).then(function(e){try{return r=e,u.call(this)}catch(t){return o(t)}}.bind(this),o);var d=function(){try{return u.call(this)}catch(e){return o(e)}}.bind(this),p=function(t){try{return compress(e,i).then(function(e){try{return r=e,d()}catch(t){return o(t)}},o)}catch(n){return o(n)}};try{return i.libURL=i.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",compressOnWebWorker(e,i).then(function(e){try{return r=e,d()}catch(t){return p()}},p)}catch(m){p()}function u(){try{r.name=e.name,r.lastModified=e.lastModified}catch(m){}try{i.preserveExif&&"image/jpeg"===e.type&&(!i.fileType||i.fileType&&i.fileType===e.type)&&(r=copyExifWithoutOrientation(e,r))}catch(m){}return n(r)}})}imageCompression.getDataUrlFromFile=getDataUrlFromFile,imageCompression.getFilefromDataUrl=getFilefromDataUrl,imageCompression.loadImage=loadImage,imageCompression.drawImageInCanvas=drawImageInCanvas,imageCompression.drawFileInCanvas=drawFileInCanvas,imageCompression.canvasToFile=canvasToFile,imageCompression.getExifOrientation=getExifOrientation,imageCompression.handleMaxWidthOrHeight=handleMaxWidthOrHeight,imageCompression.followExifOrientation=followExifOrientation,imageCompression.cleanupCanvasMemory=cleanupCanvasMemory,imageCompression.isAutoOrientationInBrowser=isAutoOrientationInBrowser,imageCompression.approximateBelowMaximumCanvasSizeOfBrowser=approximateBelowMaximumCanvasSizeOfBrowser,imageCompression.copyExifWithoutOrientation=copyExifWithoutOrientation,imageCompression.getBrowserName=getBrowserName,imageCompression.version="2.0.2";const PDF_MIME_TYPE$1="application/pdf",imageCompressionAcceptableFileTypes=["image/jpg","image/jpeg","image/png","image/webp","image/bmp"],RECEIPT_IMAGE_COMPRESSION_OPTIONS={useWebWorker:!0,maxWidthOrHeight:1920,initialQuality:.92,maxSizeMB:2},handleImageCompression=async(e,t)=>{if(!1===imageCompressionAcceptableFileTypes.includes(e.type))return e;const n=await imageCompression(e,{useWebWorker:!0,maxWidthOrHeight:900,initialQuality:1,maxSizeMB:1.4}),o=n.lastModified,i=n.type.split("/")[1];let r=`image_${o}.${i}`;null!=t&&(r=`${t}.${i}`);return new File([n],r,{lastModified:o,type:n.type})},compressImageForReceipt=async(e,t)=>{if(!1===imageCompressionAcceptableFileTypes.includes(e.type))return e;const n=await imageCompression(e,RECEIPT_IMAGE_COMPRESSION_OPTIONS),o=n.type.split("/")[1],i=t.replace(/\.[^.]+$/,"")||"image";return new File([n],`${i}.${o}`,{lastModified:e.lastModified,type:n.type})},PDF_RENDER_SCALE=1.5,PDF_JPEG_QUALITY=.7;function canvasToJpegBlob(e,t){return new Promise((n,o)=>{e.toBlob(e=>{null!=e?n(e):o(new Error("canvas.toBlob returned null"))},"image/jpeg",t)})}async function renderPageToJpeg(e,t,n){const o=e.getViewport({scale:t}),i=document.createElement("canvas");i.width=Math.floor(o.width),i.height=Math.floor(o.height);const r=i.getContext("2d");if(null==r)throw new Error("Could not get canvas 2d context");await e.render({canvasContext:r,viewport:o}).promise;return(await canvasToJpegBlob(i,n)).arrayBuffer()}async function compressPdfForReceipt(e,t){const[{PDFDocument:n},o]=await Promise.all([Promise.resolve().then(()=>require("./index-pV_EtQ9Q.cjs")),Promise.resolve().then(()=>index$2).then(e=>e.pdfjs)]),i=await e.arrayBuffer(),r=await o.getDocument({data:new Uint8Array(i)}).promise,a=r.numPages,s=await n.create();for(let d=1;d<=a;d++){const e=await r.getPage(d),t=await renderPageToJpeg(e,PDF_RENDER_SCALE,PDF_JPEG_QUALITY),n=await s.embedJpg(new Uint8Array(t)),o=n.scale(1);s.addPage([o.width,o.height]).drawImage(n,{x:0,y:0,width:o.width,height:o.height})}const l=await s.save(),c=t.toLowerCase().endsWith(".pdf")?t:`${t}.pdf`;return new File([l],c,{type:PDF_MIME_TYPE$1,lastModified:e.lastModified})}async function compressSingleFile(e,t){const n=e instanceof File?e:new File([e],t,{type:e.type});if(e.type===PDF_MIME_TYPE$1){const o=await compressPdfForReceipt(n,t);return o.size<n.size?{blob:o,name:o.name}:{blob:e,name:t}}const o=await compressImageForReceipt(n,t);return{blob:o,name:o.name}}async function compressReceiptFiles(e,t){const n=await Promise.all(e.map((e,n)=>{const o=t[n]??`file_${n}`;return compressSingleFile(e,o).catch(t=>(console.warn("[compressReceiptFiles] compression failed, using original:",t instanceof Error?t.message:t),{blob:e,name:o}))}));return{blobs:n.map(e=>e.blob),names:n.map(e=>e.name)}}const InputElementMobileCamera=({fileType:e="file",fileRef:t,name:n,value:o="",multiple:i=!1,acceptableTypes:r,onFileSizeError:a,onImageChange:s})=>jsxRuntimeExports.jsx("input",{type:e,ref:t,name:n,value:o,size:1e3,"data-testid":generateDataTestId("input-file-element-mobile",n),onChange:async e=>{const t=e.target.files?.[0],n=t?.size;null!=t&&null!=n?(a?.(!1),s(t),e.target.value=""):(a?.(!0),e.target.value="")},style:{display:"none"},accept:`${(r??"image/jpg, image/jpeg").toString()}`,multiple:i,capture:!0}),MoneyTransferSuccessAnimation=({shouldDisplay:e,width:t=30,height:n=30,styles:o,animationInLoop:i=!1})=>{const[,r]=useMusic(SUCCESS_SOUND_SOURCE),[a]=useAnimation("MoneyTransferSuccess");return React.useEffect(()=>{e&&r(!0)},[e,r]),e&&null!=a?jsxRuntimeExports.jsx(Lottie,{style:{width:t,height:n,...o},play:!0,animationData:a,loop:i,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}}):null};var browserPonyfill={exports:{}},hasRequiredBrowserPonyfill;function requireBrowserPonyfill(){return hasRequiredBrowserPonyfill||(hasRequiredBrowserPonyfill=1,function(e,t){var n,o="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==commonjsGlobal$1&&commonjsGlobal$1,i=function(){function e(){this.fetch=!1,this.DOMException=o.DOMException}return e.prototype=o,new e}();n=i,function(e){var t=void 0!==n&&n||"undefined"!=typeof self&&self||void 0!==commonjsGlobal$1&&commonjsGlobal$1||{},o="URLSearchParams"in t,i="Symbol"in t&&"iterator"in Symbol,r="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in t,s="ArrayBuffer"in t;if(s)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&l.indexOf(Object.prototype.toString.call(e))>-1};function d(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function p(e){return"string"!=typeof e&&(e=String(e)),e}function u(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function m(e){this.map={},e instanceof m?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function h(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function g(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function x(e){var t=new FileReader,n=g(t);return t.readAsArrayBuffer(e),n}function f(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:r&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:o&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&r&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=f(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=h(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(r)return this.blob().then(x);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,n,o,i,r=h(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=g(t),o=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=o?o[1]:"utf-8",t.readAsText(e,i),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),o=0;o<t.length;o++)n[o]=String.fromCharCode(t[o]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}m.prototype.append=function(e,t){e=d(e),t=p(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},m.prototype.delete=function(e){delete this.map[d(e)]},m.prototype.get=function(e){return e=d(e),this.has(e)?this.map[e]:null},m.prototype.has=function(e){return this.map.hasOwnProperty(d(e))},m.prototype.set=function(e,t){this.map[d(e)]=p(t)},m.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},m.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),u(e)},m.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),u(e)},m.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),u(e)},i&&(m.prototype[Symbol.iterator]=m.prototype.entries);var S=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function C(e,n){if(!(this instanceof C))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var o,i,r=(n=n||{}).body;if(e instanceof C){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,n.headers||(this.headers=new m(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=n.credentials||this.credentials||"same-origin",!n.headers&&this.headers||(this.headers=new m(n.headers)),this.method=(o=n.method||this.method||"GET",i=o.toUpperCase(),S.indexOf(i)>-1?i:o),this.mode=n.mode||this.mode||null,this.signal=n.signal||this.signal||function(){if("AbortController"in t)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==n.cache&&"no-cache"!==n.cache)){var a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function b(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),o=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(o),decodeURIComponent(i))}}),t}function $(e,t){if(!(this instanceof $))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new m(t.headers),this.url=t.url||"",this._initBody(e)}C.prototype.clone=function(){return new C(this,{body:this._bodyInit})},y.call(C.prototype),y.call($.prototype),$.prototype.clone=function(){return new $(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},$.error=function(){var e=new $(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var v=[301,302,303,307,308];$.redirect=function(e,t){if(-1===v.indexOf(t))throw new RangeError("Invalid status code");return new $(null,{status:t,headers:{location:e}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(A){e.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function E(n,o){return new Promise(function(i,a){var l=new C(n,o);if(l.signal&&l.signal.aborted)return a(new e.DOMException("Aborted","AbortError"));var c=new XMLHttpRequest;function u(){c.abort()}if(c.onload=function(){var e,t,n={statusText:c.statusText,headers:(e=c.getAllResponseHeaders()||"",t=new m,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var n=e.split(":"),o=n.shift().trim();if(o){var i=n.join(":").trim();try{t.append(o,i)}catch(r){console.warn("Response "+r.message)}}}),t)};0===l.url.indexOf("file://")&&(c.status<200||c.status>599)?n.status=200:n.status=c.status,n.url="responseURL"in c?c.responseURL:n.headers.get("X-Request-URL");var o="response"in c?c.response:c.responseText;setTimeout(function(){i(new $(o,n))},0)},c.onerror=function(){setTimeout(function(){a(new TypeError("Network request failed"))},0)},c.ontimeout=function(){setTimeout(function(){a(new TypeError("Network request timed out"))},0)},c.onabort=function(){setTimeout(function(){a(new e.DOMException("Aborted","AbortError"))},0)},c.open(l.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(n){return e}}(l.url),!0),"include"===l.credentials?c.withCredentials=!0:"omit"===l.credentials&&(c.withCredentials=!1),"responseType"in c&&(r?c.responseType="blob":s&&(c.responseType="arraybuffer")),o&&"object"==typeof o.headers&&!(o.headers instanceof m||t.Headers&&o.headers instanceof t.Headers)){var h=[];Object.getOwnPropertyNames(o.headers).forEach(function(e){h.push(d(e)),c.setRequestHeader(e,p(o.headers[e]))}),l.headers.forEach(function(e,t){-1===h.indexOf(t)&&c.setRequestHeader(t,e)})}else l.headers.forEach(function(e,t){c.setRequestHeader(t,e)});l.signal&&(l.signal.addEventListener("abort",u),c.onreadystatechange=function(){4===c.readyState&&l.signal.removeEventListener("abort",u)}),c.send(void 0===l._bodyInit?null:l._bodyInit)})}E.polyfill=!0,t.fetch||(t.fetch=E,t.Headers=m,t.Request=C,t.Response=$),e.Headers=m,e.Request=C,e.Response=$,e.fetch=E,Object.defineProperty(e,"__esModule",{value:!0})}({}),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var r=o.fetch?o:i;(t=r.fetch).default=r.fetch,t.fetch=r.fetch,t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response,e.exports=t}(browserPonyfill,browserPonyfill.exports)),browserPonyfill.exports}var browserPonyfillExports=requireBrowserPonyfill();const fetch$1=getDefaultExportFromCjs(browserPonyfillExports),SvgNewVendor=e=>React__namespace.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},React__namespace.createElement("path",{d:"M7.5055 4L1.5 9.54354L22.5 9.5435",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),React__namespace.createElement("path",{d:"M16.4945 19.7067L22.5 14.1632H1.5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));__webpack_exports__GlobalWorkerOptions.workerSrc=`//cdnjs.cloudflare.com/ajax/libs/pdf.js/${__webpack_exports__version}/pdf.worker.mjs`;const{common:common$3g}=appLocale.getLocalizedStrings(),FileInputElementName$1="invoice",getEffectiveCitationVariant=(e,t,n)=>{if("deleted"===e.variant)return"deleted";if("excluded"===e.variant)return"excluded";return null!=t&&e.statementTransactionId===t||null!=n&&e.statementTransactionId===n?"hovered":e.variant??"default"},findCitationTransactionIdAtPoint=(e,t,n)=>{const o=Array.from(e.querySelectorAll("[data-statement-transaction-id]"));for(const i of o){if("excluded"===i.dataset.citationVariant)continue;const e=i.getBoundingClientRect();if(t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom)return i.dataset.statementTransactionId}},getScrollTargetPageNumber=(e,t)=>{if(null==t)return;const n=e.find(e=>e.statementTransactionId===t);return n?.page},isElementVisibleInContainer=(e,t)=>{const n=e.getBoundingClientRect(),o=null!=t?t.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};return n.bottom>o.top&&n.top<o.bottom&&n.right>o.left&&n.left<o.right},getScrollableParent=e=>{let t=e.parentElement;for(;null!=t;){const{overflowY:e}=window.getComputedStyle(t);if(("auto"===e||"scroll"===e)&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return null},scrollPageElementIntoView=(e,t,n="smooth")=>{const o=t??getScrollableParent(e);if(null==o)return void e.scrollIntoView({behavior:n,block:"center"});const i=e.getBoundingClientRect(),r=o.getBoundingClientRect(),a=o.scrollTop+(i.top-r.top)-(o.clientHeight-i.height)/2;o.scrollTo({top:Math.max(0,a),behavior:n})};function getPolygonBounds(e){const t=e.map(e=>e.x),n=e.map(e=>e.y);return{maxX:Math.max(...t),maxY:Math.max(...n),minX:Math.min(...t),minY:Math.min(...n)}}function convertPolygonToPercent(e,t,n){const{minX:o,maxX:i,minY:r,maxY:a}=getPolygonBounds(e);return{height:(a-r)/n*100,left:o/t*100,top:r/n*100,width:(i-o)/t*100}}function RenderPdf(e){const[t,n]=React.useState(0),[o,i]=React.useState(void 0),[r,a]=React.useState(null),[s,l]=React.useState(void 0),c=useWindowSizeContext(),d=React.useRef(null),p=React.useRef(null),u=React.useRef(void 0),m=null!=e.highlightedCitations&&e.highlightedCitations.length>0;React.useLayoutEffect(()=>{if(e.isFullScreen)return void i(void 0);const t=p.current;if(null==t)return;const n=()=>{const e=Math.floor(t.clientWidth);e>0&&i(t=>t===e?t:e)};n();const o=new ResizeObserver(n);return o.observe(t),()=>{o.disconnect()}},[e.isFullScreen,e.fileUrl]);const h=t=>{u.current!==t&&(u.current=t,l(t),e.onCitationHover?.(t))},g=e=>{!0===m&&h(findCitationTransactionIdAtPoint(e.currentTarget,e.clientX,e.clientY))},x=()=>{!0===m&&h(void 0)},f=t=>{null!=e.onCitationClick&&e.onCitationClick(findCitationTransactionIdAtPoint(t.currentTarget,t.clientX,t.clientY))},y=React.useCallback(()=>{if(null==e.highlightedCitations||0===e.highlightedCitations.length)return;const t=getScrollTargetPageNumber(e.highlightedCitations,e.selectedStatementTransactionId);if(null==t)return;const n=p.current?.querySelector(`[data-testid="pdf-page-${t}"]`);if(null!=n){const t=p.current,o=null!=t&&t.scrollHeight>t.clientHeight?t:null,i=(null!=e.selectedStatementTransactionId?n.querySelector(`[data-statement-transaction-id="${CSS.escape(String(e.selectedStatementTransactionId))}"]`):null)??n;if(isElementVisibleInContainer(i,o))return;scrollPageElementIntoView(i,o)}},[e.highlightedCitations,e.selectedStatementTransactionId]);React.useEffect(()=>{if(null==e.highlightedCitations||0===e.highlightedCitations.length||null==e.selectedStatementTransactionId)return;y();const t=requestAnimationFrame(y),n=window.setTimeout(y,150);return()=>{cancelAnimationFrame(t),window.clearTimeout(n)}},[e.highlightedCitations,e.selectedStatementTransactionId,t,y]),React.useEffect(()=>{a(null),n(0)},[e.fileUrl]);const S=t=>{if(!e.highlightedCitations)return null;const n=e.highlightedCitations.filter(e=>e.page===t);return 0===n.length?null:jsxRuntimeExports.jsx(HighlightsOverlay,{children:n.flatMap((t,n)=>{const o=convertPolygonToPercent(t.polygon,t.pageWidth,t.pageHeight),i=getEffectiveCitationVariant(t,e.selectedStatementTransactionId,s);return jsxRuntimeExports.jsx(HighlightBox,{"data-citation-variant":i,"data-statement-transaction-id":t.statementTransactionId,$variant:i,style:{height:`${o.height}%`,left:`${o.left}%`,top:`${o.top}%`,width:`${o.width}%`}},`${n}`)})})},C=()=>{e.setShowFullScreenView(!0)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(FileInputElement,{fileRef:d,name:FileInputElementName$1,onFileChange:t=>{if(null!=t.target.files){const n=t.target.files[0];e.onUploadAttachment?.([n],[n.name])}},multiple:e.allowMultiFiles,sizeLimit:SizeLimit32MB,onFileSizeError:t=>e.openSizeLimitPopup?.(t)}),jsxRuntimeExports.jsx(AttachmentContainer$2,{maxHeight:e.maxHeight??!1,$allowTextSelection:m,"data-statement-pdf-surface":"",onClick:()=>{m||C()},onDoubleClick:()=>{m&&C()},windowSize:c,"data-testid":generateDataTestId("attachment-container",e.pdfTitle),children:jsxRuntimeExports.jsxs(PdfRender,{isFullScreen:e.isFullScreen,ref:p,children:[!0===e.showTitlebar?jsxRuntimeExports.jsxs(Titlebar$2,{children:[jsxRuntimeExports.jsx(PdfTitle$2,{children:e.pdfTitle}),!0===e.showTitlebarIcon?jsxRuntimeExports.jsxs(ActionIcons$1,{className:"actionIcons",children:[!1!==e.showReplaceIcon?jsxRuntimeExports.jsx(Tooltip$6,{enterDelay:600,display:"flex",title:common$3g.texts.replace,placement:"top-end",children:jsxRuntimeExports.jsx(ReplaceIconWrapper$1,{"data-testid":generateDataTestId("replace-attachment",e.pdfTitle),onClick:e=>{e.stopPropagation(),d.current?.click()}})}):null,"small"===c?jsxRuntimeExports.jsx(DeleteIconWrapperMobile$1,{"data-testid":null!=e.deleteAttachmentDataTestId?`${e.deleteAttachmentDataTestId}-mobile`:generateDataTestId("delete-attachment-mobile",e.pdfTitle),onClick:t=>{t.stopPropagation(),e.onDeleteClick?.()}}):jsxRuntimeExports.jsx(Tooltip$6,{enterDelay:600,display:"flex",title:common$3g.delete,placement:"top",children:jsxRuntimeExports.jsx(DeleteIconWrapper$c,{onClick:t=>{t.stopPropagation(),e.onDeleteClick?.()},"data-testid":e.deleteAttachmentDataTestId??generateDataTestId("delete-attachment",e.pdfTitle)})})]}):null]}):null,(()=>{const t=e.fileUrl.toLowerCase();return[".jpg",".jpeg",".png",".gif",".webp",".bmp"].some(e=>t.includes(e))})()?jsxRuntimeExports.jsx(ImageContainer$1,{children:jsxRuntimeExports.jsxs(ImageWrapper$2,{onMouseMove:g,onMouseLeave:x,onClick:f,children:[jsxRuntimeExports.jsx(StyledImage$g,{src:e.fileUrl,alt:e.pdfTitle,onLoad:e=>{const t=e.currentTarget;a({width:t.naturalWidth,height:t.naturalHeight})}},e.fileUrl),(()=>{if(!e.highlightedCitations||null==r)return null;const t=e.highlightedCitations.filter(e=>1===e.page);return 0===t.length?null:jsxRuntimeExports.jsx(HighlightsOverlay,{children:t.flatMap((t,n)=>{const o=convertPolygonToPercent(t.polygon,t.pageWidth,t.pageHeight),i=getEffectiveCitationVariant(t,e.selectedStatementTransactionId,s);return jsxRuntimeExports.jsx(HighlightBox,{"data-citation-variant":i,"data-statement-transaction-id":t.statementTransactionId,$variant:i,style:{height:`${o.height}%`,left:`${o.left}%`,top:`${o.top}%`,width:`${o.width}%`}},`${n}`)})})})()]})}):jsxRuntimeExports.jsxs(Document,{file:e.fileUrl,onLoadSuccess:({numPages:e})=>n(e),onLoadError:()=>n(0),loading:jsxRuntimeExports.jsx(BusyContainer$e,{children:jsxRuntimeExports.jsx(ActivityIndicator,{size:"ExtraLarge",start:!0})}),className:"pdfDoc",children:[Array.from(new Array(t),(n,i)=>jsxRuntimeExports.jsx(ClickAwayListener,{onClickAway:()=>e.onCrossClick?.(),children:jsxRuntimeExports.jsxs(PageWrapper$1,{windowSize:c,isFullScreen:e.isFullScreen,children:[jsxRuntimeExports.jsxs(PageContainer$q,{"data-testid":`pdf-page-${i+1}`,isFullScreen:e.isFullScreen,onMouseMove:g,onMouseLeave:x,onClick:f,children:[jsxRuntimeExports.jsx(Page$7,{pageNumber:i+1,className:"reactPdfPage",...e.isFullScreen?{scale:1.5}:null!=o?{width:o}:{scale:1},error:jsxRuntimeExports.jsx("div",{}),onRenderSuccess:()=>{(null!=e.highlightedCitations?getScrollTargetPageNumber(e.highlightedCitations,e.selectedStatementTransactionId):void 0)===i+1&&y()}},`page_${i+1}`),S(i+1)]}),t!=i+1?jsxRuntimeExports.jsx(Divider$d,{}):null]})},`page_${i+1}`)),jsxRuntimeExports.jsx("div",{})]},e.fileUrl)]})})]})}const AttachmentContainer$2=styled$2.div`
|
|
10277
|
+
`,BottomHeader=styled$2(H6Medium)``;function _mergeNamespaces$1(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}function copyExifWithoutOrientation(e,t){return new Promise(function(n,o){let i;return getApp1Segment(e).then(function(e){try{return i=e,n(new Blob([t.slice(0,2),i,t.slice(2)],{type:"image/jpeg"}))}catch(r){return o(r)}},o)})}const getApp1Segment=e=>new Promise((t,n)=>{const o=new FileReader;o.addEventListener("load",({target:{result:e}})=>{const o=new DataView(e);let i=0;if(65496!==o.getUint16(i))return n("not a valid JPEG");for(i+=2;;){const r=o.getUint16(i);if(65498===r)break;const a=o.getUint16(i+2);if(65505===r&&1165519206===o.getUint32(i+4)){const r=i+10;let s;switch(o.getUint16(r)){case 18761:s=!0;break;case 19789:s=!1;break;default:return n("TIFF header contains invalid endian")}if(42!==o.getUint16(r+2,s))return n("TIFF header contains invalid version");const l=o.getUint32(r+4,s),c=r+l+2+12*o.getUint16(r+l,s);for(let e=r+l+2;e<c;e+=12)if(274==o.getUint16(e,s)){if(3!==o.getUint16(e+2,s))return n("Orientation data type is invalid");if(1!==o.getUint32(e+4,s))return n("Orientation data count is invalid");o.setUint16(e+8,1,s);break}return t(e.slice(i,i+2+a))}i+=2+a}return t(new Blob)}),o.readAsArrayBuffer(e)});var e={},t={get exports(){return e},set exports(t){e=t}},r2,i3,UZIP2;UZIP2={},t.exports=UZIP2,UZIP2.parse=function(e,t){for(var n=UZIP2.bin.readUshort,o=UZIP2.bin.readUint,i=0,r={},a=new Uint8Array(e),s=a.length-4;101010256!=o(a,s);)s--;i=s,i+=4;var l=n(a,i+=4);n(a,i+=2);var c=o(a,i+=2),d=o(a,i+=4);i+=4,i=d;for(var p=0;p<l;p++){o(a,i),i+=4,i+=4,i+=4,o(a,i+=4),c=o(a,i+=4);var u=o(a,i+=4),m=n(a,i+=4),h=n(a,i+2),g=n(a,i+4);i+=6;var x=o(a,i+=8);i+=4,i+=m+h+g,UZIP2._readLocal(a,x,r,c,u,t)}return r},UZIP2._readLocal=function(e,t,n,o,i,r){var a=UZIP2.bin.readUshort,s=UZIP2.bin.readUint;s(e,t),a(e,t+=4),a(e,t+=2);var l=a(e,t+=2);s(e,t+=2),s(e,t+=4),t+=4;var c=a(e,t+=8),d=a(e,t+=2);t+=2;var p=UZIP2.bin.readUTF8(e,t,c);if(t+=c,t+=d,r)n[p]={size:i,csize:o};else{var u=new Uint8Array(e.buffer,t);if(0==l)n[p]=new Uint8Array(u.buffer.slice(t,t+o));else{if(8!=l)throw"unknown compression method: "+l;var m=new Uint8Array(i);UZIP2.inflateRaw(u,m),n[p]=m}}},UZIP2.inflateRaw=function(e,t){return UZIP2.F.inflate(e,t)},UZIP2.inflate=function(e,t){return e[0],e[1],UZIP2.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),t)},UZIP2.deflate=function(e,t){null==t&&(t={level:6});var n=0,o=new Uint8Array(50+Math.floor(1.1*e.length));o[n]=120,o[n+1]=156,n+=2,n=UZIP2.F.deflateRaw(e,o,n,t.level);var i=UZIP2.adler(e,0,e.length);return o[n+0]=i>>>24&255,o[n+1]=i>>>16&255,o[n+2]=i>>>8&255,o[n+3]=i>>>0&255,new Uint8Array(o.buffer,0,n+4)},UZIP2.deflateRaw=function(e,t){null==t&&(t={level:6});var n=new Uint8Array(50+Math.floor(1.1*e.length)),o=UZIP2.F.deflateRaw(e,n,o,t.level);return new Uint8Array(n.buffer,0,o)},UZIP2.encode=function(e,t){null==t&&(t=!1);var n=0,o=UZIP2.bin.writeUint,i=UZIP2.bin.writeUshort,r={};for(var a in e){var s=!UZIP2._noNeed(a)&&!t,l=e[a],c=UZIP2.crc.crc(l,0,l.length);r[a]={cpr:s,usize:l.length,crc:c,file:s?UZIP2.deflateRaw(l):l}}for(var a in r)n+=r[a].file.length+30+46+2*UZIP2.bin.sizeUTF8(a);n+=22;var d=new Uint8Array(n),p=0,u=[];for(var a in r){var m=r[a];u.push(p),p=UZIP2._writeHeader(d,p,a,m,0)}var h=0,g=p;for(var a in r)m=r[a],u.push(p),p=UZIP2._writeHeader(d,p,a,m,1,u[h++]);var x=p-g;return o(d,p,101010256),p+=4,i(d,p+=4,h),i(d,p+=2,h),o(d,p+=2,x),o(d,p+=4,g),p+=4,p+=2,d.buffer},UZIP2._noNeed=function(e){var t=e.split(".").pop().toLowerCase();return-1!="png,jpg,jpeg,zip".indexOf(t)},UZIP2._writeHeader=function(e,t,n,o,i,r){var a=UZIP2.bin.writeUint,s=UZIP2.bin.writeUshort,l=o.file;return a(e,t,0==i?67324752:33639248),t+=4,1==i&&(t+=2),s(e,t,20),s(e,t+=2,0),s(e,t+=2,o.cpr?8:0),a(e,t+=2,0),a(e,t+=4,o.crc),a(e,t+=4,l.length),a(e,t+=4,o.usize),s(e,t+=4,UZIP2.bin.sizeUTF8(n)),s(e,t+=2,0),t+=2,1==i&&(t+=2,t+=2,a(e,t+=6,r),t+=4),t+=UZIP2.bin.writeUTF8(e,t,n),0==i&&(e.set(l,t),t+=l.length),t},UZIP2.crc={table:function(){for(var e=new Uint32Array(256),t=0;t<256;t++){for(var n=t,o=0;o<8;o++)1&n?n=3988292384^n>>>1:n>>>=1;e[t]=n}return e}(),update:function(e,t,n,o){for(var i=0;i<o;i++)e=UZIP2.crc.table[255&(e^t[n+i])]^e>>>8;return e},crc:function(e,t,n){return 4294967295^UZIP2.crc.update(4294967295,e,t,n)}},UZIP2.adler=function(e,t,n){for(var o=1,i=0,r=t,a=t+n;r<a;){for(var s=Math.min(r+5552,a);r<s;)i+=o+=e[r++];o%=65521,i%=65521}return i<<16|o},UZIP2.bin={readUshort:function(e,t){return e[t]|e[t+1]<<8},writeUshort:function(e,t,n){e[t]=255&n,e[t+1]=n>>8&255},readUint:function(e,t){return 16777216*e[t+3]+(e[t+2]<<16|e[t+1]<<8|e[t])},writeUint:function(e,t,n){e[t]=255&n,e[t+1]=n>>8&255,e[t+2]=n>>16&255,e[t+3]=n>>24&255},readASCII:function(e,t,n){for(var o="",i=0;i<n;i++)o+=String.fromCharCode(e[t+i]);return o},writeASCII:function(e,t,n){for(var o=0;o<n.length;o++)e[t+o]=n.charCodeAt(o)},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,t,n){for(var o,i="",r=0;r<n;r++)i+="%"+UZIP2.bin.pad(e[t+r].toString(16));try{o=decodeURIComponent(i)}catch(a){return UZIP2.bin.readASCII(e,t,n)}return o},writeUTF8:function(e,t,n){for(var o=n.length,i=0,r=0;r<o;r++){var a=n.charCodeAt(r);if(4294967168&a)if(4294965248&a)if(4294901760&a){if(4292870144&a)throw"e";e[t+i]=240|a>>18,e[t+i+1]=128|a>>12&63,e[t+i+2]=128|a>>6&63,e[t+i+3]=128|63&a,i+=4}else e[t+i]=224|a>>12,e[t+i+1]=128|a>>6&63,e[t+i+2]=128|63&a,i+=3;else e[t+i]=192|a>>6,e[t+i+1]=128|63&a,i+=2;else e[t+i]=a,i++}return i},sizeUTF8:function(e){for(var t=e.length,n=0,o=0;o<t;o++){var i=e.charCodeAt(o);if(4294967168&i)if(4294965248&i)if(4294901760&i){if(4292870144&i)throw"e";n+=4}else n+=3;else n+=2;else n++}return n}},UZIP2.F={},UZIP2.F.deflateRaw=function(e,t,n,o){var i=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][o],r=UZIP2.F.U,a=UZIP2.F._goodIndex;UZIP2.F._hash;var s=UZIP2.F._putsE,l=0,c=n<<3,d=0,p=e.length;if(0==o){for(;l<p;)s(t,c,l+(v=Math.min(65535,p-l))==p?1:0),c=UZIP2.F._copyExact(e,l,v,t,c+8),l+=v;return c>>>3}var u=r.lits,m=r.strt,h=r.prev,g=0,x=0,f=0,y=0,S=0,C=0;for(p>2&&(m[C=UZIP2.F._hash(e,0)]=0),l=0;l<p;l++){if(S=C,l+1<p-2){C=UZIP2.F._hash(e,l+1);var b=l+1&32767;h[b]=m[C],m[C]=b}if(d<=l){(g>14e3||x>26697)&&p-l>100&&(d<l&&(u[g]=l-d,g+=2,d=l),c=UZIP2.F._writeBlock(l==p-1||d==p?1:0,u,g,y,e,f,l-f,t,c),g=x=y=0,f=l);var $=0;l<p-2&&($=UZIP2.F._bestMatch(e,l,h,S,Math.min(i[2],p-l),i[3]));var v=$>>>16,E=65535&$;if(0!=$){E=65535&$;var A=a(v=$>>>16,r.of0);r.lhst[257+A]++;var w=a(E,r.df0);r.dhst[w]++,y+=r.exb[A]+r.dxb[w],u[g]=v<<23|l-d,u[g+1]=E<<16|A<<8|w,g+=2,d=l+v}else r.lhst[e[l]]++;x++}}for(f==l&&0!=e.length||(d<l&&(u[g]=l-d,g+=2,d=l),c=UZIP2.F._writeBlock(1,u,g,y,e,f,l-f,t,c),g=0,x=0,g=x=y=0,f=l);7&c;)c++;return c>>>3},UZIP2.F._bestMatch=function(e,t,n,o,i,r){var a=32767&t,s=n[a],l=a-s+32768&32767;if(s==a||o!=UZIP2.F._hash(e,t-l))return 0;for(var c=0,d=0,p=Math.min(32767,t);l<=p&&0!=--r&&s!=a;){if(0==c||e[t+c]==e[t+c-l]){var u=UZIP2.F._howLong(e,t,l);if(u>c){if(d=l,(c=u)>=i)break;l+2<u&&(u=l+2);for(var m=0,h=0;h<u-2;h++){var g=t-l+h+32768&32767,x=g-n[g]+32768&32767;x>m&&(m=x,s=g)}}}l+=(a=s)-(s=n[a])+32768&32767}return c<<16|d},UZIP2.F._howLong=function(e,t,n){if(e[t]!=e[t-n]||e[t+1]!=e[t+1-n]||e[t+2]!=e[t+2-n])return 0;var o=t,i=Math.min(e.length,t+258);for(t+=3;t<i&&e[t]==e[t-n];)t++;return t-o},UZIP2.F._hash=function(e,t){return(e[t]<<8|e[t+1])+(e[t+2]<<4)&65535},UZIP2.saved=0,UZIP2.F._writeBlock=function(e,t,n,o,i,r,a,s,l){var c,d,p,u,m,h,g,x,f,y=UZIP2.F.U,S=UZIP2.F._putsF,C=UZIP2.F._putsE;y.lhst[256]++,d=(c=UZIP2.F.getTrees())[0],p=c[1],u=c[2],m=c[3],h=c[4],g=c[5],x=c[6],f=c[7];var b=32+(l+3&7?8-(l+3&7):0)+(a<<3),$=o+UZIP2.F.contSize(y.fltree,y.lhst)+UZIP2.F.contSize(y.fdtree,y.dhst),v=o+UZIP2.F.contSize(y.ltree,y.lhst)+UZIP2.F.contSize(y.dtree,y.dhst);v+=14+3*g+UZIP2.F.contSize(y.itree,y.ihst)+(2*y.ihst[16]+3*y.ihst[17]+7*y.ihst[18]);for(var E=0;E<286;E++)y.lhst[E]=0;for(E=0;E<30;E++)y.dhst[E]=0;for(E=0;E<19;E++)y.ihst[E]=0;var A=b<$&&b<v?0:$<v?1:2;if(S(s,l,e),S(s,l+1,A),l+=3,0==A){for(;7&l;)l++;l=UZIP2.F._copyExact(i,r,a,s,l)}else{var w,R;if(1==A&&(w=y.fltree,R=y.fdtree),2==A){UZIP2.F.makeCodes(y.ltree,d),UZIP2.F.revCodes(y.ltree,d),UZIP2.F.makeCodes(y.dtree,p),UZIP2.F.revCodes(y.dtree,p),UZIP2.F.makeCodes(y.itree,u),UZIP2.F.revCodes(y.itree,u),w=y.ltree,R=y.dtree,C(s,l,m-257),C(s,l+=5,h-1),C(s,l+=5,g-4),l+=4;for(var j=0;j<g;j++)C(s,l+3*j,y.itree[1+(y.ordr[j]<<1)]);l+=3*g,l=UZIP2.F._codeTiny(x,y.itree,s,l),l=UZIP2.F._codeTiny(f,y.itree,s,l)}for(var T=r,I=0;I<n;I+=2){for(var k=t[I],L=k>>>23,D=T+(8388607&k);T<D;)l=UZIP2.F._writeLit(i[T++],w,s,l);if(0!=L){var _=t[I+1],P=_>>16,B=_>>8&255,M=255&_;C(s,l=UZIP2.F._writeLit(257+B,w,s,l),L-y.of0[B]),l+=y.exb[B],S(s,l=UZIP2.F._writeLit(M,R,s,l),P-y.df0[M]),l+=y.dxb[M],T+=L}}l=UZIP2.F._writeLit(256,w,s,l)}return l},UZIP2.F._copyExact=function(e,t,n,o,i){var r=i>>>3;return o[r]=n,o[r+1]=n>>>8,o[r+2]=255-o[r],o[r+3]=255-o[r+1],r+=4,o.set(new Uint8Array(e.buffer,t,n),r),i+(n+4<<3)},UZIP2.F.getTrees=function(){for(var e=UZIP2.F.U,t=UZIP2.F._hufTree(e.lhst,e.ltree,15),n=UZIP2.F._hufTree(e.dhst,e.dtree,15),o=[],i=UZIP2.F._lenCodes(e.ltree,o),r=[],a=UZIP2.F._lenCodes(e.dtree,r),s=0;s<o.length;s+=2)e.ihst[o[s]]++;for(s=0;s<r.length;s+=2)e.ihst[r[s]]++;for(var l=UZIP2.F._hufTree(e.ihst,e.itree,7),c=19;c>4&&0==e.itree[1+(e.ordr[c-1]<<1)];)c--;return[t,n,l,i,a,c,o,r]},UZIP2.F.getSecond=function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(e[n+1]);return t},UZIP2.F.nonZero=function(e){for(var t="",n=0;n<e.length;n+=2)0!=e[n+1]&&(t+=(n>>1)+",");return t},UZIP2.F.contSize=function(e,t){for(var n=0,o=0;o<t.length;o++)n+=t[o]*e[1+(o<<1)];return n},UZIP2.F._codeTiny=function(e,t,n,o){for(var i=0;i<e.length;i+=2){var r=e[i],a=e[i+1];o=UZIP2.F._writeLit(r,t,n,o);var s=16==r?2:17==r?3:7;r>15&&(UZIP2.F._putsE(n,o,a,s),o+=s)}return o},UZIP2.F._lenCodes=function(e,t){for(var n=e.length;2!=n&&0==e[n-1];)n-=2;for(var o=0;o<n;o+=2){var i=e[o+1],r=o+3<n?e[o+3]:-1,a=o+5<n?e[o+5]:-1,s=0==o?-1:e[o-1];if(0==i&&r==i&&a==i){for(var l=o+5;l+2<n&&e[l+2]==i;)l+=2;(c=Math.min(l+1-o>>>1,138))<11?t.push(17,c-3):t.push(18,c-11),o+=2*c-2}else if(i==s&&r==i&&a==i){for(l=o+5;l+2<n&&e[l+2]==i;)l+=2;var c=Math.min(l+1-o>>>1,6);t.push(16,c-3),o+=2*c-2}else t.push(i,0)}return n>>>1},UZIP2.F._hufTree=function(e,t,n){var o=[],i=e.length,r=t.length,a=0;for(a=0;a<r;a+=2)t[a]=0,t[a+1]=0;for(a=0;a<i;a++)0!=e[a]&&o.push({lit:a,f:e[a]});var s=o.length,l=o.slice(0);if(0==s)return 0;if(1==s){var c=o[0].lit;return l=0==c?1:0,t[1+(c<<1)]=1,t[1+(l<<1)]=1,1}o.sort(function(e,t){return e.f-t.f});var d=o[0],p=o[1],u=0,m=1,h=2;for(o[0]={lit:-1,f:d.f+p.f,l:d,r:p,d:0};m!=s-1;)d=u!=m&&(h==s||o[u].f<o[h].f)?o[u++]:o[h++],p=u!=m&&(h==s||o[u].f<o[h].f)?o[u++]:o[h++],o[m++]={lit:-1,f:d.f+p.f,l:d,r:p};var g=UZIP2.F.setDepth(o[m-1],0);for(g>n&&(UZIP2.F.restrictDepth(l,n,g),g=n),a=0;a<s;a++)t[1+(l[a].lit<<1)]=l[a].d;return g},UZIP2.F.setDepth=function(e,t){return-1!=e.lit?(e.d=t,t):Math.max(UZIP2.F.setDepth(e.l,t+1),UZIP2.F.setDepth(e.r,t+1))},UZIP2.F.restrictDepth=function(e,t,n){var o=0,i=1<<n-t,r=0;for(e.sort(function(e,t){return t.d==e.d?e.f-t.f:t.d-e.d}),o=0;o<e.length&&e[o].d>t;o++){var a=e[o].d;e[o].d=t,r+=i-(1<<n-a)}for(r>>>=n-t;r>0;)(a=e[o].d)<t?(e[o].d++,r-=1<<t-a-1):o++;for(;o>=0;o--)e[o].d==t&&r<0&&(e[o].d--,r++);0!=r&&console.log("debt left")},UZIP2.F._goodIndex=function(e,t){var n=0;return t[16|n]<=e&&(n|=16),t[8|n]<=e&&(n|=8),t[4|n]<=e&&(n|=4),t[2|n]<=e&&(n|=2),t[1|n]<=e&&(n|=1),n},UZIP2.F._writeLit=function(e,t,n,o){return UZIP2.F._putsF(n,o,t[e<<1]),o+t[1+(e<<1)]},UZIP2.F.inflate=function(e,t){var n=Uint8Array;if(3==e[0]&&0==e[1])return t||new n(0);var o=UZIP2.F,i=o._bitsF,r=o._bitsE,a=o._decodeTiny,s=o.makeCodes,l=o.codes2map,c=o._get17,d=o.U,p=null==t;p&&(t=new n(e.length>>>2<<3));for(var u,m,h=0,g=0,x=0,f=0,y=0,S=0,C=0,b=0,$=0;0==h;)if(h=i(e,$,1),g=i(e,$+1,2),$+=3,0!=g){if(p&&(t=UZIP2.F._check(t,b+(1<<17))),1==g&&(u=d.flmap,m=d.fdmap,S=511,C=31),2==g){x=r(e,$,5)+257,f=r(e,$+5,5)+1,y=r(e,$+10,4)+4,$+=14;for(var v=0;v<38;v+=2)d.itree[v]=0,d.itree[v+1]=0;var E=1;for(v=0;v<y;v++){var A=r(e,$+3*v,3);d.itree[1+(d.ordr[v]<<1)]=A,A>E&&(E=A)}$+=3*y,s(d.itree,E),l(d.itree,E,d.imap),u=d.lmap,m=d.dmap,$=a(d.imap,(1<<E)-1,x+f,e,$,d.ttree);var w=o._copyOut(d.ttree,0,x,d.ltree);S=(1<<w)-1;var R=o._copyOut(d.ttree,x,f,d.dtree);C=(1<<R)-1,s(d.ltree,w),l(d.ltree,w,u),s(d.dtree,R),l(d.dtree,R,m)}for(;;){var j=u[c(e,$)&S];$+=15&j;var T=j>>>4;if(T>>>8==0)t[b++]=T;else{if(256==T)break;var I=b+T-254;if(T>264){var k=d.ldef[T-257];I=b+(k>>>3)+r(e,$,7&k),$+=7&k}var L=m[c(e,$)&C];$+=15&L;var D=L>>>4,_=d.ddef[D],P=(_>>>4)+i(e,$,15&_);for($+=15&_,p&&(t=UZIP2.F._check(t,b+(1<<17)));b<I;)t[b]=t[b++-P],t[b]=t[b++-P],t[b]=t[b++-P],t[b]=t[b++-P];b=I}}}else{7&$&&($+=8-(7&$));var B=4+($>>>3),M=e[B-4]|e[B-3]<<8;p&&(t=UZIP2.F._check(t,b+M)),t.set(new n(e.buffer,e.byteOffset+B,M),b),$=B+M<<3,b+=M}return t.length==b?t:t.slice(0,b)},UZIP2.F._check=function(e,t){var n=e.length;if(t<=n)return e;var o=new Uint8Array(Math.max(n<<1,t));return o.set(e,0),o},UZIP2.F._decodeTiny=function(e,t,n,o,i,r){for(var a=UZIP2.F._bitsE,s=UZIP2.F._get17,l=0;l<n;){var c=e[s(o,i)&t];i+=15&c;var d=c>>>4;if(d<=15)r[l]=d,l++;else{var p=0,u=0;16==d?(u=3+a(o,i,2),i+=2,p=r[l-1]):17==d?(u=3+a(o,i,3),i+=3):18==d&&(u=11+a(o,i,7),i+=7);for(var m=l+u;l<m;)r[l]=p,l++}}return i},UZIP2.F._copyOut=function(e,t,n,o){for(var i=0,r=0,a=o.length>>>1;r<n;){var s=e[r+t];o[r<<1]=0,o[1+(r<<1)]=s,s>i&&(i=s),r++}for(;r<a;)o[r<<1]=0,o[1+(r<<1)]=0,r++;return i},UZIP2.F.makeCodes=function(e,t){for(var n,o,i,r,a=UZIP2.F.U,s=e.length,l=a.bl_count,c=0;c<=t;c++)l[c]=0;for(c=1;c<s;c+=2)l[e[c]]++;var d=a.next_code;for(n=0,l[0]=0,o=1;o<=t;o++)n=n+l[o-1]<<1,d[o]=n;for(i=0;i<s;i+=2)0!=(r=e[i+1])&&(e[i]=d[r],d[r]++)},UZIP2.F.codes2map=function(e,t,n){for(var o=e.length,i=UZIP2.F.U.rev15,r=0;r<o;r+=2)if(0!=e[r+1])for(var a=r>>1,s=e[r+1],l=a<<4|s,c=t-s,d=e[r]<<c,p=d+(1<<c);d!=p;)n[i[d]>>>15-t]=l,d++},UZIP2.F.revCodes=function(e,t){for(var n=UZIP2.F.U.rev15,o=15-t,i=0;i<e.length;i+=2){var r=e[i]<<t-e[i+1];e[i]=n[r]>>>o}},UZIP2.F._putsE=function(e,t,n){n<<=7&t;var o=t>>>3;e[o]|=n,e[o+1]|=n>>>8},UZIP2.F._putsF=function(e,t,n){n<<=7&t;var o=t>>>3;e[o]|=n,e[o+1]|=n>>>8,e[o+2]|=n>>>16},UZIP2.F._bitsE=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<n)-1},UZIP2.F._bitsF=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<n)-1},UZIP2.F._get17=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},UZIP2.F._get25=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},UZIP2.F.U=(r2=Uint16Array,i3=Uint32Array,{next_code:new r2(16),bl_count:new r2(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new r2(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new i3(32),flmap:new r2(512),fltree:[],fdmap:new r2(32),fdtree:[],lmap:new r2(32768),ltree:[],ttree:[],dmap:new r2(32768),dtree:[],imap:new r2(512),itree:[],rev15:new r2(32768),lhst:new i3(286),dhst:new i3(30),ihst:new i3(19),lits:new i3(15e3),strt:new r2(65536),prev:new r2(32768)}),function(){for(var e=UZIP2.F.U,t=0;t<32768;t++){var n=t;n=(4278255360&(n=(4042322160&(n=(3435973836&(n=(2863311530&n)>>>1|(1431655765&n)<<1))>>>2|(858993459&n)<<2))>>>4|(252645135&n)<<4))>>>8|(16711935&n)<<8,e.rev15[t]=(n>>>16|n<<16)>>>17}function o(e,t,n){for(;0!=t--;)e.push(0,n)}for(t=0;t<32;t++)e.ldef[t]=e.of0[t]<<3|e.exb[t],e.ddef[t]=e.df0[t]<<4|e.dxb[t];o(e.fltree,144,8),o(e.fltree,112,9),o(e.fltree,24,7),o(e.fltree,8,8),UZIP2.F.makeCodes(e.fltree,9),UZIP2.F.codes2map(e.fltree,9,e.flmap),UZIP2.F.revCodes(e.fltree,9),o(e.fdtree,32,5),UZIP2.F.makeCodes(e.fdtree,5),UZIP2.F.codes2map(e.fdtree,5,e.fdmap),UZIP2.F.revCodes(e.fdtree,5),o(e.itree,19,0),o(e.ltree,286,0),o(e.dtree,30,0),o(e.ttree,320,0)}();var UZIP=_mergeNamespaces$1({__proto__:null,default:e},[e]);const UPNG=function(){var e={nextZero(e,t){for(;0!=e[t];)t++;return t},readUshort:(e,t)=>e[t]<<8|e[t+1],writeUshort(e,t,n){e[t]=n>>8&255,e[t+1]=255&n},readUint:(e,t)=>16777216*e[t]+(e[t+1]<<16|e[t+2]<<8|e[t+3]),writeUint(e,t,n){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n},readASCII(e,t,n){let o="";for(let i=0;i<n;i++)o+=String.fromCharCode(e[t+i]);return o},writeASCII(e,t,n){for(let o=0;o<n.length;o++)e[t+o]=n.charCodeAt(o)},readBytes(e,t,n){const o=[];for(let i=0;i<n;i++)o.push(e[t+i]);return o},pad:e=>e.length<2?`0${e}`:e,readUTF8(t,n,o){let i,r="";for(let s=0;s<o;s++)r+=`%${e.pad(t[n+s].toString(16))}`;try{i=decodeURIComponent(r)}catch(a){return e.readASCII(t,n,o)}return i}};function t(t,n,o,i){const a=n*o,s=r(i),l=Math.ceil(n*s/8),c=new Uint8Array(4*a),d=new Uint32Array(c.buffer),{ctype:p}=i,{depth:u}=i,m=e.readUshort;if(6==p){const e=a<<2;if(8==u)for(var h=0;h<e;h+=4)c[h]=t[h],c[h+1]=t[h+1],c[h+2]=t[h+2],c[h+3]=t[h+3];if(16==u)for(h=0;h<e;h++)c[h]=t[h<<1]}else if(2==p){const e=i.tabs.tRNS;if(null==e){if(8==u)for(h=0;h<a;h++){var g=3*h;d[h]=255<<24|t[g+2]<<16|t[g+1]<<8|t[g]}if(16==u)for(h=0;h<a;h++)g=6*h,d[h]=255<<24|t[g+4]<<16|t[g+2]<<8|t[g]}else{var x=e[0];const n=e[1],o=e[2];if(8==u)for(h=0;h<a;h++){var f=h<<2;g=3*h,d[h]=255<<24|t[g+2]<<16|t[g+1]<<8|t[g],t[g]==x&&t[g+1]==n&&t[g+2]==o&&(c[f+3]=0)}if(16==u)for(h=0;h<a;h++)f=h<<2,g=6*h,d[h]=255<<24|t[g+4]<<16|t[g+2]<<8|t[g],m(t,g)==x&&m(t,g+2)==n&&m(t,g+4)==o&&(c[f+3]=0)}}else if(3==p){const e=i.tabs.PLTE,r=i.tabs.tRNS,s=r?r.length:0;if(1==u)for(var y=0;y<o;y++){var S=y*l,C=y*n;for(h=0;h<n;h++){f=C+h<<2;var b=3*($=t[S+(h>>3)]>>7-(7&h)&1);c[f]=e[b],c[f+1]=e[b+1],c[f+2]=e[b+2],c[f+3]=$<s?r[$]:255}}if(2==u)for(y=0;y<o;y++)for(S=y*l,C=y*n,h=0;h<n;h++)f=C+h<<2,b=3*($=t[S+(h>>2)]>>6-((3&h)<<1)&3),c[f]=e[b],c[f+1]=e[b+1],c[f+2]=e[b+2],c[f+3]=$<s?r[$]:255;if(4==u)for(y=0;y<o;y++)for(S=y*l,C=y*n,h=0;h<n;h++)f=C+h<<2,b=3*($=t[S+(h>>1)]>>4-((1&h)<<2)&15),c[f]=e[b],c[f+1]=e[b+1],c[f+2]=e[b+2],c[f+3]=$<s?r[$]:255;if(8==u)for(h=0;h<a;h++){var $;f=h<<2,b=3*($=t[h]),c[f]=e[b],c[f+1]=e[b+1],c[f+2]=e[b+2],c[f+3]=$<s?r[$]:255}}else if(4==p){if(8==u)for(h=0;h<a;h++){f=h<<2;var v=t[E=h<<1];c[f]=v,c[f+1]=v,c[f+2]=v,c[f+3]=t[E+1]}if(16==u)for(h=0;h<a;h++){var E;f=h<<2,v=t[E=h<<2],c[f]=v,c[f+1]=v,c[f+2]=v,c[f+3]=t[E+2]}}else if(0==p)for(x=i.tabs.tRNS?i.tabs.tRNS:-1,y=0;y<o;y++){const e=y*l,o=y*n;if(1==u)for(var A=0;A<n;A++){var w=(v=255*(t[e+(A>>>3)]>>>7-(7&A)&1))==255*x?0:255;d[o+A]=w<<24|v<<16|v<<8|v}else if(2==u)for(A=0;A<n;A++)w=(v=85*(t[e+(A>>>2)]>>>6-((3&A)<<1)&3))==85*x?0:255,d[o+A]=w<<24|v<<16|v<<8|v;else if(4==u)for(A=0;A<n;A++)w=(v=17*(t[e+(A>>>1)]>>>4-((1&A)<<2)&15))==17*x?0:255,d[o+A]=w<<24|v<<16|v<<8|v;else if(8==u)for(A=0;A<n;A++)w=(v=t[e+A])==x?0:255,d[o+A]=w<<24|v<<16|v<<8|v;else if(16==u)for(A=0;A<n;A++)v=t[e+(A<<1)],w=m(t,e+(A<<1))==x?0:255,d[o+A]=w<<24|v<<16|v<<8|v}return c}function n(e,t,n,s){const l=r(e),c=Math.ceil(n*l/8),d=new Uint8Array((c+1+e.interlace)*s);return t=e.tabs.CgBI?i(t,d):o(t,d),0==e.interlace?t=a(t,e,0,n,s):1==e.interlace&&(t=function(e,t){const n=t.width,o=t.height,i=r(t),s=i>>3,l=Math.ceil(n*i/8),c=new Uint8Array(o*l);let d=0;const p=[0,0,4,0,2,0,1],u=[0,4,0,2,0,1,0],m=[8,8,8,4,4,2,2],h=[8,8,4,4,2,2,1];let g=0;for(;g<7;){const r=m[g],f=h[g];let y=0,S=0,C=p[g];for(;C<o;)C+=r,S++;let b=u[g];for(;b<n;)b+=f,y++;const $=Math.ceil(y*i/8);a(e,t,d,y,S);let v=0,E=p[g];for(;E<o;){let t=u[g],o=d+v*$<<3;for(;t<n;){var x;if(1==i&&(x=(x=e[o>>3])>>7-(7&o)&1,c[E*l+(t>>3)]|=x<<7-(7&t)),2==i&&(x=(x=e[o>>3])>>6-(7&o)&3,c[E*l+(t>>2)]|=x<<6-((3&t)<<1)),4==i&&(x=(x=e[o>>3])>>4-(7&o)&15,c[E*l+(t>>1)]|=x<<4-((1&t)<<2)),i>=8){const n=E*l+t*s;for(let t=0;t<s;t++)c[n+t]=e[(o>>3)+t]}o+=i,t+=f}v++,E+=r}y*S!=0&&(d+=S*(1+$)),g+=1}return c}(t,e)),t}function o(e,t){return i(new Uint8Array(e.buffer,2,e.length-6),t)}var i=function(){const e={H:{}};return e.H.N=function(t,n){const o=Uint8Array;let i,r,a=0,s=0,l=0,c=0,d=0,p=0,u=0,m=0,h=0;if(3==t[0]&&0==t[1])return n||new o(0);const g=e.H,x=g.b,f=g.e,y=g.R,S=g.n,C=g.A,b=g.Z,$=g.m,v=null==n;for(v&&(n=new o(t.length>>>2<<5));0==a;)if(a=x(t,h,1),s=x(t,h+1,2),h+=3,0!=s){if(v&&(n=e.H.W(n,m+(1<<17))),1==s&&(i=$.J,r=$.h,p=511,u=31),2==s){l=f(t,h,5)+257,c=f(t,h+5,5)+1,d=f(t,h+10,4)+4,h+=14;let e=1;for(var E=0;E<38;E+=2)$.Q[E]=0,$.Q[E+1]=0;for(E=0;E<d;E++){const n=f(t,h+3*E,3);$.Q[1+($.X[E]<<1)]=n,n>e&&(e=n)}h+=3*d,S($.Q,e),C($.Q,e,$.u),i=$.w,r=$.d,h=y($.u,(1<<e)-1,l+c,t,h,$.v);const n=g.V($.v,0,l,$.C);p=(1<<n)-1;const o=g.V($.v,l,c,$.D);u=(1<<o)-1,S($.C,n),C($.C,n,i),S($.D,o),C($.D,o,r)}for(;;){const e=i[b(t,h)&p];h+=15&e;const o=e>>>4;if(o>>>8==0)n[m++]=o;else{if(256==o)break;{let e=m+o-254;if(o>264){const n=$.q[o-257];e=m+(n>>>3)+f(t,h,7&n),h+=7&n}const i=r[b(t,h)&u];h+=15&i;const a=i>>>4,s=$.c[a],l=(s>>>4)+x(t,h,15&s);for(h+=15&s;m<e;)n[m]=n[m++-l],n[m]=n[m++-l],n[m]=n[m++-l],n[m]=n[m++-l];m=e}}}}else{7&h&&(h+=8-(7&h));const i=4+(h>>>3),r=t[i-4]|t[i-3]<<8;v&&(n=e.H.W(n,m+r)),n.set(new o(t.buffer,t.byteOffset+i,r),m),h=i+r<<3,m+=r}return n.length==m?n:n.slice(0,m)},e.H.W=function(e,t){const n=e.length;if(t<=n)return e;const o=new Uint8Array(n<<1);return o.set(e,0),o},e.H.R=function(t,n,o,i,r,a){const s=e.H.e,l=e.H.Z;let c=0;for(;c<o;){const e=t[l(i,r)&n];r+=15&e;const o=e>>>4;if(o<=15)a[c]=o,c++;else{let e=0,t=0;16==o?(t=3+s(i,r,2),r+=2,e=a[c-1]):17==o?(t=3+s(i,r,3),r+=3):18==o&&(t=11+s(i,r,7),r+=7);const n=c+t;for(;c<n;)a[c]=e,c++}}return r},e.H.V=function(e,t,n,o){let i=0,r=0;const a=o.length>>>1;for(;r<n;){const n=e[r+t];o[r<<1]=0,o[1+(r<<1)]=n,n>i&&(i=n),r++}for(;r<a;)o[r<<1]=0,o[1+(r<<1)]=0,r++;return i},e.H.n=function(t,n){const o=e.H.m,i=t.length;let r,a,s,l;const c=o.j;for(var d=0;d<=n;d++)c[d]=0;for(d=1;d<i;d+=2)c[t[d]]++;const p=o.K;for(r=0,c[0]=0,a=1;a<=n;a++)r=r+c[a-1]<<1,p[a]=r;for(s=0;s<i;s+=2)l=t[s+1],0!=l&&(t[s]=p[l],p[l]++)},e.H.A=function(t,n,o){const i=t.length,r=e.H.m.r;for(let e=0;e<i;e+=2)if(0!=t[e+1]){const i=e>>1,a=t[e+1],s=i<<4|a,l=n-a;let c=t[e]<<l;const d=c+(1<<l);for(;c!=d;)o[r[c]>>>15-n]=s,c++}},e.H.l=function(t,n){const o=e.H.m.r,i=15-n;for(let e=0;e<t.length;e+=2){const r=t[e]<<n-t[e+1];t[e]=o[r]>>>i}},e.H.M=function(e,t,n){n<<=7&t;const o=t>>>3;e[o]|=n,e[o+1]|=n>>>8},e.H.I=function(e,t,n){n<<=7&t;const o=t>>>3;e[o]|=n,e[o+1]|=n>>>8,e[o+2]|=n>>>16},e.H.e=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<n)-1},e.H.b=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<n)-1},e.H.Z=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},e.H.i=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},e.H.m=function(){const e=Uint16Array,t=Uint32Array;return{K:new e(16),j:new e(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new e(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new t(32),J:new e(512),_:[],h:new e(32),$:[],w:new e(32768),C:[],v:[],d:new e(32768),D:[],u:new e(512),Q:[],r:new e(32768),s:new t(286),Y:new t(30),a:new t(19),t:new t(15e3),k:new e(65536),g:new e(32768)}}(),function(){const t=e.H.m;for(var n=0;n<32768;n++){let e=n;e=(2863311530&e)>>>1|(1431655765&e)<<1,e=(3435973836&e)>>>2|(858993459&e)<<2,e=(4042322160&e)>>>4|(252645135&e)<<4,e=(4278255360&e)>>>8|(16711935&e)<<8,t.r[n]=(e>>>16|e<<16)>>>17}function o(e,t,n){for(;0!=t--;)e.push(0,n)}for(n=0;n<32;n++)t.q[n]=t.S[n]<<3|t.T[n],t.c[n]=t.p[n]<<4|t.z[n];o(t._,144,8),o(t._,112,9),o(t._,24,7),o(t._,8,8),e.H.n(t._,9),e.H.A(t._,9,t.J),e.H.l(t._,9),o(t.$,32,5),e.H.n(t.$,5),e.H.A(t.$,5,t.h),e.H.l(t.$,5),o(t.Q,19,0),o(t.C,286,0),o(t.D,30,0),o(t.v,320,0)}(),e.H.N}();function r(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth}function a(e,t,n,o,i){let a=r(t);const l=Math.ceil(o*a/8);let c,d;a=Math.ceil(a/8);let p=e[n],u=0;if(p>1&&(e[n]=[0,0,1][p-2]),3==p)for(u=a;u<l;u++)e[u+1]=e[u+1]+(e[u+1-a]>>>1)&255;for(let r=0;r<i;r++)if(c=n+r*l,d=c+r+1,p=e[d-1],u=0,0==p)for(;u<l;u++)e[c+u]=e[d+u];else if(1==p){for(;u<a;u++)e[c+u]=e[d+u];for(;u<l;u++)e[c+u]=e[d+u]+e[c+u-a]}else if(2==p)for(;u<l;u++)e[c+u]=e[d+u]+e[c+u-l];else if(3==p){for(;u<a;u++)e[c+u]=e[d+u]+(e[c+u-l]>>>1);for(;u<l;u++)e[c+u]=e[d+u]+(e[c+u-l]+e[c+u-a]>>>1)}else{for(;u<a;u++)e[c+u]=e[d+u]+s(0,e[c+u-l],0);for(;u<l;u++)e[c+u]=e[d+u]+s(e[c+u-a],e[c+u-l],e[c+u-a-l])}return e}function s(e,t,n){const o=e+t-n,i=o-e,r=o-t,a=o-n;return i*i<=r*r&&i*i<=a*a?e:r*r<=a*a?t:n}function l(t,n,o){o.width=e.readUint(t,n),n+=4,o.height=e.readUint(t,n),n+=4,o.depth=t[n],n++,o.ctype=t[n],n++,o.compress=t[n],n++,o.filter=t[n],n++,o.interlace=t[n],n++}function c(e,t,n,o,i,r,a,s,l){const c=Math.min(t,i),d=Math.min(n,r);let p=0,u=0;for(let b=0;b<d;b++)for(let n=0;n<c;n++)if(a>=0&&s>=0?(p=b*t+n<<2,u=(s+b)*i+a+n<<2):(p=(-s+b)*t-a+n<<2,u=b*i+n<<2),0==l)o[u]=e[p],o[u+1]=e[p+1],o[u+2]=e[p+2],o[u+3]=e[p+3];else if(1==l){var m=e[p+3]*(1/255),h=e[p]*m,g=e[p+1]*m,x=e[p+2]*m,f=o[u+3]*(1/255),y=o[u]*f,S=o[u+1]*f,C=o[u+2]*f;const t=1-m,n=m+f*t,i=0==n?0:1/n;o[u+3]=255*n,o[u+0]=(h+y*t)*i,o[u+1]=(g+S*t)*i,o[u+2]=(x+C*t)*i}else if(2==l)m=e[p+3],h=e[p],g=e[p+1],x=e[p+2],f=o[u+3],y=o[u],S=o[u+1],C=o[u+2],m==f&&h==y&&g==S&&x==C?(o[u]=0,o[u+1]=0,o[u+2]=0,o[u+3]=0):(o[u]=h,o[u+1]=g,o[u+2]=x,o[u+3]=m);else if(3==l){if(m=e[p+3],h=e[p],g=e[p+1],x=e[p+2],f=o[u+3],y=o[u],S=o[u+1],C=o[u+2],m==f&&h==y&&g==S&&x==C)continue;if(m<220&&f>20)return!1}return!0}return{decode:function(t){const r=new Uint8Array(t);let a=8;const s=e,c=s.readUshort,d=s.readUint,p={tabs:{},frames:[]},u=new Uint8Array(r.length);let m,h=0,g=0;const x=[137,80,78,71,13,10,26,10];for(var f=0;f<8;f++)if(r[f]!=x[f])throw"The input is not a PNG file!";for(;a<r.length;){const e=s.readUint(r,a);a+=4;const t=s.readASCII(r,a,4);if(a+=4,"IHDR"==t)l(r,a,p);else if("iCCP"==t){for(var y=a;0!=r[y];)y++;s.readASCII(r,a,y-a),r[y+1];const n=r.slice(y+2,a+e);let l=null;try{l=o(n)}catch(A){l=i(n)}p.tabs[t]=l}else if("CgBI"==t)p.tabs[t]=r.slice(a,a+4);else if("IDAT"==t){for(f=0;f<e;f++)u[h+f]=r[a+f];h+=e}else if("acTL"==t)p.tabs[t]={num_frames:d(r,a),num_plays:d(r,a+4)},m=new Uint8Array(r.length);else if("fcTL"==t){0!=g&&((E=p.frames[p.frames.length-1]).data=n(p,m.slice(0,g),E.rect.width,E.rect.height),g=0);const e={x:d(r,a+12),y:d(r,a+16),width:d(r,a+4),height:d(r,a+8)};let t=c(r,a+22);t=c(r,a+20)/(0==t?100:t);const o={rect:e,delay:Math.round(1e3*t),dispose:r[a+24],blend:r[a+25]};p.frames.push(o)}else if("fdAT"==t){for(f=0;f<e-4;f++)m[g+f]=r[a+f+4];g+=e-4}else if("pHYs"==t)p.tabs[t]=[s.readUint(r,a),s.readUint(r,a+4),r[a+8]];else if("cHRM"==t)for(p.tabs[t]=[],f=0;f<8;f++)p.tabs[t].push(s.readUint(r,a+4*f));else if("tEXt"==t||"zTXt"==t){null==p.tabs[t]&&(p.tabs[t]={});var S=s.nextZero(r,a),C=s.readASCII(r,a,S-a),b=a+e-S-1;if("tEXt"==t)v=s.readASCII(r,S+1,b);else{var $=o(r.slice(S+2,S+2+b));v=s.readUTF8($,0,$.length)}p.tabs[t][C]=v}else if("iTXt"==t){null==p.tabs[t]&&(p.tabs[t]={}),S=0,y=a,S=s.nextZero(r,y),C=s.readASCII(r,y,S-y);const n=r[y=S+1];var v;r[y+1],y+=2,S=s.nextZero(r,y),s.readASCII(r,y,S-y),y=S+1,S=s.nextZero(r,y),s.readUTF8(r,y,S-y),b=e-((y=S+1)-a),0==n?v=s.readUTF8(r,y,b):($=o(r.slice(y,y+b)),v=s.readUTF8($,0,$.length)),p.tabs[t][C]=v}else if("PLTE"==t)p.tabs[t]=s.readBytes(r,a,e);else if("hIST"==t){const e=p.tabs.PLTE.length/3;for(p.tabs[t]=[],f=0;f<e;f++)p.tabs[t].push(c(r,a+2*f))}else if("tRNS"==t)3==p.ctype?p.tabs[t]=s.readBytes(r,a,e):0==p.ctype?p.tabs[t]=c(r,a):2==p.ctype&&(p.tabs[t]=[c(r,a),c(r,a+2),c(r,a+4)]);else if("gAMA"==t)p.tabs[t]=s.readUint(r,a)/1e5;else if("sRGB"==t)p.tabs[t]=r[a];else if("bKGD"==t)0==p.ctype||4==p.ctype?p.tabs[t]=[c(r,a)]:2==p.ctype||6==p.ctype?p.tabs[t]=[c(r,a),c(r,a+2),c(r,a+4)]:3==p.ctype&&(p.tabs[t]=r[a]);else if("IEND"==t)break;a+=e,s.readUint(r,a),a+=4}var E;return 0!=g&&((E=p.frames[p.frames.length-1]).data=n(p,m.slice(0,g),E.rect.width,E.rect.height)),p.data=n(p,u,p.width,p.height),delete p.compress,delete p.interlace,delete p.filter,p},toRGBA8:function(e){const n=e.width,o=e.height;if(null==e.tabs.acTL)return[t(e.data,n,o,e).buffer];const i=[];null==e.frames[0].data&&(e.frames[0].data=e.data);const r=n*o*4,a=new Uint8Array(r),s=new Uint8Array(r),l=new Uint8Array(r);for(let p=0;p<e.frames.length;p++){const u=e.frames[p],m=u.rect.x,h=u.rect.y,g=u.rect.width,x=u.rect.height,f=t(u.data,g,x,e);if(0!=p)for(var d=0;d<r;d++)l[d]=a[d];if(0==u.blend?c(f,g,x,a,n,o,m,h,0):1==u.blend&&c(f,g,x,a,n,o,m,h,1),i.push(a.buffer.slice(0)),0==u.dispose);else if(1==u.dispose)c(s,g,x,a,n,o,m,h,0);else if(2==u.dispose)for(d=0;d<r;d++)a[d]=l[d]}return i},_paeth:s,_copyTile:c,_bin:e}}();!function(){const{_copyTile:e}=UPNG,{_bin:t}=UPNG,n=UPNG._paeth;var o={table:function(){const e=new Uint32Array(256);for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)1&n?n=3988292384^n>>>1:n>>>=1;e[t]=n}return e}(),update(e,t,n,i){for(let r=0;r<i;r++)e=o.table[255&(e^t[n+r])]^e>>>8;return e},crc:(e,t,n)=>4294967295^o.update(4294967295,e,t,n)};function i(e,t,n,o){t[n]+=e[0]*o>>4,t[n+1]+=e[1]*o>>4,t[n+2]+=e[2]*o>>4,t[n+3]+=e[3]*o>>4}function r(e){return Math.max(0,Math.min(255,e))}function a(e,t){const n=e[0]-t[0],o=e[1]-t[1],i=e[2]-t[2],r=e[3]-t[3];return n*n+o*o+i*i+r*r}function s(e,t,n,o,s,l,c){null==c&&(c=1);const d=o.length,p=[];for(var u=0;u<d;u++){const e=o[u];p.push([e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255])}for(u=0;u<d;u++){let e=4294967295;for(var m=0,h=0;h<d;h++){var g=a(p[u],p[h]);h!=u&&g<e&&(e=g,m=h)}}const x=new Uint32Array(s.buffer),f=new Int16Array(t*n*4),y=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(u=0;u<y.length;u++)y[u]=255*((y[u]+.5)/16-.5);for(let C=0;C<n;C++)for(let s=0;s<t;s++){var S;u=4*(C*t+s),2!=c?S=[r(e[u]+f[u]),r(e[u+1]+f[u+1]),r(e[u+2]+f[u+2]),r(e[u+3]+f[u+3])]:(g=y[4*(3&C)+(3&s)],S=[r(e[u]+g),r(e[u+1]+g),r(e[u+2]+g),r(e[u+3]+g)]),m=0;let b=16777215;for(h=0;h<d;h++){const e=a(S,p[h]);e<b&&(b=e,m=h)}const $=p[m],v=[S[0]-$[0],S[1]-$[1],S[2]-$[2],S[3]-$[3]];1==c&&(s!=t-1&&i(v,f,u+4,7),C!=n-1&&(0!=s&&i(v,f,u+4*t-4,3),i(v,f,u+4*t,5),s!=t-1&&i(v,f,u+4*t+4,1))),l[u>>2]=m,x[u>>2]=o[m]}}function l(e,n,i,r,a){null==a&&(a={});const{crc:s}=o,l=t.writeUint,c=t.writeUshort,d=t.writeASCII;let p=8;const u=e.frames.length>1;let m,h=!1,g=33+(u?20:0);if(null!=a.sRGB&&(g+=13),null!=a.pHYs&&(g+=21),null!=a.iCCP&&(m=pako.deflate(a.iCCP),g+=21+m.length+4),3==e.ctype){for(var x=e.plte.length,f=0;f<x;f++)e.plte[f]>>>24!=255&&(h=!0);g+=8+3*x+4+(h?8+1*x+4:0)}for(var y=0;y<e.frames.length;y++)u&&(g+=38),g+=($=e.frames[y]).cimg.length+12,0!=y&&(g+=4);g+=12;const S=new Uint8Array(g),C=[137,80,78,71,13,10,26,10];for(f=0;f<8;f++)S[f]=C[f];if(l(S,p,13),p+=4,d(S,p,"IHDR"),p+=4,l(S,p,n),p+=4,l(S,p,i),p+=4,S[p]=e.depth,p++,S[p]=e.ctype,p++,S[p]=0,p++,S[p]=0,p++,S[p]=0,p++,l(S,p,s(S,p-17,17)),p+=4,null!=a.sRGB&&(l(S,p,1),p+=4,d(S,p,"sRGB"),p+=4,S[p]=a.sRGB,p++,l(S,p,s(S,p-5,5)),p+=4),null!=a.iCCP){const e=13+m.length;l(S,p,e),p+=4,d(S,p,"iCCP"),p+=4,d(S,p,"ICC profile"),p+=11,p+=2,S.set(m,p),p+=m.length,l(S,p,s(S,p-(e+4),e+4)),p+=4}if(null!=a.pHYs&&(l(S,p,9),p+=4,d(S,p,"pHYs"),p+=4,l(S,p,a.pHYs[0]),p+=4,l(S,p,a.pHYs[1]),p+=4,S[p]=a.pHYs[2],p++,l(S,p,s(S,p-13,13)),p+=4),u&&(l(S,p,8),p+=4,d(S,p,"acTL"),p+=4,l(S,p,e.frames.length),p+=4,l(S,p,null!=a.loop?a.loop:0),p+=4,l(S,p,s(S,p-12,12)),p+=4),3==e.ctype){for(l(S,p,3*(x=e.plte.length)),p+=4,d(S,p,"PLTE"),p+=4,f=0;f<x;f++){const t=3*f,n=e.plte[f],o=255&n,i=n>>>8&255,r=n>>>16&255;S[p+t+0]=o,S[p+t+1]=i,S[p+t+2]=r}if(p+=3*x,l(S,p,s(S,p-3*x-4,3*x+4)),p+=4,h){for(l(S,p,x),p+=4,d(S,p,"tRNS"),p+=4,f=0;f<x;f++)S[p+f]=e.plte[f]>>>24&255;p+=x,l(S,p,s(S,p-x-4,x+4)),p+=4}}let b=0;for(y=0;y<e.frames.length;y++){var $=e.frames[y];u&&(l(S,p,26),p+=4,d(S,p,"fcTL"),p+=4,l(S,p,b++),p+=4,l(S,p,$.rect.width),p+=4,l(S,p,$.rect.height),p+=4,l(S,p,$.rect.x),p+=4,l(S,p,$.rect.y),p+=4,c(S,p,r[y]),p+=2,c(S,p,1e3),p+=2,S[p]=$.dispose,p++,S[p]=$.blend,p++,l(S,p,s(S,p-30,30)),p+=4);const t=$.cimg;l(S,p,(x=t.length)+(0==y?0:4)),p+=4;const n=p;d(S,p,0==y?"IDAT":"fdAT"),p+=4,0!=y&&(l(S,p,b++),p+=4),S.set(t,p),p+=x,l(S,p,s(S,n,p-n)),p+=4}return l(S,p,0),p+=4,d(S,p,"IEND"),p+=4,l(S,p,s(S,p-4,4)),p+=4,S.buffer}function c(e,t,n){for(let o=0;o<e.frames.length;o++){const i=e.frames[o];i.rect.width;const r=i.rect.height,a=new Uint8Array(r*i.bpl+r);i.cimg=m(i.img,r,i.bpp,i.bpl,a,t,n)}}function d(t,n,o,i,r){const a=r[0],l=r[1],c=r[2],d=r[3],m=r[4],h=r[5];let x=6,f=8,y=255;for(var S=0;S<t.length;S++){const e=new Uint8Array(t[S]);for(var C=e.length,b=0;b<C;b+=4)y&=e[b+3]}const $=255!=y,v=function(t,n,o,i,r,a){const s=[];for(var l=0;l<t.length;l++){const p=new Uint8Array(t[l]),m=new Uint32Array(p.buffer);var c;let g=0,x=0,f=n,y=o,S=i?1:0;if(0!=l){const C=a||i||1==l||0!=s[l-2].dispose?1:2;let b=0,$=1e9;for(let e=0;e<C;e++){var d=new Uint8Array(t[l-1-e]);const i=new Uint32Array(t[l-1-e]);let a=n,s=o,c=-1,p=-1;for(let e=0;e<o;e++)for(let t=0;t<n;t++)m[h=e*n+t]!=i[h]&&(t<a&&(a=t),t>c&&(c=t),e<s&&(s=e),e>p&&(p=e));-1==c&&(a=s=c=p=0),r&&(!(1&~a)&&a--,!(1&~s)&&s--);const u=(c-a+1)*(p-s+1);u<$&&($=u,b=e,g=a,x=s,f=c-a+1,y=p-s+1)}d=new Uint8Array(t[l-1-b]),1==b&&(s[l-1].dispose=2),c=new Uint8Array(f*y*4),e(d,n,o,c,f,y,-g,-x,0),S=e(p,n,o,c,f,y,-g,-x,3)?1:0,1==S?u(p,n,o,c,{x:g,y:x,width:f,height:y}):e(p,n,o,c,f,y,-g,-x,0)}else c=p.slice(0);s.push({rect:{x:g,y:x,width:f,height:y},img:c,blend:S,dispose:0})}if(i)for(l=0;l<s.length;l++){if(1==(g=s[l]).blend)continue;const e=g.rect,i=s[l-1].rect,a=Math.min(e.x,i.x),c=Math.min(e.y,i.y),d={x:a,y:c,width:Math.max(e.x+e.width,i.x+i.width)-a,height:Math.max(e.y+e.height,i.y+i.height)-c};s[l-1].dispose=1,l-1!=0&&p(t,n,o,s,l-1,d,r),p(t,n,o,s,l,d,r)}let m=0;if(1!=t.length)for(var h=0;h<s.length;h++){var g;m+=(g=s[h]).rect.width*g.rect.height}return s}(t,n,o,a,l,c),E={},A=[],w=[];if(0!=i){const e=[];for(b=0;b<v.length;b++)e.push(v[b].img.buffer);const t=g(function(e){let t=0;for(var n=0;n<e.length;n++)t+=e[n].byteLength;const o=new Uint8Array(t);let i=0;for(n=0;n<e.length;n++){const t=new Uint8Array(e[n]),r=t.length;for(let e=0;e<r;e+=4){let n=t[e],r=t[e+1],a=t[e+2];const s=t[e+3];0==s&&(n=r=a=0),o[i+e]=n,o[i+e+1]=r,o[i+e+2]=a,o[i+e+3]=s}i+=r}return o.buffer}(e),i);for(b=0;b<t.plte.length;b++)A.push(t.plte[b].est.rgba);let n=0;for(b=0;b<v.length;b++){const e=(j=v[b]).img.length;var R=new Uint8Array(t.inds.buffer,n>>2,e>>2);w.push(R);const o=new Uint8Array(t.abuf,n,e);h&&s(j.img,j.rect.width,j.rect.height,A,o,R),j.img.set(o),n+=e}}else for(S=0;S<v.length;S++){var j=v[S];const e=new Uint32Array(j.img.buffer);var T=j.rect.width;for(C=e.length,R=new Uint8Array(C),w.push(R),b=0;b<C;b++){const t=e[b];if(0!=b&&t==e[b-1])R[b]=R[b-1];else if(b>T&&t==e[b-T])R[b]=R[b-T];else{let e=E[t];if(null==e&&(E[t]=e=A.length,A.push(t),A.length>=300))break;R[b]=e}}}const I=A.length;for(I<=256&&0==m&&(f=I<=2?1:I<=4?2:I<=16?4:8,f=Math.max(f,d)),S=0;S<v.length;S++){(j=v[S]).rect.x,j.rect.y,T=j.rect.width;const e=j.rect.height;let t=j.img;new Uint32Array(t.buffer);let n=4*T,o=4;if(I<=256&&0==m){n=Math.ceil(f*T/8);var k=new Uint8Array(n*e);const i=w[S];for(let t=0;t<e;t++){b=t*n;const e=t*T;if(8==f)for(var L=0;L<T;L++)k[b+L]=i[e+L];else if(4==f)for(L=0;L<T;L++)k[b+(L>>1)]|=i[e+L]<<4-4*(1&L);else if(2==f)for(L=0;L<T;L++)k[b+(L>>2)]|=i[e+L]<<6-2*(3&L);else if(1==f)for(L=0;L<T;L++)k[b+(L>>3)]|=i[e+L]<<7-1*(7&L)}t=k,x=3,o=1}else if(0==$&&1==v.length){k=new Uint8Array(T*e*3);const i=T*e;for(b=0;b<i;b++){const e=3*b,n=4*b;k[e]=t[n],k[e+1]=t[n+1],k[e+2]=t[n+2]}t=k,x=2,o=3,n=3*T}j.img=t,j.bpl=n,j.bpp=o}return{ctype:x,depth:f,plte:A,frames:v}}function p(t,n,o,i,r,a,s){const l=Uint8Array,c=Uint32Array,d=new l(t[r-1]),p=new c(t[r-1]),m=r+1<t.length?new l(t[r+1]):null,h=new l(t[r]),g=new c(h.buffer);let x=n,f=o,y=-1,S=-1;for(let e=0;e<a.height;e++)for(let t=0;t<a.width;t++){const o=a.x+t,s=a.y+e,l=s*n+o,c=g[l];0==c||0==i[r-1].dispose&&p[l]==c&&(null==m||0!=m[4*l+3])||(o<x&&(x=o),o>y&&(y=o),s<f&&(f=s),s>S&&(S=s))}-1==y&&(x=f=y=S=0),s&&(!(1&~x)&&x--,!(1&~f)&&f--),a={x:x,y:f,width:y-x+1,height:S-f+1};const C=i[r];C.rect=a,C.blend=1,C.img=new Uint8Array(a.width*a.height*4),0==i[r-1].dispose?(e(d,n,o,C.img,a.width,a.height,-a.x,-a.y,0),u(h,n,o,C.img,a)):e(h,n,o,C.img,a.width,a.height,-a.x,-a.y,0)}function u(t,n,o,i,r){e(t,n,o,i,r.width,r.height,-r.x,-r.y,2)}function m(e,t,n,o,i,r,a){const s=[];let l,c=[0,1,2,3,4];-1!=r?c=[r]:(t*o>5e5||1==n)&&(c=[0]),a&&(l={level:0});const d=UZIP;for(var p=0;p<c.length;p++){for(let r=0;r<t;r++)h(i,e,r,o,n,c[p]);s.push(d.deflate(i,l))}let u,m=1e9;for(p=0;p<s.length;p++)s[p].length<m&&(u=p,m=s[p].length);return s[u]}function h(e,t,o,i,r,a){const s=o*i;let l=s+o;if(e[l]=a,l++,0==a)if(i<500)for(var c=0;c<i;c++)e[l+c]=t[s+c];else e.set(new Uint8Array(t.buffer,s,i),l);else if(1==a){for(c=0;c<r;c++)e[l+c]=t[s+c];for(c=r;c<i;c++)e[l+c]=t[s+c]-t[s+c-r]+256&255}else if(0==o){for(c=0;c<r;c++)e[l+c]=t[s+c];if(2==a)for(c=r;c<i;c++)e[l+c]=t[s+c];if(3==a)for(c=r;c<i;c++)e[l+c]=t[s+c]-(t[s+c-r]>>1)+256&255;if(4==a)for(c=r;c<i;c++)e[l+c]=t[s+c]-n(t[s+c-r],0,0)+256&255}else{if(2==a)for(c=0;c<i;c++)e[l+c]=t[s+c]+256-t[s+c-i]&255;if(3==a){for(c=0;c<r;c++)e[l+c]=t[s+c]+256-(t[s+c-i]>>1)&255;for(c=r;c<i;c++)e[l+c]=t[s+c]+256-(t[s+c-i]+t[s+c-r]>>1)&255}if(4==a){for(c=0;c<r;c++)e[l+c]=t[s+c]+256-n(0,t[s+c-i],0)&255;for(c=r;c<i;c++)e[l+c]=t[s+c]+256-n(t[s+c-r],t[s+c-i],t[s+c-r-i])&255}}}function g(e,t){const n=new Uint8Array(e),o=n.slice(0),i=new Uint32Array(o.buffer),r=x(o,t),a=r[0],s=r[1],l=n.length,c=new Uint8Array(l>>2);let d;if(n.length<2e7)for(var p=0;p<l;p+=4)d=f(a,u=n[p]*(1/255),m=n[p+1]*(1/255),h=n[p+2]*(1/255),g=n[p+3]*(1/255)),c[p>>2]=d.ind,i[p>>2]=d.est.rgba;else for(p=0;p<l;p+=4){var u=n[p]*(1/255),m=n[p+1]*(1/255),h=n[p+2]*(1/255),g=n[p+3]*(1/255);for(d=a;d.left;)d=y(d.est,u,m,h,g)<=0?d.left:d.right;c[p>>2]=d.ind,i[p>>2]=d.est.rgba}return{abuf:o.buffer,inds:c,plte:s}}function x(e,t,n){null==n&&(n=1e-4);const o=new Uint32Array(e.buffer),i={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};i.bst=b(e,i.i0,i.i1),i.est=$(i.bst);const r=[i];for(;r.length<t;){let t=0,i=0;for(var a=0;a<r.length;a++)r[a].est.L>t&&(t=r[a].est.L,i=a);if(t<n)break;const s=r[i],l=S(e,o,s.i0,s.i1,s.est.e,s.est.eMq255);if(s.i0>=l||s.i1<=l){s.est.L=0;continue}const c={i0:s.i0,i1:l,bst:null,est:null,tdst:0,left:null,right:null};c.bst=b(e,c.i0,c.i1),c.est=$(c.bst);const d={i0:l,i1:s.i1,bst:null,est:null,tdst:0,left:null,right:null};for(d.bst={R:[],m:[],N:s.bst.N-c.bst.N},a=0;a<16;a++)d.bst.R[a]=s.bst.R[a]-c.bst.R[a];for(a=0;a<4;a++)d.bst.m[a]=s.bst.m[a]-c.bst.m[a];d.est=$(d.bst),s.left=c,s.right=d,r[i]=c,r.push(d)}for(r.sort((e,t)=>t.bst.N-e.bst.N),a=0;a<r.length;a++)r[a].ind=a;return[i,r]}function f(e,t,n,o,i){if(null==e.left)return e.tdst=function(e,t,n,o,i){const r=t-e[0],a=n-e[1],s=o-e[2],l=i-e[3];return r*r+a*a+s*s+l*l}(e.est.q,t,n,o,i),e;const r=y(e.est,t,n,o,i);let a=e.left,s=e.right;r>0&&(a=e.right,s=e.left);const l=f(a,t,n,o,i);if(l.tdst<=r*r)return l;const c=f(s,t,n,o,i);return c.tdst<l.tdst?c:l}function y(e,t,n,o,i){const{e:r}=e;return r[0]*t+r[1]*n+r[2]*o+r[3]*i-e.eMq}function S(e,t,n,o,i,r){for(o-=4;n<o;){for(;C(e,n,i)<=r;)n+=4;for(;C(e,o,i)>r;)o-=4;if(n>=o)break;const a=t[n>>2];t[n>>2]=t[o>>2],t[o>>2]=a,n+=4,o-=4}for(;C(e,n,i)>r;)n-=4;return n+4}function C(e,t,n){return e[t]*n[0]+e[t+1]*n[1]+e[t+2]*n[2]+e[t+3]*n[3]}function b(e,t,n){const o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],r=n-t>>2;for(let a=t;a<n;a+=4){const t=e[a]*(1/255),n=e[a+1]*(1/255),r=e[a+2]*(1/255),s=e[a+3]*(1/255);i[0]+=t,i[1]+=n,i[2]+=r,i[3]+=s,o[0]+=t*t,o[1]+=t*n,o[2]+=t*r,o[3]+=t*s,o[5]+=n*n,o[6]+=n*r,o[7]+=n*s,o[10]+=r*r,o[11]+=r*s,o[15]+=s*s}return o[4]=o[1],o[8]=o[2],o[9]=o[6],o[12]=o[3],o[13]=o[7],o[14]=o[11],{R:o,m:i,N:r}}function $(e){const{R:t}=e,{m:n}=e,{N:o}=e,i=n[0],r=n[1],a=n[2],s=n[3],l=0==o?0:1/o,c=[t[0]-i*i*l,t[1]-i*r*l,t[2]-i*a*l,t[3]-i*s*l,t[4]-r*i*l,t[5]-r*r*l,t[6]-r*a*l,t[7]-r*s*l,t[8]-a*i*l,t[9]-a*r*l,t[10]-a*a*l,t[11]-a*s*l,t[12]-s*i*l,t[13]-s*r*l,t[14]-s*a*l,t[15]-s*s*l],d=c,p=v;let u=[Math.random(),Math.random(),Math.random(),Math.random()],m=0,h=0;if(0!=o)for(let x=0;x<16&&(u=p.multVec(d,u),h=Math.sqrt(p.dot(u,u)),u=p.sml(1/h,u),!(0!=x&&Math.abs(h-m)<1e-9));x++)m=h;const g=[i*l,r*l,a*l,s*l];return{Cov:c,q:g,e:u,L:m,eMq255:p.dot(p.sml(255,g),u),eMq:p.dot(u,g),rgba:(Math.round(255*g[3])<<24|Math.round(255*g[2])<<16|Math.round(255*g[1])<<8|Math.round(255*g[0]))>>>0}}var v={multVec:(e,t)=>[e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],e[4]*t[0]+e[5]*t[1]+e[6]*t[2]+e[7]*t[3],e[8]*t[0]+e[9]*t[1]+e[10]*t[2]+e[11]*t[3],e[12]*t[0]+e[13]*t[1]+e[14]*t[2]+e[15]*t[3]],dot:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],sml:(e,t)=>[e*t[0],e*t[1],e*t[2],e*t[3]]};UPNG.encode=function(e,t,n,o,i,r,a){null==o&&(o=0),null==a&&(a=!1);const s=d(e,t,n,o,[!1,!1,!1,0,a,!1]);return c(s,-1),l(s,t,n,i,r)},UPNG.encodeLL=function(e,t,n,o,i,r,a,s){const d={ctype:0+(1==o?0:2)+(0==i?0:4),depth:r,frames:[]},p=(o+i)*r,u=p*t;for(let l=0;l<e.length;l++)d.frames.push({rect:{x:0,y:0,width:t,height:n},img:new Uint8Array(e[l]),blend:0,dispose:1,bpp:Math.ceil(p/8),bpl:Math.ceil(u/8)});return c(d,0,!0),l(d,t,n,a,s)},UPNG.encode.compress=d,UPNG.encode.dither=s,UPNG.quantize=g,UPNG.quantize.getKDtree=x,UPNG.quantize.getNearest=f}();const r={toArrayBuffer(e,t){const n=e.width,o=e.height,i=n<<2,a=e.getContext("2d").getImageData(0,0,n,o),s=new Uint32Array(a.data.buffer),l=(32*n+31)/32<<2,c=l*o,d=122+c,p=new ArrayBuffer(d),u=new DataView(p),m=1<<20;let h,g,x,f,y=m,S=0,C=0,b=0;function $(e){u.setUint16(C,e,!0),C+=2}function v(e){u.setUint32(C,e,!0),C+=4}function E(e){C+=e}$(19778),v(d),E(4),v(122),v(108),v(n),v(-o>>>0),$(1),$(32),v(3),v(c),v(2835),v(2835),E(8),v(16711680),v(65280),v(255),v(4278190080),v(1466527264),function e(){for(;S<o&&y>0;){for(f=122+S*l,h=0;h<i;)y--,g=s[b++],x=g>>>24,u.setUint32(f+h,g<<8|x),h+=4;S++}b<s.length?(y=m,setTimeout(e,r._dly)):t(p)}()},toBlob(e,t){this.toArrayBuffer(e,e=>{t(new Blob([e],{type:"image/bmp"}))})},_dly:9};var i={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},o={[i.CHROME]:16384,[i.FIREFOX]:11180,[i.DESKTOP_SAFARI]:16384,[i.IE]:8192,[i.IOS]:4096,[i.ETC]:8192};const a="undefined"!=typeof window,s="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,f=a&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),CustomFile=(a||s)&&(f&&f.getOriginalSymbol(window,"File")||"undefined"!=typeof File&&File),CustomFileReader=(a||s)&&(f&&f.getOriginalSymbol(window,"FileReader")||"undefined"!=typeof FileReader&&FileReader);function getFilefromDataUrl(e,t,n=Date.now()){return new Promise(o=>{const i=e.split(","),r=i[0].match(/:(.*?);/)[1],a=globalThis.atob(i[1]);let s=a.length;const l=new Uint8Array(s);for(;s--;)l[s]=a.charCodeAt(s);const c=new Blob([l],{type:r});c.name=t,c.lastModified=n,o(c)})}function getDataUrlFromFile(e){return new Promise((t,n)=>{const o=new CustomFileReader;o.onload=()=>t(o.result),o.onerror=e=>n(e),o.readAsDataURL(e)})}function loadImage(e){return new Promise((t,n)=>{const o=new Image;o.onload=()=>t(o),o.onerror=e=>n(e),o.src=e})}function getBrowserName(){if(void 0!==getBrowserName.cachedResult)return getBrowserName.cachedResult;let e=i.ETC;const{userAgent:t}=navigator;return/Chrom(e|ium)/i.test(t)?e=i.CHROME:/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)?e=i.IOS:/Safari/i.test(t)?e=i.DESKTOP_SAFARI:/Firefox/i.test(t)?e=i.FIREFOX:(/MSIE/i.test(t)||1==!!document.documentMode)&&(e=i.IE),getBrowserName.cachedResult=e,getBrowserName.cachedResult}function approximateBelowMaximumCanvasSizeOfBrowser(e,t){const n=getBrowserName(),i=o[n];let r=e,a=t,s=r*a;const l=r>a?a/r:r/a;for(;s>i*i;){const e=(i+r)/2,t=(i+a)/2;e<t?(a=t,r=t*l):(a=e*l,r=e),s=r*a}return{width:r,height:a}}function getNewCanvasAndCtx(e,t){let n,o;try{if(n=new OffscreenCanvas(e,t),o=n.getContext("2d"),null===o)throw new Error("getContext of OffscreenCanvas returns null")}catch(i){n=document.createElement("canvas"),o=n.getContext("2d")}return n.width=e,n.height=t,[n,o]}function drawImageInCanvas(e,t){const{width:n,height:o}=approximateBelowMaximumCanvasSizeOfBrowser(e.width,e.height),[i,r]=getNewCanvasAndCtx(n,o);return t&&/jpe?g/.test(t)&&(r.fillStyle="white",r.fillRect(0,0,i.width,i.height)),r.drawImage(e,0,0,i.width,i.height),i}function isIOS(){return void 0!==isIOS.cachedResult||(isIOS.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"undefined"!=typeof document&&"ontouchend"in document),isIOS.cachedResult}function drawFileInCanvas(e,t={}){return new Promise(function(n,o){let r,a;var s=function(){try{return a=drawImageInCanvas(r,t.fileType||e.type),n([r,a])}catch(i){return o(i)}},l=function(t){try{var n=function(e){try{throw e}catch(t){return o(t)}};try{let t;return getDataUrlFromFile(e).then(function(e){try{return t=e,loadImage(t).then(function(e){try{return r=e,function(){try{return s()}catch(e){return o(e)}}()}catch(t){return n(t)}},n)}catch(i){return n(i)}},n)}catch(i){n(i)}}catch(i){return o(i)}};try{if(isIOS()||[i.DESKTOP_SAFARI,i.MOBILE_SAFARI].includes(getBrowserName()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(e).then(function(e){try{return r=e,s()}catch(t){return l()}},l)}catch(c){l()}})}function canvasToFile(e,t,n,o,i=1){return new Promise(function(a,s){let l;if("image/png"===t){let r,a,s;return r=e.getContext("2d"),({data:a}=r.getImageData(0,0,e.width,e.height)),s=UPNG.encode([a.buffer],e.width,e.height,4096*i),l=new Blob([s],{type:t}),l.name=n,l.lastModified=o,c.call(this)}{let a=function(){return c.call(this)};if("image/bmp"===t)return new Promise(t=>r.toBlob(e,t)).then(function(e){try{return l=e,l.name=n,l.lastModified=o,a.call(this)}catch(t){return s(t)}}.bind(this),s);{let r=function(){return a.call(this)};if("function"==typeof OffscreenCanvas&&e instanceof OffscreenCanvas)return e.convertToBlob({type:t,quality:i}).then(function(e){try{return l=e,l.name=n,l.lastModified=o,r.call(this)}catch(t){return s(t)}}.bind(this),s);{let a;return a=e.toDataURL(t,i),getFilefromDataUrl(a,n,o).then(function(e){try{return l=e,r.call(this)}catch(t){return s(t)}}.bind(this),s)}}}function c(){return a(l)}})}function cleanupCanvasMemory(e){e.width=0,e.height=0}function isAutoOrientationInBrowser(){return new Promise(function(e,t){let n,o,i,r;return void 0!==isAutoOrientationInBrowser.cachedResult?e(isAutoOrientationInBrowser.cachedResult):getFilefromDataUrl("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then(function(a){try{return n=a,drawFileInCanvas(n).then(function(a){try{return o=a[1],canvasToFile(o,n.type,n.name,n.lastModified).then(function(n){try{return i=n,cleanupCanvasMemory(o),drawFileInCanvas(i).then(function(n){try{return r=n[0],isAutoOrientationInBrowser.cachedResult=1===r.width&&2===r.height,e(isAutoOrientationInBrowser.cachedResult)}catch(o){return t(o)}},t)}catch(a){return t(a)}},t)}catch(s){return t(s)}},t)}catch(s){return t(s)}},t)})}function getExifOrientation(e){return new Promise((t,n)=>{const o=new CustomFileReader;o.onload=e=>{const n=new DataView(e.target.result);if(65496!=n.getUint16(0,!1))return t(-2);const o=n.byteLength;let i=2;for(;i<o;){if(n.getUint16(i+2,!1)<=8)return t(-1);const e=n.getUint16(i,!1);if(i+=2,65505==e){if(1165519206!=n.getUint32(i+=2,!1))return t(-1);const e=18761==n.getUint16(i+=6,!1);i+=n.getUint32(i+4,e);const o=n.getUint16(i,e);i+=2;for(let r=0;r<o;r++)if(274==n.getUint16(i+12*r,e))return t(n.getUint16(i+12*r+8,e))}else{if(65280&~e)break;i+=n.getUint16(i,!1)}}return t(-1)},o.onerror=e=>n(e),o.readAsArrayBuffer(e)})}function handleMaxWidthOrHeight(e,t){const{width:n}=e,{height:o}=e,{maxWidthOrHeight:i}=t;let r,a=e;return isFinite(i)&&(n>i||o>i)&&([a,r]=getNewCanvasAndCtx(n,o),n>o?(a.width=i,a.height=o/n*i):(a.width=n/o*i,a.height=i),r.drawImage(e,0,0,a.width,a.height),cleanupCanvasMemory(e)),a}function followExifOrientation(e,t){const{width:n}=e,{height:o}=e,[i,r]=getNewCanvasAndCtx(n,o);switch(t>4&&t<9?(i.width=o,i.height=n):(i.width=n,i.height=o),t){case 2:r.transform(-1,0,0,1,n,0);break;case 3:r.transform(-1,0,0,-1,n,o);break;case 4:r.transform(1,0,0,-1,0,o);break;case 5:r.transform(0,1,1,0,0,0);break;case 6:r.transform(0,1,-1,0,o,0);break;case 7:r.transform(0,-1,-1,0,o,n);break;case 8:r.transform(0,-1,1,0,0,n)}return r.drawImage(e,0,0,n,o),cleanupCanvasMemory(e),i}function compress(e,t,n=0){return new Promise(function(o,i){let r,a,s,l,c,d,p,u,m,h,g,x,f,y,S,C,b,$,v,E;function A(e=5){if(t.signal&&t.signal.aborted)throw t.signal.reason;r+=e,t.onProgress(Math.min(r,100))}function w(e){if(t.signal&&t.signal.aborted)throw t.signal.reason;r=Math.min(Math.max(e,r),100),t.onProgress(r)}return r=n,a=t.maxIteration||10,s=1024*t.maxSizeMB*1024,A(),drawFileInCanvas(e,t).then(function(n){try{return[,l]=n,A(),c=handleMaxWidthOrHeight(l,t),A(),new Promise(function(n,o){var i;if(!(i=t.exifOrientation))return getExifOrientation(e).then(function(e){try{return i=e,r.call(this)}catch(t){return o(t)}}.bind(this),o);function r(){return n(i)}return r.call(this)}).then(function(n){try{return d=n,A(),isAutoOrientationInBrowser().then(function(n){try{return p=n?c:followExifOrientation(c,d),A(),u=t.initialQuality||1,m=t.fileType||e.type,canvasToFile(p,m,e.name,e.lastModified,u).then(function(n){try{{let d=function(){if(a--&&(S>s||S>f)){let t,n;return t=E?.95*v.width:v.width,n=E?.95*v.height:v.height,[b,$]=getNewCanvasAndCtx(t,n),$.drawImage(v,0,0,t,n),u*="image/png"===m?.85:.95,canvasToFile(b,m,e.name,e.lastModified,u).then(function(e){try{return C=e,cleanupCanvasMemory(v),v=b,S=C.size,w(Math.min(99,Math.floor((y-S)/(y-s)*100))),d}catch(t){return i(t)}},i)}return[1]},R=function(){return cleanupCanvasMemory(v),cleanupCanvasMemory(b),cleanupCanvasMemory(c),cleanupCanvasMemory(p),cleanupCanvasMemory(l),w(100),o(C)};return h=n,A(),g=h.size>s,x=h.size>e.size,g||x?(f=e.size,y=h.size,S=y,v=p,E=!t.alwaysKeepResolution&&g,(r=function(e){for(;e;){if(e.then)return void e.then(r,i);try{if(e.pop){if(e.length)return e.pop()?R.call(this):e;e=d}else e=e.call(this)}catch(t){return i(t)}}}.bind(this))(d)):(w(100),o(h));var r}}catch(d){return i(d)}}.bind(this),i)}catch(r){return i(r)}}.bind(this),i)}catch(r){return i(r)}}.bind(this),i)}catch(r){return i(r)}}.bind(this),i)})}const l="\nlet scriptImported = false\nself.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\n' + e.stack, id })\n }\n})\n";let c;function compressOnWebWorker(e,t){return new Promise((n,o)=>{c||(c=function(e){const t=[];return t.push(e),URL.createObjectURL(new Blob(t))}(l));const i=new Worker(c);i.addEventListener("message",function(e){if(t.signal&&t.signal.aborted)i.terminate();else if(void 0===e.data.progress){if(e.data.error)return o(new Error(e.data.error)),void i.terminate();n(e.data.file),i.terminate()}else t.onProgress(e.data.progress)}),i.addEventListener("error",o),t.signal&&t.signal.addEventListener("abort",()=>{o(t.signal.reason),i.terminate()}),i.postMessage({file:e,imageCompressionLibUrl:t.libURL,options:{...t,onProgress:void 0,signal:void 0}})})}function imageCompression(e,t){return new Promise(function(n,o){let i,r,a,s,l,c;if(i={...t},a=0,({onProgress:s}=i),i.maxSizeMB=i.maxSizeMB||Number.POSITIVE_INFINITY,l="boolean"!=typeof i.useWebWorker||i.useWebWorker,delete i.useWebWorker,i.onProgress=e=>{a=e,"function"==typeof s&&s(a)},!(e instanceof Blob||e instanceof CustomFile))return o(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return o(new Error("The file given is not an image"));if(c="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,!l||"function"!=typeof Worker||c)return compress(e,i).then(function(e){try{return r=e,u.call(this)}catch(t){return o(t)}}.bind(this),o);var d=function(){try{return u.call(this)}catch(e){return o(e)}}.bind(this),p=function(t){try{return compress(e,i).then(function(e){try{return r=e,d()}catch(t){return o(t)}},o)}catch(n){return o(n)}};try{return i.libURL=i.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",compressOnWebWorker(e,i).then(function(e){try{return r=e,d()}catch(t){return p()}},p)}catch(m){p()}function u(){try{r.name=e.name,r.lastModified=e.lastModified}catch(m){}try{i.preserveExif&&"image/jpeg"===e.type&&(!i.fileType||i.fileType&&i.fileType===e.type)&&(r=copyExifWithoutOrientation(e,r))}catch(m){}return n(r)}})}imageCompression.getDataUrlFromFile=getDataUrlFromFile,imageCompression.getFilefromDataUrl=getFilefromDataUrl,imageCompression.loadImage=loadImage,imageCompression.drawImageInCanvas=drawImageInCanvas,imageCompression.drawFileInCanvas=drawFileInCanvas,imageCompression.canvasToFile=canvasToFile,imageCompression.getExifOrientation=getExifOrientation,imageCompression.handleMaxWidthOrHeight=handleMaxWidthOrHeight,imageCompression.followExifOrientation=followExifOrientation,imageCompression.cleanupCanvasMemory=cleanupCanvasMemory,imageCompression.isAutoOrientationInBrowser=isAutoOrientationInBrowser,imageCompression.approximateBelowMaximumCanvasSizeOfBrowser=approximateBelowMaximumCanvasSizeOfBrowser,imageCompression.copyExifWithoutOrientation=copyExifWithoutOrientation,imageCompression.getBrowserName=getBrowserName,imageCompression.version="2.0.2";const PDF_MIME_TYPE$1="application/pdf",imageCompressionAcceptableFileTypes=["image/jpg","image/jpeg","image/png","image/webp","image/bmp"],RECEIPT_IMAGE_COMPRESSION_OPTIONS={useWebWorker:!0,maxWidthOrHeight:1920,initialQuality:.92,maxSizeMB:2},handleImageCompression=async(e,t)=>{if(!1===imageCompressionAcceptableFileTypes.includes(e.type))return e;const n=await imageCompression(e,{useWebWorker:!0,maxWidthOrHeight:900,initialQuality:1,maxSizeMB:1.4}),o=n.lastModified,i=n.type.split("/")[1];let r=`image_${o}.${i}`;null!=t&&(r=`${t}.${i}`);return new File([n],r,{lastModified:o,type:n.type})},compressImageForReceipt=async(e,t)=>{if(!1===imageCompressionAcceptableFileTypes.includes(e.type))return e;const n=await imageCompression(e,RECEIPT_IMAGE_COMPRESSION_OPTIONS),o=n.type.split("/")[1],i=t.replace(/\.[^.]+$/,"")||"image";return new File([n],`${i}.${o}`,{lastModified:e.lastModified,type:n.type})},PDF_RENDER_SCALE=1.5,PDF_JPEG_QUALITY=.7;function canvasToJpegBlob(e,t){return new Promise((n,o)=>{e.toBlob(e=>{null!=e?n(e):o(new Error("canvas.toBlob returned null"))},"image/jpeg",t)})}async function renderPageToJpeg(e,t,n){const o=e.getViewport({scale:t}),i=document.createElement("canvas");i.width=Math.floor(o.width),i.height=Math.floor(o.height);const r=i.getContext("2d");if(null==r)throw new Error("Could not get canvas 2d context");await e.render({canvasContext:r,viewport:o}).promise;return(await canvasToJpegBlob(i,n)).arrayBuffer()}async function compressPdfForReceipt(e,t){const[{PDFDocument:n},o]=await Promise.all([Promise.resolve().then(()=>require("./index-pxCLEu5F.cjs")),Promise.resolve().then(()=>index$2).then(e=>e.pdfjs)]),i=await e.arrayBuffer(),r=await o.getDocument({data:new Uint8Array(i)}).promise,a=r.numPages,s=await n.create();for(let d=1;d<=a;d++){const e=await r.getPage(d),t=await renderPageToJpeg(e,PDF_RENDER_SCALE,PDF_JPEG_QUALITY),n=await s.embedJpg(new Uint8Array(t)),o=n.scale(1);s.addPage([o.width,o.height]).drawImage(n,{x:0,y:0,width:o.width,height:o.height})}const l=await s.save(),c=t.toLowerCase().endsWith(".pdf")?t:`${t}.pdf`;return new File([l],c,{type:PDF_MIME_TYPE$1,lastModified:e.lastModified})}async function compressSingleFile(e,t){const n=e instanceof File?e:new File([e],t,{type:e.type});if(e.type===PDF_MIME_TYPE$1){const o=await compressPdfForReceipt(n,t);return o.size<n.size?{blob:o,name:o.name}:{blob:e,name:t}}const o=await compressImageForReceipt(n,t);return{blob:o,name:o.name}}async function compressReceiptFiles(e,t){const n=await Promise.all(e.map((e,n)=>{const o=t[n]??`file_${n}`;return compressSingleFile(e,o).catch(t=>(console.warn("[compressReceiptFiles] compression failed, using original:",t instanceof Error?t.message:t),{blob:e,name:o}))}));return{blobs:n.map(e=>e.blob),names:n.map(e=>e.name)}}const InputElementMobileCamera=({fileType:e="file",fileRef:t,name:n,value:o="",multiple:i=!1,acceptableTypes:r,onFileSizeError:a,onImageChange:s})=>jsxRuntimeExports.jsx("input",{type:e,ref:t,name:n,value:o,size:1e3,"data-testid":generateDataTestId("input-file-element-mobile",n),onChange:async e=>{const t=e.target.files?.[0],n=t?.size;null!=t&&null!=n?(a?.(!1),s(t),e.target.value=""):(a?.(!0),e.target.value="")},style:{display:"none"},accept:`${(r??"image/jpg, image/jpeg").toString()}`,multiple:i,capture:!0}),MoneyTransferSuccessAnimation=({shouldDisplay:e,width:t=30,height:n=30,styles:o,animationInLoop:i=!1})=>{const[,r]=useMusic(SUCCESS_SOUND_SOURCE),[a]=useAnimation("MoneyTransferSuccess");return React.useEffect(()=>{e&&r(!0)},[e,r]),e&&null!=a?jsxRuntimeExports.jsx(Lottie,{style:{width:t,height:n,...o},play:!0,animationData:a,loop:i,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}}):null};var browserPonyfill={exports:{}},hasRequiredBrowserPonyfill;function requireBrowserPonyfill(){return hasRequiredBrowserPonyfill||(hasRequiredBrowserPonyfill=1,function(e,t){var n,o="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==commonjsGlobal$1&&commonjsGlobal$1,i=function(){function e(){this.fetch=!1,this.DOMException=o.DOMException}return e.prototype=o,new e}();n=i,function(e){var t=void 0!==n&&n||"undefined"!=typeof self&&self||void 0!==commonjsGlobal$1&&commonjsGlobal$1||{},o="URLSearchParams"in t,i="Symbol"in t&&"iterator"in Symbol,r="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in t,s="ArrayBuffer"in t;if(s)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&l.indexOf(Object.prototype.toString.call(e))>-1};function d(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function p(e){return"string"!=typeof e&&(e=String(e)),e}function u(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function m(e){this.map={},e instanceof m?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function h(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function g(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function x(e){var t=new FileReader,n=g(t);return t.readAsArrayBuffer(e),n}function f(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:r&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:o&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&r&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=f(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=h(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(r)return this.blob().then(x);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e,t,n,o,i,r=h(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=g(t),o=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=o?o[1]:"utf-8",t.readAsText(e,i),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),o=0;o<t.length;o++)n[o]=String.fromCharCode(t[o]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}m.prototype.append=function(e,t){e=d(e),t=p(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},m.prototype.delete=function(e){delete this.map[d(e)]},m.prototype.get=function(e){return e=d(e),this.has(e)?this.map[e]:null},m.prototype.has=function(e){return this.map.hasOwnProperty(d(e))},m.prototype.set=function(e,t){this.map[d(e)]=p(t)},m.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},m.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),u(e)},m.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),u(e)},m.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),u(e)},i&&(m.prototype[Symbol.iterator]=m.prototype.entries);var S=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function C(e,n){if(!(this instanceof C))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var o,i,r=(n=n||{}).body;if(e instanceof C){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,n.headers||(this.headers=new m(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=n.credentials||this.credentials||"same-origin",!n.headers&&this.headers||(this.headers=new m(n.headers)),this.method=(o=n.method||this.method||"GET",i=o.toUpperCase(),S.indexOf(i)>-1?i:o),this.mode=n.mode||this.mode||null,this.signal=n.signal||this.signal||function(){if("AbortController"in t)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==n.cache&&"no-cache"!==n.cache)){var a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function b(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),o=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(o),decodeURIComponent(i))}}),t}function $(e,t){if(!(this instanceof $))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new m(t.headers),this.url=t.url||"",this._initBody(e)}C.prototype.clone=function(){return new C(this,{body:this._bodyInit})},y.call(C.prototype),y.call($.prototype),$.prototype.clone=function(){return new $(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},$.error=function(){var e=new $(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var v=[301,302,303,307,308];$.redirect=function(e,t){if(-1===v.indexOf(t))throw new RangeError("Invalid status code");return new $(null,{status:t,headers:{location:e}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(A){e.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function E(n,o){return new Promise(function(i,a){var l=new C(n,o);if(l.signal&&l.signal.aborted)return a(new e.DOMException("Aborted","AbortError"));var c=new XMLHttpRequest;function u(){c.abort()}if(c.onload=function(){var e,t,n={statusText:c.statusText,headers:(e=c.getAllResponseHeaders()||"",t=new m,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var n=e.split(":"),o=n.shift().trim();if(o){var i=n.join(":").trim();try{t.append(o,i)}catch(r){console.warn("Response "+r.message)}}}),t)};0===l.url.indexOf("file://")&&(c.status<200||c.status>599)?n.status=200:n.status=c.status,n.url="responseURL"in c?c.responseURL:n.headers.get("X-Request-URL");var o="response"in c?c.response:c.responseText;setTimeout(function(){i(new $(o,n))},0)},c.onerror=function(){setTimeout(function(){a(new TypeError("Network request failed"))},0)},c.ontimeout=function(){setTimeout(function(){a(new TypeError("Network request timed out"))},0)},c.onabort=function(){setTimeout(function(){a(new e.DOMException("Aborted","AbortError"))},0)},c.open(l.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(n){return e}}(l.url),!0),"include"===l.credentials?c.withCredentials=!0:"omit"===l.credentials&&(c.withCredentials=!1),"responseType"in c&&(r?c.responseType="blob":s&&(c.responseType="arraybuffer")),o&&"object"==typeof o.headers&&!(o.headers instanceof m||t.Headers&&o.headers instanceof t.Headers)){var h=[];Object.getOwnPropertyNames(o.headers).forEach(function(e){h.push(d(e)),c.setRequestHeader(e,p(o.headers[e]))}),l.headers.forEach(function(e,t){-1===h.indexOf(t)&&c.setRequestHeader(t,e)})}else l.headers.forEach(function(e,t){c.setRequestHeader(t,e)});l.signal&&(l.signal.addEventListener("abort",u),c.onreadystatechange=function(){4===c.readyState&&l.signal.removeEventListener("abort",u)}),c.send(void 0===l._bodyInit?null:l._bodyInit)})}E.polyfill=!0,t.fetch||(t.fetch=E,t.Headers=m,t.Request=C,t.Response=$),e.Headers=m,e.Request=C,e.Response=$,e.fetch=E,Object.defineProperty(e,"__esModule",{value:!0})}({}),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var r=o.fetch?o:i;(t=r.fetch).default=r.fetch,t.fetch=r.fetch,t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response,e.exports=t}(browserPonyfill,browserPonyfill.exports)),browserPonyfill.exports}var browserPonyfillExports=requireBrowserPonyfill();const fetch$1=getDefaultExportFromCjs(browserPonyfillExports),SvgNewVendor=e=>React__namespace.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},React__namespace.createElement("path",{d:"M7.5055 4L1.5 9.54354L22.5 9.5435",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),React__namespace.createElement("path",{d:"M16.4945 19.7067L22.5 14.1632H1.5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));__webpack_exports__GlobalWorkerOptions.workerSrc=`//cdnjs.cloudflare.com/ajax/libs/pdf.js/${__webpack_exports__version}/pdf.worker.mjs`;const{common:common$3g}=appLocale.getLocalizedStrings(),FileInputElementName$1="invoice",getEffectiveCitationVariant=(e,t,n)=>{if("deleted"===e.variant)return"deleted";if("excluded"===e.variant)return"excluded";return null!=t&&e.statementTransactionId===t||null!=n&&e.statementTransactionId===n?"hovered":e.variant??"default"},findCitationTransactionIdAtPoint=(e,t,n)=>{const o=Array.from(e.querySelectorAll("[data-statement-transaction-id]"));for(const i of o){if("excluded"===i.dataset.citationVariant)continue;const e=i.getBoundingClientRect();if(t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom)return i.dataset.statementTransactionId}},getScrollTargetPageNumber=(e,t)=>{if(null==t)return;const n=e.find(e=>e.statementTransactionId===t);return n?.page},isElementVisibleInContainer=(e,t)=>{const n=e.getBoundingClientRect(),o=null!=t?t.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};return n.bottom>o.top&&n.top<o.bottom&&n.right>o.left&&n.left<o.right},getScrollableParent=e=>{let t=e.parentElement;for(;null!=t;){const{overflowY:e}=window.getComputedStyle(t);if(("auto"===e||"scroll"===e)&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return null},scrollPageElementIntoView=(e,t,n="smooth")=>{const o=t??getScrollableParent(e);if(null==o)return void e.scrollIntoView({behavior:n,block:"center"});const i=e.getBoundingClientRect(),r=o.getBoundingClientRect(),a=o.scrollTop+(i.top-r.top)-(o.clientHeight-i.height)/2;o.scrollTo({top:Math.max(0,a),behavior:n})};function getPolygonBounds(e){const t=e.map(e=>e.x),n=e.map(e=>e.y);return{maxX:Math.max(...t),maxY:Math.max(...n),minX:Math.min(...t),minY:Math.min(...n)}}function convertPolygonToPercent(e,t,n){const{minX:o,maxX:i,minY:r,maxY:a}=getPolygonBounds(e);return{height:(a-r)/n*100,left:o/t*100,top:r/n*100,width:(i-o)/t*100}}function RenderPdf(e){const[t,n]=React.useState(0),[o,i]=React.useState(void 0),[r,a]=React.useState(null),[s,l]=React.useState(void 0),c=useWindowSizeContext(),d=React.useRef(null),p=React.useRef(null),u=React.useRef(void 0),m=null!=e.highlightedCitations&&e.highlightedCitations.length>0;React.useLayoutEffect(()=>{if(e.isFullScreen)return void i(void 0);const t=p.current;if(null==t)return;const n=()=>{const e=Math.floor(t.clientWidth);e>0&&i(t=>t===e?t:e)};n();const o=new ResizeObserver(n);return o.observe(t),()=>{o.disconnect()}},[e.isFullScreen,e.fileUrl]);const h=t=>{u.current!==t&&(u.current=t,l(t),e.onCitationHover?.(t))},g=e=>{!0===m&&h(findCitationTransactionIdAtPoint(e.currentTarget,e.clientX,e.clientY))},x=()=>{!0===m&&h(void 0)},f=t=>{null!=e.onCitationClick&&e.onCitationClick(findCitationTransactionIdAtPoint(t.currentTarget,t.clientX,t.clientY))},y=React.useCallback(()=>{if(null==e.highlightedCitations||0===e.highlightedCitations.length)return;const t=getScrollTargetPageNumber(e.highlightedCitations,e.selectedStatementTransactionId);if(null==t)return;const n=p.current?.querySelector(`[data-testid="pdf-page-${t}"]`);if(null!=n){const t=p.current,o=null!=t&&t.scrollHeight>t.clientHeight?t:null,i=(null!=e.selectedStatementTransactionId?n.querySelector(`[data-statement-transaction-id="${CSS.escape(String(e.selectedStatementTransactionId))}"]`):null)??n;if(isElementVisibleInContainer(i,o))return;scrollPageElementIntoView(i,o)}},[e.highlightedCitations,e.selectedStatementTransactionId]);React.useEffect(()=>{if(null==e.highlightedCitations||0===e.highlightedCitations.length||null==e.selectedStatementTransactionId)return;y();const t=requestAnimationFrame(y),n=window.setTimeout(y,150);return()=>{cancelAnimationFrame(t),window.clearTimeout(n)}},[e.highlightedCitations,e.selectedStatementTransactionId,t,y]),React.useEffect(()=>{a(null),n(0)},[e.fileUrl]);const S=t=>{if(!e.highlightedCitations)return null;const n=e.highlightedCitations.filter(e=>e.page===t);return 0===n.length?null:jsxRuntimeExports.jsx(HighlightsOverlay,{children:n.flatMap((t,n)=>{const o=convertPolygonToPercent(t.polygon,t.pageWidth,t.pageHeight),i=getEffectiveCitationVariant(t,e.selectedStatementTransactionId,s);return jsxRuntimeExports.jsx(HighlightBox,{"data-citation-variant":i,"data-statement-transaction-id":t.statementTransactionId,$variant:i,style:{height:`${o.height}%`,left:`${o.left}%`,top:`${o.top}%`,width:`${o.width}%`}},`${n}`)})})},C=()=>{e.setShowFullScreenView(!0)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(FileInputElement,{fileRef:d,name:FileInputElementName$1,onFileChange:t=>{if(null!=t.target.files){const n=t.target.files[0];e.onUploadAttachment?.([n],[n.name])}},multiple:e.allowMultiFiles,sizeLimit:SizeLimit32MB,onFileSizeError:t=>e.openSizeLimitPopup?.(t)}),jsxRuntimeExports.jsx(AttachmentContainer$2,{maxHeight:e.maxHeight??!1,$allowTextSelection:m,"data-statement-pdf-surface":"",onClick:()=>{m||C()},onDoubleClick:()=>{m&&C()},windowSize:c,"data-testid":generateDataTestId("attachment-container",e.pdfTitle),children:jsxRuntimeExports.jsxs(PdfRender,{isFullScreen:e.isFullScreen,ref:p,children:[!0===e.showTitlebar?jsxRuntimeExports.jsxs(Titlebar$2,{children:[jsxRuntimeExports.jsx(PdfTitle$2,{children:e.pdfTitle}),!0===e.showTitlebarIcon?jsxRuntimeExports.jsxs(ActionIcons$1,{className:"actionIcons",children:[!1!==e.showReplaceIcon?jsxRuntimeExports.jsx(Tooltip$6,{enterDelay:600,display:"flex",title:common$3g.texts.replace,placement:"top-end",children:jsxRuntimeExports.jsx(ReplaceIconWrapper$1,{"data-testid":generateDataTestId("replace-attachment",e.pdfTitle),onClick:e=>{e.stopPropagation(),d.current?.click()}})}):null,"small"===c?jsxRuntimeExports.jsx(DeleteIconWrapperMobile$1,{"data-testid":null!=e.deleteAttachmentDataTestId?`${e.deleteAttachmentDataTestId}-mobile`:generateDataTestId("delete-attachment-mobile",e.pdfTitle),onClick:t=>{t.stopPropagation(),e.onDeleteClick?.()}}):jsxRuntimeExports.jsx(Tooltip$6,{enterDelay:600,display:"flex",title:common$3g.delete,placement:"top",children:jsxRuntimeExports.jsx(DeleteIconWrapper$c,{onClick:t=>{t.stopPropagation(),e.onDeleteClick?.()},"data-testid":e.deleteAttachmentDataTestId??generateDataTestId("delete-attachment",e.pdfTitle)})})]}):null]}):null,(()=>{const t=e.fileUrl.toLowerCase();return[".jpg",".jpeg",".png",".gif",".webp",".bmp"].some(e=>t.includes(e))})()?jsxRuntimeExports.jsx(ImageContainer$1,{children:jsxRuntimeExports.jsxs(ImageWrapper$2,{onMouseMove:g,onMouseLeave:x,onClick:f,children:[jsxRuntimeExports.jsx(StyledImage$g,{src:e.fileUrl,alt:e.pdfTitle,onLoad:e=>{const t=e.currentTarget;a({width:t.naturalWidth,height:t.naturalHeight})}},e.fileUrl),(()=>{if(!e.highlightedCitations||null==r)return null;const t=e.highlightedCitations.filter(e=>1===e.page);return 0===t.length?null:jsxRuntimeExports.jsx(HighlightsOverlay,{children:t.flatMap((t,n)=>{const o=convertPolygonToPercent(t.polygon,t.pageWidth,t.pageHeight),i=getEffectiveCitationVariant(t,e.selectedStatementTransactionId,s);return jsxRuntimeExports.jsx(HighlightBox,{"data-citation-variant":i,"data-statement-transaction-id":t.statementTransactionId,$variant:i,style:{height:`${o.height}%`,left:`${o.left}%`,top:`${o.top}%`,width:`${o.width}%`}},`${n}`)})})})()]})}):jsxRuntimeExports.jsxs(Document,{file:e.fileUrl,onLoadSuccess:({numPages:e})=>n(e),onLoadError:()=>n(0),loading:jsxRuntimeExports.jsx(BusyContainer$e,{children:jsxRuntimeExports.jsx(ActivityIndicator,{size:"ExtraLarge",start:!0})}),className:"pdfDoc",children:[Array.from(new Array(t),(n,i)=>jsxRuntimeExports.jsx(ClickAwayListener,{onClickAway:()=>e.onCrossClick?.(),children:jsxRuntimeExports.jsxs(PageWrapper$1,{windowSize:c,isFullScreen:e.isFullScreen,children:[jsxRuntimeExports.jsxs(PageContainer$q,{"data-testid":`pdf-page-${i+1}`,isFullScreen:e.isFullScreen,onMouseMove:g,onMouseLeave:x,onClick:f,children:[jsxRuntimeExports.jsx(Page$7,{pageNumber:i+1,className:"reactPdfPage",...e.isFullScreen?{scale:1.5}:null!=o?{width:o}:{scale:1},error:jsxRuntimeExports.jsx("div",{}),onRenderSuccess:()=>{(null!=e.highlightedCitations?getScrollTargetPageNumber(e.highlightedCitations,e.selectedStatementTransactionId):void 0)===i+1&&y()}},`page_${i+1}`),S(i+1)]}),t!=i+1?jsxRuntimeExports.jsx(Divider$d,{}):null]})},`page_${i+1}`)),jsxRuntimeExports.jsx("div",{})]},e.fileUrl)]})})]})}const AttachmentContainer$2=styled$2.div`
|
|
10278
10278
|
max-height: ${e=>!0===e.maxHeight?"650px":"auto"};
|
|
10279
10279
|
display: flex;
|
|
10280
10280
|
flex-direction: column;
|
|
@@ -91779,4 +91779,4 @@ to {
|
|
|
91779
91779
|
`,StyledButton=styled$2(Button$3)`
|
|
91780
91780
|
min-width: 140px;
|
|
91781
91781
|
`;exports.AIAgentsActivatingPage=AIAgentsActivatingPage,exports.AIIconButton=AIIconButton,exports.AIPerformancePage=AIPerformancePage,exports.ALL_AI_CFO_MENU_OPTIONS=ALL_AI_CFO_MENU_OPTIONS,exports.ALL_INVOICING_MENU_GROUPS=ALL_INVOICING_MENU_GROUPS,exports.ALL_INVOICING_MENU_OPTIONS=ALL_INVOICING_MENU_OPTIONS,exports.ALL_SETTINGS_MENU_OPTIONS=ALL_SETTINGS_MENU_OPTIONS,exports.ALPHA_NUMERIC_PATTERN=ALPHA_NUMERIC_PATTERN,exports.APP_DRAWER_CONTENT_WIDTH_PX=APP_DRAWER_CONTENT_WIDTH_PX,exports.AccountInfoPage=AccountInfoPage,exports.AccountLockedInfoModal=AccountLockedInfoModal,exports.AccountReconDetailsDrawerPage=AccountReconDetailsDrawerPage$1,exports.AccountReconDetailsDrawerPage$1=AccountReconDetailsDrawerPage,exports.ActivityIndicator=ActivityIndicator,exports.ActualMatchingMatchDetailPage=ActualMatchingMatchDetailPage,exports.AddAddressForCardDrawer=AddAddressForCardDrawer,exports.AddThreadFloating=AddThreadFloating,exports.AddThreadsComponent=AddThreadsComponent,exports.AddToWalletPage=AddToWalletPage,exports.AddressFormPage=AddressFormPage,exports.AgentInsightsEditor=AgentInsightsEditor,exports.AgingReportsPage=AgingReportsPage,exports.AiCfoChatHeader=AiCfoChatHeader,exports.AiCfoMenuContent=AiCfoMenuContent,exports.AiCfoOnboardingPage=AiCfoOnboardingPage,exports.AiCfoPage=AiCfoPage,exports.AiCfoScopeModal=AiCfoScopeModal,exports.AiCfoScopeModalScrollBody=AiCfoScopeModalScrollBody,exports.AiCfoSidePanel=AiCfoSidePanel,exports.AiCfoSkillsBrowser=AiCfoSkillsBrowser,exports.AiFinanceTeamReadyPage=AiFinanceTeamReadyPage,exports.AllThreadsDrawer=AllThreadsDrawer,exports.AllThreadsSection=AllThreadsSection,exports.AllowBlockChipPicker=AllowBlockChipPicker,exports.AnalyticsOnLoad=AnalyticsOnLoad,exports.ApAgingDetailPage=ApAgingDetailPage,exports.AppBasePage=AppBasePage,exports.AppDrawerContent=AppDrawerContent,exports.AppDrawerHeightMobile=AppDrawerHeightMobile,exports.ApprovalRulesSettingsPage=ApprovalRulesSettingsPage,exports.ArAgingDetailPage=ArAgingDetailPage,exports.AskAiCfoNavButton=AskAiCfoNavButton,exports.AskAiCfoNavButtonWhenEnabled=AskAiCfoNavButtonWhenEnabled,exports.AttachmentView=AttachmentView,exports.AutoSizer=AutoSizer,exports.AutoTransferRulePage=AutoTransferRulePage,exports.AvatarSVG=AvatarSVG$1,exports.BORDER_RADIUS_SELECT_FIELD=BORDER_RADIUS_SELECT_FIELD,exports.BackNavigationProvider=BackNavigationProvider,exports.BankConnectionsSettingsPage=BankConnectionsSettingsPage,exports.BillDetailPage=BillDetailPage,exports.BillDetailPageSkeleton=BillDetailPageSkeleton,exports.BillPayApprovalRuleDetailPage=BillPayApprovalRuleDetailPage$1,exports.BillPayApprovalRuleDetailPage$1=BillPayApprovalRuleDetailPage,exports.BillPayApprovalRulesPage=BillPayApprovalRulesPage$1,exports.BillPayApprovalRulesPage$1=BillPayApprovalRulesPage,exports.BillPayPromoPage=BillPayPromoPage,exports.BillPaySetUpPage=BillPaySetUpPage,exports.BillingSettingsPage=BillingSettingsPage,exports.BillsBulkReviewDrawerPage=BillsBulkReviewDrawerPage,exports.BusinessVerificationPage=BusinessVerificationPage,exports.BusyIndication=BusyIndication,exports.Button=Button$3,exports.ButtonBase=ButtonBase,exports.ButtonWithDropDown=ButtonWithDropDown,exports.CARD_POLICY_LIMIT_ROW_ID_REQUIRE_RECEIPT=CARD_POLICY_LIMIT_ROW_ID_REQUIRE_RECEIPT,exports.CARD_POLICY_LIMIT_ROW_ID_TRANSACTION=CARD_POLICY_LIMIT_ROW_ID_TRANSACTION,exports.COMMAND_CENTER_SUBMENU_TYPES=COMMAND_CENTER_SUBMENU_TYPES,exports.COMMENTS_DRAWER_MAXIMUM_WIDTH=COMMENTS_DRAWER_MAXIMUM_WIDTH,exports.COMMENTS_SECTION_MINIMUM_WIDTH=COMMENTS_SECTION_MINIMUM_WIDTH,exports.COMMENT_NOTIFICATION_KINDS=COMMENT_NOTIFICATION_KINDS,exports.CapitalizationOnboardingPopup=CapitalizationOnboardingPopup,exports.CapitalizationSettingsSection=CapitalizationSettingsSection,exports.CardPolicyCreatePage=CardPolicyCreatePage,exports.CardPolicyEditPage=CardPolicyEditPage,exports.CardPolicyFormPageSkeleton=CardPolicyFormPageSkeleton,exports.CardPolicyFormSections=CardPolicyFormSections,exports.CardPolicyListPage=CardPolicyListPage,exports.CardPolicyListPageSkeleton=CardPolicyListPageSkeleton,exports.CardPolicyListRow=CardPolicyListRow,exports.CardPolicyListSkeletonRow=CardPolicyListSkeletonRow,exports.CardPolicyManualEmptyState=CardPolicyManualEmptyState,exports.CardsAiCfoHero=CardsAiCfoHero,exports.CardsShutdownBanner=CardsShutdownBanner,exports.CashbackDetailLoading=CashbackDetailLoading,exports.CashbackDetailPage=CashbackDetailPage,exports.ChargeCardCVVActivate=ChargeCardCVVActivate,exports.ChargeCardDetailLoading=ChargeCardDetailLoading,exports.ChargeCardDetailPage=ChargeCardDetailPage,exports.ChargeCardListLoading=ChargeCardListLoading,exports.ChargeCardListPage=ChargeCardListPage,exports.ChargeCardListSkeletonRow=ChargeCardListSkeletonRow,exports.ChargeCardPaymentHistoryPage=ChargeCardPaymentHistoryPage,exports.ChargeCardPromoPage=ChargeCardPromoPage,exports.ChargeCardPromoPageSkeleton=ChargeCardPromoPageSkeleton,exports.ChargeCardSetUpPage=ChargeCardSetUpPage,exports.ChargeCardStatementsLoading=ChargeCardStatementsLoading,exports.ChargeCardStatementsPage=ChargeCardStatementsPage,exports.ChargeCardUserOnboardingPromoPage=ChargeCardUserOnboardingPromoPage,exports.ChargeCardUserOnboardingPromoPageSkeleton=ChargeCardUserOnboardingPromoPageSkeleton,exports.CheckDepositDrawerPage=CheckDepositDrawerPage,exports.Checkbox=Checkbox,exports.CircleWithAttachmentSuccessIcon=CircleWithAttachmentSuccessIcon,exports.CircularProgress=CircularProgress,exports.ClickAwayListener=ClickAwayListener,exports.ClickableRow=ClickableRow,exports.CollaborationGlobalStyles=CollaborationGlobalStyles,exports.CollaborationProvider=CollaborationProvider,exports.CollaborationRoomProvider=CollaborationRoomProvider,exports.Color=Color$1,exports.Colors=Colors,exports.CombinationOperatorButton=CombinationOperatorButton,exports.CommentsAndNotesCount=CommentsAndNotesCount,exports.CommentsDrawerProvider=CommentsDrawerProvider,exports.CommonDot=CommonDot,exports.CompanyOfficerOnboardingDetailsSection=CompanyOfficerOnboardingDetailsSection,exports.CompanyOnboardingDetailsSection=CompanyOnboardingDetailsSection,exports.CompanyPassportCard=CompanyPassportCard,exports.CompanyPassportPage=CompanyPassportPage,exports.CompleteProfile=CompleteProfile,exports.ConfettiBurst=ConfettiBurst,exports.ConfirmationPopUpDescription=ConfirmationPopUpDescription$2,exports.ConfirmationPopUpTitle=ConfirmationPopUpTitle$3,exports.ConfirmationPopup=ConfirmationPopup,exports.ConnectDataSourcesPage=ConnectDataSourcesPage,exports.ContentLoaderSkeleton=ContentLoaderSkeleton,exports.ControlledComponent=ControlledComponent,exports.Controller=Controller,exports.CreateOrEditVendorPage=CreateOrEditVendorPage,exports.CreateOrEditVendorPageSkeleton=CreateOrEditVendorPageSkeleton,exports.CreateTransactionButton=CreateTransactionButton,exports.CreateTransactionPage=CreateTransactionPage,exports.CreatedEntitiesAnswer=CreatedEntitiesAnswer,exports.CreatingEntitiesAnswerLoading=CreatingEntitiesAnswerLoading,exports.CreditCardPaymentDrawerPage=CreditCardPaymentDrawerPage,exports.CustomerOnboardingContainerPage=CustomerOnboardingContainerPage,exports.CustomerOnboardingNoStepsPage=CustomerOnboardingNoStepsPage,exports.CustomerOnboardingPage=CustomerOnboardingPage,exports.CustomerOnboardingProductSuitePage=CustomerOnboardingProductSuitePage,exports.DIGITS_PATTERN=DIGITS_PATTERN,exports.DOMAIN_PATTERN=DOMAIN_PATTERN,exports.Dashboard=Dashboard,exports.DashboardReportPage=DashboardReportPage,exports.DashboardSidebarLogoAnimation=DashboardSidebarLogoAnimation,exports.DataListTable=DataListTable,exports.DataListTableHeader=DataListTableHeader,exports.DataListTableRow=DataListTableRow,exports.DataListTableSortIndicator=DataListTableSortIndicator,exports.DateRangeFilterField=DateRangeFilterField,exports.DebitCardSetPin=DebitCardSetPin,exports.Drawer=Drawer,exports.DrawerPage=DrawerPage,exports.DropdownOption=DropdownOption$1,exports.DropdownPortalContext=DropdownPortalContext,exports.DynamicConfigNames=DynamicConfigNames,exports.EMPTY_HTML_CHECKER=EMPTY_HTML_CHECKER,exports.EditPeoplePage=EditPeoplePage,exports.EditReimbursementDetailPage=EditReimbursementDetailPage,exports.EditableBillDetailPage=EditableBillDetailPage,exports.Editor=Editor,exports.EmptySearchResults=EmptySearchResults,exports.EntityAvatar=EntityAvatar,exports.EntityAvatarWithInitials=EntityAvatarWithInitials,exports.EntityDetailPage=EntityDetailPage,exports.ErrorBoundaryWrapper=ErrorBoundaryWrapper,exports.ExcludedAccountReconDetailsDrawerPage=ExcludedAccountReconDetailsDrawerPage,exports.ExpenseAutomationOverviewPage=ExpenseAutomationOverviewPage,exports.ExpenseAutomationOverviewPageSkeleton=ExpenseAutomationOverviewPageSkeleton,exports.ExpenseAutomationPage=ExpenseAutomationPage,exports.ExpressPayPage=ExpressPayPage,exports.ExtraLargeMedium=ExtraLargeMedium,exports.ExtraLargeRegular=ExtraLargeRegular,exports.ExtraLargeSemiBold=ExtraLargeSemiBold,exports.ExtraSmallBoldSp=ExtraSmallBoldSp,exports.ExtraSmallRegular=ExtraSmallRegular,exports.ExtraSmallRegularSp=ExtraSmallRegularSp,exports.ExtraSmallSemiBold=ExtraSmallSemiBold,exports.ExtraSmallSemiBoldSp=ExtraSmallSemiBoldSp,exports.EyebrowSmallSemiBoldSp=EyebrowSmallSemiBoldSp,exports.FORM_MINIMUM_WIDTH=FORM_MINIMUM_WIDTH,exports.FeatureGatesNames=FeatureGatesNames,exports.FeaturePreviewPage=FeaturePreviewPage,exports.FeatureProvider=FeatureProvider,exports.FieldHelpIcon=FieldHelpIcon,exports.FieldHelpProvider=FieldHelpProvider,exports.FileAttachment=FileAttachment,exports.FileInputElement=FileInputElement,exports.FiltersPopover=FiltersPopover,exports.FirstReviewVendorDetailPage=FirstReviewVendorDetailPage,exports.FixedSizeList=FixedSizeList,exports.FloatingThreads=FloatingThreads,exports.FontWeight=FontWeight,exports.Footer=Footer$7,exports.FormProvider=FormProvider,exports.GlobalInfoProvider=GlobalInfoProvider,exports.GlobalReviewListPage=GlobalReviewListPage,exports.H5Regular=H5Regular,exports.H6Regular=H6Regular,exports.INPUT_BG_COLOR=INPUT_BG_COLOR,exports.INPUT_BORDER_COLOR_SELECT_FIELD=INPUT_BORDER_COLOR_SELECT_FIELD,exports.INPUT_COLOR=INPUT_COLOR,exports.INPUT_ERROR_BG_COLOR=INPUT_ERROR_BG_COLOR,exports.INPUT_HOVER_FOCUS_COLOR=INPUT_HOVER_FOCUS_COLOR,exports.INPUT_PLACEHOLDER_COLOR=INPUT_PLACEHOLDER_COLOR,exports.INVOICING_SETTINGS_NAV_SECTIONS=INVOICING_SETTINGS_NAV_SECTIONS,exports.INVOICING_SETTINGS_TABS=INVOICING_SETTINGS_TABS,exports.InfiniteLoader=InfiniteLoader,exports.InformationCardStack=InformationCardStack,exports.InitialCollaborationProvider=InitialCollaborationProvider,exports.InsightCardStack=InsightCardStack,exports.IntegrationCardView=IntegrationCardView,exports.IntegrationsCardGrid=IntegrationsCardGrid,exports.IntegrationsSection=IntegrationsSection,exports.IntegrationsSettingsPage=IntegrationsSettingsPage,exports.InternationalWireVerificationPage=InternationalWireVerificationPage,exports.InviteFormPage=InviteFormPage,exports.InvitePageListView=InvitePageListView,exports.InvitePeoplePage=InvitePeoplePage,exports.InvoiceUploadSection=InvoiceUploadSection,exports.InvoiceUploadSectionSkeleton=InvoiceUploadSectionSkeleton,exports.InvoicingAddPaymentMethodDialog=InvoicingAddPaymentMethodDialog,exports.InvoicingAuditLogPage=InvoicingAuditLogPage,exports.InvoicingBrandingSettingsPage=InvoicingBrandingSettingsPage,exports.InvoicingCatalogItemDetailPage=InvoicingCatalogItemDetailPage,exports.InvoicingCatalogItemFormPage=InvoicingCatalogItemFormPage,exports.InvoicingCatalogPage=InvoicingCatalogPage,exports.InvoicingCouponFormPage=InvoicingCouponFormPage,exports.InvoicingCreateInvoicePage=InvoicingCreateInvoicePage,exports.InvoicingCreateInvoiceSkeleton=InvoicingCreateInvoiceSkeleton,exports.InvoicingCreatePromotionalCreditsDialog=InvoicingCreatePromotionalCreditsDialog,exports.InvoicingCreditDetailPage=InvoicingCreditDetailPage,exports.InvoicingCreditListPage=InvoicingCreditListPage,exports.InvoicingCustomerDetailPage=InvoicingCustomerDetailPage,exports.InvoicingCustomerFormPage=InvoicingCustomerFormPage,exports.InvoicingCustomerListPage=InvoicingCustomerListPage,exports.InvoicingDashboardSkeleton=InvoicingDashboardSkeleton,exports.InvoicingDataImportDetailPage=InvoicingDataImportDetailPage,exports.InvoicingDataImportHubPage=InvoicingDataImportHubPage,exports.InvoicingDataImportMigratePage=InvoicingDataImportMigratePage,exports.InvoicingDetailScaffold=InvoicingDetailScaffold,exports.InvoicingDiscountDetailPage=InvoicingDiscountDetailPage,exports.InvoicingDiscountListPage=InvoicingDiscountListPage,exports.InvoicingDunningDetailPage=InvoicingDunningDetailPage,exports.InvoicingDunningEmailComposerDialog=InvoicingDunningEmailComposerDialog,exports.InvoicingDunningListPage=InvoicingDunningListPage,exports.InvoicingDunningSettingsPage=InvoicingDunningSettingsPage,exports.InvoicingEmptyState=InvoicingEmptyState,exports.InvoicingIntegrationsSettingsPage=InvoicingIntegrationsSettingsPage,exports.InvoicingInvoiceDetailPage=InvoicingInvoiceDetailPage,exports.InvoicingInvoiceListPage=InvoicingInvoiceListPage,exports.InvoicingIssueCreditNotePage=InvoicingIssueCreditNotePage,exports.InvoicingOverviewPage=InvoicingOverviewPage,exports.InvoicingPaymentDestinationSettingsPage=InvoicingPaymentDestinationSettingsPage,exports.InvoicingPaymentLinkEmailComposerDialog=InvoicingPaymentLinkEmailComposerDialog,exports.InvoicingPaymentLinkPage=InvoicingPaymentLinkPage,exports.InvoicingPaymentListPage=InvoicingPaymentListPage,exports.InvoicingPromoPage=InvoicingPromoPage,exports.InvoicingQBOSettingsPage=InvoicingQBOSettingsPage,exports.InvoicingRecordPaymentPage=InvoicingRecordPaymentPage,exports.InvoicingSettingsHubPage=InvoicingSettingsHubPage,exports.InvoicingSubscriptionDetailPage=InvoicingSubscriptionDetailPage,exports.InvoicingSubscriptionFormPage=InvoicingSubscriptionFormPage,exports.InvoicingSubscriptionListPage=InvoicingSubscriptionListPage,exports.InvoicingTransactionDetailPage=InvoicingTransactionDetailPage,exports.InvoicingVoidInvoiceDialog=InvoicingVoidInvoiceDialog,exports.IssueChargeCardPage=IssueChargeCardPage,exports.IssueChargeCardPageSkeleton=IssueChargeCardPageSkeleton,exports.JEOneTimeAccrualDetailPage=JEOneTimeAccrualDetailPage,exports.JEOneTimeAccrualLinkedEntriesButton=JEOneTimeAccrualLinkedEntriesButton,exports.Label=Label$g,exports.LabeledDatePickerField=LabeledDatePickerField,exports.LabeledGroupedMultiSelectField=LabeledGroupedMultiSelectField,exports.LabeledGroupedSingleSelectField=LabeledGroupedSingleSelectField,exports.LabeledItemWithButton=LabeledItemWithButton,exports.LabeledNameField=LabeledNameField,exports.LabeledRadioField=LabeledRadioField,exports.LabeledReadOnlyTextField=LabeledReadOnlyTextField,exports.LabeledSingleSelectNumericField=LabeledSingleSelectNumericField,exports.LabeledSingleSelectPickerField=LabeledSingleSelectPickerField,exports.LabeledSingleSelectWithoutClearableField=LabeledSingleSelectWithoutClearableField,exports.LabeledTextField=LabeledTextField,exports.LabeledUnSafeCheckBoxField=LabeledUnSafeCheckBoxField,exports.LargeBoldSp=LargeBoldSp,exports.LargeMedium=LargeMedium,exports.LargeMediumSp=LargeMediumSp,exports.LargeRegular=LargeRegular,exports.LargeRegularA=LargeRegularA,exports.LargeRegularLabel=LargeRegularLabel,exports.LargeRegularSp=LargeRegularSp,exports.LargeRegularTA=LargeRegularTA,exports.LargeSemiBold=LargeSemiBold,exports.LinkBillExpensePage=LinkBillExpensePage,exports.LinkJETransactionPage=LinkJETransactionPage,exports.ListTableSkeleton=ListTableSkeleton,exports.Loader=Loader,exports.LogoutButton=LogoutButton,exports.Lottie=Lottie,exports.MCC_CHIP_ID_PREFIX=MCC_CHIP_ID_PREFIX,exports.MEETING_LINK_DEFAULTS=MEETING_LINK_DEFAULTS,exports.MENU_BG_COLOR=MENU_BG_COLOR,exports.MONTH_END_EDITOR_PLACEHOLDER=MONTH_END_EDITOR_PLACEHOLDER,exports.MONTH_END_EMAIL_BODY_SECTION=MONTH_END_EMAIL_BODY_SECTION,exports.MONTH_END_EMAIL_EDITOR_SECTION=MONTH_END_EMAIL_EDITOR_SECTION,exports.MONTH_END_EMAIL_HEADER_SECTION=MONTH_END_EMAIL_HEADER_SECTION,exports.MONTH_END_REPORT_CANVAS=MONTH_END_REPORT_CANVAS,exports.MagicLinkDomesticWireDetailsPage=MagicLinkDomesticWireDetailsPage,exports.MagicLinkInternationalWireDetailsPage=MagicLinkInternationalWireDetailsPage,exports.MagicLinkSuccessPage=MagicLinkSuccessPage,exports.MagicLinkVendorACHDetailsPage=MagicLinkVendorACHDetailsPage,exports.MatchingOperatorDropdown=MatchingOperatorDropdown,exports.Modal=Modal,exports.Modal$1=Modal$1,exports.MonthCalendar=MonthCalendar,exports.MonthEndEmailDrawerCustomerRequestPage=MonthEndEmailDrawerCustomerRequestPage,exports.MonthEndReportCustomerRequestSection=MonthEndReportCustomerRequestSection,exports.MonthEndReportSection=MonthEndReportSection,exports.MoreMenuButton=MoreMenuButton$1,exports.MyBankConnectionsSettingsPage=MyBankConnectionsSettingsPage,exports.MyPendingActivationChargeCardListPage=MyPendingActivationChargeCardListPage,exports.MyProfileSettingsPage=MyProfileSettingsPage,exports.NEW_CATEGORY_BODY=NEW_CATEGORY_BODY$2,exports.NEW_THREAD_SUFFIX=NEW_THREAD_SUFFIX,exports.NavBar=NavBar,exports.NavBarRightRowStyled=NavBarRightRowStyled,exports.NavBarWithClose=NavBarWithClose,exports.NewGlobalMerchantPage=NewGlobalMerchantPage,exports.NewUpdateAvailablePage=NewUpdateAvailablePage,exports.NotFoundPage=NotFoundPage,exports.NotificationSettingsPage=NotificationSettingsPage,exports.NotificationsPage=NotificationsPage,exports.OAuthConsentPage=OAuthConsentPage,exports.OPTION_BG_COLOR=OPTION_BG_COLOR,exports.OPTION_DISABLED_BG_COLOR=OPTION_DISABLED_BG_COLOR,exports.OPTION_HOVER_FOCUS_BG_COLOR=OPTION_HOVER_FOCUS_BG_COLOR,exports.OPTION_LABEL_COLOR=OPTION_LABEL_COLOR,exports.OPTION_LABEL_DISABLED_COLOR=OPTION_LABEL_DISABLED_COLOR,exports.OPTION_LABEL_HOVER_FOCUS_COLOR=OPTION_LABEL_HOVER_FOCUS_COLOR,exports.OnboardingInitialLoader=OnboardingInitialLoader,exports.OnboardingSidebar=OnboardingSidebar,exports.OnboardingStepFrame=OnboardingStepFrame,exports.OpExByVendorPage=OpExByVendorPage,exports.OverlayContainerPage=OverlayContainerPage,exports.PandLWithForecastPage=PandLWithForecastPage,exports.PanelDirtyGuardContext=PanelDirtyGuardContext,exports.PanelInternalContext=PanelInternalContext,exports.PaymentAccountSetupBillingAddressSection=PaymentAccountSetupBillingAddressSection,exports.PeoplePage=PeoplePage,exports.Picker=Picker,exports.PolicyLimitsRowList=PolicyLimitsRowList,exports.PolicyModeSelector=PolicyModeSelector,exports.Popover=Popover,exports.PortfolioAllocationFormPage=PortfolioAllocationFormPage,exports.PropTypes=PropTypes,exports.QBOConnectionDialog=QBOConnectionDialog,exports.QBOSetupSectionWithForm=QBOSetupSectionWithForm,exports.QuickResponsesPage=QuickResponsesPage,exports.QuickViewModeContext=QuickViewModeContext,exports.REALM_ID=REALM_ID,exports.RIGHT_SIDE_PANEL_WIDTH_PX=RIGHT_SIDE_PANEL_WIDTH_PX,exports.RecommendationFeedbackPopup=RecommendationFeedbackPopup,exports.ReconciliationReportPage=ReconciliationReportPage,exports.ReimbursementApprovalRuleDetailPage=ReimbursementApprovalRuleDetailPage$1,exports.ReimbursementApprovalRuleDetailPage$1=ReimbursementApprovalRuleDetailPage,exports.ReimbursementApprovalRulesPage=ReimbursementApprovalRulesPage$1,exports.ReimbursementApprovalRulesPage$1=ReimbursementApprovalRulesPage,exports.ReimbursementDetailPage=ReimbursementDetailPage,exports.ReimbursementDetailPageSkeleton=ReimbursementDetailPageSkeleton,exports.ReimbursementPromoPage=ReimbursementPromoPage,exports.ReimbursementsBulkReviewDrawerPage=ReimbursementsBulkReviewDrawerPage,exports.ReloadContainer=ReloadContainer,exports.RemiSetupPage=RemiSetupPage,exports.ReportsPage=ReportsPage,exports.ResponsiveSized=ResponsiveSized,exports.ResponsiveSizedStyle=ResponsiveSizedStyle,exports.ReviewBillDetailsPage=ReviewBillDetailsPage,exports.ReviewConfirmTransferPanel=ReviewConfirmTransferPanel,exports.ReviewDetailsPageSkeleton=ReviewDetailsPageSkeleton,exports.SUPPORTED_CREATE_TRANSACTION_TYPES=SUPPORTED_CREATE_TRANSACTION_TYPES,exports.ScheduleDetailSkeleton=ScheduleDetailSkeleton,exports.ScheduleDetailsAccruedExpensesPage=ScheduleDetailsAccruedExpensesPage,exports.ScheduleDetailsFixedAssetsPage=ScheduleDetailsFixedAssetsPage,exports.ScheduleDetailsPage=ScheduleDetailsPage,exports.SearchBoxWithFilterButton=SearchBoxWithFilterButton,exports.SearchableCheckboxCardList=SearchableCheckboxCardList,exports.SessionTimeoutPopup=SessionTimeoutPopup,exports.SidePanelContext=SidePanelContext,exports.SidePanelLayout=SidePanelLayout,exports.SidePanelProvider=SidePanelProvider,exports.SignIn=SignIn,exports.SimpleDownloadMenuButton=SimpleDownloadMenuButton,exports.SingleSelectNumeric=SingleSelectNumeric,exports.SingleSelectPickerField=SingleSelectPickerField,exports.SingleSelectWithoutClearableField=SingleSelectWithoutClearableField,exports.SmallMedium=SmallMedium,exports.SmallMediumBtn=SmallMediumBtn,exports.SmallMediumSp=SmallMediumSp,exports.SmallRegular=SmallRegular,exports.SmallRegularA=SmallRegularA,exports.SmallRegularBtn=SmallRegularBtn,exports.SmallRegularInput=SmallRegularInput,exports.SmallRegularP=SmallRegularP,exports.SmallRegularSp=SmallRegularSp,exports.SmallRegularUl=SmallRegularUl,exports.SmallSemiBoldSp=SmallSemiBoldSp,exports.SomethingWrongPage=SomethingWrongPage,exports.Space=Space,exports.SpendManagementListLoading=SpendManagementListLoading,exports.SpendManagementListViewPage=SpendManagementListViewPage,exports.SpendManagementSetUpLoading=SpendManagementSetUpLoading,exports.StandardBold=StandardBold,exports.StandardMedium=StandardMedium,exports.StandardMediumA=StandardMediumA,exports.StandardMediumSp=StandardMediumSp,exports.StandardMediumTA=StandardMediumTA,exports.StandardRegular=StandardRegular,exports.StandardRegularLabel=StandardRegularLabel,exports.StandardRegularLi=StandardRegularLi,exports.StandardRegularSp=StandardRegularSp,exports.StandardSemiBold=StandardSemiBold,exports.StandardSemiBoldSp=StandardSemiBoldSp,exports.StateManagedSelect$1=StateManagedSelect$1,exports.StatementParseInfoEntry=StatementParseInfoEntry,exports.StatementProcessingPage=StatementProcessingPage,exports.StatementsPage=StatementsPage,exports.StickyThread=StickyThread,exports.StyledCapsule=StyledCapsule,exports.StyledCheckBox=StyledCheckBox$1,exports.StyledText=StyledText$c,exports.SubscriptionDetailPage=SubscriptionDetailPage,exports.SubscriptionSnackBar=SubscriptionSnackBar,exports.SubscriptionSummaryPage=SubscriptionSummaryPage,exports.SvgAddRound=SvgAddRound,exports.SvgAlert=SvgAlert,exports.SvgArrowBottom=SvgArrowBottom,exports.SvgArrowLeft=SvgArrowLeft,exports.SvgArrowRight=SvgArrowRight,exports.SvgArrowTailRight=SvgArrowTailRight,exports.SvgArrowTailTop=SvgArrowTailTop,exports.SvgAvatar=SvgAvatar,exports.SvgClock=SvgClock,exports.SvgClose=SvgClose,exports.SvgCloseRound=SvgCloseRound,exports.SvgComment=SvgComment,exports.SvgCompanyDetails=SvgCompanyDetails,exports.SvgDelete=SvgDelete,exports.SvgDoubleTick=SvgDoubleTick,exports.SvgEdit=SvgEdit,exports.SvgEmail=SvgEmail,exports.SvgFlag=SvgFlag,exports.SvgHighImportance=SvgHighImportance,exports.SvgHighImportanceFill=SvgHighImportanceFill,exports.SvgHighImportanceFilled=SvgHighImportanceFilled,exports.SvgInfinite=SvgInfinite,exports.SvgInfo=SvgInfo,exports.SvgIntuitQuickBooksLogo=SvgIntuitQuickBooksLogo,exports.SvgLoader=SvgLoader,exports.SvgMore=SvgMore,exports.SvgNotification=SvgNotification,exports.SvgOpenLink=SvgOpenLink,exports.SvgPlayButtonSmall=SvgPlayButtonSmall,exports.SvgQueryRound=SvgQueryRound,exports.SvgRefresh=SvgRefresh,exports.SvgReload=SvgReload,exports.SvgSearch=SvgSearch,exports.SvgTick=SvgTick,exports.SvgTickRound=SvgTickRound,exports.SvgTickRoundFill=SvgTickRoundFill,exports.SvgWarning=SvgWarning,exports.SvgZeniLogoFull=SvgZeniLogoFull,exports.SyntheticAiCfoAnswerView=SyntheticAiCfoAnswerView,exports.THREAD_RESOLVED_NOTIFICATION_KIND=THREAD_RESOLVED_NOTIFICATION_KIND,exports.THREAD_UNRESOLVED_NOTIFICATION_KIND=THREAD_UNRESOLVED_NOTIFICATION_KIND,exports.TaskDetailPage=TaskDetailPage,exports.TaskManagementPage=TaskManagementPage,exports.TenantsDropDown=TenantsDropDown,exports.TextHighlightSection=TextHighlightSection,exports.TextStyle=TextStyle,exports.ThreadComponent=ThreadComponent,exports.ThreadDotComponent=ThreadDotComponent,exports.ThreadsContext=ThreadsContext,exports.ToolkitProvider=ToolkitProvider,exports.Tooltip=Tooltip$6,exports.TopExDetailPage=TopExDetailPage,exports.TransactionActivityLogPage=TransactionActivityLogPage,exports.TransactionActivityLogPanel=TransactionActivityLogPanel,exports.TransactionDetailPage=TransactionDetailPage,exports.TransactionDetailSkeleton=TransactionDetailSkeleton,exports.TransactionListBig=TransactionListBig,exports.TransactionListComments=TransactionListComments,exports.TransactionListPage=TransactionListPage,exports.TransactionVendorDetailPage=TransactionVendorDetailPage,exports.TransferDrawerPage=TransferDrawerPage,exports.TreasuryOverviewPage=TreasuryOverviewPage,exports.TreasuryPromoPage=TreasuryPromoPage,exports.TreasurySetUpPage=TreasurySetUpPage,exports.TreasuryStatementsPage=TreasuryStatementsPage,exports.TreasuryTaxLetterPage=TreasuryTaxLetterPage,exports.TreasuryTransferOrReviewPage=TreasuryTransferOrReviewPage,exports.TrendChart=TrendChart,exports.UncategorizedAccountsMappingPage=UncategorizedAccountsMappingPage,exports.UnitIntegrationPage=UnitIntegrationPage,exports.UserMultiSelectField=UserMultiSelectField,exports.UserWithTimestamp=UserWithTimestamp,exports.VENDOR_CHIP_ID_PREFIX=VENDOR_CHIP_ID_PREFIX,exports.VariableSizeList=VariableSizeList,exports.Vendor2FAPopup=Vendor2FAPopup,exports.VendorACHDetailsPage=VendorACHDetailsPage,exports.VendorAccruedSchedulesPage=VendorAccruedSchedulesPage,exports.VendorDetailPage=VendorDetailPage,exports.VendorDomesticWireDetailsPage=VendorDomesticWireDetailsPage,exports.VendorFiling1099DetailsEditablePage=VendorFiling1099DetailsEditablePage,exports.VendorFiling1099EditableFormSkeleton=VendorFiling1099EditableFormSkeleton,exports.VendorFiling1099ListPage=VendorFiling1099ListPage,exports.VendorFirstReviewPage=VendorFirstReviewPage,exports.VendorInternationalSwiftBasedDetailsPage=VendorInternationalSwiftBasedDetailsPage,exports.VendorInternationalWireDetailsPage=VendorInternationalWireDetailsPage,exports.VendorListPage=VendorListPage,exports.VendorSchedulesPage=VendorSchedulesPage,exports.VerificationFrame=VerificationFrame,exports.VerifyDevice=VerifyDevice,exports.VerifyUnlockFinancialStackPage=VerifyUnlockFinancialStackPage,exports.WebV2MicroService=WebV2MicroService,exports.WebV2MicroServiceProvider=WebV2MicroServiceProvider,exports.WelcomeAnimation=WelcomeAnimation,exports.WindowSizeProvider=WindowSizeProvider,exports.ZeniAccountDetailLoading=ZeniAccountDetailLoading,exports.ZeniAccountDetailNavBarTitleShimmer=ZeniAccountDetailNavBarTitleShimmer,exports.ZeniAccountDetailPage=ZeniAccountDetailPage,exports.ZeniAccountListLoading=ZeniAccountListLoading,exports.ZeniAccountListViewPage=ZeniAccountListViewPage,exports.ZeniAccountPromoPage=ZeniAccountPromoPage,exports.ZeniAccountSetUpPage=ZeniAccountSetUpPage,exports.ZeniAvatar=ZeniAvatar,exports.ZeniDatePickerField=ZeniDatePickerField,exports.ZeniText=ZeniText,exports.ZeniThemeProvider=ZeniThemeProvider,exports.activeElement=activeElement,exports.alignToJustify=alignToJustify$1,exports.amountToString=amountToString,exports.amountValueToString=amountValueToString,exports.appLocale=appLocale,exports.applyExtractedPolicyRulesToFormValues=applyExtractedPolicyRulesToFormValues,exports.base64FileSize=base64FileSize,exports.buildBulkCreateCardPolicyTemplateRequestsFromInteractiveForm=buildBulkCreateCardPolicyTemplateRequestsFromInteractiveForm,exports.buildCardPolicyFormValuesFromRequest=buildCardPolicyFormValuesFromRequest,exports.buildCreateCardPolicyTemplateRequest=buildCreateCardPolicyTemplateRequest,exports.buildCreateCardPolicyTemplateRequestFromInteractiveForm=buildCreateCardPolicyTemplateRequestFromInteractiveForm,exports.buildMccCategoryChipId=buildMccCategoryChipId,exports.buildStickyKeySet=buildStickyKeySet,exports.buildVendorChipId=buildVendorChipId,exports.capitaliseWords=capitaliseWords,exports.capitalize=capitalize,exports.cellVerticalAlignToFlexAlign=cellVerticalAlignToFlexAlign,exports.clearAutoLogoutContext=clearAutoLogoutContext,exports.clickableRowStyles=clickableRowStyles,exports.cloneDeep=cloneDeep,exports.clsx=clsx$1,exports.components=components,exports.composeClasses=composeClasses,exports.computeRecommendationSelectionFeedback=computeRecommendationSelectionFeedback,exports.computeStatementProcessingStepsFromElapsedTime=computeStatementProcessingStepsFromElapsedTime,exports.computeStickyLeftOffsets=computeStickyLeftOffsets,exports.createSvgIcon=createSvgIcon,exports.currencyAmountCompactFormatter=currencyAmountCompactFormatter,exports.darkColors=darkColors,exports.darkTheme=darkTheme,exports.debounce=debounce$1,exports.debounce$1=debounce,exports.defaultCardPolicyFormValues=defaultCardPolicyFormValues,exports.defer=defer,exports.describeSchedule=describeSchedule,exports.designDimension=designDimension,exports.fetchRequest=fetchRequest,exports.fileDownload=fileDownload,exports.formHasDirtyFields=formHasDirtyFields,exports.formatReconAccountDisplayName=formatReconAccountDisplayName,exports.generateDataTestId=generateDataTestId,exports.generateUtilityClass=generateUtilityClass,exports.generateUtilityClasses=generateUtilityClasses,exports.getAlpha2=getAlpha2,exports.getAlpha3=getAlpha3,exports.getCockpitColor=getCockpitColor,exports.getColorForALabel=getColorForALabel,exports.getCountries=getCountries$1,exports.getCreateTransactionFieldConfig=getCreateTransactionFieldConfig,exports.getCustomerDataFromAutoComplete=getCustomerDataFromAutoComplete,exports.getDefaultExportFromCjs=getDefaultExportFromCjs,exports.getDropdownStyles=getDropdownStyles$1,exports.getFileNameFromResponseHeaders=getFileNameFromResponseHeaders,exports.getFilteredThreads=getFilteredThreads,exports.getFullName=getFullName$1,exports.getHTMLWithCommentingSections=getHTMLWithCommentingSections,exports.getHistoricMonthsList=getHistoricMonthsList,exports.getInitialOpenThreadRequestFromSearch=getInitialOpenThreadRequestFromSearch,exports.getLabelColor=getLabelColor,exports.getMonthIndex=getMonthIndex,exports.getMultiSelectDropdownStyles=getMultiSelectDropdownStyles,exports.getRecipientTotalAmount=getRecipientTotalAmount,exports.getReconAccountDisplayName=getReconAccountDisplayName,exports.getReviewVendorTagColor=getReviewVendorTagColor,exports.getRichLabel=getRichLabel,exports.getSelectionData=getSelectionData,exports.getShowNegativeAmountInParenthesisDefaultValue=getShowNegativeAmountInParenthesisDefaultValue,exports.getShowNegativeAmountInParenthesisForPercentDefaultValue=getShowNegativeAmountInParenthesisForPercentDefaultValue,exports.getStableTransactionId=getStableTransactionId,exports.getStatementParseTransactionCount=getStatementParseTransactionCount,exports.getTagLabel=getTagLabel,exports.getTemplatesFromTemplatedData=getTemplatesFromTemplatedData,exports.getTransactionAppliedFiltersCount=getTransactionAppliedFiltersCount,exports.getTransactionTagColor=getTransactionTagColor$1,exports.getUpdatedFiltersOnCategoryChange=getUpdatedFiltersOnCategoryChange$1,exports.getUpdatedFiltersOnMatchingOperatorChange=getUpdatedFiltersOnMatchingOperatorChange$1,exports.getUpdatedFiltersOnValueChange=getUpdatedFiltersOnValueChange$1,exports.has=has,exports.hasAgentInsights=hasAgentInsights,exports.invoicingMenuList=invoicingMenuList,exports.isCloseManagementMenu=isCloseManagementMenu,exports.isClosedCardStatus=isClosedCardStatus,exports.isCollaborationEntityType=isCollaborationEntityType,exports.isCommentNotificationKind=isCommentNotificationKind,exports.isEqual=isEqual$5,exports.isLayoutSupported=isLayoutSupported,exports.isMobileOrTabletView=isMobileOrTabletView,exports.isMobilePhoneScreen=isMobilePhoneScreen,exports.isRecommendationFeedbackDimension=isRecommendationFeedbackDimension,exports.isZeniAIUser=isZeniAIUser,exports.jsxRuntimeExports=jsxRuntimeExports,exports.lightColors=lightColors,exports.lightTheme=lightTheme,exports.memoTheme=memoTheme,exports.menuList=menuList,exports.mergeColumnDeclarativeWithRenderers=mergeColumnDeclarativeWithRenderers,exports.mergeLayoutDefaults=mergeLayoutDefaults,exports.nanoid=nanoid,exports.ownerDocument=ownerDocument,exports.ownerWindow=ownerWindow,exports.percentValueToString=percentValueToString,exports.reactIsExports=reactIsExports$1,exports.refType=refType,exports.requireToInteger=requireToInteger,exports.requireToString=requireToString,exports.require_baseProperty=require_baseProperty,exports.require_baseToString=require_baseToString,exports.require_castSlice=require_castSlice,exports.require_hasUnicode=require_hasUnicode,exports.require_stringToArray=require_stringToArray,exports.resolveBackgroundStatementProcessingCompletedSteps=resolveBackgroundStatementProcessingCompletedSteps,exports.resolveColumnWidth=resolveColumnWidth,exports.roundAmountIfNeeded=roundAmountIfNeeded,exports.roundOffNumberToTwoDecimal=roundOffNumberToTwoDecimal,exports.routineIdFromSession=routineIdFromSession,exports.scrollContainerToTargetAdjusted=scrollContainerToTargetAdjusted,exports.setAutoLogoutContext=setAutoLogoutContext,exports.setShowNegativeAmountInParenthesisDefaultValue=setShowNegativeAmountInParenthesisDefaultValue,exports.setShowNegativeAmountInParenthesisForPercentDefaultValue=setShowNegativeAmountInParenthesisForPercentDefaultValue,exports.settingMenuList=settingMenuList,exports.shortCadence=shortCadence,exports.sp=sp,exports.styled=styled,exports.textAlignForCell=textAlignForCell,exports.textStyles=textStyles,exports.toCollaborationEntityType=toCollaborationEntityType,exports.toGroupedAccountingClassOptions=toGroupedAccountingClassOptions,exports.toGroupedQboAccountOptions=toGroupedQboAccountOptions,exports.toInstitutionLogoDataUri=toInstitutionLogoDataUri,exports.toInvoicingMenuOptionType=toInvoicingMenuOptionType,exports.toInvoicingMenuOptionTypeStrict=toInvoicingMenuOptionTypeStrict,exports.toMccCategoryChipFieldValue=toMccCategoryChipFieldValue,exports.toMenuOptionType=toMenuOptionType,exports.toSettingsMenuOptionTypeStrict=toSettingsMenuOptionTypeStrict,exports.toSupportedLocaleStrict=toSupportedLocaleStrict,exports.toVendorChipFieldValue=toVendorChipFieldValue,exports.trackTreasuryTransferAnalytics=trackTreasuryTransferAnalytics,exports.uploadAttachmentReceipts=uploadAttachmentReceipts,exports.useAgentInsightEdits=useAgentInsightEdits,exports.useAnimation=useAnimation,exports.useApprovalRulesV3Config=useApprovalRulesV3Config,exports.useBackNavigation=useBackNavigation,exports.useCollaborationInfoContext=useCollaborationInfoContext,exports.useCommentsDrawer=useCommentsDrawer,exports.useDefaultProps=useDefaultProps,exports.useDelayUnmount=useDelayUnmount,exports.useDropdownPortal=useDropdownPortal,exports.useEnhancedEffect=useEnhancedEffect,exports.useEventCallback=useEventCallback,exports.useExpenseAutomationEnabledForUser=useExpenseAutomationEnabledForUser,exports.useFieldArray=useFieldArray,exports.useFieldHelp=useFieldHelp,exports.useFilteredThreads=useFilteredThreads,exports.useFloatingThreads=useFloatingThreads,exports.useForm=useForm,exports.useFormContext=useFormContext,exports.useGlobalInfoContext=useGlobalInfoContext,exports.useHandleSelection=useHandleSelection,exports.useIsCreateTransactionTypeAllowed=useIsCreateTransactionTypeAllowed,exports.useIsFeatureGateLoading=useIsFeatureGateLoading,exports.useLockBodyScroll=useLockBodyScroll,exports.useMeetingLinks=useMeetingLinks,exports.usePanelDirtyGuardRegistry=usePanelDirtyGuardRegistry,exports.usePanelInternal=usePanelInternal,exports.usePrevious=usePrevious$1,exports.useQuickViewMode=useQuickViewMode,exports.useRegisterBackHandler=useRegisterBackHandler,exports.useRegisterPanelDirtyGuard=useRegisterPanelDirtyGuard,exports.useRequestCloseAllCommentDrawers=useRequestCloseAllCommentDrawers,exports.useRtl=useRtl,exports.useSessionAutoLogoutConfig=useSessionAutoLogoutConfig,exports.useSidePanelContext=useSidePanelContext,exports.useSlot=useSlot,exports.useSlotProps=useSlotProps,exports.useTheme=useTheme,exports.useToolkitContext=useToolkitContext,exports.useWindowSizeContext=useWindowSizeContext,exports.useZeniCardsVisibilityConfig=useZeniCardsVisibilityConfig,exports.useZeniFeatureContext=useZeniFeatureContext,exports.useZeniThemeContext=useZeniThemeContext,exports.waitFor=waitFor;
|
|
91782
|
-
//# sourceMappingURL=SessionTimeoutPopup-
|
|
91782
|
+
//# sourceMappingURL=SessionTimeoutPopup-CbT1ZTmx.cjs.map
|