@buoy-gg/images 7.0.75 → 7.0.77
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/images",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.77",
|
|
4
4
|
"description": "Inspect instrumented React Native Image and expo-image loads, available cache and timing data, failures, and image-size estimates.",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"**/autoCapture.*"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@buoy-gg/shared-ui": "^7.0.
|
|
22
|
+
"@buoy-gg/shared-ui": "^7.0.77"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": "*"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";var M=Object.defineProperty;var De=Object.getOwnPropertyDescriptor;var Be=Object.getOwnPropertyNames;var Ne=Object.prototype.hasOwnProperty;var w=(e,t)=>()=>(e&&(t=e(e=0)),t);var J=(e,t)=>{for(var r in t)M(e,r,{get:t[r],enumerable:true})},R=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Be(t))!Ne.call(e,n)&&n!==r&&M(e,n,{get:()=>t[n],enumerable:!(i=De(t,n))||i.enumerable});return e},Oe=(e,t,r)=>(R(e,t,"default"),r&&R(r,t,"default"));var Ve=e=>R(M({},"__esModule",{value:true}),e);var Ue,g=w(()=>{"use strict";Ue=(()=>{try{let e=globalThis.Capacitor;if(e&&typeof e.isNativePlatform=="function"&&e.isNativePlatform())return e.DEBUG===true}catch{}return process.env.NODE_ENV!=="production"})();typeof window<"u"&&typeof globalThis.global>"u"&&(globalThis.global=globalThis)});function d(){let e=globalThis;return e[L]||(e[L]={records:[],byId:new Map,nextId:1,listeners:new Set,snapshot:[],emitScheduled:false,captureInstalled:false,rnInstalled:false,expoInstalled:false,decoratorRegistered:false,decoratorInvoked:false,attachSeen:0,expoAvailable:false,expoPatched:false,reloadRequests:new Map,actionListeners:new Set,expoInstances:new Map,overrides:new Map,flashUntil:new Map,recordVersions:new Map,globalVersion:0,versionCounter:0,globalModes:{network:"normal",blank:false},captureDisabled:false,remoteDispatch:null,mirrorPixelRatio:null,mirrorCaptureStatus:null}),e[L]}var L,A=w(()=>{"use strict";g();L=Symbol.for("buoy.images.globalState.v1")});function Ke(e){d().remoteDispatch=e}function y(){return d().remoteDispatch}async function ze(e){try{let t=await e;return{ok:!!t?.ok,message:String(t?.message??"")}}catch(t){return{ok:false,message:String(t?.message??t)}}}var P=w(()=>{"use strict";g();A()});var Q,Fe=w(()=>{"use strict";g();Q='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'});import{useEffect as je,useState as We}from"react";import{createPortal as _e}from"react-dom";import{jsx as He}from"react/jsx-runtime";function Z(){let e=document;if(e[S])return e[S].host;let t=document.createElement("div");t.dataset.buoyPortalHost="",Object.assign(t.style,{position:"fixed",inset:"0",zIndex:"2147483647",pointerEvents:"none",fontFamily:Q});let r=()=>{let o=document.fullscreenElement,u=o&&o.tagName!=="CANVAS"?o:document.body;t.parentElement!==u&&u.appendChild(t)},i=new Map,n=o=>{(!t.contains(o.target)||!T(o.target))&&i.set(o.code||o.key,{key:o.key,code:o.code,location:o.location,keyCode:o.keyCode,which:o.which,altKey:o.altKey,ctrlKey:o.ctrlKey,metaKey:o.metaKey,shiftKey:o.shiftKey})},a=o=>{i.delete(o.code||o.key)},c=()=>i.clear(),p=()=>{let o=[...i.values()];i.clear();for(let u of o)document.dispatchEvent(new KeyboardEvent("keyup",{...u,bubbles:true}))},l=o=>{T(o.target)&&o.stopPropagation()},s=o=>o.stopPropagation();return r(),document.addEventListener("fullscreenchange",r),document.addEventListener("keydown",n,true),document.addEventListener("keyup",a,true),window.addEventListener("blur",c),t.addEventListener("focusin",p),t.addEventListener("keydown",l),t.addEventListener("keyup",l),t.addEventListener("keypress",l),t.addEventListener("wheel",s,{passive:true}),e[S]={host:t,users:0,dispose:()=>{document.removeEventListener("fullscreenchange",r),document.removeEventListener("keydown",n,true),document.removeEventListener("keyup",a,true),window.removeEventListener("blur",c),t.remove(),delete e[S]}},t}function $e({children:e}){let[t,r]=We(null);return je(()=>{let i=Z(),n=document[S];return n.users++,r(i),()=>{--n.users===0&&n.dispose()}},[]),t?_e(He("div",{"data-buoy-root":"",style:{display:"contents",pointerEvents:"auto"},children:e}),t):null}var S,T,qe=w(()=>{"use strict";g();Fe();S=Symbol.for("@buoy-gg/portal-host"),T=e=>{if(!(e instanceof Element))return false;if(e.closest("input, textarea, select"))return true;let t=e.closest("[contenteditable]")?.getAttribute("contenteditable")?.toLowerCase();return t===""||t==="true"||t==="plaintext-only"}});var X={};J(X,{AccessibilityInfo:()=>Qe,ActivityIndicator:()=>de,Alert:()=>pe,Animated:()=>Ze,AppRegistry:()=>et,AppState:()=>tt,Appearance:()=>Xe,BackHandler:()=>at,Button:()=>ue,CheckBox:()=>yt,Clipboard:()=>rt,DeviceEventEmitter:()=>Pt,Dimensions:()=>ot,Easing:()=>st,FlatList:()=>te,I18nManager:()=>nt,Image:()=>ae,ImageBackground:()=>gt,InteractionManager:()=>lt,Keyboard:()=>it,KeyboardAvoidingView:()=>vt,LayoutAnimation:()=>dt,Linking:()=>ut,LogBox:()=>Rt,Modal:()=>ie,NativeEventEmitter:()=>ct,NativeModules:()=>Je,PanResponder:()=>pt,Picker:()=>wt,PixelRatio:()=>D,Platform:()=>ft,Pressable:()=>ne,ProgressBar:()=>St,RefreshControl:()=>xt,SafeAreaView:()=>At,ScrollView:()=>K,SectionList:()=>Et,Share:()=>mt,StatusBar:()=>kt,StyleSheet:()=>ee,Switch:()=>le,Text:()=>O,TextInput:()=>V,Touchable:()=>Lt,TouchableHighlight:()=>oe,TouchableNativeFeedback:()=>Ct,TouchableOpacity:()=>U,TouchableWithoutFeedback:()=>se,UIManager:()=>ht,Vibration:()=>bt,View:()=>N,VirtualizedList:()=>It,YellowBox:()=>Mt,findNodeHandle:()=>ce,unstable_createElement:()=>Ye,useColorScheme:()=>Tt,useLocaleContext:()=>Dt,useWindowDimensions:()=>Bt});import*as Ge from"react-native-web";import{unstable_createElement as Ye,NativeModules as Je,AccessibilityInfo as Qe,Animated as Ze,Appearance as Xe,AppRegistry as et,AppState as tt,BackHandler as at,Clipboard as rt,Dimensions as ot,Easing as st,I18nManager as nt,Keyboard as it,InteractionManager as lt,LayoutAnimation as dt,Linking as ut,NativeEventEmitter as ct,PanResponder as pt,PixelRatio as D,Platform as ft,Share as mt,StyleSheet as ee,UIManager as ht,Vibration as bt,CheckBox as yt,FlatList as te,Image as ae,ImageBackground as gt,KeyboardAvoidingView as vt,Picker as wt,ProgressBar as St,RefreshControl as xt,SafeAreaView as At,SectionList as Et,StatusBar as kt,Touchable as Lt,TouchableNativeFeedback as Ct,VirtualizedList as It,YellowBox as Mt,LogBox as Rt,DeviceEventEmitter as Pt,useColorScheme as Tt,useLocaleContext as Dt,useWindowDimensions as Bt}from"react-native-web";import*as m from"react-native-web";import{createElement as B,forwardRef as re,useCallback as Nt,useRef as Ot}from"react";function b(e){let t=re((i,n)=>{let{accessibilityState:a,accessibilityValue:c,...p}=i;for(let l of["busy","checked","disabled","expanded","selected"])a?.[l]!==void 0&&p[`aria-${l}`]===void 0&&(p[`aria-${l}`]=a[l]);for(let[l,s]of Object.entries({min:"valuemin",max:"valuemax",now:"valuenow",text:"valuetext"}))c?.[l]!==void 0&&p[`aria-${s}`]===void 0&&(p[`aria-${s}`]=c[l]);return B(e,{...p,ref:n})}),r=e.State;return r&&Object.assign(t,{State:r}),t.displayName=e.displayName??e.name??"NativeWebView",t}var N,O,V,U,oe,se,ne,K,z,ie,le,de,ue,ce,pe,fe=w(()=>{g();Oe(X,Ge);qe();N=b(m.View),O=b(m.Text),V=b(m.TextInput),U=b(m.TouchableOpacity),oe=b(m.TouchableHighlight),se=b(m.TouchableWithoutFeedback),ne=b(m.Pressable),K=b(m.ScrollView),z=re((e,t)=>{let r=Ot(null),i=Nt(n=>{if(n){let a=n;for(;a.parentElement&&a.parentElement!==document.body;)a=a.parentElement;a.parentElement===document.body&&(r.current=a,Object.assign(a.style,{position:"relative",zIndex:"2147483647",pointerEvents:"auto"}),Z().appendChild(a))}else r.current&&(document.body.appendChild(r.current),r.current=null);typeof t=="function"?t(n):t&&(t.current=n)},[t]);return B($e,null,B(m.Modal,{...e,ref:i}))});z.displayName="Modal";ie=b(z),le=b(m.Switch),de=b(m.ActivityIndicator),ue=b(m.Button),ce=m.findNodeHandle,pe={alert(e,t,r,i){if(typeof document>"u")return;let n=document.createElement("dialog");n.dataset.buoyRoot="",n.setAttribute("aria-label",e),n.style.cssText="position:fixed;inset:0;margin:auto;width:min(440px,90vw);padding:24px;border:1px solid #475569;border-radius:14px;background:#17212e;color:#f1f5f9;font:14px system-ui;box-shadow:0 20px 80px #0008;z-index:2147483647";let a=document.createElement("h2");if(a.textContent=e,a.style.cssText="font-size:18px;margin:0 0 12px",n.appendChild(a),t){let s=document.createElement("p");s.textContent=t,s.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px",n.appendChild(s)}let c=document.createElement("div");c.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";let p=r?.length?r:[{text:"OK"}],l=()=>{n.close?.(),n.remove()};for(let s of p){let o=document.createElement("button");o.type="button",o.textContent=s.text??"OK",o.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${s.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`,o.onclick=()=>{l(),s.onPress?.()},c.appendChild(o)}n.addEventListener("cancel",s=>{s.preventDefault(),i?.cancelable!==false&&(l(),i?.onDismiss?.())}),n.appendChild(c),document.body.appendChild(n),n.showModal?n.showModal():n.setAttribute("open","")}}});var me={};J(me,{clearRecords:()=>ye,computeStats:()=>Se,createRecord:()=>he,disableImagesCapture:()=>ge,effectivePixelRatio:()=>j,estDecodedBytes:()=>W,estWastedBytes:()=>_,getRecord:()=>F,getSnapshot:()=>E,neededPixels:()=>I,oversizeFactor:()=>we,replaceImagesFromSnapshot:()=>ve,subscribe:()=>be,updateRecord:()=>h});import{isBuoyAssetPath as Vt}from"@buoy-gg/shared-ui/web";function Ut(){let e=d();e.emitScheduled||(e.emitScheduled=true,requestAnimationFrame(()=>{e.emitScheduled=false;for(let t of e.listeners)t()}))}function C(){let e=d();e.snapshot=[...e.records],Ut()}function he(e){let t=d(),r={...e,id:t.nextId++,createdAt:Date.now(),status:"pending",mounted:true,loadCount:0};if(t.records.push(r),t.byId.set(r.id,r),t.records.length>H){let i=t.records.splice(0,t.records.length-H);for(let n of i)t.byId.delete(n.id)}return C(),r}function h(e,t){let r=d().byId.get(e);if(r)return Object.assign(r,t),C(),r}function F(e){return d().byId.get(e)}function E(){return d().snapshot}function be(e){return d().listeners.add(e),()=>d().listeners.delete(e)}function ye(){y()?.("clearRecords");let e=d();e.records=e.records.filter(t=>t.mounted&&t.status!=="loaded"&&t.status!=="error"),e.byId=new Map(e.records.map(t=>[t.id,t])),C()}function ge(){d().captureDisabled=true}function ve(e){let t=d(),r=(e.records??[]).filter(a=>!Vt(a.uri)),i=0;for(let a of r)a.layout&&a.neededPx&&a.layout.width>i&&(i=a.layout.width,t.mirrorPixelRatio=a.neededPx.width/a.layout.width);let n=Date.now();t.records=[...r].reverse().map(a=>({id:a.id,lib:a.lib,uri:a.uri,sourceKind:a.kind,status:a.status,mounted:a.mounted,createdAt:n-a.ageMs,durationMs:a.ms??void 0,intrinsic:a.intrinsic??void 0,layout:a.layout??void 0,cacheVerdict:a.cache??void 0,cacheVerdictSource:a.cacheSource??void 0,progressSeen:a.progressSeen,bytesLoaded:a.status==="loaded"?a.bytesTotal??void 0:void 0,bytesTotal:a.bytesTotal??void 0,error:a.error??void 0,errorCode:a.errorCode??void 0,loadCount:a.loadCount,overrideLabel:a.overrideLabel??void 0,hasAltText:a.hasAltText??void 0,layoutShifts:a.layoutShifts})),t.byId=new Map(t.records.map(a=>[a.id,a])),e.globalModes&&(t.globalModes={...e.globalModes}),e.captureStatus&&(t.mirrorCaptureStatus=e.captureStatus),C();for(let a of t.actionListeners)a()}function j(){return d().mirrorPixelRatio??D.get()}function I(e){if(!e.layout||e.layout.width<=0||e.layout.height<=0)return null;let t=j();return{width:Math.round(e.layout.width*t),height:Math.round(e.layout.height*t)}}function we(e){let t=I(e);if(!t||!e.intrinsic)return null;let r=t.width*t.height,i=e.intrinsic.width*e.intrinsic.height;return r<=0||i<=0?null:Math.sqrt(i/r)}function W(e){return e.intrinsic?e.intrinsic.width*e.intrinsic.height*4:0}function _(e){let t=I(e);if(!t||!e.intrinsic)return 0;let r=(e.intrinsic.width*e.intrinsic.height-t.width*t.height)*4;return Math.max(0,r)}function Se(e){let t={total:e.length,loading:0,loaded:0,errors:0,networkLoads:0,estDecodedBytes:0,estWastedBytes:0};for(let r of e)(r.status==="loading"||r.status==="pending")&&r.mounted&&t.loading++,r.status==="loaded"&&t.loaded++,r.status==="error"&&t.errors++,(r.progressSeen||r.cacheVerdict==="none")&&t.networkLoads++,r.mounted&&r.status==="loaded"&&(t.estDecodedBytes+=W(r),t.estWastedBytes+=_(r));return t}var H,$=w(()=>{"use strict";g();fe();P();A();H=500});g();P();A();$();function xe(){for(let e of d().actionListeners)e()}function Ae(e){let t=d();if(e!=null){t.expoInstances.get(e)?.forceUpdate?.();return}for(let r of t.expoInstances.values())r?.forceUpdate?.()}function k(e){let t=d();t.recordVersions.set(e,++t.versionCounter),xe(),Ae(e)}function Ee(){let e=d();e.globalVersion=++e.versionCounter,xe(),Ae()}function Kt(e,t){return t.type==="url"?{id:e,kind:"url",uri:t.uri}:{id:e,kind:t.type}}function ke(e,t){d().overrides.set(e,t),h(e,{overrideLabel:t.label}),k(e)}function zt(e,t){t.source&&y()?.("setOverride",Kt(e,t.source)),ke(e,t)}function Le(e){d().overrides.delete(e),h(e,{overrideLabel:void 0}),k(e)}function Ft(e){y()?.("clearOverride",{id:e}),Le(e)}function q(e){if(e!=null)return d().overrides.get(e)}function jt(e){return e.type==="hang"?"loading":e.type}function Wt(e,t){y()?.("massAction",{kind:jt(e)});let r=0;for(let i of E())i.mounted&&(ke(i.id,{source:e,label:t}),r++);return r}function _t(){y()?.("massAction",{kind:"restore"});let e=new Set(d().overrides.keys());for(let t of E())t.overrideLabel!=null&&e.add(t.id);for(let t of e)Le(t);return e.size}function Ht(e=2500){y()?.("massAction",{kind:"flash"});let t=0;for(let r of E())r.mounted&&(Ce(r.id,e),t++);return t}function Ce(e,t=2500){d().flashUntil.set(e,Date.now()+t),k(e),setTimeout(()=>{d().flashUntil.delete(e),k(e)},t+50)}function $t(e,t=2500){y()?.("flash",{id:e}),Ce(e,t)}function qt(e){y()?.("setNetworkMode",{mode:e}),d().globalModes.network=e,Ee()}function Gt(e){y()?.("setBlankImages",{enabled:e}),d().globalModes.blank=e,Ee()}function G(){return d().globalModes}g();A();$();import{isBuoyElement as Yt,isBuoyAssetPath as Jt}from"@buoy-gg/shared-ui/web";var v=new Map,x,Ie=0,Me="data:image/png;base64,";function Y(e){let t=F(e.id);if(!t)return;let r=d(),i=q(e.id),n=G(),a=e.source;if(n.network==="offline"&&t.sourceKind==="network"&&(a=Me),i?.source){let o=i.source;o.type==="url"?a=o.uri:o.type==="error"?a=Me:a=null,o.type==="hang"&&h(e.id,{status:"loading"})}let c=r.reloadRequests.get(e.id),p=c&&c.nonce!==e.nonce;if(p){if(e.nonce=c.nonce,c.bust&&a&&/^https?:/.test(new URL(a,document.baseURI).href)){let o=new URL(a,document.baseURI);o.searchParams.set("__buoy_reload",String(Date.now())),a=o.href}e.image.removeAttribute("src"),h(e.id,{status:"loading",startedAt:Date.now(),loadCount:t.loadCount+1})}if(n.network==="cold"&&a&&/^https?:/.test(new URL(a,document.baseURI).href)){if(e.coldSource!==a||!e.coldURL||p){e.coldSource=a;let o=new URL(a,document.baseURI);o.searchParams.set("__buoy_reload",`${Date.now()}-${e.nonce}`),e.coldURL=o.href}a=e.coldURL}else e.coldSource=void 0,e.coldURL=void 0;e.appliedSource=a,e.appliedSrcset=a!==e.source?null:e.srcset,e.appliedSrcset===null?e.image.removeAttribute("srcset"):e.image.getAttribute("srcset")!==e.appliedSrcset&&e.image.setAttribute("srcset",e.appliedSrcset),a===null?e.image.removeAttribute("src"):e.image.getAttribute("src")!==a&&e.image.setAttribute("src",a);let l=document.createElement("span").style;l.cssText=e.style??"";let s=i?.extraProps?.contentFit??i?.extraProps?.resizeMode;typeof s=="string"&&(l.objectFit={stretch:"fill",center:"none"}[s]??s),(n.blank||i?.source?.type==="blank")&&(l.opacity="0");for(let[o,u]of Object.entries(i?.style??{})){let f=o.replace(/[A-Z]/g,Te=>`-${Te.toLowerCase()}`);l.setProperty(f,typeof u=="number"&&!["opacity","zIndex","flex","flexGrow","flexShrink"].includes(o)?`${u}px`:String(u))}(r.flashUntil.get(e.id)??0)>Date.now()&&(l.outline="3px solid #ff453a"),e.appliedStyle=l.cssText||null,e.image.getAttribute("style")!==e.appliedStyle&&(e.appliedStyle===null?e.image.removeAttribute("style"):e.image.setAttribute("style",e.appliedStyle))}function Qt(e){if(v.has(e)||Yt(e))return;let t=e.currentSrc||e.src;if(!t||Jt(t))return;let r=he({lib:"web",uri:t,sourceKind:t.startsWith("data:")?"data":t.startsWith("blob:")?"file":"network",hasAltText:e.hasAttribute("alt")||e.hasAttribute("aria-label")}),i={id:r.id,image:e,source:e.getAttribute("src"),srcset:e.getAttribute("srcset"),style:e.getAttribute("style"),appliedSource:e.getAttribute("src"),appliedSrcset:e.getAttribute("srcset"),appliedStyle:e.getAttribute("style"),nonce:0,dispose(){}},n=()=>{let l=e.getBoundingClientRect(),s=r.layout,o=r.status==="loaded"&&s&&(s.width!==l.width||s.height!==l.height);h(r.id,{layout:{width:l.width,height:l.height},layoutShifts:(r.layoutShifts??0)+(o?1:0)})},a=()=>{let l=performance.getEntriesByName(e.currentSrc||e.src),s=l[l.length-1];h(r.id,{status:"loaded",loadedAt:Date.now(),intrinsic:{width:e.naturalWidth,height:e.naturalHeight},...!q(r.id)?.source&&G().network==="normal"?{uri:e.currentSrc||e.src}:{},durationMs:s?.duration,bytesTotal:s&&s.encodedBodySize>0?s.encodedBodySize:void 0,cacheVerdict:s&&s.transferSize>0?"none":void 0,cacheVerdictSource:s?"event":void 0}),n()},c=()=>h(r.id,{status:"error",erroredAt:Date.now(),error:"The browser could not load this image."});e.addEventListener("load",a),e.addEventListener("error",c);let p=typeof ResizeObserver>"u"?void 0:new ResizeObserver(n);p?.observe(e),i.dispose=()=>{p?.disconnect(),e.removeEventListener("load",a),e.removeEventListener("error",c)},v.set(e,i),n(),h(r.id,{status:"loading",startedAt:Date.now(),loadCount:1}),e.complete&&(e.naturalWidth>0?a():c()),Y(i)}function Re(){let e=d();if(typeof document>"u"||e.captureDisabled||x)return;e.captureInstalled=true;let t=new WeakSet,r=s=>{s.querySelectorAll("img").forEach(Qt);let o=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT);for(let u=o.nextNode();u;u=o.nextNode()){let f=u.shadowRoot;f&&(t.has(f)||(t.add(f),a.observe(f,n)),r(f))}},i=()=>{for(let[s,o]of v)s.isConnected||(o.dispose(),v.delete(s),h(o.id,{mounted:false}));r(document)},n={childList:true,subtree:true,attributes:true,attributeFilter:["src","srcset","style","alt"]},a=new MutationObserver(s=>{if(d().captureDisabled){Pe();return}for(let o of s){let u=o.target,f=v.get(u);!f||o.type!=="attributes"||(o.attributeName==="src"&&u.getAttribute("src")!==f.appliedSource||o.attributeName==="srcset"&&u.getAttribute("srcset")!==f.appliedSrcset?(f.dispose(),v.delete(u),h(f.id,{mounted:false})):o.attributeName==="style"&&u.getAttribute("style")!==f.appliedStyle&&(f.style=u.getAttribute("style"),Y(f)))}i()});a.observe(document.documentElement,n);let c=Element.prototype.attachShadow,p=function(s){let o=c.call(this,s);return s.mode==="open"&&!t.has(o)&&(t.add(o),a.observe(o,n)),o};Element.prototype.attachShadow=p;let l=()=>{for(let s of v.values())Y(s)};e.actionListeners.add(l),x=()=>{a.disconnect(),e.actionListeners.delete(l),Element.prototype.attachShadow===p&&(Element.prototype.attachShadow=c);for(let s of v.values()){s.dispose();for(let[o,u,f]of[["src",s.source,s.appliedSource],["srcset",s.srcset,s.appliedSrcset],["style",s.style,s.appliedStyle]])s.image.getAttribute(o)===f&&(u===null?s.image.removeAttribute(o):s.image.setAttribute(o,u));h(s.id,{mounted:false})}v.clear(),e.captureInstalled=false},i()}function Pe(){x?.(),x=void 0}function Zt(){if(typeof document>"u")return()=>{};Ie++===0&&Re();let e=false;return()=>{e||(e=true,--Ie===0&&Pe())}}function Xt(){return d().mirrorCaptureStatus??{installed:!!x,rnDecoratorActive:false,rnDecoratorTooLate:false,expoPatched:false,expoAvailable:false,browserObserverActive:!!x}}export{Ve as a,g as b,N as c,O as d,V as e,U as f,K as g,D as h,ee as i,te as j,ae as k,fe as l,d as m,A as n,Ke as o,y as p,ze as q,P as r,h as s,F as t,E as u,be as v,ye as w,ge as x,ve as y,j as z,I as A,we as B,W as C,_ as D,Se as E,me as F,$ as G,k as H,zt as I,Ft as J,q as K,Wt as L,_t as M,Ht as N,$t as O,qt as P,Gt as Q,G as R,Re as S,Zt as T,Xt as U};
|