Build 533169stable
Module 680243
1,392 characters · in no known chunkDependencies
Source Raw
function(e,t,n){"use strict";n.d(t,{A:()=>O});var r=n(311907),i=n(118356),s=n(73153),a=n(49463),o=n(9302),l=n(211753),u=n(206885),c=n(682763),d=n(327194);let _=new i.Vy("OverlayV3NativeModuleStore"),f=!1,p=!1,h=null,m=!1,E=null,g=null,A=(()=>{async function e(){T(),h=d.P.getInstance();try{await h.initialize(),f=!0}catch(e){(0,c._r)(null,"module_initialization_failed",{error:e}),f=!1,(0,c.mD)(o.UNSET_PID,e,{crashType:"native"})}finally{R.emitChange()}}return()=>(null==g&&(g=e()),g)})();function I(e){__OVERLAY__||!u.O||p!==e&&(p=e,e&&(0,o.setOutOfProcessSupport)(!0))}function T(){!__OVERLAY__&&u.O&&(E=null,m=!1,_.verbose("Maybe Enable Overlay"),I(l.x.oopEnabled))}function S(e){let{oopEnabled:t}=e;E=null,I(t)}function y(){return E=null,A(),!1}function v(e){let{isCrashedDisabled:t,error:n}=e;return!0===t&&(m=!0),null!=n&&(E=n instanceof Error?n.message:String(n)),!0}function N(){return A(),!1}class C extends r.Ay.Store{static displayName="Overlay-v3-Native-Module-Store";initialize(){this.waitFor(a.A)}get isModuleLoading(){return null!=g}get isOverlayEnabled(){return p}get isSupported(){return u.O}get isModuleLoaded(){return f}get isCrashedDisabled(){return m}get errorMessage(){return E}getNativeModule(){return h}}let R=new C(s.h,__OVERLAY__||!u.O?{}:{CONNECTION_OPEN:N,EXPERIMENT_OVERRIDE_BUCKET:T,OVERLAY_SET_ENABLED:S,OVERLAY_V3_LOAD_NATIVE_MODULE:y,OVERLAY_CRASHED:v}),O=R}