@buoy-gg/images 7.0.43 → 7.0.44

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.
@@ -0,0 +1 @@
1
+ "use client";var M=Object.defineProperty;var Le=Object.getOwnPropertyDescriptor;var Me=Object.getOwnPropertyNames;var Re=Object.prototype.hasOwnProperty;var v=(e,t)=>()=>(e&&(t=e(e=0)),t);var $=(e,t)=>{for(var r in t)M(e,r,{get:t[r],enumerable:true})},R=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Me(t))!Re.call(e,o)&&o!==r&&M(e,o,{get:()=>t[o],enumerable:!(s=Le(t,o))||s.enumerable});return e},Ce=(e,t,r)=>(R(e,t,"default"),r&&R(r,t,"default"));var Te=e=>R(M({},"__esModule",{value:true}),e);var g=v(()=>{"use strict";typeof window<"u"&&typeof globalThis.global>"u"&&(globalThis.global=globalThis)});function i(){let e=globalThis;return e[A]||(e[A]={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[A]}var A,w=v(()=>{"use strict";g();A=Symbol.for("buoy.images.globalState.v1")});function De(e){i().remoteDispatch=e}function h(){return i().remoteDispatch}async function Pe(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 C=v(()=>{"use strict";g();w()});var H={};$(H,{AccessibilityInfo:()=>Oe,ActivityIndicator:()=>te,Alert:()=>oe,Animated:()=>Ue,AppRegistry:()=>ze,AppState:()=>Fe,Appearance:()=>Ne,BackHandler:()=>We,Button:()=>ae,CheckBox:()=>at,Clipboard:()=>je,DeviceEventEmitter:()=>mt,Dimensions:()=>Ke,Easing:()=>_e,FlatList:()=>G,I18nManager:()=>$e,Image:()=>Y,ImageBackground:()=>rt,InteractionManager:()=>qe,Keyboard:()=>He,KeyboardAvoidingView:()=>ot,LayoutAnimation:()=>Ge,Linking:()=>Ye,LogBox:()=>ht,Modal:()=>X,NativeEventEmitter:()=>Je,NativeModules:()=>Ve,PanResponder:()=>Qe,Picker:()=>st,PixelRatio:()=>T,Platform:()=>Ze,Pressable:()=>Z,ProgressBar:()=>it,RefreshControl:()=>nt,SafeAreaView:()=>lt,ScrollView:()=>V,SectionList:()=>dt,Share:()=>Xe,StatusBar:()=>ut,StyleSheet:()=>q,Switch:()=>ee,Text:()=>P,TextInput:()=>B,Touchable:()=>ct,TouchableHighlight:()=>J,TouchableNativeFeedback:()=>ft,TouchableOpacity:()=>E,TouchableWithoutFeedback:()=>Q,UIManager:()=>et,Vibration:()=>tt,View:()=>D,VirtualizedList:()=>pt,YellowBox:()=>bt,findNodeHandle:()=>re,unstable_createElement:()=>Ee,useColorScheme:()=>gt,useLocaleContext:()=>yt,useWindowDimensions:()=>vt});import*as Be from"react-native-web";import{unstable_createElement as Ee,NativeModules as Ve,AccessibilityInfo as Oe,Animated as Ue,Appearance as Ne,AppRegistry as ze,AppState as Fe,BackHandler as We,Clipboard as je,Dimensions as Ke,Easing as _e,I18nManager as $e,Keyboard as He,InteractionManager as qe,LayoutAnimation as Ge,Linking as Ye,NativeEventEmitter as Je,PanResponder as Qe,PixelRatio as T,Platform as Ze,Share as Xe,StyleSheet as q,UIManager as et,Vibration as tt,CheckBox as at,FlatList as G,Image as Y,ImageBackground as rt,KeyboardAvoidingView as ot,Picker as st,ProgressBar as it,RefreshControl as nt,SafeAreaView as lt,SectionList as dt,StatusBar as ut,Touchable as ct,TouchableNativeFeedback as ft,VirtualizedList as pt,YellowBox as bt,LogBox as ht,DeviceEventEmitter as mt,useColorScheme as gt,useLocaleContext as yt,useWindowDimensions as vt}from"react-native-web";import*as f from"react-native-web";import{createElement as wt,forwardRef as xt}from"react";function b(e){let t=xt((r,s)=>{let{accessibilityState:o,accessibilityValue:a,...n}=r;for(let l of["busy","checked","disabled","expanded","selected"])o?.[l]!==void 0&&n[`aria-${l}`]===void 0&&(n[`aria-${l}`]=o[l]);for(let[l,c]of Object.entries({min:"valuemin",max:"valuemax",now:"valuenow",text:"valuetext"}))a?.[l]!==void 0&&n[`aria-${c}`]===void 0&&(n[`aria-${c}`]=a[l]);return wt(e,{...n,ref:s})});return t.displayName=e.displayName??e.name??"NativeWebView",t}var D,P,B,E,J,Q,Z,V,X,ee,te,ae,re,oe,se=v(()=>{g();Ce(H,Be);D=b(f.View),P=b(f.Text),B=b(f.TextInput),E=b(f.TouchableOpacity),J=b(f.TouchableHighlight),Q=b(f.TouchableWithoutFeedback),Z=b(f.Pressable),V=b(f.ScrollView),X=b(f.Modal),ee=b(f.Switch),te=b(f.ActivityIndicator),ae=b(f.Button),re=f.findNodeHandle,oe={alert(e,t,r,s){if(typeof document>"u")return;let o=document.createElement("dialog");o.dataset.buoyRoot="",o.setAttribute("aria-label",e),o.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",o.appendChild(a),t){let d=document.createElement("p");d.textContent=t,d.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px",o.appendChild(d)}let n=document.createElement("div");n.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";let l=r?.length?r:[{text:"OK"}],c=()=>{o.close?.(),o.remove()};for(let d of l){let u=document.createElement("button");u.type="button",u.textContent=d.text??"OK",u.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${d.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`,u.onclick=()=>{c(),d.onPress?.()},n.appendChild(u)}o.addEventListener("cancel",d=>{d.preventDefault(),s?.cancelable!==false&&(c(),s?.onDismiss?.())}),o.appendChild(n),document.body.appendChild(o),o.showModal?o.showModal():o.setAttribute("open","")}}});var ie={};$(ie,{clearRecords:()=>de,computeStats:()=>pe,createRecord:()=>ne,disableImagesCapture:()=>ue,effectivePixelRatio:()=>U,estDecodedBytes:()=>N,estWastedBytes:()=>z,getRecord:()=>O,getSnapshot:()=>x,neededPixels:()=>I,oversizeFactor:()=>fe,replaceImagesFromSnapshot:()=>ce,subscribe:()=>le,updateRecord:()=>p});function St(){let e=i();e.emitScheduled||(e.emitScheduled=true,requestAnimationFrame(()=>{e.emitScheduled=false;for(let t of e.listeners)t()}))}function k(){let e=i();e.snapshot=[...e.records],St()}function ne(e){let t=i(),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>F){let s=t.records.splice(0,t.records.length-F);for(let o of s)t.byId.delete(o.id)}return k(),r}function p(e,t){let r=i().byId.get(e);if(r)return Object.assign(r,t),k(),r}function O(e){return i().byId.get(e)}function x(){return i().snapshot}function le(e){return i().listeners.add(e),()=>i().listeners.delete(e)}function de(){h()?.("clearRecords");let e=i();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])),k()}function ue(){i().captureDisabled=true}function ce(e){let t=i(),r=e.records??[],s=0;for(let a of r)a.layout&&a.neededPx&&a.layout.width>s&&(s=a.layout.width,t.mirrorPixelRatio=a.neededPx.width/a.layout.width);let o=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:o-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),k();for(let a of t.actionListeners)a()}function U(){return i().mirrorPixelRatio??T.get()}function I(e){if(!e.layout||e.layout.width<=0||e.layout.height<=0)return null;let t=U();return{width:Math.round(e.layout.width*t),height:Math.round(e.layout.height*t)}}function fe(e){let t=I(e);if(!t||!e.intrinsic)return null;let r=t.width*t.height,s=e.intrinsic.width*e.intrinsic.height;return r<=0||s<=0?null:Math.sqrt(s/r)}function N(e){return e.intrinsic?e.intrinsic.width*e.intrinsic.height*4:0}function z(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 pe(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+=N(r),t.estWastedBytes+=z(r));return t}var F,W=v(()=>{"use strict";g();se();C();w();F=500});g();C();w();W();function be(){for(let e of i().actionListeners)e()}function he(e){let t=i();if(e!=null){t.expoInstances.get(e)?.forceUpdate?.();return}for(let r of t.expoInstances.values())r?.forceUpdate?.()}function S(e){let t=i();t.recordVersions.set(e,++t.versionCounter),be(),he(e)}function me(){let e=i();e.globalVersion=++e.versionCounter,be(),he()}function At(e,t){return t.type==="url"?{id:e,kind:"url",uri:t.uri}:{id:e,kind:t.type}}function ge(e,t){i().overrides.set(e,t),p(e,{overrideLabel:t.label}),S(e)}function kt(e,t){t.source&&h()?.("setOverride",At(e,t.source)),ge(e,t)}function ye(e){i().overrides.delete(e),p(e,{overrideLabel:void 0}),S(e)}function It(e){h()?.("clearOverride",{id:e}),ye(e)}function j(e){if(e!=null)return i().overrides.get(e)}function Lt(e){return e.type==="hang"?"loading":e.type}function Mt(e,t){h()?.("massAction",{kind:Lt(e)});let r=0;for(let s of x())s.mounted&&(ge(s.id,{source:e,label:t}),r++);return r}function Rt(){h()?.("massAction",{kind:"restore"});let e=new Set(i().overrides.keys());for(let t of x())t.overrideLabel!=null&&e.add(t.id);for(let t of e)ye(t);return e.size}function Ct(e=2500){h()?.("massAction",{kind:"flash"});let t=0;for(let r of x())r.mounted&&(ve(r.id,e),t++);return t}function ve(e,t=2500){i().flashUntil.set(e,Date.now()+t),S(e),setTimeout(()=>{i().flashUntil.delete(e),S(e)},t+50)}function Tt(e,t=2500){h()?.("flash",{id:e}),ve(e,t)}function Dt(e){h()?.("setNetworkMode",{mode:e}),i().globalModes.network=e,me()}function Pt(e){h()?.("setBlankImages",{enabled:e}),i().globalModes.blank=e,me()}function K(){return i().globalModes}g();w();W();var m=new Map,y,we=0,xe="data:image/png;base64,";function _(e){let t=O(e.id);if(!t)return;let r=i(),s=j(e.id),o=K(),a=e.source;if(o.network==="offline"&&t.sourceKind==="network"&&(a=xe),s?.source){let u=s.source;u.type==="url"?a=u.uri:u.type==="error"?a=xe:a=null,u.type==="hang"&&p(e.id,{status:"loading"})}let n=r.reloadRequests.get(e.id),l=n&&n.nonce!==e.nonce;if(l){if(e.nonce=n.nonce,n.bust&&a&&/^https?:/.test(new URL(a,document.baseURI).href)){let u=new URL(a,document.baseURI);u.searchParams.set("__buoy_reload",String(Date.now())),a=u.href}e.image.removeAttribute("src"),p(e.id,{status:"loading",startedAt:Date.now(),loadCount:t.loadCount+1})}if(o.network==="cold"&&a&&/^https?:/.test(new URL(a,document.baseURI).href)){if(e.coldSource!==a||!e.coldURL||l){e.coldSource=a;let u=new URL(a,document.baseURI);u.searchParams.set("__buoy_reload",`${Date.now()}-${e.nonce}`),e.coldURL=u.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 c=document.createElement("span").style;c.cssText=e.style??"";let d=s?.extraProps?.contentFit??s?.extraProps?.resizeMode;typeof d=="string"&&(c.objectFit={stretch:"fill",center:"none"}[d]??d),(o.blank||s?.source?.type==="blank")&&(c.opacity="0");for(let[u,L]of Object.entries(s?.style??{})){let ke=u.replace(/[A-Z]/g,Ie=>`-${Ie.toLowerCase()}`);c.setProperty(ke,typeof L=="number"&&!["opacity","zIndex","flex","flexGrow","flexShrink"].includes(u)?`${L}px`:String(L))}(r.flashUntil.get(e.id)??0)>Date.now()&&(c.outline="3px solid #ff453a"),e.appliedStyle=c.cssText||null,e.image.getAttribute("style")!==e.appliedStyle&&(e.appliedStyle===null?e.image.removeAttribute("style"):e.image.setAttribute("style",e.appliedStyle))}function Bt(e){if(m.has(e)||e.closest("[data-buoy-root]"))return;let t=e.currentSrc||e.src;if(!t)return;let r=ne({lib:"web",uri:t,sourceKind:t.startsWith("data:")?"data":t.startsWith("blob:")?"file":"network",hasAltText:e.hasAttribute("alt")||e.hasAttribute("aria-label")}),s={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(){}},o=()=>{let c=e.getBoundingClientRect(),d=r.layout,u=r.status==="loaded"&&d&&(d.width!==c.width||d.height!==c.height);p(r.id,{layout:{width:c.width,height:c.height},layoutShifts:(r.layoutShifts??0)+(u?1:0)})},a=()=>{let c=performance.getEntriesByName(e.currentSrc||e.src),d=c[c.length-1];p(r.id,{status:"loaded",loadedAt:Date.now(),intrinsic:{width:e.naturalWidth,height:e.naturalHeight},...!j(r.id)?.source&&K().network==="normal"?{uri:e.currentSrc||e.src}:{},durationMs:d?.duration,bytesTotal:d&&d.encodedBodySize>0?d.encodedBodySize:void 0,cacheVerdict:d&&d.transferSize>0?"none":void 0,cacheVerdictSource:d?"event":void 0}),o()},n=()=>p(r.id,{status:"error",erroredAt:Date.now(),error:"The browser could not load this image."});e.addEventListener("load",a),e.addEventListener("error",n);let l=typeof ResizeObserver>"u"?void 0:new ResizeObserver(o);l?.observe(e),s.dispose=()=>{l?.disconnect(),e.removeEventListener("load",a),e.removeEventListener("error",n)},m.set(e,s),o(),p(r.id,{status:"loading",startedAt:Date.now(),loadCount:1}),e.complete&&(e.naturalWidth>0?a():n()),_(s)}function Se(){let e=i();if(typeof document>"u"||e.captureDisabled||y)return;e.captureInstalled=true;let t=()=>{for(let[o,a]of m)o.isConnected||(a.dispose(),m.delete(o),p(a.id,{mounted:false}));document.querySelectorAll("img").forEach(Bt)},r=new MutationObserver(o=>{if(i().captureDisabled){Ae();return}for(let a of o){let n=a.target,l=m.get(n);!l||a.type!=="attributes"||(a.attributeName==="src"&&n.getAttribute("src")!==l.appliedSource||a.attributeName==="srcset"&&n.getAttribute("srcset")!==l.appliedSrcset?(l.dispose(),m.delete(n),p(l.id,{mounted:false})):a.attributeName==="style"&&n.getAttribute("style")!==l.appliedStyle&&(l.style=n.getAttribute("style"),_(l)))}t()});r.observe(document.documentElement,{childList:true,subtree:true,attributes:true,attributeFilter:["src","srcset","style","alt"]});let s=()=>{for(let o of m.values())_(o)};e.actionListeners.add(s),y=()=>{r.disconnect(),e.actionListeners.delete(s);for(let o of m.values()){o.dispose();for(let[a,n,l]of[["src",o.source,o.appliedSource],["srcset",o.srcset,o.appliedSrcset],["style",o.style,o.appliedStyle]])o.image.getAttribute(a)===l&&(n===null?o.image.removeAttribute(a):o.image.setAttribute(a,n));p(o.id,{mounted:false})}m.clear(),e.captureInstalled=false},t()}function Ae(){y?.(),y=void 0}function Et(){if(typeof document>"u")return()=>{};we++===0&&Se();let e=false;return()=>{e||(e=true,--we===0&&Ae())}}function Vt(){return i().mirrorCaptureStatus??{installed:!!y,rnDecoratorActive:false,rnDecoratorTooLate:false,expoPatched:false,expoAvailable:false,browserObserverActive:!!y}}export{Te as a,g as b,D as c,P as d,B as e,E as f,V as g,T as h,q as i,G as j,Y as k,se as l,i as m,w as n,De as o,h as p,Pe as q,C as r,p as s,O as t,x as u,le as v,de as w,ue as x,ce as y,U as z,I as A,fe as B,N as C,z as D,pe as E,ie as F,W as G,S as H,kt as I,It as J,j as K,Mt as L,Rt as M,Ct as N,Tt as O,Dt as P,Pt as Q,K as R,Se as S,Et as T,Vt as U};
@@ -0,0 +1 @@
1
+ "use client";var L=Object.defineProperty;var me=Object.getOwnPropertyDescriptor;var ye=Object.getOwnPropertyNames;var ve=Object.prototype.hasOwnProperty;var m=(e,t)=>()=>(e&&(t=e(e=0)),t);var N=(e,t)=>{for(var r in t)L(e,r,{get:t[r],enumerable:true})},I=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ye(t))!ve.call(e,o)&&o!==r&&L(e,o,{get:()=>t[o],enumerable:!(i=me(t,o))||i.enumerable});return e},we=(e,t,r)=>(I(e,t,"default"),r&&I(r,t,"default"));var Se=e=>I(L({},"__esModule",{value:true}),e);var h=m(()=>{"use strict";typeof window<"u"&&typeof globalThis.global>"u"&&(globalThis.global=globalThis)});function s(){let e=globalThis;return e[S]||(e[S]={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[S]}var S,y=m(()=>{"use strict";h();S=Symbol.for("buoy.images.globalState.v1")});function xe(e){s().remoteDispatch=e}function p(){return s().remoteDispatch}async function Ae(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 M=m(()=>{"use strict";h();y()});var z={};N(z,{AccessibilityInfo:()=>Me,ActivityIndicator:()=>$e,Alert:()=>Y,Animated:()=>Ce,AppRegistry:()=>Te,AppState:()=>De,Appearance:()=>Re,BackHandler:()=>Pe,Button:()=>Ge,CheckBox:()=>Ye,Clipboard:()=>Be,DeviceEventEmitter:()=>bt,Dimensions:()=>Ee,Easing:()=>Ue,FlatList:()=>W,I18nManager:()=>Ve,Image:()=>j,ImageBackground:()=>Je,InteractionManager:()=>Ne,Keyboard:()=>Oe,KeyboardAvoidingView:()=>Qe,LayoutAnimation:()=>ze,Linking:()=>Fe,LogBox:()=>pt,Modal:()=>Ze,NativeEventEmitter:()=>We,NativeModules:()=>Ie,PanResponder:()=>je,Picker:()=>Xe,PixelRatio:()=>C,Platform:()=>Ke,Pressable:()=>et,ProgressBar:()=>tt,RefreshControl:()=>at,SafeAreaView:()=>rt,ScrollView:()=>K,SectionList:()=>ot,Share:()=>_e,StatusBar:()=>st,StyleSheet:()=>F,Switch:()=>it,Text:()=>_,TextInput:()=>H,Touchable:()=>nt,TouchableHighlight:()=>lt,TouchableNativeFeedback:()=>dt,TouchableOpacity:()=>q,TouchableWithoutFeedback:()=>ut,UIManager:()=>He,Vibration:()=>qe,View:()=>$,VirtualizedList:()=>ct,YellowBox:()=>ft,findNodeHandle:()=>G,unstable_createElement:()=>Le,useColorScheme:()=>ht,useLocaleContext:()=>gt,useWindowDimensions:()=>mt});import*as ke from"react-native-web";import{unstable_createElement as Le,NativeModules as Ie,AccessibilityInfo as Me,Animated as Ce,Appearance as Re,AppRegistry as Te,AppState as De,BackHandler as Pe,Clipboard as Be,Dimensions as Ee,Easing as Ue,I18nManager as Ve,Keyboard as Oe,InteractionManager as Ne,LayoutAnimation as ze,Linking as Fe,NativeEventEmitter as We,PanResponder as je,PixelRatio as C,Platform as Ke,Share as _e,StyleSheet as F,UIManager as He,Vibration as qe,ActivityIndicator as $e,Button as Ge,CheckBox as Ye,FlatList as W,Image as j,ImageBackground as Je,KeyboardAvoidingView as Qe,Modal as Ze,Picker as Xe,Pressable as et,ProgressBar as tt,RefreshControl as at,SafeAreaView as rt,ScrollView as K,SectionList as ot,StatusBar as st,Switch as it,Text as _,TextInput as H,Touchable as nt,TouchableHighlight as lt,TouchableNativeFeedback as dt,TouchableOpacity as q,TouchableWithoutFeedback as ut,View as $,VirtualizedList as ct,YellowBox as ft,LogBox as pt,DeviceEventEmitter as bt,useColorScheme as ht,useLocaleContext as gt,useWindowDimensions as mt}from"react-native-web";import*as yt from"react-native-web";var G,Y,J=m(()=>{h();we(z,ke);G=yt.findNodeHandle,Y={alert(e,t,r,i){if(typeof document>"u")return;let o=document.createElement("dialog");o.dataset.buoyRoot="",o.setAttribute("aria-label",e),o.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",o.appendChild(a),t){let n=document.createElement("p");n.textContent=t,n.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px",o.appendChild(n)}let l=document.createElement("div");l.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";let u=r?.length?r:[{text:"OK"}],c=()=>{o.close?.(),o.remove()};for(let n of u){let d=document.createElement("button");d.type="button",d.textContent=n.text??"OK",d.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${n.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`,d.onclick=()=>{c(),n.onPress?.()},l.appendChild(d)}o.addEventListener("cancel",n=>{n.preventDefault(),i?.cancelable!==false&&(c(),i?.onDismiss?.())}),o.appendChild(l),document.body.appendChild(o),o.showModal?o.showModal():o.setAttribute("open","")}}});var Q={};N(Q,{clearRecords:()=>ee,computeStats:()=>oe,createRecord:()=>Z,disableImagesCapture:()=>te,effectivePixelRatio:()=>T,estDecodedBytes:()=>D,estWastedBytes:()=>P,getRecord:()=>R,getSnapshot:()=>v,neededPixels:()=>A,oversizeFactor:()=>re,replaceImagesFromSnapshot:()=>ae,subscribe:()=>X,updateRecord:()=>f});function vt(){let e=s();e.emitScheduled||(e.emitScheduled=true,requestAnimationFrame(()=>{e.emitScheduled=false;for(let t of e.listeners)t()}))}function x(){let e=s();e.snapshot=[...e.records],vt()}function Z(e){let t=s(),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>B){let i=t.records.splice(0,t.records.length-B);for(let o of i)t.byId.delete(o.id)}return x(),r}function f(e,t){let r=s().byId.get(e);if(r)return Object.assign(r,t),x(),r}function R(e){return s().byId.get(e)}function v(){return s().snapshot}function X(e){return s().listeners.add(e),()=>s().listeners.delete(e)}function ee(){p()?.("clearRecords");let e=s();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])),x()}function te(){s().captureDisabled=true}function ae(e){let t=s(),r=e.records??[],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 o=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:o-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),x();for(let a of t.actionListeners)a()}function T(){return s().mirrorPixelRatio??C.get()}function A(e){if(!e.layout||e.layout.width<=0||e.layout.height<=0)return null;let t=T();return{width:Math.round(e.layout.width*t),height:Math.round(e.layout.height*t)}}function re(e){let t=A(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 D(e){return e.intrinsic?e.intrinsic.width*e.intrinsic.height*4:0}function P(e){let t=A(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 oe(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+=D(r),t.estWastedBytes+=P(r));return t}var B,E=m(()=>{"use strict";h();J();M();y();B=500});h();M();y();E();function se(){for(let e of s().actionListeners)e()}function ie(e){let t=s();if(e!=null){t.expoInstances.get(e)?.forceUpdate?.();return}for(let r of t.expoInstances.values())r?.forceUpdate?.()}function w(e){let t=s();t.recordVersions.set(e,++t.versionCounter),se(),ie(e)}function ne(){let e=s();e.globalVersion=++e.versionCounter,se(),ie()}function wt(e,t){return t.type==="url"?{id:e,kind:"url",uri:t.uri}:{id:e,kind:t.type}}function le(e,t){s().overrides.set(e,t),f(e,{overrideLabel:t.label}),w(e)}function St(e,t){t.source&&p()?.("setOverride",wt(e,t.source)),le(e,t)}function de(e){s().overrides.delete(e),f(e,{overrideLabel:void 0}),w(e)}function xt(e){p()?.("clearOverride",{id:e}),de(e)}function U(e){if(e!=null)return s().overrides.get(e)}function At(e){return e.type==="hang"?"loading":e.type}function kt(e,t){p()?.("massAction",{kind:At(e)});let r=0;for(let i of v())i.mounted&&(le(i.id,{source:e,label:t}),r++);return r}function Lt(){p()?.("massAction",{kind:"restore"});let e=new Set(s().overrides.keys());for(let t of v())t.overrideLabel!=null&&e.add(t.id);for(let t of e)de(t);return e.size}function It(e=2500){p()?.("massAction",{kind:"flash"});let t=0;for(let r of v())r.mounted&&(ue(r.id,e),t++);return t}function ue(e,t=2500){s().flashUntil.set(e,Date.now()+t),w(e),setTimeout(()=>{s().flashUntil.delete(e),w(e)},t+50)}function Mt(e,t=2500){p()?.("flash",{id:e}),ue(e,t)}function Ct(e){p()?.("setNetworkMode",{mode:e}),s().globalModes.network=e,ne()}function Rt(e){p()?.("setBlankImages",{enabled:e}),s().globalModes.blank=e,ne()}function V(){return s().globalModes}h();y();E();var b=new Map,g,ce=0,fe="data:image/png;base64,";function O(e){let t=R(e.id);if(!t)return;let r=s(),i=U(e.id),o=V(),a=e.source;if(o.network==="offline"&&t.sourceKind==="network"&&(a=fe),i?.source){let d=i.source;d.type==="url"?a=d.uri:d.type==="error"?a=fe:a=null,d.type==="hang"&&f(e.id,{status:"loading"})}let l=r.reloadRequests.get(e.id),u=l&&l.nonce!==e.nonce;if(u){if(e.nonce=l.nonce,l.bust&&a&&/^https?:/.test(new URL(a,document.baseURI).href)){let d=new URL(a,document.baseURI);d.searchParams.set("__buoy_reload",String(Date.now())),a=d.href}e.image.removeAttribute("src"),f(e.id,{status:"loading",startedAt:Date.now(),loadCount:t.loadCount+1})}if(o.network==="cold"&&a&&/^https?:/.test(new URL(a,document.baseURI).href)){if(e.coldSource!==a||!e.coldURL||u){e.coldSource=a;let d=new URL(a,document.baseURI);d.searchParams.set("__buoy_reload",`${Date.now()}-${e.nonce}`),e.coldURL=d.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 c=document.createElement("span").style;c.cssText=e.style??"";let n=i?.extraProps?.contentFit??i?.extraProps?.resizeMode;typeof n=="string"&&(c.objectFit={stretch:"fill",center:"none"}[n]??n),(o.blank||i?.source?.type==="blank")&&(c.opacity="0");for(let[d,k]of Object.entries(i?.style??{})){let he=d.replace(/[A-Z]/g,ge=>`-${ge.toLowerCase()}`);c.setProperty(he,typeof k=="number"&&!["opacity","zIndex","flex","flexGrow","flexShrink"].includes(d)?`${k}px`:String(k))}(r.flashUntil.get(e.id)??0)>Date.now()&&(c.outline="3px solid #ff453a"),e.appliedStyle=c.cssText||null,e.image.getAttribute("style")!==e.appliedStyle&&(e.appliedStyle===null?e.image.removeAttribute("style"):e.image.setAttribute("style",e.appliedStyle))}function Tt(e){if(b.has(e)||e.closest("[data-buoy-root]"))return;let t=e.currentSrc||e.src;if(!t)return;let r=Z({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(){}},o=()=>{let c=e.getBoundingClientRect(),n=r.layout,d=r.status==="loaded"&&n&&(n.width!==c.width||n.height!==c.height);f(r.id,{layout:{width:c.width,height:c.height},layoutShifts:(r.layoutShifts??0)+(d?1:0)})},a=()=>{let c=performance.getEntriesByName(e.currentSrc||e.src),n=c[c.length-1];f(r.id,{status:"loaded",loadedAt:Date.now(),intrinsic:{width:e.naturalWidth,height:e.naturalHeight},...!U(r.id)?.source&&V().network==="normal"?{uri:e.currentSrc||e.src}:{},durationMs:n?.duration,bytesTotal:n&&n.encodedBodySize>0?n.encodedBodySize:void 0,cacheVerdict:n&&n.transferSize>0?"none":void 0,cacheVerdictSource:n?"event":void 0}),o()},l=()=>f(r.id,{status:"error",erroredAt:Date.now(),error:"The browser could not load this image."});e.addEventListener("load",a),e.addEventListener("error",l);let u=typeof ResizeObserver>"u"?void 0:new ResizeObserver(o);u?.observe(e),i.dispose=()=>{u?.disconnect(),e.removeEventListener("load",a),e.removeEventListener("error",l)},b.set(e,i),o(),f(r.id,{status:"loading",startedAt:Date.now(),loadCount:1}),e.complete&&(e.naturalWidth>0?a():l()),O(i)}function pe(){let e=s();if(typeof document>"u"||e.captureDisabled||g)return;e.captureInstalled=true;let t=()=>{for(let[o,a]of b)o.isConnected||(a.dispose(),b.delete(o),f(a.id,{mounted:false}));document.querySelectorAll("img").forEach(Tt)},r=new MutationObserver(o=>{if(s().captureDisabled){be();return}for(let a of o){let l=a.target,u=b.get(l);!u||a.type!=="attributes"||(a.attributeName==="src"&&l.getAttribute("src")!==u.appliedSource||a.attributeName==="srcset"&&l.getAttribute("srcset")!==u.appliedSrcset?(u.dispose(),b.delete(l),f(u.id,{mounted:false})):a.attributeName==="style"&&l.getAttribute("style")!==u.appliedStyle&&(u.style=l.getAttribute("style"),O(u)))}t()});r.observe(document.documentElement,{childList:true,subtree:true,attributes:true,attributeFilter:["src","srcset","style","alt"]});let i=()=>{for(let o of b.values())O(o)};e.actionListeners.add(i),g=()=>{r.disconnect(),e.actionListeners.delete(i);for(let o of b.values()){o.dispose();for(let[a,l,u]of[["src",o.source,o.appliedSource],["srcset",o.srcset,o.appliedSrcset],["style",o.style,o.appliedStyle]])o.image.getAttribute(a)===u&&(l===null?o.image.removeAttribute(a):o.image.setAttribute(a,l));f(o.id,{mounted:false})}b.clear(),e.captureInstalled=false},t()}function be(){g?.(),g=void 0}function Dt(){if(typeof document>"u")return()=>{};ce++===0&&pe();let e=false;return()=>{e||(e=true,--ce===0&&be())}}function Pt(){return s().mirrorCaptureStatus??{installed:!!g,rnDecoratorActive:false,rnDecoratorTooLate:false,expoPatched:false,expoAvailable:false,browserObserverActive:!!g}}export{Se as a,h as b,C as c,F as d,W as e,j as f,K as g,_ as h,H as i,q as j,$ as k,J as l,s as m,y as n,xe as o,p,Ae as q,M as r,f as s,R as t,v as u,X as v,ee as w,te as x,ae as y,T as z,A,re as B,D as C,P as D,oe as E,Q as F,E as G,w as H,St as I,xt as J,U as K,kt as L,Lt as M,It as N,Mt as O,Ct as P,Rt as Q,V as R,pe as S,Dt as T,Pt as U};
@@ -0,0 +1 @@
1
+ "use client";var M=Object.defineProperty;var Le=Object.getOwnPropertyDescriptor;var Me=Object.getOwnPropertyNames;var Re=Object.prototype.hasOwnProperty;var v=(e,t)=>()=>(e&&(t=e(e=0)),t);var $=(e,t)=>{for(var r in t)M(e,r,{get:t[r],enumerable:true})},R=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Me(t))!Re.call(e,o)&&o!==r&&M(e,o,{get:()=>t[o],enumerable:!(s=Le(t,o))||s.enumerable});return e},Ce=(e,t,r)=>(R(e,t,"default"),r&&R(r,t,"default"));var Te=e=>R(M({},"__esModule",{value:true}),e);var g=v(()=>{"use strict";typeof window<"u"&&typeof globalThis.global>"u"&&(globalThis.global=globalThis)});function i(){let e=globalThis;return e[A]||(e[A]={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[A]}var A,w=v(()=>{"use strict";g();A=Symbol.for("buoy.images.globalState.v1")});function De(e){i().remoteDispatch=e}function h(){return i().remoteDispatch}async function Pe(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 C=v(()=>{"use strict";g();w()});var H={};$(H,{AccessibilityInfo:()=>Oe,ActivityIndicator:()=>te,Alert:()=>oe,Animated:()=>Ue,AppRegistry:()=>ze,AppState:()=>Fe,Appearance:()=>Ne,BackHandler:()=>We,Button:()=>ae,CheckBox:()=>at,Clipboard:()=>je,DeviceEventEmitter:()=>gt,Dimensions:()=>Ke,Easing:()=>_e,FlatList:()=>G,I18nManager:()=>$e,Image:()=>Y,ImageBackground:()=>rt,Input:()=>ct,InteractionManager:()=>qe,Keyboard:()=>He,KeyboardAvoidingView:()=>ot,LayoutAnimation:()=>Ge,Linking:()=>Ye,LogBox:()=>mt,Modal:()=>X,NativeEventEmitter:()=>Je,NativeModules:()=>Ve,PanResponder:()=>Qe,Picker:()=>st,PixelRatio:()=>T,Platform:()=>Ze,Pressable:()=>Z,ProgressBar:()=>it,RefreshControl:()=>nt,SafeAreaView:()=>lt,ScrollView:()=>V,SectionList:()=>dt,Share:()=>Xe,StatusBar:()=>ut,StyleSheet:()=>q,Switch:()=>ee,Text:()=>P,TextInput:()=>B,Touchable:()=>ft,TouchableHighlight:()=>J,TouchableNativeFeedback:()=>pt,TouchableOpacity:()=>E,TouchableWithoutFeedback:()=>Q,UIManager:()=>et,Vibration:()=>tt,View:()=>D,VirtualizedList:()=>bt,YellowBox:()=>ht,findNodeHandle:()=>re,unstable_createElement:()=>Ee,useColorScheme:()=>yt,useLocaleContext:()=>vt,useWindowDimensions:()=>wt});import*as Be from"react-native-web";import{unstable_createElement as Ee,NativeModules as Ve,AccessibilityInfo as Oe,Animated as Ue,Appearance as Ne,AppRegistry as ze,AppState as Fe,BackHandler as We,Clipboard as je,Dimensions as Ke,Easing as _e,I18nManager as $e,Keyboard as He,InteractionManager as qe,LayoutAnimation as Ge,Linking as Ye,NativeEventEmitter as Je,PanResponder as Qe,PixelRatio as T,Platform as Ze,Share as Xe,StyleSheet as q,UIManager as et,Vibration as tt,CheckBox as at,FlatList as G,Image as Y,ImageBackground as rt,KeyboardAvoidingView as ot,Picker as st,ProgressBar as it,RefreshControl as nt,SafeAreaView as lt,SectionList as dt,StatusBar as ut,Input as ct,Touchable as ft,TouchableNativeFeedback as pt,VirtualizedList as bt,YellowBox as ht,LogBox as mt,DeviceEventEmitter as gt,useColorScheme as yt,useLocaleContext as vt,useWindowDimensions as wt}from"react-native-web";import*as f from"react-native-web";import{createElement as xt,forwardRef as St}from"react";function b(e){let t=St((r,s)=>{let{accessibilityState:o,accessibilityValue:a,...n}=r;for(let l of["busy","checked","disabled","expanded","selected"])o?.[l]!==void 0&&n[`aria-${l}`]===void 0&&(n[`aria-${l}`]=o[l]);for(let[l,c]of Object.entries({min:"valuemin",max:"valuemax",now:"valuenow",text:"valuetext"}))a?.[l]!==void 0&&n[`aria-${c}`]===void 0&&(n[`aria-${c}`]=a[l]);return xt(e,{...n,ref:s})});return t.displayName=e.displayName??e.name??"NativeWebView",t}var D,P,B,E,J,Q,Z,V,X,ee,te,ae,re,oe,se=v(()=>{g();Ce(H,Be);D=b(f.View),P=b(f.Text),B=b(f.TextInput),E=b(f.TouchableOpacity),J=b(f.TouchableHighlight),Q=b(f.TouchableWithoutFeedback),Z=b(f.Pressable),V=b(f.ScrollView),X=b(f.Modal),ee=b(f.Switch),te=b(f.ActivityIndicator),ae=b(f.Button),re=f.findNodeHandle,oe={alert(e,t,r,s){if(typeof document>"u")return;let o=document.createElement("dialog");o.dataset.buoyRoot="",o.setAttribute("aria-label",e),o.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",o.appendChild(a),t){let d=document.createElement("p");d.textContent=t,d.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px",o.appendChild(d)}let n=document.createElement("div");n.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";let l=r?.length?r:[{text:"OK"}],c=()=>{o.close?.(),o.remove()};for(let d of l){let u=document.createElement("button");u.type="button",u.textContent=d.text??"OK",u.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${d.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`,u.onclick=()=>{c(),d.onPress?.()},n.appendChild(u)}o.addEventListener("cancel",d=>{d.preventDefault(),s?.cancelable!==false&&(c(),s?.onDismiss?.())}),o.appendChild(n),document.body.appendChild(o),o.showModal?o.showModal():o.setAttribute("open","")}}});var ie={};$(ie,{clearRecords:()=>de,computeStats:()=>pe,createRecord:()=>ne,disableImagesCapture:()=>ue,effectivePixelRatio:()=>U,estDecodedBytes:()=>N,estWastedBytes:()=>z,getRecord:()=>O,getSnapshot:()=>x,neededPixels:()=>I,oversizeFactor:()=>fe,replaceImagesFromSnapshot:()=>ce,subscribe:()=>le,updateRecord:()=>p});function At(){let e=i();e.emitScheduled||(e.emitScheduled=true,requestAnimationFrame(()=>{e.emitScheduled=false;for(let t of e.listeners)t()}))}function k(){let e=i();e.snapshot=[...e.records],At()}function ne(e){let t=i(),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>F){let s=t.records.splice(0,t.records.length-F);for(let o of s)t.byId.delete(o.id)}return k(),r}function p(e,t){let r=i().byId.get(e);if(r)return Object.assign(r,t),k(),r}function O(e){return i().byId.get(e)}function x(){return i().snapshot}function le(e){return i().listeners.add(e),()=>i().listeners.delete(e)}function de(){h()?.("clearRecords");let e=i();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])),k()}function ue(){i().captureDisabled=true}function ce(e){let t=i(),r=e.records??[],s=0;for(let a of r)a.layout&&a.neededPx&&a.layout.width>s&&(s=a.layout.width,t.mirrorPixelRatio=a.neededPx.width/a.layout.width);let o=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:o-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),k();for(let a of t.actionListeners)a()}function U(){return i().mirrorPixelRatio??T.get()}function I(e){if(!e.layout||e.layout.width<=0||e.layout.height<=0)return null;let t=U();return{width:Math.round(e.layout.width*t),height:Math.round(e.layout.height*t)}}function fe(e){let t=I(e);if(!t||!e.intrinsic)return null;let r=t.width*t.height,s=e.intrinsic.width*e.intrinsic.height;return r<=0||s<=0?null:Math.sqrt(s/r)}function N(e){return e.intrinsic?e.intrinsic.width*e.intrinsic.height*4:0}function z(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 pe(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+=N(r),t.estWastedBytes+=z(r));return t}var F,W=v(()=>{"use strict";g();se();C();w();F=500});g();C();w();W();function be(){for(let e of i().actionListeners)e()}function he(e){let t=i();if(e!=null){t.expoInstances.get(e)?.forceUpdate?.();return}for(let r of t.expoInstances.values())r?.forceUpdate?.()}function S(e){let t=i();t.recordVersions.set(e,++t.versionCounter),be(),he(e)}function me(){let e=i();e.globalVersion=++e.versionCounter,be(),he()}function kt(e,t){return t.type==="url"?{id:e,kind:"url",uri:t.uri}:{id:e,kind:t.type}}function ge(e,t){i().overrides.set(e,t),p(e,{overrideLabel:t.label}),S(e)}function It(e,t){t.source&&h()?.("setOverride",kt(e,t.source)),ge(e,t)}function ye(e){i().overrides.delete(e),p(e,{overrideLabel:void 0}),S(e)}function Lt(e){h()?.("clearOverride",{id:e}),ye(e)}function j(e){if(e!=null)return i().overrides.get(e)}function Mt(e){return e.type==="hang"?"loading":e.type}function Rt(e,t){h()?.("massAction",{kind:Mt(e)});let r=0;for(let s of x())s.mounted&&(ge(s.id,{source:e,label:t}),r++);return r}function Ct(){h()?.("massAction",{kind:"restore"});let e=new Set(i().overrides.keys());for(let t of x())t.overrideLabel!=null&&e.add(t.id);for(let t of e)ye(t);return e.size}function Tt(e=2500){h()?.("massAction",{kind:"flash"});let t=0;for(let r of x())r.mounted&&(ve(r.id,e),t++);return t}function ve(e,t=2500){i().flashUntil.set(e,Date.now()+t),S(e),setTimeout(()=>{i().flashUntil.delete(e),S(e)},t+50)}function Dt(e,t=2500){h()?.("flash",{id:e}),ve(e,t)}function Pt(e){h()?.("setNetworkMode",{mode:e}),i().globalModes.network=e,me()}function Bt(e){h()?.("setBlankImages",{enabled:e}),i().globalModes.blank=e,me()}function K(){return i().globalModes}g();w();W();var m=new Map,y,we=0,xe="data:image/png;base64,";function _(e){let t=O(e.id);if(!t)return;let r=i(),s=j(e.id),o=K(),a=e.source;if(o.network==="offline"&&t.sourceKind==="network"&&(a=xe),s?.source){let u=s.source;u.type==="url"?a=u.uri:u.type==="error"?a=xe:a=null,u.type==="hang"&&p(e.id,{status:"loading"})}let n=r.reloadRequests.get(e.id),l=n&&n.nonce!==e.nonce;if(l){if(e.nonce=n.nonce,n.bust&&a&&/^https?:/.test(new URL(a,document.baseURI).href)){let u=new URL(a,document.baseURI);u.searchParams.set("__buoy_reload",String(Date.now())),a=u.href}e.image.removeAttribute("src"),p(e.id,{status:"loading",startedAt:Date.now(),loadCount:t.loadCount+1})}if(o.network==="cold"&&a&&/^https?:/.test(new URL(a,document.baseURI).href)){if(e.coldSource!==a||!e.coldURL||l){e.coldSource=a;let u=new URL(a,document.baseURI);u.searchParams.set("__buoy_reload",`${Date.now()}-${e.nonce}`),e.coldURL=u.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 c=document.createElement("span").style;c.cssText=e.style??"";let d=s?.extraProps?.contentFit??s?.extraProps?.resizeMode;typeof d=="string"&&(c.objectFit={stretch:"fill",center:"none"}[d]??d),(o.blank||s?.source?.type==="blank")&&(c.opacity="0");for(let[u,L]of Object.entries(s?.style??{})){let ke=u.replace(/[A-Z]/g,Ie=>`-${Ie.toLowerCase()}`);c.setProperty(ke,typeof L=="number"&&!["opacity","zIndex","flex","flexGrow","flexShrink"].includes(u)?`${L}px`:String(L))}(r.flashUntil.get(e.id)??0)>Date.now()&&(c.outline="3px solid #ff453a"),e.appliedStyle=c.cssText||null,e.image.getAttribute("style")!==e.appliedStyle&&(e.appliedStyle===null?e.image.removeAttribute("style"):e.image.setAttribute("style",e.appliedStyle))}function Et(e){if(m.has(e)||e.closest("[data-buoy-root]"))return;let t=e.currentSrc||e.src;if(!t)return;let r=ne({lib:"web",uri:t,sourceKind:t.startsWith("data:")?"data":t.startsWith("blob:")?"file":"network",hasAltText:e.hasAttribute("alt")||e.hasAttribute("aria-label")}),s={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(){}},o=()=>{let c=e.getBoundingClientRect(),d=r.layout,u=r.status==="loaded"&&d&&(d.width!==c.width||d.height!==c.height);p(r.id,{layout:{width:c.width,height:c.height},layoutShifts:(r.layoutShifts??0)+(u?1:0)})},a=()=>{let c=performance.getEntriesByName(e.currentSrc||e.src),d=c[c.length-1];p(r.id,{status:"loaded",loadedAt:Date.now(),intrinsic:{width:e.naturalWidth,height:e.naturalHeight},...!j(r.id)?.source&&K().network==="normal"?{uri:e.currentSrc||e.src}:{},durationMs:d?.duration,bytesTotal:d&&d.encodedBodySize>0?d.encodedBodySize:void 0,cacheVerdict:d&&d.transferSize>0?"none":void 0,cacheVerdictSource:d?"event":void 0}),o()},n=()=>p(r.id,{status:"error",erroredAt:Date.now(),error:"The browser could not load this image."});e.addEventListener("load",a),e.addEventListener("error",n);let l=typeof ResizeObserver>"u"?void 0:new ResizeObserver(o);l?.observe(e),s.dispose=()=>{l?.disconnect(),e.removeEventListener("load",a),e.removeEventListener("error",n)},m.set(e,s),o(),p(r.id,{status:"loading",startedAt:Date.now(),loadCount:1}),e.complete&&(e.naturalWidth>0?a():n()),_(s)}function Se(){let e=i();if(typeof document>"u"||e.captureDisabled||y)return;e.captureInstalled=true;let t=()=>{for(let[o,a]of m)o.isConnected||(a.dispose(),m.delete(o),p(a.id,{mounted:false}));document.querySelectorAll("img").forEach(Et)},r=new MutationObserver(o=>{if(i().captureDisabled){Ae();return}for(let a of o){let n=a.target,l=m.get(n);!l||a.type!=="attributes"||(a.attributeName==="src"&&n.getAttribute("src")!==l.appliedSource||a.attributeName==="srcset"&&n.getAttribute("srcset")!==l.appliedSrcset?(l.dispose(),m.delete(n),p(l.id,{mounted:false})):a.attributeName==="style"&&n.getAttribute("style")!==l.appliedStyle&&(l.style=n.getAttribute("style"),_(l)))}t()});r.observe(document.documentElement,{childList:true,subtree:true,attributes:true,attributeFilter:["src","srcset","style","alt"]});let s=()=>{for(let o of m.values())_(o)};e.actionListeners.add(s),y=()=>{r.disconnect(),e.actionListeners.delete(s);for(let o of m.values()){o.dispose();for(let[a,n,l]of[["src",o.source,o.appliedSource],["srcset",o.srcset,o.appliedSrcset],["style",o.style,o.appliedStyle]])o.image.getAttribute(a)===l&&(n===null?o.image.removeAttribute(a):o.image.setAttribute(a,n));p(o.id,{mounted:false})}m.clear(),e.captureInstalled=false},t()}function Ae(){y?.(),y=void 0}function Vt(){if(typeof document>"u")return()=>{};we++===0&&Se();let e=false;return()=>{e||(e=true,--we===0&&Ae())}}function Ot(){return i().mirrorCaptureStatus??{installed:!!y,rnDecoratorActive:false,rnDecoratorTooLate:false,expoPatched:false,expoAvailable:false,browserObserverActive:!!y}}export{Te as a,g as b,D as c,P as d,B as e,E as f,V as g,T as h,q as i,G as j,Y as k,se as l,i as m,w as n,De as o,h as p,Pe as q,C as r,p as s,O as t,x as u,le as v,de as w,ue as x,ce as y,U as z,I as A,fe as B,N as C,z as D,pe as E,ie as F,W as G,S as H,It as I,Lt as J,j as K,Rt as L,Ct as M,Tt as N,Dt as O,Pt as P,Bt as Q,K as R,Se as S,Vt as T,Ot as U};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buoy-gg/images",
3
- "version": "7.0.43",
3
+ "version": "7.0.44",
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.43"
22
+ "@buoy-gg/shared-ui": "^7.0.44"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "react": "*"