@ctrl/dom 0.1.9 → 0.1.11

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/dom/index.js CHANGED
@@ -1 +1 @@
1
- export{Cr as AbstractRange,ms as AnimationEvent,Wa as Attr,Zt as Audio,hs as BeforeUnloadEvent,$a as CDATASection,t as CSS,di as CSSConditionRule,fi as CSSContainerRule,pi as CSSFontFaceRule,mi as CSSGroupingRule,hi as CSSImportRule,gi as CSSKeyframeRule,_i as CSSKeyframesRule,vi as CSSLayerBlockRule,yi as CSSLayerStatementRule,bi as CSSMediaRule,xi as CSSNamespaceRule,Si as CSSNestedDeclarations,Ci as CSSPageRule,wi as CSSPropertyRule,Ti as CSSRule,Ei as CSSRuleList,Di as CSSScopeRule,Oi as CSSStartingStyleRule,Yi as CSSStyleDeclaration,ki as CSSStyleRule,Ai as CSSStyleSheet,ji as CSSSupportsRule,eo as CharacterData,cr as Clipboard,As as ClipboardEvent,lr as ClipboardItem,gs as CloseEvent,Or as CommandEvent,to as Comment,js as CompositionEvent,ba as CustomElementRegistry,_s as CustomEvent,Yn as CustomStateSet,hr as DOMImplementation,ja as DOMMatrix,Ma as DOMMatrixReadOnly,pr as DOMParser,Na as DOMPoint,Pa as DOMPointReadOnly,Fa as DOMRect,Ia as DOMRectList,La as DOMRectReadOnly,Ga as DOMStringMap,Ka as DOMTokenList,T as DataTransfer,E as DataTransferItem,D as DataTransferItemList,gr as Document,gr as HTMLDocument,Qa as DocumentFragment,Za as DocumentType,Ms as DragEvent,Ea as Element,Xn as ElementInternals,vs as ErrorEvent,Ks as Event,ns as EventTarget,et as FileList,A as FileReader,Ns as FocusEvent,F as FormData,ys as FormDataEvent,rn as HTMLAnchorElement,in as HTMLAreaElement,Qt as HTMLAudioElement,an as HTMLBRElement,on as HTMLBaseElement,sn as HTMLBodyElement,G as HTMLButtonElement,cn as HTMLCanvasElement,io as HTMLCollection,ln as HTMLDListElement,un as HTMLDataElement,R as HTMLDataListElement,Yt as HTMLDetailsElement,Xt as HTMLDialogElement,dn as HTMLDirectoryElement,fn as HTMLDivElement,Zn as HTMLElement,pn as HTMLEmbedElement,H as HTMLFieldSetElement,mn as HTMLFontElement,ta as HTMLFormControlsCollection,L as HTMLFormElement,hn as HTMLFrameElement,gn as HTMLFrameSetElement,_n as HTMLHRElement,vn as HTMLHeadElement,yn as HTMLHeadingElement,bn as HTMLHtmlElement,xn as HTMLIFrameElement,Sn as HTMLImageElement,Q as HTMLInputElement,Cn as HTMLLIElement,W as HTMLLabelElement,U as HTMLLegendElement,Ut as HTMLLinkElement,wn as HTMLMapElement,Tn as HTMLMarqueeElement,$t as HTMLMediaElement,En as HTMLMenuElement,Dn as HTMLMetaElement,z as HTMLMeterElement,On as HTMLModElement,kn as HTMLOListElement,An as HTMLObjectElement,K as HTMLOptGroupElement,q as HTMLOptionElement,na as HTMLOptionsCollection,B as HTMLOutputElement,jn as HTMLParagraphElement,Mn as HTMLParamElement,Nn as HTMLPictureElement,Pn as HTMLPreElement,V as HTMLProgressElement,Fn as HTMLQuoteElement,Wt as HTMLScriptElement,X as HTMLSelectElement,qt as HTMLSlotElement,In as HTMLSourceElement,Ln as HTMLSpanElement,Gt as HTMLStyleElement,Rn as HTMLTableCaptionElement,zn as HTMLTableCellElement,Bn as HTMLTableColElement,Vn as HTMLTableElement,Hn as HTMLTableRowElement,Un as HTMLTableSectionElement,Jt as HTMLTemplateElement,Z as HTMLTextAreaElement,Wn as HTMLTimeElement,Kt as HTMLTitleElement,Gn as HTMLTrackElement,Kn as HTMLUListElement,qn as HTMLUnknownElement,en as HTMLVideoElement,bs as HashChangeEvent,dr as History,Jn as Image,Ps as InputEvent,O as IntersectionObserver,Fs as KeyboardEvent,fr as Location,nt as MathMLElement,tn as MediaError,Mi as MediaList,oi as MediaQueryList,li as MediaQueryListEvent,xs as MessageEvent,Is as MouseEvent,w as MutationObserver,Io as MutationRecord,Ha as NamedNodeMap,ur as Navigator,do as Node,br as NodeFilter,xr as NodeIterator,Lo as NodeList,J as Option,Ss as PageTransitionEvent,Ls as PointerEvent,Cs as PopStateEvent,no as ProcessingInstruction,ws as ProgressEvent,Ts as PromiseRejectionEvent,ra as RadioNodeList,wr as Range,k as ResizeObserver,rt as SVGAElement,it as SVGAnimatedString,at as SVGCircleElement,ot as SVGClipPathElement,st as SVGDefsElement,ct as SVGDescElement,lt as SVGElement,ut as SVGEllipseElement,dt as SVGFilterElement,ft as SVGForeignObjectElement,pt as SVGGElement,mt as SVGGeometryElement,ht as SVGGradientElement,gt as SVGGraphicsElement,_t as SVGImageElement,vt as SVGLineElement,yt as SVGLinearGradientElement,bt as SVGMarkerElement,xt as SVGMaskElement,St as SVGMetadataElement,Ct as SVGPathElement,wt as SVGPatternElement,Tt as SVGPolygonElement,Et as SVGPolylineElement,Dt as SVGRadialGradientElement,Ot as SVGRectElement,kt as SVGSVGElement,At as SVGScriptElement,jt as SVGStopElement,Mt as SVGStyleElement,Nt as SVGSwitchElement,Pt as SVGSymbolElement,Ft as SVGTSpanElement,It as SVGTextContentElement,Lt as SVGTextElement,Rt as SVGTextPathElement,zt as SVGTextPositioningElement,Bt as SVGTitleElement,Vt as SVGUseElement,Ht as SVGViewElement,or as Screen,yr as Selection,qa as ShadowRoot,Tr as StaticRange,ar as Storage,Es as StorageEvent,Ni as StyleSheet,Pi as StyleSheetList,Ds as SubmitEvent,ro as Text,Rs as TextEvent,nn as TimeRanges,Os as ToggleEvent,zs as Touch,Bs as TouchEvent,Vs as TouchList,ks as TransitionEvent,Sr as TreeWalker,Hs as UIEvent,ea as ValidityState,sr as VisualViewport,Us as WheelEvent,tr as Window,_r as XMLDocument,j as XMLHttpRequest,M as XMLHttpRequestEventTarget,N as XMLHttpRequestUpload,mr as XMLSerializer,nr as createWindow,us as currentDocument,ds as currentWindow,fs as currentWindowOrNull,Lr as getComputedStyle,P as installGlobals,ps as setCurrentWindow}from"./_chunks/src-BbkJRbbx.js";
1
+ export{Cr as AbstractRange,ms as AnimationEvent,Wa as Attr,Zt as Audio,hs as BeforeUnloadEvent,$a as CDATASection,t as CSS,di as CSSConditionRule,fi as CSSContainerRule,pi as CSSFontFaceRule,mi as CSSGroupingRule,hi as CSSImportRule,gi as CSSKeyframeRule,_i as CSSKeyframesRule,vi as CSSLayerBlockRule,yi as CSSLayerStatementRule,bi as CSSMediaRule,xi as CSSNamespaceRule,Si as CSSNestedDeclarations,Ci as CSSPageRule,wi as CSSPropertyRule,Ti as CSSRule,Ei as CSSRuleList,Di as CSSScopeRule,Oi as CSSStartingStyleRule,Yi as CSSStyleDeclaration,ki as CSSStyleRule,Ai as CSSStyleSheet,ji as CSSSupportsRule,eo as CharacterData,cr as Clipboard,As as ClipboardEvent,lr as ClipboardItem,gs as CloseEvent,Or as CommandEvent,to as Comment,js as CompositionEvent,ba as CustomElementRegistry,_s as CustomEvent,Yn as CustomStateSet,hr as DOMImplementation,ja as DOMMatrix,Ma as DOMMatrixReadOnly,pr as DOMParser,Na as DOMPoint,Pa as DOMPointReadOnly,Fa as DOMRect,Ia as DOMRectList,La as DOMRectReadOnly,Ga as DOMStringMap,Ka as DOMTokenList,T as DataTransfer,E as DataTransferItem,D as DataTransferItemList,gr as Document,gr as HTMLDocument,Qa as DocumentFragment,Za as DocumentType,Ms as DragEvent,Ea as Element,Xn as ElementInternals,vs as ErrorEvent,Ks as Event,ns as EventTarget,et as FileList,A as FileReader,Ns as FocusEvent,F as FormData,ys as FormDataEvent,rn as HTMLAnchorElement,in as HTMLAreaElement,Qt as HTMLAudioElement,an as HTMLBRElement,on as HTMLBaseElement,sn as HTMLBodyElement,G as HTMLButtonElement,cn as HTMLCanvasElement,io as HTMLCollection,ln as HTMLDListElement,un as HTMLDataElement,R as HTMLDataListElement,Yt as HTMLDetailsElement,Xt as HTMLDialogElement,dn as HTMLDirectoryElement,fn as HTMLDivElement,Zn as HTMLElement,pn as HTMLEmbedElement,H as HTMLFieldSetElement,mn as HTMLFontElement,ta as HTMLFormControlsCollection,L as HTMLFormElement,hn as HTMLFrameElement,gn as HTMLFrameSetElement,_n as HTMLHRElement,vn as HTMLHeadElement,yn as HTMLHeadingElement,bn as HTMLHtmlElement,xn as HTMLIFrameElement,Sn as HTMLImageElement,Q as HTMLInputElement,Cn as HTMLLIElement,W as HTMLLabelElement,U as HTMLLegendElement,Ut as HTMLLinkElement,wn as HTMLMapElement,Tn as HTMLMarqueeElement,$t as HTMLMediaElement,En as HTMLMenuElement,Dn as HTMLMetaElement,z as HTMLMeterElement,On as HTMLModElement,kn as HTMLOListElement,An as HTMLObjectElement,K as HTMLOptGroupElement,q as HTMLOptionElement,na as HTMLOptionsCollection,B as HTMLOutputElement,jn as HTMLParagraphElement,Mn as HTMLParamElement,Nn as HTMLPictureElement,Pn as HTMLPreElement,V as HTMLProgressElement,Fn as HTMLQuoteElement,Wt as HTMLScriptElement,X as HTMLSelectElement,qt as HTMLSlotElement,In as HTMLSourceElement,Ln as HTMLSpanElement,Gt as HTMLStyleElement,Rn as HTMLTableCaptionElement,zn as HTMLTableCellElement,Bn as HTMLTableColElement,Vn as HTMLTableElement,Hn as HTMLTableRowElement,Un as HTMLTableSectionElement,Jt as HTMLTemplateElement,Z as HTMLTextAreaElement,Wn as HTMLTimeElement,Kt as HTMLTitleElement,Gn as HTMLTrackElement,Kn as HTMLUListElement,qn as HTMLUnknownElement,en as HTMLVideoElement,bs as HashChangeEvent,dr as History,Jn as Image,Ps as InputEvent,O as IntersectionObserver,Fs as KeyboardEvent,fr as Location,nt as MathMLElement,tn as MediaError,Mi as MediaList,oi as MediaQueryList,li as MediaQueryListEvent,xs as MessageEvent,Is as MouseEvent,w as MutationObserver,Io as MutationRecord,Ha as NamedNodeMap,ur as Navigator,do as Node,br as NodeFilter,xr as NodeIterator,Lo as NodeList,J as Option,Ss as PageTransitionEvent,Ls as PointerEvent,Cs as PopStateEvent,no as ProcessingInstruction,ws as ProgressEvent,Ts as PromiseRejectionEvent,ra as RadioNodeList,wr as Range,k as ResizeObserver,rt as SVGAElement,it as SVGAnimatedString,at as SVGCircleElement,ot as SVGClipPathElement,st as SVGDefsElement,ct as SVGDescElement,lt as SVGElement,ut as SVGEllipseElement,dt as SVGFilterElement,ft as SVGForeignObjectElement,pt as SVGGElement,mt as SVGGeometryElement,ht as SVGGradientElement,gt as SVGGraphicsElement,_t as SVGImageElement,vt as SVGLineElement,yt as SVGLinearGradientElement,bt as SVGMarkerElement,xt as SVGMaskElement,St as SVGMetadataElement,Ct as SVGPathElement,wt as SVGPatternElement,Tt as SVGPolygonElement,Et as SVGPolylineElement,Dt as SVGRadialGradientElement,Ot as SVGRectElement,kt as SVGSVGElement,At as SVGScriptElement,jt as SVGStopElement,Mt as SVGStyleElement,Nt as SVGSwitchElement,Pt as SVGSymbolElement,Ft as SVGTSpanElement,It as SVGTextContentElement,Lt as SVGTextElement,Rt as SVGTextPathElement,zt as SVGTextPositioningElement,Bt as SVGTitleElement,Vt as SVGUseElement,Ht as SVGViewElement,or as Screen,yr as Selection,qa as ShadowRoot,Tr as StaticRange,ar as Storage,Es as StorageEvent,Ni as StyleSheet,Pi as StyleSheetList,Ds as SubmitEvent,ro as Text,Rs as TextEvent,nn as TimeRanges,Os as ToggleEvent,zs as Touch,Bs as TouchEvent,Vs as TouchList,ks as TransitionEvent,Sr as TreeWalker,Hs as UIEvent,ea as ValidityState,sr as VisualViewport,Us as WheelEvent,tr as Window,_r as XMLDocument,j as XMLHttpRequest,M as XMLHttpRequestEventTarget,N as XMLHttpRequestUpload,mr as XMLSerializer,nr as createWindow,us as currentDocument,ds as currentWindow,fs as currentWindowOrNull,Lr as getComputedStyle,P as installGlobals,ps as setCurrentWindow}from"./_chunks/src-C8w0qc4Q.js";
@@ -1 +1 @@
1
- import{$ as e,$c as t,$d as n,$i as r,$l as i,$n as a,$o as o,$r as s,$s as c,$u as ee,Aa as te,Ac as ne,Ad as l,Af as re,Al as ie,Ao as ae,Ar as oe,Au as se,Ba as ce,Bc as le,Bd as ue,Bi as de,Bl as fe,Bo as pe,Br as me,Bu as he,C as ge,Ca as _e,Cc as ve,Cd as ye,Cf as be,Cl as xe,Co as Se,Cu as Ce,Da as we,Dc as Te,Dd as Ee,Df as De,Dl as Oe,Do as ke,Dr as Ae,Du as je,Ec as Me,Ed as u,Ef as Ne,El as Pe,Eo as d,Er as f,Eu as p,Fc as m,Fd as h,Ff as g,Fi as _,Fl as v,Fo as y,Fr as Fe,Fu as Ie,Gc as Le,Gd as b,Gi as Re,Gl as ze,Go as Be,Gr as Ve,Gs as He,Gu as x,Hc as Ue,Hd as We,Hi as Ge,Hl as Ke,Ho as qe,Hr as Je,Hu as Ye,I as Xe,Ic as Ze,Id as Qe,If as $e,Ii as et,Il as tt,Ir as nt,Iu as rt,Ja as it,Jc as S,Jd as at,Ji as ot,Jl as st,Jo as ct,Jr as lt,Js as ut,Ju as C,Kc as w,Kd as T,Ki as dt,Kl as ft,Ko as pt,Kr as mt,Ku as E,Lc as ht,Ld as gt,Lf as _t,Li as vt,Ll as yt,Lo as bt,Lr as xt,Lu as St,Mc as Ct,Md as wt,Mf as Tt,Ml as Et,Mo as Dt,Mr as Ot,Mu as kt,Nc as At,Nd as jt,Nf as Mt,Nl as Nt,No as Pt,Nr as Ft,Nu as It,Oa as Lt,Oc as Rt,Od as zt,Of as Bt,Ol as Vt,Oo as Ht,Ou as D,Pc as Ut,Pd as Wt,Pf as Gt,Pl as Kt,Po as qt,Pr as Jt,Pu as Yt,Qc as Xt,Qd as Zt,Qi as Qt,Ql as $t,Qn as en,Qo as tn,Qr as nn,Qs as rn,Qu as an,Ra as on,Rc as sn,Rd as cn,Ri as ln,Rl as un,Ro as dn,Rr as fn,Ru as pn,S as mn,Sa as hn,Sc as gn,Sd as _n,Sf as vn,Sl as yn,So as bn,Su as xn,Ta as Sn,Tc as Cn,Td as wn,Tf as Tn,Tl as En,To as Dn,Tu as On,Ua as kn,Uc as An,Ud as jn,Ui as Mn,Ul as Nn,Uo as Pn,Ur as Fn,Uu as In,Va as Ln,Vc as Rn,Vd as zn,Vi as Bn,Vl as Vn,Vo as Hn,Vr as Un,Vu as Wn,Wc as Gn,Wd as Kn,Wi as qn,Wl as Jn,Wo as Yn,Wr as Xn,Ws as Zn,Wu as Qn,Xa as $n,Xc as er,Xd as tr,Xi as nr,Xl as rr,Xo as ir,Xr as ar,Xs as or,Xu as sr,Y as cr,Ya as lr,Yc as ur,Yd as dr,Yl as fr,Yo as pr,Yr as mr,Ys as hr,Yu as gr,Zc as _r,Zd as vr,Zi as yr,Zl as br,Zo as xr,Zr as Sr,Zs as Cr,Zu as wr,_ as Tr,_a as O,_c as Er,_d as Dr,_f as Or,_l as kr,_o as Ar,_u as jr,a as Mr,aa as Nr,ac as Pr,ad as Fr,af as Ir,ai as Lr,al as Rr,ao as zr,as as Br,au as Vr,b as Hr,bc as Ur,bd as k,bf as Wr,bl as Gr,bo as Kr,bu as qr,c as Jr,ca as Yr,cc as Xr,cd as Zr,cf as Qr,ci as $r,cl as ei,co as ti,cs as ni,cu as ri,d as ii,da as ai,dc as oi,dd as si,df as ci,dl as li,du as ui,ec as A,ed as di,ef as fi,ei as pi,el as mi,er as hi,es as gi,eu as _i,f as vi,fa as yi,fc as bi,fd as xi,ff as Si,fl as Ci,fo as wi,fu as Ti,g as Ei,ga as Di,gc as Oi,gd as ki,gf as Ai,gl as ji,go as Mi,gu as Ni,h as Pi,ha as Fi,hc as Ii,hd as Li,hf as Ri,hl as zi,ho as Bi,hu as Vi,i as Hi,ia as Ui,ic as Wi,id as Gi,if as Ki,ii as qi,il as Ji,io as Yi,ir as Xi,is as Zi,iu as Qi,jc as $i,jd as ea,jf as ta,jl as j,jo as na,jr as ra,ju as ia,ka as aa,kc as oa,kd as M,kf as sa,kl as ca,ko as la,kr as ua,ku as da,l as fa,la as pa,lc as ma,ld as ha,lf as ga,ll as _a,lo as va,ls as ya,lu as ba,m as N,ma as P,mc as xa,md as Sa,mf as Ca,ml as wa,mo as Ta,mu as Ea,n as Da,nc as F,nd as Oa,nf as ka,ni as Aa,nl as ja,nu as Ma,o as Na,oa as Pa,oc as Fa,od as Ia,of as La,ol as Ra,oo as za,os as Ba,ou as Va,p as Ha,pa as Ua,pc as Wa,pd as Ga,pf as Ka,pl as qa,po as Ja,pu as Ya,qc as Xa,qd as Za,qi as Qa,ql as $a,qo as eo,qr as to,qs as no,qu as ro,r as io,rc as ao,rd as oo,rf as so,ri as co,rl as lo,rr as I,rs as uo,ru as fo,s as po,sa as mo,sc as ho,sd as go,sf as _o,si as vo,sl as L,so as yo,ss as bo,su as xo,tc as So,td as Co,tf as wo,ti as To,tl as Eo,tr as R,ts as Do,tt as z,tu as Oo,u as ko,ua as Ao,uc as jo,ud as Mo,uf as No,ui as Po,ul as Fo,uo as Io,uu as Lo,v as Ro,va as B,vc as zo,vd as Bo,vf as Vo,vl as Ho,vo as Uo,vr as Wo,vu as Go,wa as Ko,wc as qo,wd as Jo,wf as Yo,wl as Xo,wo as Zo,wu as Qo,x as $o,xa as es,xc as ts,xd as ns,xf as rs,xl as is,xo as V,xu as as,y as os,ya as H,yc as ss,yd as cs,yf as ls,yl as us,yo as ds,yu as fs,za as ps,zc as ms,zd as hs,zi as gs,zl as _s,zo as vs,zr as ys,zu as bs}from"./_chunks/src-BbkJRbbx.js";import{constants as xs,createContext as Ss,runInContext as Cs}from"node:vm";import*as U from"node:diagnostics_channel";let W=null;function targets(){let e=/* @__PURE__ */ new Set,t=I();for(let n in t){let r=t[n];if(r===null||typeof r!=`object`&&typeof r!=`function`)continue;e.add(r);let i=r.prototype;typeof r==`function`&&typeof i==`object`&&i&&e.add(i)}return e.add(R.prototype),[...e]}function snapshot(e){let t=Reflect.ownKeys(e),n=Array(t.length);for(let r=0;r<t.length;r++){let i=t[r];n[r]=isArrayIndex(i)?null:Object.getOwnPropertyDescriptor(e,i)}return{target:e,keys:t,descriptors:n,keySet:null}}let G=null;function captureInterfaceBaseline(){if(W===null){W=[],G=/* @__PURE__ */ new WeakSet;for(let e of targets())W.push(snapshot(e)),G.add(e);ownObjectCreateMaps()}}let ws=null;function ownObjectCreateMaps(){if(W===null)return;let e=ws??=Cs(`(prototypes) => prototypes.map((p) => Object.create(p))`,Ss(xs.DONT_CONTEXTIFY)),t=[Object.prototype];for(let e=0;e<W.length;e++){let n=W[e].target;typeof n!=`function`&&t.push(n)}e(t)}function configurableDescriptor(e){return typeof e==`object`&&e&&e.configurable!==!0?{...e,configurable:!0}:e}function guardInterfaceDefinitions(e){let t=G;if(t===null)return;let n=e.Object,r=e.Reflect,i=n.defineProperty,a=n.defineProperties,o=r.defineProperty,s={defineProperty(e,n,r){return i(e,n,t.has(e)?configurableDescriptor(r):r)},defineProperties(e,n){if(!t.has(e)||typeof n!=`object`||!n)return a(e,n);let r={};for(let e of Reflect.ownKeys(n))Object.getOwnPropertyDescriptor(n,e)?.enumerable&&(r[e]=configurableDescriptor(n[e]));return a(e,r)},reflectDefineProperty(e,n,r){return o(e,n,t.has(e)?configurableDescriptor(r):r)}};Object.defineProperty(s.reflectDefineProperty,"name",{value:`defineProperty`}),Object.defineProperty(n,"defineProperty",{value:s.defineProperty,writable:!0,configurable:!0,enumerable:!1}),Object.defineProperty(n,"defineProperties",{value:s.defineProperties,writable:!0,configurable:!0,enumerable:!1}),Object.defineProperty(r,"defineProperty",{value:s.reflectDefineProperty,writable:!0,configurable:!0,enumerable:!1})}function isArrayIndex(e){if(typeof e!=`string`||e===``||e.length>10)return!1;let t=Number(e);return t>>>0===t&&t!==4294967295&&String(t)===e}function sameDescriptor(e,t){return e.value===t.value&&e.get===t.get&&e.set===t.set&&e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable}function restoreInterfaces(){if(W===null)return 0;let e=0;for(let t=0;t<W.length;t++){let n=W[t],r=n.target,i=Reflect.ownKeys(r);for(let t=0;t<i.length;t++){let a=i[t];a===n.keys[t]||(n.keySet??=new Set(n.keys)).has(a)||isArrayIndex(a)||Reflect.deleteProperty(r,a)&&e++}for(let t=0;t<n.keys.length;t++){let i=n.keys[t],a=n.descriptors[t];if(a===null)continue;let o=Object.getOwnPropertyDescriptor(r,i);if(!(o!==void 0&&sameDescriptor(o,a)))try{Object.defineProperty(r,i,a),e++}catch{}}}return ownObjectCreateMaps(),e}const K=`ctrl-dom:span`,q=typeof U.tracingChannel==`function`?U.tracingChannel(K):null;function spanChannel(){return q}function tracing(){return q!==null&&q.hasSubscribers}function traceSync(e,t,n){let r={op:e,description:t,data:{},async:!1},i=b();return q.traceSync(e=>{try{return n(e)}finally{recordSkipped(e,i)}},r,void 0,r)}function tracePromise(e,t,n){let r={op:e,description:t,data:{},async:!0},i=b();return q.tracePromise(e=>n(e).finally(()=>recordSkipped(e,i)),r,void 0,r)}function recordSkipped(e,t){let n=b()-t;n>0&&(e.data[`clock.skipped_ms`]=Math.round(n))}function describeCall(e,t){let n=`${e}(`;for(let e=0;e<t.length&&(t[e]!==void 0||e!==t.length-1);e++)if(n+=(e>0?`, `:``)+describeValue(t[e],0),n.length>160)return`${n.slice(0,159)}…)`;return`${n})`}function describeValue(e,t){if(typeof e==`string`)return JSON.stringify(e.length>40?`${e.slice(0,39)}…`:e);if(typeof e==`function`)return e.name?`${e.name}()`:`fn`;if(e instanceof RegExp||typeof e!=`object`||!e)return String(e);if(e[j]!==void 0)return describeNode(e);if(Array.isArray(e))return t>0?`[…]`:`[${e.slice(0,3).map(e=>describeValue(e,t+1)).join(`, `)}${e.length>3?`, …`:``}]`;if(t>0)return`{…}`;let n=Object.entries(e).slice(0,4);return n.length===0?`{}`:`{ ${n.map(([e,n])=>`${e}: ${describeValue(n,t+1)}`).join(`, `)} }`}let J=null;function setNodeDescriber(e){J=e}function describeNode(e){let t=e;if(t.nodeType===9)return`document`;if(t.nodeType!==1||typeof t.localName!=`string`)return t.nodeType===3?`#text`:`node`;if(J!==null)try{let t=J(e);if(t)return t}catch{}if(t.localName===`body`||t.localName===`html`)return`<${t.localName}>`;let n=t.getAttribute?.(`aria-label`)||t.textContent?.trim().replace(/\s+/g,` `)||t.getAttribute?.(`placeholder`)||t.getAttribute?.(`name`)||``;return n===``?`<${t.localName}>`:`<${t.localName} ${quote(n)}>`}function quote(e){return JSON.stringify(e.length>40?`${e.slice(0,39)}…`:e)}const Y=`sentry-tests:failure`;let X=null;function setFailureSnapshot(e){X=e}function subscribeTestFailures(e){let t=U.channel(Y),onFailure=t=>{let n=t,r=e();if(r==null||n.document!==r)return;let i=T();if(i!==null&&(n.contexts.clock={skipped_ms:Math.round(i.skippedMs),pending_timers:i.pendingTimers}),X!==null&&r.body!=null)try{n.attachments.push({filename:`accessibility-snapshot.txt`,contentType:`text/plain`,data:X(r.body)})}catch{}};return t.subscribe(onFailure),()=>t.unsubscribe(onFailure)}function implOf(e){return e[j]??e}function isTypingType(e){return O(e)||e===12||e>=7&&e<=11}function isEditable(e){let t=implOf(e);return t.tag===V.input?isTypingType(P(t))&&N(t):t.tag===V.textarea?N(t):Jt(t)}function supportsSelection(e){let t=implOf(e);return t.tag===V.textarea||t.tag===V.input&&B(P(t))}function hasUIValue(e){let t=implOf(e);return t.tag===V.textarea||t.tag===V.input&&H(P(t))===0}function getUIValue(e){let t=implOf(e);if(t.tag===V.input){let e=t.node;return e[k]??e.value}return t.tag===V.textarea?t.node.value:``}function setUIValue(t,n){let r=implOf(t);if(r.tag===V.input){let t=r.node,i=P(r);if(H(i)!==0)return;let a=e(i,n,r);r.doc[l]++,t[M]=a,t[S]=!0,t[u]=!0,t[k]=a===n?null:n,t[F]=a===``&&n!==``&&i!==5&&!O(i);let o=n.length;t[C]>o&&(t[C]=o),t[E]>o&&(t[E]=o)}else if(r.tag===V.textarea){let e=r.node;r.doc[l]++,e[D]=n,e[S]=!0,e[u]=!0}}function clearUIValue(e){let t=implOf(e);if(t.tag===V.input){let e=t.node;e[k]=null,e[F]=!1}}function getUISelection(e){let t=implOf(e).node,n=getUIValue(e).length;return{start:Math.min(t[C],n),end:Math.min(t[E],n),direction:t[x]}}function setUISelection(e,t,n=t,r=`none`){let i=implOf(e);if(i.tag!==V.input&&i.tag!==V.textarea)return;let a=i.node,o=getUIValue(e).length,s=Math.max(0,Math.min(t,n)),c=Math.max(t,n);c>o&&(c=o),s>c&&(s=c),a[C]=s,a[E]=c,a[x]=r}function setFilesFromUI(e,t){let n=implOf(e);n.tag===V.input&&P(n)===17&&(n.doc[l]++,n.node[L]=z(t))}function setOptionSelectedFromUI(e,t){let n=implOf(e);if(n.tag!==V.option)return;let r=n.node;r._setSelectedness(t),r[w]=!0;let i=cr(n);if(i!==null){let e=i.node;t&&e._deselectOthers(n),e._updateSelectedContent()}}function setCheckedFromUI(e,t){let n=implOf(e);n.tag===V.input&&n.node._setCheckedness(t,!0)}const Ts=R.prototype.getComputedStyle;let Z=null,Q=null,$=null;function getComputedStyleOverride(e){let t=e.doc.defaultView;if(t==null)return null;let n=t.getComputedStyle;if(n===Ts||typeof n!=`function`||Xe.has(n))return null;if(Q?.deref()===n&&Z?.deref()===t){let e=$.deref();if(e!==void 0)return e}let r=n.bind(t);return Z=new WeakRef(t),Q=new WeakRef(n),$=new WeakRef(r),r}export{hr as $_proto__,or as $aboutBase,Cr as $active,rn as $assocGen,c as $attr,A as $attributes,So as $availableToElementInternals,F as $badInput,ao as $baseFor,Wi as $baseOverride,Pr as $baseURL,Fa as $baseVersion,ho as $block,Xr as $byCtor,ma as $byName,jo as $cache,oi as $callback,bi as $checked,Wa as $checkedSet,xa as $childNodes,Ii as $childWindows,Oi as $children,Er as $classList,zo as $clipboard,ss as $clonable,Ur as $closed,ts as $coll,gn as $compiled,ve as $compiledFor,qo as $condition,Cn as $constructed,Me as $constructingEntryList,Te as $contentType,Rt as $controlsCache,oa as $controlsDoc,ne as $controlsVersion,$i as $cookieJar,Ct as $cookies,At as $css,Ut as $current,m as $customElements,Ze as $customValidity,ht as $cx,sn as $data,ms as $dataset,le as $declarative,Rn as $defaultNamespace,Ue as $defaultValueOverride,An as $delegatesFocus,Gn as $derived,Le as $devicePixelRatio,w as $dirtiness,Xa as $dirtyChecked,S as $dirtyValue,ur as $disabled,er as $disallowModification,_r as $doc,Xt as $dropEffect,t as $ec,mi as $effectAllowed,Eo as $el,ja as $elements,lo as $entries,Ji as $eo,Rr as $error,Ra as $file,L as $files,ei as $fill,_a as $filter,Fo as $firingSubmissionEvents,li as $focused,Ci as $form,qa as $forms,wa as $frameCallbacks,zi as $frameElement,ji as $frameId,kr as $frameTask,Ho as $frameTime,us as $generation,Gr as $globalObject,is as $hasTransients,yn as $height,xe as $history,Xo as $home,En as $host,Pe as $href,Oe as $id,Vt as $idleCallbacks,ca as $idleId,ie as $ids,j as $impl,Et as $implementation,Nt as $indeterminate,Kt as $index,v as $indexed,tt as $inflight,yt as $info,un as $innerHeight,_s as $innerWidth,fe as $is2D,Vn as $isHTML,Ke as $items,Nn as $keyText,Jn as $kind,ze as $labels,ft as $layerName,$a as $list,st as $listeners,fr as $localStorage,rr as $location,br as $lockedForReset,$t as $m,i as $matches,_i as $media,Oo as $mediaQueryLists,Ma as $mode,fo as $name,Qi as $names,Vr as $namespaces,Va as $navigator,xo as $nodes,ri as $onchange,ba as $options,Lo as $owner,ui as $ownerNode,Ti as $ownerRule,Ya as $parent,Ea as $parentRule,Vi as $parentWindow,Ni as $pastNames,jr as $pointerBeforeReference,Go as $preApplied,fs as $preChecked,qr as $preCheckedRadio,as as $preIndeterminate,xn as $prefix,Ce as $prelude,Qo as $presentationStyle,On as $pseudo,p as $queries,je as $ranges,D as $rawValue,da as $readonly,se as $readyState,ia as $record,kt as $records,It as $rects,Yt as $reference,Ie as $result,rt as $root,St as $rules,pn as $running,bs as $runningFrame,he as $sc,Wn as $screen,Ye as $scrollRestoration,In as $scrollX,Qn as $scrollY,x as $selDir,E as $selEnd,ro as $selSet,C as $selStart,gr as $selectedOptions,sr as $selectedness,wr as $selection,an as $selector,ee as $serializable,di as $sessionStorage,Co as $settled,Oa as $shadowRoot,oo as $shed,Gi as $sheet,Fr as $sheets,Ia as $slotAssignment,go as $so,Zr as $states,ha as $style,Mo as $styleVersion,si as $supportsText,xi as $systemId,Ga as $target,Sa as $targets,Li as $tasks,ki as $timers,Dr as $title,Bo as $type,cs as $types,k as $uiValue,ns as $updating,_n as $updatingSelectedContent,ye as $uri,Jo as $url,wn as $userActivation,u as $userEdited,Ee as $userValidity,zt as $validity,M as $value,l as $version,ea as $visualViewport,wt as $w,jt as $whatToShow,Wt as $whenDefined,h as $width,Qe as $window,gt as $writeBuffer,cn as $x,hs as $xhr,ue as $y,zn as $z,Zt as ATTRIBUTE_NODE,gi as AttrRecord,n as CDATA_SECTION_NODE,fi as COMMENT_NODE,Ge as COMPAT,Mn as COMPAT_PROFILES,qn as DEFAULT_COMPAT,wo as DOCUMENT_FRAGMENT_NODE,ka as DOCUMENT_NODE,so as DOCUMENT_POSITION_CONTAINED_BY,Ki as DOCUMENT_POSITION_CONTAINS,Ir as DOCUMENT_POSITION_DISCONNECTED,La as DOCUMENT_POSITION_FOLLOWING,_o as DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC,Qr as DOCUMENT_POSITION_PRECEDING,ga as DOCUMENT_TYPE_NODE,nr as DeclBlock,No as ELEMENT_NODE,ci as ENTITY_NODE,Si as ENTITY_REFERENCE_NODE,no as EventState,Y as FAILURE_CHANNEL,Ka as F_ADOPT_HOOK,Ca as F_ARIA_ATTRS,Ri as F_ATTR_HOOK,Ai as F_CE_CUSTOM,Or as F_CHILDREN_HOOK,Vo as F_CHILD_LIST,ls as F_CONNECTED,Wr as F_CONNECT_HOOK,rs as F_CUSTOM,vn as F_DATA_ATTRS,be as F_FACE,Yo as F_HAS_SHADOW,Tn as F_HAS_STYLE_ATTR,Ne as F_HTML,De as F_MO_REGISTERED,Bt as F_SHADOW_ROOT,es as GLOBAL_EVENT_HANDLER_EVENTS,Yi as HTMLCollection,sa as HTML_NS,Ua as INPUT_TYPE_NAMES,re as MATHML_NS,ta as NOTATION_NODE,vt as NodeCache,Do as NodeImpl,bt as NodeList,Tt as PROCESSING_INSTRUCTION_NODE,K as SPAN_CHANNEL,Mt as SVG_NS,V as T,Gt as TEXT_NODE,We as VirtualClock,jn as VirtualTimeout,hn as WINDOW_EVENT_HANDLER_EVENTS,g as XLINK_NS,$e as XMLNS_NS,_t as XML_NS,nn as adoptedStyleSheetsOf,Zo as ariaAttr,Dn as asciiLowercase,Bi as assignManually,Mi as assignedElements,Ar as assignedNodes,Uo as assignedSlot,we as attachShadowRoot,d as attr,en as attrAssociatedElement,a as attrAssociatedElements,kn as attrNode,captureInterfaceBaseline,qe as childAt,ke as classTokens,clearUIValue,Kn as clockNow,T as clockStats,yo as closest,f as compareBoundaryPoints,Re as compatExposes,fn as computedDisplay,ys as computedValue,me as computedVisibility,ua as constructEntryList,Da as controlValue,Wo as createEvent,z as createFileList,s as createLinkSheet,Un as currentStyleVersion,oe as defaultButton,dt as deferredCompatMembers,pe as derivedCache,describeCall,describeNode,uo as dispatch,gs as dispatchTrusted,zr as ensureCollectionIndexGetters,dn as ensureIndexGetters,vo as evaluateMediaQueryList,Qt as faceState,ds as findFlattenedSlottables,Kr as findSlot,de as fireAnEvent,Bn as fireSyntheticPointerEvent,Pn as firstElementChild,Za as foreignImmediatesPending,Nr as formOwner,Ht as getAttribute,xt as getComputedStyle,getComputedStyleOverride,Zi as getCurrentEvent,Lt as getElementsByClassName,aa as getElementsByTagName,te as getElementsByTagNameNS,_e as getEventHandler,getUISelection,getUIValue,guardInterfaceDefinitions,la as hasAttr,Je as hasAuthorStyles,hi as hasExplicitAttrElements,Zn as hasListeners,io as hasReadonlyAttribute,hasUIValue,Qa as hiddenGlobals,ra as implicitSubmission,vs as indexGetterTable,Yn as indexOf,Hi as inputChecked,Mr as inputIndeterminate,P as inputType,Fi as inputTypeFromAttr,wi as inspectNode,at as installClock,Ko as installEventHandlers,Pa as isActuallyDisabled,ae as isAsciiWhitespace,Na as isAutofilled,po as isChecked,Jr as isDefault,fa as isDisabled,Fn as isDisplayNone,Xn as isDisplayNoneInclusive,isEditable as isEditableControl,ko as isEnabled,r as isFACE,ii as isInRange,Be as isInclusiveAncestor,vi as isIndeterminate,Ha as isInvalid,mo as isLabelable,Yr as isListed,N as isMutable,Di as isNumericType,Pi as isOptional,Ei as isOutOfRange,Tr as isPlaceholderShown,Ro as isReadOnly,os as isReadWrite,Hr as isRequired,pa as isResettable,Ot as isSubmitButton,Ao as isSubmittable,$o as isTextControl,O as isTextualType,mn as isValid,on as isValidDoctypeName,ps as isValidElementLocalName,ce as isValidNamespacePrefix,Ve as isVisibilityHidden,ai as labeledControl,yi as labelsFor,pt as lastElementChild,Ui as listOfOptions,_ as matchMediaText,ti as matches,$r as mediaEnvironment,eo as nextElementInTree,ct as nextElementSibling,pr as nextInTree,ir as nextSkippingChildren,ln as nodeCache,Br as nodeGetTheParent,Ae as nodeLength,y as notifyMutationObservers,ge as optionSelected,yr as parseDeclBlock,$n as parseFragment,et as parseMediaQueryList,Hn as peekDerivedCache,mt as pointerEvents,to as pointerEventsNone,na as prefixFlag,xr as previousElementSibling,tn as previousInTree,lt as pseudoContent,va as querySelector,Io as querySelectorAll,quote,To as registerOwnerSheet,He as removeAllEventListeners,Dt as removeAttribute,Aa as removeOwnerSheet,Ja as replaceData,ni as reportException,ot as resolveCompat,restoreInterfaces,Ba as retarget,it as serializeChildren,lr as serializeNode,co as setAdoptedStyleSheets,bo as setAssignedSlotLookup,Pt as setAttribute,setCheckedFromUI,mr as setComputedColorMode,Sn as setEventHandler,setFailureSnapshot,setFilesFromUI,setNodeDescriber,Ft as setNotImplementedHandler,setOptionSelectedFromUI,ut as setTrusted,setUISelection,setUIValue,ya as setUncaughtExceptionHandler,dr as skipIdleTime,spanChannel,qt as splitOnAsciiWhitespace,Ta as splitText,Fe as styleElementRemoved,pi as styleElementSheet,nt as styleElementUpdated,qi as styleSheetsOf,ar as styledDisplay,subscribeTestFailures,supportsSelection,B as supportsSelectionType,bn as tagId,Se as tagName,tracePromise,traceSync,tracing,Xi as trackGlobalTimers,o as treeRoot,Sr as uaDisplay,Lr as unregisterOwnerSheet,Ln as validateAndExtract,H as valueMode,tr as virtualDate,vr as virtualPerformance,Po as windowHooks,I as windowInterfaces,za as withNamedProperties};
1
+ import{$ as e,$c as t,$d as n,$i as r,$l as i,$n as a,$o as o,$r as s,$s as c,$u as ee,Aa as te,Ac as ne,Ad as l,Af as re,Al as ie,Ao as ae,Ar as oe,Au as se,Ba as ce,Bc as le,Bd as ue,Bi as de,Bl as fe,Bo as pe,Br as me,Bu as he,C as ge,Ca as _e,Cc as ve,Cd as ye,Cf as be,Cl as xe,Co as Se,Cu as Ce,Da as we,Dc as Te,Dd as Ee,Df as De,Dl as Oe,Do as ke,Dr as Ae,Du as je,Ec as Me,Ed as u,Ef as Ne,El as Pe,Eo as d,Er as f,Eu as p,Fc as m,Fd as h,Ff as g,Fi as _,Fl as v,Fo as y,Fr as Fe,Fu as Ie,Gc as Le,Gd as b,Gi as Re,Gl as ze,Go as Be,Gr as Ve,Gs as He,Gu as x,Hc as Ue,Hd as We,Hi as Ge,Hl as Ke,Ho as qe,Hr as Je,Hu as Ye,I as Xe,Ic as Ze,Id as Qe,If as $e,Ii as et,Il as tt,Ir as nt,Iu as rt,Ja as it,Jc as S,Jd as at,Ji as ot,Jl as st,Jo as ct,Jr as lt,Js as ut,Ju as C,Kc as w,Kd as T,Ki as dt,Kl as ft,Ko as pt,Kr as mt,Ku as E,Lc as ht,Ld as gt,Lf as _t,Li as vt,Ll as yt,Lo as bt,Lr as xt,Lu as St,Mc as Ct,Md as wt,Mf as Tt,Ml as Et,Mo as Dt,Mr as Ot,Mu as kt,Nc as At,Nd as jt,Nf as Mt,Nl as Nt,No as Pt,Nr as Ft,Nu as It,Oa as Lt,Oc as Rt,Od as zt,Of as Bt,Ol as Vt,Oo as Ht,Ou as D,Pc as Ut,Pd as Wt,Pf as Gt,Pl as Kt,Po as qt,Pr as Jt,Pu as Yt,Qc as Xt,Qd as Zt,Qi as Qt,Ql as $t,Qn as en,Qo as tn,Qr as nn,Qs as rn,Qu as an,Ra as on,Rc as sn,Rd as cn,Ri as ln,Rl as un,Ro as dn,Rr as fn,Ru as pn,S as mn,Sa as hn,Sc as gn,Sd as _n,Sf as vn,Sl as yn,So as bn,Su as xn,Ta as Sn,Tc as Cn,Td as wn,Tf as Tn,Tl as En,To as Dn,Tu as On,Ua as kn,Uc as An,Ud as jn,Ui as Mn,Ul as Nn,Uo as Pn,Ur as Fn,Uu as In,Va as Ln,Vc as Rn,Vd as zn,Vi as Bn,Vl as Vn,Vo as Hn,Vr as Un,Vu as Wn,Wc as Gn,Wd as Kn,Wi as qn,Wl as Jn,Wo as Yn,Wr as Xn,Ws as Zn,Wu as Qn,Xa as $n,Xc as er,Xd as tr,Xi as nr,Xl as rr,Xo as ir,Xr as ar,Xs as or,Xu as sr,Y as cr,Ya as lr,Yc as ur,Yd as dr,Yl as fr,Yo as pr,Yr as mr,Ys as hr,Yu as gr,Zc as _r,Zd as vr,Zi as yr,Zl as br,Zo as xr,Zr as Sr,Zs as Cr,Zu as wr,_ as Tr,_a as O,_c as Er,_d as Dr,_f as Or,_l as kr,_o as Ar,_u as jr,a as Mr,aa as Nr,ac as Pr,ad as Fr,af as Ir,ai as Lr,al as Rr,ao as zr,as as Br,au as Vr,b as Hr,bc as Ur,bd as k,bf as Wr,bl as Gr,bo as Kr,bu as qr,c as Jr,ca as Yr,cc as Xr,cd as Zr,cf as Qr,ci as $r,cl as ei,co as ti,cs as ni,cu as ri,d as ii,da as ai,dc as oi,dd as si,df as ci,dl as li,du as ui,ec as A,ed as di,ef as fi,ei as pi,el as mi,er as hi,es as gi,eu as _i,f as vi,fa as yi,fc as bi,fd as xi,ff as Si,fl as Ci,fo as wi,fu as Ti,g as Ei,ga as Di,gc as Oi,gd as ki,gf as Ai,gl as ji,go as Mi,gu as Ni,h as Pi,ha as Fi,hc as Ii,hd as Li,hf as Ri,hl as zi,ho as Bi,hu as Vi,i as Hi,ia as Ui,ic as Wi,id as Gi,if as Ki,ii as qi,il as Ji,io as Yi,ir as Xi,is as Zi,iu as Qi,jc as $i,jd as ea,jf as ta,jl as j,jo as na,jr as ra,ju as ia,ka as aa,kc as oa,kd as M,kf as sa,kl as ca,ko as la,kr as ua,ku as da,l as fa,la as pa,lc as ma,ld as ha,lf as ga,ll as _a,lo as va,ls as ya,lu as ba,m as N,ma as P,mc as xa,md as Sa,mf as Ca,ml as wa,mo as Ta,mu as Ea,n as Da,nc as F,nd as Oa,nf as ka,ni as Aa,nl as ja,nu as Ma,o as Na,oa as Pa,oc as Fa,od as Ia,of as La,ol as Ra,oo as za,os as Ba,ou as Va,p as Ha,pa as Ua,pc as Wa,pd as Ga,pf as Ka,pl as qa,po as Ja,pu as Ya,qc as Xa,qd as Za,qi as Qa,ql as $a,qo as eo,qr as to,qs as no,qu as ro,r as io,rc as ao,rd as oo,rf as so,ri as co,rl as lo,rr as I,rs as uo,ru as fo,s as po,sa as mo,sc as ho,sd as go,sf as _o,si as vo,sl as L,so as yo,ss as bo,su as xo,tc as So,td as Co,tf as wo,ti as To,tl as Eo,tr as R,ts as Do,tt as z,tu as Oo,u as ko,ua as Ao,uc as jo,ud as Mo,uf as No,ui as Po,ul as Fo,uo as Io,uu as Lo,v as Ro,va as B,vc as zo,vd as Bo,vf as Vo,vl as Ho,vo as Uo,vr as Wo,vu as Go,wa as Ko,wc as qo,wd as Jo,wf as Yo,wl as Xo,wo as Zo,wu as Qo,x as $o,xa as es,xc as ts,xd as ns,xf as rs,xl as is,xo as V,xu as as,y as os,ya as H,yc as ss,yd as cs,yf as ls,yl as us,yo as ds,yu as fs,za as ps,zc as ms,zd as hs,zi as gs,zl as _s,zo as vs,zr as ys,zu as bs}from"./_chunks/src-C8w0qc4Q.js";import{constants as xs,createContext as Ss,runInContext as Cs}from"node:vm";import*as U from"node:diagnostics_channel";let W=null;function targets(){let e=/* @__PURE__ */ new Set,t=I();for(let n in t){let r=t[n];if(r===null||typeof r!=`object`&&typeof r!=`function`)continue;e.add(r);let i=r.prototype;typeof r==`function`&&typeof i==`object`&&i&&e.add(i)}return e.add(R.prototype),[...e]}function snapshot(e){let t=Reflect.ownKeys(e),n=Array(t.length);for(let r=0;r<t.length;r++){let i=t[r];n[r]=isArrayIndex(i)?null:Object.getOwnPropertyDescriptor(e,i)}return{target:e,keys:t,descriptors:n,keySet:null}}let G=null;function captureInterfaceBaseline(){if(W===null){W=[],G=/* @__PURE__ */ new WeakSet;for(let e of targets())W.push(snapshot(e)),G.add(e);ownObjectCreateMaps()}}let ws=null;function ownObjectCreateMaps(){if(W===null)return;let e=ws??=Cs(`(prototypes) => prototypes.map((p) => Object.create(p))`,Ss(xs.DONT_CONTEXTIFY)),t=[Object.prototype];for(let e=0;e<W.length;e++){let n=W[e].target;typeof n!=`function`&&t.push(n)}e(t)}function configurableDescriptor(e){return typeof e==`object`&&e&&e.configurable!==!0?{...e,configurable:!0}:e}function guardInterfaceDefinitions(e){let t=G;if(t===null)return;let n=e.Object,r=e.Reflect,i=n.defineProperty,a=n.defineProperties,o=r.defineProperty,s={defineProperty(e,n,r){return i(e,n,t.has(e)?configurableDescriptor(r):r)},defineProperties(e,n){if(!t.has(e)||typeof n!=`object`||!n)return a(e,n);let r={};for(let e of Reflect.ownKeys(n))Object.getOwnPropertyDescriptor(n,e)?.enumerable&&(r[e]=configurableDescriptor(n[e]));return a(e,r)},reflectDefineProperty(e,n,r){return o(e,n,t.has(e)?configurableDescriptor(r):r)}};Object.defineProperty(s.reflectDefineProperty,"name",{value:`defineProperty`}),Object.defineProperty(n,"defineProperty",{value:s.defineProperty,writable:!0,configurable:!0,enumerable:!1}),Object.defineProperty(n,"defineProperties",{value:s.defineProperties,writable:!0,configurable:!0,enumerable:!1}),Object.defineProperty(r,"defineProperty",{value:s.reflectDefineProperty,writable:!0,configurable:!0,enumerable:!1})}function isArrayIndex(e){if(typeof e!=`string`||e===``||e.length>10)return!1;let t=Number(e);return t>>>0===t&&t!==4294967295&&String(t)===e}function sameDescriptor(e,t){return e.value===t.value&&e.get===t.get&&e.set===t.set&&e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable}function restoreInterfaces(){if(W===null)return 0;let e=0;for(let t=0;t<W.length;t++){let n=W[t],r=n.target,i=Reflect.ownKeys(r);for(let t=0;t<i.length;t++){let a=i[t];a===n.keys[t]||(n.keySet??=new Set(n.keys)).has(a)||isArrayIndex(a)||Reflect.deleteProperty(r,a)&&e++}for(let t=0;t<n.keys.length;t++){let i=n.keys[t],a=n.descriptors[t];if(a===null)continue;let o=Object.getOwnPropertyDescriptor(r,i);if(!(o!==void 0&&sameDescriptor(o,a)))try{Object.defineProperty(r,i,a),e++}catch{}}}return ownObjectCreateMaps(),e}const K=`ctrl-dom:span`,q=typeof U.tracingChannel==`function`?U.tracingChannel(K):null;function spanChannel(){return q}function tracing(){return q!==null&&q.hasSubscribers}function traceSync(e,t,n){let r={op:e,description:t,data:{},async:!1},i=b();return q.traceSync(e=>{try{return n(e)}finally{recordSkipped(e,i)}},r,void 0,r)}function tracePromise(e,t,n){let r={op:e,description:t,data:{},async:!0},i=b();return q.tracePromise(e=>n(e).finally(()=>recordSkipped(e,i)),r,void 0,r)}function recordSkipped(e,t){let n=b()-t;n>0&&(e.data[`clock.skipped_ms`]=Math.round(n))}function describeCall(e,t){let n=`${e}(`;for(let e=0;e<t.length&&(t[e]!==void 0||e!==t.length-1);e++)if(n+=(e>0?`, `:``)+describeValue(t[e],0),n.length>160)return`${n.slice(0,159)}…)`;return`${n})`}function describeValue(e,t){if(typeof e==`string`)return JSON.stringify(e.length>40?`${e.slice(0,39)}…`:e);if(typeof e==`function`)return e.name?`${e.name}()`:`fn`;if(e instanceof RegExp||typeof e!=`object`||!e)return String(e);if(e[j]!==void 0)return describeNode(e);if(Array.isArray(e))return t>0?`[…]`:`[${e.slice(0,3).map(e=>describeValue(e,t+1)).join(`, `)}${e.length>3?`, …`:``}]`;if(t>0)return`{…}`;let n=Object.entries(e).slice(0,4);return n.length===0?`{}`:`{ ${n.map(([e,n])=>`${e}: ${describeValue(n,t+1)}`).join(`, `)} }`}let J=null;function setNodeDescriber(e){J=e}function describeNode(e){let t=e;if(t.nodeType===9)return`document`;if(t.nodeType!==1||typeof t.localName!=`string`)return t.nodeType===3?`#text`:`node`;if(J!==null)try{let t=J(e);if(t)return t}catch{}if(t.localName===`body`||t.localName===`html`)return`<${t.localName}>`;let n=t.getAttribute?.(`aria-label`)||t.textContent?.trim().replace(/\s+/g,` `)||t.getAttribute?.(`placeholder`)||t.getAttribute?.(`name`)||``;return n===``?`<${t.localName}>`:`<${t.localName} ${quote(n)}>`}function quote(e){return JSON.stringify(e.length>40?`${e.slice(0,39)}…`:e)}const Y=`sentry-tests:failure`;let X=null;function setFailureSnapshot(e){X=e}function subscribeTestFailures(e){let t=U.channel(Y),onFailure=t=>{let n=t,r=e();if(r==null||n.document!==r)return;let i=T();if(i!==null&&(n.contexts.clock={skipped_ms:Math.round(i.skippedMs),pending_timers:i.pendingTimers}),X!==null&&r.body!=null)try{n.attachments.push({filename:`accessibility-snapshot.txt`,contentType:`text/plain`,data:X(r.body)})}catch{}};return t.subscribe(onFailure),()=>t.unsubscribe(onFailure)}function implOf(e){return e[j]??e}function isTypingType(e){return O(e)||e===12||e>=7&&e<=11}function isEditable(e){let t=implOf(e);return t.tag===V.input?isTypingType(P(t))&&N(t):t.tag===V.textarea?N(t):Jt(t)}function supportsSelection(e){let t=implOf(e);return t.tag===V.textarea||t.tag===V.input&&B(P(t))}function hasUIValue(e){let t=implOf(e);return t.tag===V.textarea||t.tag===V.input&&H(P(t))===0}function getUIValue(e){let t=implOf(e);if(t.tag===V.input){let e=t.node;return e[k]??e.value}return t.tag===V.textarea?t.node.value:``}function setUIValue(t,n){let r=implOf(t);if(r.tag===V.input){let t=r.node,i=P(r);if(H(i)!==0)return;let a=e(i,n,r);r.doc[l]++,t[M]=a,t[S]=!0,t[u]=!0,t[k]=a===n?null:n,t[F]=a===``&&n!==``&&i!==5&&!O(i);let o=n.length;t[C]>o&&(t[C]=o),t[E]>o&&(t[E]=o)}else if(r.tag===V.textarea){let e=r.node;r.doc[l]++,e[D]=n,e[S]=!0,e[u]=!0}}function clearUIValue(e){let t=implOf(e);if(t.tag===V.input){let e=t.node;e[k]=null,e[F]=!1}}function getUISelection(e){let t=implOf(e).node,n=getUIValue(e).length;return{start:Math.min(t[C],n),end:Math.min(t[E],n),direction:t[x]}}function setUISelection(e,t,n=t,r=`none`){let i=implOf(e);if(i.tag!==V.input&&i.tag!==V.textarea)return;let a=i.node,o=getUIValue(e).length,s=Math.max(0,Math.min(t,n)),c=Math.max(t,n);c>o&&(c=o),s>c&&(s=c),a[C]=s,a[E]=c,a[x]=r}function setFilesFromUI(e,t){let n=implOf(e);n.tag===V.input&&P(n)===17&&(n.doc[l]++,n.node[L]=z(t))}function setOptionSelectedFromUI(e,t){let n=implOf(e);if(n.tag!==V.option)return;let r=n.node;r._setSelectedness(t),r[w]=!0;let i=cr(n);if(i!==null){let e=i.node;t&&e._deselectOthers(n),e._updateSelectedContent()}}function setCheckedFromUI(e,t){let n=implOf(e);n.tag===V.input&&n.node._setCheckedness(t,!0)}const Ts=R.prototype.getComputedStyle;let Z=null,Q=null,$=null;function getComputedStyleOverride(e){let t=e.doc.defaultView;if(t==null)return null;let n=t.getComputedStyle;if(n===Ts||typeof n!=`function`||Xe.has(n))return null;if(Q?.deref()===n&&Z?.deref()===t){let e=$.deref();if(e!==void 0)return e}let r=n.bind(t);return Z=new WeakRef(t),Q=new WeakRef(n),$=new WeakRef(r),r}export{hr as $_proto__,or as $aboutBase,Cr as $active,rn as $assocGen,c as $attr,A as $attributes,So as $availableToElementInternals,F as $badInput,ao as $baseFor,Wi as $baseOverride,Pr as $baseURL,Fa as $baseVersion,ho as $block,Xr as $byCtor,ma as $byName,jo as $cache,oi as $callback,bi as $checked,Wa as $checkedSet,xa as $childNodes,Ii as $childWindows,Oi as $children,Er as $classList,zo as $clipboard,ss as $clonable,Ur as $closed,ts as $coll,gn as $compiled,ve as $compiledFor,qo as $condition,Cn as $constructed,Me as $constructingEntryList,Te as $contentType,Rt as $controlsCache,oa as $controlsDoc,ne as $controlsVersion,$i as $cookieJar,Ct as $cookies,At as $css,Ut as $current,m as $customElements,Ze as $customValidity,ht as $cx,sn as $data,ms as $dataset,le as $declarative,Rn as $defaultNamespace,Ue as $defaultValueOverride,An as $delegatesFocus,Gn as $derived,Le as $devicePixelRatio,w as $dirtiness,Xa as $dirtyChecked,S as $dirtyValue,ur as $disabled,er as $disallowModification,_r as $doc,Xt as $dropEffect,t as $ec,mi as $effectAllowed,Eo as $el,ja as $elements,lo as $entries,Ji as $eo,Rr as $error,Ra as $file,L as $files,ei as $fill,_a as $filter,Fo as $firingSubmissionEvents,li as $focused,Ci as $form,qa as $forms,wa as $frameCallbacks,zi as $frameElement,ji as $frameId,kr as $frameTask,Ho as $frameTime,us as $generation,Gr as $globalObject,is as $hasTransients,yn as $height,xe as $history,Xo as $home,En as $host,Pe as $href,Oe as $id,Vt as $idleCallbacks,ca as $idleId,ie as $ids,j as $impl,Et as $implementation,Nt as $indeterminate,Kt as $index,v as $indexed,tt as $inflight,yt as $info,un as $innerHeight,_s as $innerWidth,fe as $is2D,Vn as $isHTML,Ke as $items,Nn as $keyText,Jn as $kind,ze as $labels,ft as $layerName,$a as $list,st as $listeners,fr as $localStorage,rr as $location,br as $lockedForReset,$t as $m,i as $matches,_i as $media,Oo as $mediaQueryLists,Ma as $mode,fo as $name,Qi as $names,Vr as $namespaces,Va as $navigator,xo as $nodes,ri as $onchange,ba as $options,Lo as $owner,ui as $ownerNode,Ti as $ownerRule,Ya as $parent,Ea as $parentRule,Vi as $parentWindow,Ni as $pastNames,jr as $pointerBeforeReference,Go as $preApplied,fs as $preChecked,qr as $preCheckedRadio,as as $preIndeterminate,xn as $prefix,Ce as $prelude,Qo as $presentationStyle,On as $pseudo,p as $queries,je as $ranges,D as $rawValue,da as $readonly,se as $readyState,ia as $record,kt as $records,It as $rects,Yt as $reference,Ie as $result,rt as $root,St as $rules,pn as $running,bs as $runningFrame,he as $sc,Wn as $screen,Ye as $scrollRestoration,In as $scrollX,Qn as $scrollY,x as $selDir,E as $selEnd,ro as $selSet,C as $selStart,gr as $selectedOptions,sr as $selectedness,wr as $selection,an as $selector,ee as $serializable,di as $sessionStorage,Co as $settled,Oa as $shadowRoot,oo as $shed,Gi as $sheet,Fr as $sheets,Ia as $slotAssignment,go as $so,Zr as $states,ha as $style,Mo as $styleVersion,si as $supportsText,xi as $systemId,Ga as $target,Sa as $targets,Li as $tasks,ki as $timers,Dr as $title,Bo as $type,cs as $types,k as $uiValue,ns as $updating,_n as $updatingSelectedContent,ye as $uri,Jo as $url,wn as $userActivation,u as $userEdited,Ee as $userValidity,zt as $validity,M as $value,l as $version,ea as $visualViewport,wt as $w,jt as $whatToShow,Wt as $whenDefined,h as $width,Qe as $window,gt as $writeBuffer,cn as $x,hs as $xhr,ue as $y,zn as $z,Zt as ATTRIBUTE_NODE,gi as AttrRecord,n as CDATA_SECTION_NODE,fi as COMMENT_NODE,Ge as COMPAT,Mn as COMPAT_PROFILES,qn as DEFAULT_COMPAT,wo as DOCUMENT_FRAGMENT_NODE,ka as DOCUMENT_NODE,so as DOCUMENT_POSITION_CONTAINED_BY,Ki as DOCUMENT_POSITION_CONTAINS,Ir as DOCUMENT_POSITION_DISCONNECTED,La as DOCUMENT_POSITION_FOLLOWING,_o as DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC,Qr as DOCUMENT_POSITION_PRECEDING,ga as DOCUMENT_TYPE_NODE,nr as DeclBlock,No as ELEMENT_NODE,ci as ENTITY_NODE,Si as ENTITY_REFERENCE_NODE,no as EventState,Y as FAILURE_CHANNEL,Ka as F_ADOPT_HOOK,Ca as F_ARIA_ATTRS,Ri as F_ATTR_HOOK,Ai as F_CE_CUSTOM,Or as F_CHILDREN_HOOK,Vo as F_CHILD_LIST,ls as F_CONNECTED,Wr as F_CONNECT_HOOK,rs as F_CUSTOM,vn as F_DATA_ATTRS,be as F_FACE,Yo as F_HAS_SHADOW,Tn as F_HAS_STYLE_ATTR,Ne as F_HTML,De as F_MO_REGISTERED,Bt as F_SHADOW_ROOT,es as GLOBAL_EVENT_HANDLER_EVENTS,Yi as HTMLCollection,sa as HTML_NS,Ua as INPUT_TYPE_NAMES,re as MATHML_NS,ta as NOTATION_NODE,vt as NodeCache,Do as NodeImpl,bt as NodeList,Tt as PROCESSING_INSTRUCTION_NODE,K as SPAN_CHANNEL,Mt as SVG_NS,V as T,Gt as TEXT_NODE,We as VirtualClock,jn as VirtualTimeout,hn as WINDOW_EVENT_HANDLER_EVENTS,g as XLINK_NS,$e as XMLNS_NS,_t as XML_NS,nn as adoptedStyleSheetsOf,Zo as ariaAttr,Dn as asciiLowercase,Bi as assignManually,Mi as assignedElements,Ar as assignedNodes,Uo as assignedSlot,we as attachShadowRoot,d as attr,en as attrAssociatedElement,a as attrAssociatedElements,kn as attrNode,captureInterfaceBaseline,qe as childAt,ke as classTokens,clearUIValue,Kn as clockNow,T as clockStats,yo as closest,f as compareBoundaryPoints,Re as compatExposes,fn as computedDisplay,ys as computedValue,me as computedVisibility,ua as constructEntryList,Da as controlValue,Wo as createEvent,z as createFileList,s as createLinkSheet,Un as currentStyleVersion,oe as defaultButton,dt as deferredCompatMembers,pe as derivedCache,describeCall,describeNode,uo as dispatch,gs as dispatchTrusted,zr as ensureCollectionIndexGetters,dn as ensureIndexGetters,vo as evaluateMediaQueryList,Qt as faceState,ds as findFlattenedSlottables,Kr as findSlot,de as fireAnEvent,Bn as fireSyntheticPointerEvent,Pn as firstElementChild,Za as foreignImmediatesPending,Nr as formOwner,Ht as getAttribute,xt as getComputedStyle,getComputedStyleOverride,Zi as getCurrentEvent,Lt as getElementsByClassName,aa as getElementsByTagName,te as getElementsByTagNameNS,_e as getEventHandler,getUISelection,getUIValue,guardInterfaceDefinitions,la as hasAttr,Je as hasAuthorStyles,hi as hasExplicitAttrElements,Zn as hasListeners,io as hasReadonlyAttribute,hasUIValue,Qa as hiddenGlobals,ra as implicitSubmission,vs as indexGetterTable,Yn as indexOf,Hi as inputChecked,Mr as inputIndeterminate,P as inputType,Fi as inputTypeFromAttr,wi as inspectNode,at as installClock,Ko as installEventHandlers,Pa as isActuallyDisabled,ae as isAsciiWhitespace,Na as isAutofilled,po as isChecked,Jr as isDefault,fa as isDisabled,Fn as isDisplayNone,Xn as isDisplayNoneInclusive,isEditable as isEditableControl,ko as isEnabled,r as isFACE,ii as isInRange,Be as isInclusiveAncestor,vi as isIndeterminate,Ha as isInvalid,mo as isLabelable,Yr as isListed,N as isMutable,Di as isNumericType,Pi as isOptional,Ei as isOutOfRange,Tr as isPlaceholderShown,Ro as isReadOnly,os as isReadWrite,Hr as isRequired,pa as isResettable,Ot as isSubmitButton,Ao as isSubmittable,$o as isTextControl,O as isTextualType,mn as isValid,on as isValidDoctypeName,ps as isValidElementLocalName,ce as isValidNamespacePrefix,Ve as isVisibilityHidden,ai as labeledControl,yi as labelsFor,pt as lastElementChild,Ui as listOfOptions,_ as matchMediaText,ti as matches,$r as mediaEnvironment,eo as nextElementInTree,ct as nextElementSibling,pr as nextInTree,ir as nextSkippingChildren,ln as nodeCache,Br as nodeGetTheParent,Ae as nodeLength,y as notifyMutationObservers,ge as optionSelected,yr as parseDeclBlock,$n as parseFragment,et as parseMediaQueryList,Hn as peekDerivedCache,mt as pointerEvents,to as pointerEventsNone,na as prefixFlag,xr as previousElementSibling,tn as previousInTree,lt as pseudoContent,va as querySelector,Io as querySelectorAll,quote,To as registerOwnerSheet,He as removeAllEventListeners,Dt as removeAttribute,Aa as removeOwnerSheet,Ja as replaceData,ni as reportException,ot as resolveCompat,restoreInterfaces,Ba as retarget,it as serializeChildren,lr as serializeNode,co as setAdoptedStyleSheets,bo as setAssignedSlotLookup,Pt as setAttribute,setCheckedFromUI,mr as setComputedColorMode,Sn as setEventHandler,setFailureSnapshot,setFilesFromUI,setNodeDescriber,Ft as setNotImplementedHandler,setOptionSelectedFromUI,ut as setTrusted,setUISelection,setUIValue,ya as setUncaughtExceptionHandler,dr as skipIdleTime,spanChannel,qt as splitOnAsciiWhitespace,Ta as splitText,Fe as styleElementRemoved,pi as styleElementSheet,nt as styleElementUpdated,qi as styleSheetsOf,ar as styledDisplay,subscribeTestFailures,supportsSelection,B as supportsSelectionType,bn as tagId,Se as tagName,tracePromise,traceSync,tracing,Xi as trackGlobalTimers,o as treeRoot,Sr as uaDisplay,Lr as unregisterOwnerSheet,Ln as validateAndExtract,H as valueMode,tr as virtualDate,vr as virtualPerformance,Po as windowHooks,I as windowInterfaces,za as withNamedProperties};
@@ -24,12 +24,14 @@ export declare class CSSStyleDeclaration {
24
24
  /**
25
25
  * https://drafts.csswg.org/cssom/#update-style-attribute-for
26
26
  *
27
- * Eager: every inline style write re-serializes the whole block into the style attribute.
28
- * Base UI's interaction tests (floating-ui writes positions on every render) spend ~0.5 s of
29
- * 72.5 s CPU in inline-style writes (bench/README.md "Where real suites spend their time").
30
- * Serializing when the attribute is read, as Blink does, would save part of that, but every
31
- * attribute read path (getAttribute, attribute iteration, serialization, MutationObserver old
32
- * values) would then have to check for a stale style attribute.
27
+ * Eager: every inline style write serializes the block into the style attribute. Base UI's
28
+ * interaction tests (floating-ui writes positions on every render) spend ~0.5 s of 72.5 s CPU
29
+ * in inline-style writes (bench/README.md "Where real suites spend their time"). Appended
30
+ * declarations, as in React's one-property-at-a-time mount, are serialized onto the previous
31
+ * text (DeclBlock.serialize()); a value changed in place re-serializes the whole block.
32
+ * Serializing when the attribute is read, as Blink does, would save more, but every attribute
33
+ * read path (getAttribute, attribute iteration, serialization, MutationObserver old values)
34
+ * would then have to check for a stale style attribute.
33
35
  */
34
36
  _changed(): void;
35
37
  _syncIndices(): void;
@@ -12,6 +12,13 @@ export declare class DeclBlock {
12
12
  * indexed properties are re-synced only then: most style writes update a value in place.
13
13
  */
14
14
  namesChanged: boolean;
15
+ /**
16
+ * The last serialization and how many leading declarations it covers, or -1 once a declaration
17
+ * was changed in place, moved or removed since. Declarations appended after it are serialized
18
+ * onto its end (see serialize()).
19
+ */
20
+ serialized: string;
21
+ serializedCount: number;
15
22
  constructor();
16
23
  get length(): number;
17
24
  indexOf(name: string): number;
@@ -38,8 +45,23 @@ export declare class DeclBlock {
38
45
  getPropertyValue(property: string): string;
39
46
  /** https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-getpropertypriority */
40
47
  getPropertyPriority(property: string): string;
41
- /** https://drafts.csswg.org/cssom/#serialize-a-css-declaration-block */
48
+ /**
49
+ * https://drafts.csswg.org/cssom/#serialize-a-css-declaration-block, incrementally.
50
+ *
51
+ * React writes inline styles one property at a time on mount, and every write serializes the
52
+ * block into the style attribute (CSSStyleDeclaration._changed), so an element with N inline
53
+ * properties serialized N(N+1)/2 declarations. When the only changes since the last call are
54
+ * appended declarations, the result is the previous text followed by them: the shorthand loop
55
+ * regroups earlier longhands only once every longhand of a shorthand is present, so an
56
+ * appended longhand that completes an expanded shorthand falls back to the full algorithm.
57
+ * bench dom/inline-style-mount (8 properties on 500 elements): 1.18 → 0.80 ms, allocation
58
+ * 3.8 → 2.0 MB per iteration (Node 26.12, 11 paired samples).
59
+ */
42
60
  serialize(): string;
61
+ /** Whether every longhand of one of `shorthands` is declared (whatever their priorities). */
62
+ completesShorthand(shorthands: string[]): boolean;
63
+ /** https://drafts.csswg.org/cssom/#serialize-a-css-declaration-block over the whole block (no cache). */
64
+ serializeAll(): string;
43
65
  }
44
66
  /** Parses a style attribute / declaration list into a fresh block. */
45
67
  export declare function parseDeclBlock(text: string): DeclBlock;
@@ -0,0 +1 @@
1
+ import*as e from"react";import*as t from"react-dom/client";import{traceSync as n,tracing as r}from"@ctrl/dom/internal";var i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,__exportAll=(e,t)=>{let n={};for(var r in e)i(n,r,{get:e[r],enumerable:!0});return t||i(n,Symbol.toStringTag,{value:`Module`}),n},__copyProps=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=o(t),l=0,u=c.length,d;l<u;l++)d=c[l],!s.call(e,d)&&d!==n&&i(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=a(t,d))||r.enumerable});return e},__reExport=(e,t,n)=>(__copyProps(e,t,`default`),n&&__copyProps(n,t,`default`)),c=/* @__PURE__ */ __exportAll({});import*as l from"@ctrl/dom/testing-library";__reExport(c,l);let u={reactStrictMode:!1,releaseSuspendedWork:!0};function releaseSuspendedWorkEnabled(){return u.releaseSuspendedWork}function getConfig(){return{...(0,c.getConfig)(),...u}}function configure(e){typeof e==`function`&&(e=e(getConfig()));let{reactStrictMode:t,releaseSuspendedWork:n,...r}=e;(0,c.configure)(r),u={...u,reactStrictMode:t,releaseSuspendedWork:n??u.releaseSuspendedWork}}const d=e.act;function setReactActEnvironment(e){globalThis.IS_REACT_ACT_ENVIRONMENT=e}function getIsReactActEnvironment(){return globalThis.IS_REACT_ACT_ENVIRONMENT}const f=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,p=/* @__PURE__ */ new Set;function flushReleasingSuspendedWork(e){let t=!1,n=0;try{for(;n<e.length;n++){let r=e[n];for(;r!==null;)if(f.didUsePromise=!1,r=r(!1),r!==null&&f.didUsePromise){t=!0;break}}e.length=0}catch(t){e.splice(0,n+1),f.thrownErrors.unshift(t)}if(t)for(let e of p){let t=e._internalRoot,n=t?.callbackNode;n!=null&&n.callback===void 0&&(t.callbackNode=null,t.callbackPriority=0)}return f.thrownErrors.splice(0)}function isThenable(e){return typeof e==`object`&&!!e&&typeof e.then==`function`}function withGlobalActEnvironment(e){return t=>{let n=getIsReactActEnvironment();setReactActEnvironment(!0);try{let r=!1,i=e(()=>{let e=t();return isThenable(e)&&(r=!0),e});if(r){let e=i;return{then:(t,r)=>{e.then(e=>{setReactActEnvironment(n),t(e)},e=>{setReactActEnvironment(n),r(e)})}}}return setReactActEnvironment(n),i}catch(e){throw setReactActEnvironment(n),e}}}const m=withGlobalActEnvironment(d);function actReleasingSuspendedWork(e){if(f.actQueue!==null||!releaseSuspendedWorkEnabled()){m(e);return}let t=[];try{m(()=>{let n=f.actQueue;e(),t=flushReleasingSuspendedWork(n)})}catch(e){t.push(e)}if(t.length===1)throw t[0];if(t.length>1)throw AggregateError(t)}const fireEvent=((...e)=>(0,c.fireEvent)(...e)),h=fireEvent,g=c.fireEvent;for(let e of Object.keys(c.fireEvent))h[e]=(...t)=>g[e](...t);const _=h.mouseEnter,v=h.mouseLeave;h.mouseEnter=(...e)=>(_(...e),h.mouseOver(...e)),h.mouseLeave=(...e)=>(v(...e),h.mouseOut(...e));const y=h.pointerEnter,b=h.pointerLeave;h.pointerEnter=(...e)=>(y(...e),h.pointerOver(...e)),h.pointerLeave=(...e)=>(b(...e),h.pointerOut(...e));const x=h.select;h.select=(e,t)=>{x(e,t),e.focus(),h.keyUp(e,t)};const S=h.blur,C=h.focus;h.blur=(...e)=>(h.focusOut(...e),S(...e)),h.focus=(...e)=>(h.focusIn(...e),C(...e));var w=/* @__PURE__ */ __exportAll({act:()=>m,cleanup:()=>cleanup,configure:()=>configure,fireEvent:()=>fireEvent,getConfig:()=>getConfig,render:()=>render,renderHook:()=>renderHook});__reExport(w,c);function advanceFakeTimersIfEnabled(){if(typeof jest<`u`&&jest!==null){(setTimeout._isMockFunction===!0||Object.prototype.hasOwnProperty.call(setTimeout,`clock`))&&jest.advanceTimersByTime(0);return}let e=setTimeout.clock;typeof e?.tick==`function`&&e.tick(0)}let T=!1;(0,c.configure)({unstable_advanceTimersWrapper:e=>m(e),asyncWrapper:async e=>{let t=getIsReactActEnvironment();setReactActEnvironment(!1);try{let t=await e();return await new Promise(e=>{setTimeout(()=>{e()},0),advanceFakeTimersIfEnabled()}),t}finally{setReactActEnvironment(t)}},eventWrapper:e=>{if(T)return e();T=!0;try{let t;return actReleasingSuspendedWork(()=>{t=e()}),t}finally{T=!1}}});const E=/* @__PURE__ */ new Set,D=[];function strictModeIfNeeded(t,n){return n??getConfig().reactStrictMode?e.createElement(e.StrictMode,null,t):t}function wrapUiIfNeeded(t,n){return n?e.createElement(n,null,t):t}function createConcurrentRoot(e,{hydrate:n,onCaughtError:r,onRecoverableError:i,ui:a,wrapper:o,reactStrictMode:s}){let c;if(n)try{actReleasingSuspendedWork(()=>{c=t.hydrateRoot(e,strictModeIfNeeded(wrapUiIfNeeded(a,o),s),{onCaughtError:r,onRecoverableError:i}),p.add(c)})}catch(e){throw p.delete(c),e}else c=t.createRoot(e,{onCaughtError:r,onRecoverableError:i}),p.add(c);return{hydrate(){if(!n)throw Error("Attempted to hydrate a non-hydrateable root. This is a bug in `@testing-library/react`.")},render(e){c.render(e)},unmount(){c.unmount(),p.delete(c)}}}const O=/* @__PURE__ */ new WeakMap;function resultTemplateFor(e){let t=O.get(e);return t===void 0&&(t={container:void 0,baseElement:void 0,debug:void 0,unmount:void 0,rerender:void 0,asFragment:void 0,...(0,c.getQueriesForElement)(e)},O.set(e,t)),t}function actRender(e,t,n,r,i){actReleasingSuspendedWork(()=>{n?t.hydrate():t.render(strictModeIfNeeded(wrapUiIfNeeded(e,r),i))})}function renderRoot(e,{baseElement:t,container:i,hydrate:a,queries:o,root:s,wrapper:l,reactStrictMode:u}){actRender(e,s,a,l,u);let debug=(e=t,n,r)=>Array.isArray(e)?e.forEach(e=>console.log((0,c.prettyDOM)(e,n,r))):console.log((0,c.prettyDOM)(e,n,r)),unmount=()=>{m(()=>{s.unmount()})},rerender=e=>{let rerender=()=>actRender(e,s,!1,l,u);r()?n(`react.rerender`,`rerender(${describeElement(e)})`,rerender):rerender()},asFragment=()=>{if(typeof document.createRange==`function`)return document.createRange().createContextualFragment(i.innerHTML);let e=document.createElement(`template`);return e.innerHTML=i.innerHTML,e.content};if(o!==void 0)return{container:i,baseElement:t,debug,unmount,rerender,asFragment,...(0,c.getQueriesForElement)(t,o)};let d={...resultTemplateFor(t)};return d.container=i,d.baseElement=t,d.debug=debug,d.unmount=unmount,d.rerender=rerender,d.asFragment=asFragment,d}function legacyRootError(e){let t=/* @__PURE__ */ Error("`legacyRoot: true` is not supported in this version of React. If your app runs React 19 or later, you should remove this flag. If your app runs React 18 or earlier, visit https://react.dev/blog/2022/03/08/react-18-upgrade-guide for upgrade instructions.");return Error.captureStackTrace(t,e),t}function render(e,t){return r()?n(`react.render`,`render(${describeElement(e)})`,()=>renderUntraced(e,t)):renderUntraced(e,t)}function describeElement(t){if(!e.isValidElement(t))return typeof t==`string`?JSON.stringify(t):String(t);let n=t;for(let e=0;e<10;e++){let e=isWrapper(n)?wrappedElement(n):null;if(e===null)break;n=e}return describeTree(n,0)}function describeTree(e,t){let n=componentName(e.type)||`Component`;if(typeof e.type!=`string`)return`<${n} />`;let r=e.props.children;if(r==null||r===!1)return`<${n} />`;let i=onlyElement(r);return i!==null&&t<2?`<${n}>${describeTree(i,t+1)}</${n}>`:`<${n}>…</${n}>`}function componentName(e){if(typeof e==`string`)return e;if(typeof e==`symbol`)return e.description?.replace(/^react\./,``)??``;let t=e;return(t?.displayName??t?.name??t?.render?.name??t?.type?.name??``).replace(/\$\d+$/,``)}const k=/(?:Providers?|Context|Router|Wrapper|Fragment|StrictMode|Suspense|Profiler)$/;function isWrapper(e){if(typeof e.type==`symbol`)return!0;let t=componentName(e.type);return k.test(t)||t===``&&onlyElement(e.props.children)!==null}function wrappedElement(e){let t=e.props;return onlyElement(t.children)??firstRouteElement(t.router?.routes)}function firstRouteElement(e){for(let t of e??[]){let e=onlyElement(t.element);if(e!==null&&componentName(e.type)!==`Outlet`)return e;let n=firstRouteElement(t.children);if(n!==null)return n}return null}function onlyElement(t){if(e.isValidElement(t))return t;if(!Array.isArray(t))return null;let n=t.filter(t=>e.isValidElement(t));return n.length===1?n[0]:null}function renderUntraced(e,{container:t,baseElement:n=t,legacyRoot:r=!1,onCaughtError:i,onUncaughtError:a,onRecoverableError:o,queries:s,hydrate:c=!1,wrapper:l,reactStrictMode:u}={}){if(a!==void 0)throw Error("onUncaughtError is not supported. The `render` call will already throw on uncaught errors.");if(r)throw legacyRootError(render);n||=document.body,t||=n.appendChild(document.createElement(`div`));let d;if(!E.has(t))d=createConcurrentRoot(t,{hydrate:c,onCaughtError:i,onRecoverableError:o,ui:e,wrapper:l,reactStrictMode:u}),D.push({container:t,root:d}),E.add(t);else for(let e=0;e<D.length;e++){let n=D[e];n.container===t&&(d=n.root)}return renderRoot(e,{container:t,baseElement:n,queries:s,hydrate:c,wrapper:l,root:d,reactStrictMode:u})}function cleanup(){for(let e=0;e<D.length;e++){let{root:t,container:n}=D[e];m(()=>{t.unmount()}),n.parentNode===document.body&&document.body.removeChild(n)}D.length=0,E.clear()}function renderHook(t,n={}){let{initialProps:r,...i}=n;if(i.legacyRoot)throw legacyRootError(renderHook);let a=e.createRef();function TestComponent({renderCallbackProps:n}){let r=t(n);return e.useEffect(()=>{a.current=r}),null}let{rerender:o,unmount:s}=render(e.createElement(TestComponent,{renderCallbackProps:r}),i);function rerender(t){return o(e.createElement(TestComponent,{renderCallbackProps:t}))}return{result:a,rerender,unmount:s}}export{fireEvent as a,setReactActEnvironment as c,__exportAll as d,__reExport as f,renderHook as i,configure as l,w as n,m as o,render as r,getIsReactActEnvironment as s,cleanup as t,getConfig as u};
@@ -0,0 +1 @@
1
+ var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,__exportAll=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},__copyProps=(r,a,o,s)=>{if(a&&typeof a==`object`||typeof a==`function`)for(var c=n(a),l=0,u=c.length,d;l<u;l++)d=c[l],!i.call(r,d)&&d!==o&&e(r,d,{get:(e=>a[e]).bind(null,d),enumerable:!(s=t(a,d))||s.enumerable});return r},__reExport=(e,t,n)=>(__copyProps(e,t,`default`),n&&__copyProps(n,t,`default`)),__toESM=(t,n,a)=>(a=t==null?{}:{__proto__:r(t)},__copyProps(n||!t||!t.__esModule||!i.call(t,`default`)?e(a,`default`,{value:t,enumerable:!0}):a,t));let a=require("react");a=__toESM(a,1);let o=require("react-dom/client");o=__toESM(o,1);let s=require("@ctrl/dom/internal");var c=/* @__PURE__ */ __exportAll({});__reExport(c,require("@ctrl/dom/testing-library"));let l={reactStrictMode:!1,releaseSuspendedWork:!0};function releaseSuspendedWorkEnabled(){return l.releaseSuspendedWork}function getConfig(){return{...(0,c.getConfig)(),...l}}function configure(e){typeof e==`function`&&(e=e(getConfig()));let{reactStrictMode:t,releaseSuspendedWork:n,...r}=e;(0,c.configure)(r),l={...l,reactStrictMode:t,releaseSuspendedWork:n??l.releaseSuspendedWork}}const u=a.act;function setReactActEnvironment(e){globalThis.IS_REACT_ACT_ENVIRONMENT=e}function getIsReactActEnvironment(){return globalThis.IS_REACT_ACT_ENVIRONMENT}const d=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,f=/* @__PURE__ */ new Set;function flushReleasingSuspendedWork(e){let t=!1,n=0;try{for(;n<e.length;n++){let r=e[n];for(;r!==null;)if(d.didUsePromise=!1,r=r(!1),r!==null&&d.didUsePromise){t=!0;break}}e.length=0}catch(t){e.splice(0,n+1),d.thrownErrors.unshift(t)}if(t)for(let e of f){let t=e._internalRoot,n=t?.callbackNode;n!=null&&n.callback===void 0&&(t.callbackNode=null,t.callbackPriority=0)}return d.thrownErrors.splice(0)}function isThenable(e){return typeof e==`object`&&!!e&&typeof e.then==`function`}function withGlobalActEnvironment(e){return t=>{let n=getIsReactActEnvironment();setReactActEnvironment(!0);try{let r=!1,i=e(()=>{let e=t();return isThenable(e)&&(r=!0),e});if(r){let e=i;return{then:(t,r)=>{e.then(e=>{setReactActEnvironment(n),t(e)},e=>{setReactActEnvironment(n),r(e)})}}}return setReactActEnvironment(n),i}catch(e){throw setReactActEnvironment(n),e}}}const p=withGlobalActEnvironment(u);function actReleasingSuspendedWork(e){if(d.actQueue!==null||!releaseSuspendedWorkEnabled()){p(e);return}let t=[];try{p(()=>{let n=d.actQueue;e(),t=flushReleasingSuspendedWork(n)})}catch(e){t.push(e)}if(t.length===1)throw t[0];if(t.length>1)throw AggregateError(t)}const fireEvent=((...e)=>(0,c.fireEvent)(...e)),m=fireEvent,h=c.fireEvent;for(let e of Object.keys(c.fireEvent))m[e]=(...t)=>h[e](...t);const g=m.mouseEnter,_=m.mouseLeave;m.mouseEnter=(...e)=>(g(...e),m.mouseOver(...e)),m.mouseLeave=(...e)=>(_(...e),m.mouseOut(...e));const v=m.pointerEnter,y=m.pointerLeave;m.pointerEnter=(...e)=>(v(...e),m.pointerOver(...e)),m.pointerLeave=(...e)=>(y(...e),m.pointerOut(...e));const b=m.select;m.select=(e,t)=>{b(e,t),e.focus(),m.keyUp(e,t)};const x=m.blur,S=m.focus;m.blur=(...e)=>(m.focusOut(...e),x(...e)),m.focus=(...e)=>(m.focusIn(...e),S(...e));var C=/* @__PURE__ */ __exportAll({act:()=>p,cleanup:()=>cleanup,configure:()=>configure,fireEvent:()=>fireEvent,getConfig:()=>getConfig,render:()=>render,renderHook:()=>renderHook});__reExport(C,c);function advanceFakeTimersIfEnabled(){if(typeof jest<`u`&&jest!==null){(setTimeout._isMockFunction===!0||Object.prototype.hasOwnProperty.call(setTimeout,`clock`))&&jest.advanceTimersByTime(0);return}let e=setTimeout.clock;typeof e?.tick==`function`&&e.tick(0)}let w=!1;(0,c.configure)({unstable_advanceTimersWrapper:e=>p(e),asyncWrapper:async e=>{let t=getIsReactActEnvironment();setReactActEnvironment(!1);try{let t=await e();return await new Promise(e=>{setTimeout(()=>{e()},0),advanceFakeTimersIfEnabled()}),t}finally{setReactActEnvironment(t)}},eventWrapper:e=>{if(w)return e();w=!0;try{let t;return actReleasingSuspendedWork(()=>{t=e()}),t}finally{w=!1}}});const T=/* @__PURE__ */ new Set,E=[];function strictModeIfNeeded(e,t){return t??getConfig().reactStrictMode?a.createElement(a.StrictMode,null,e):e}function wrapUiIfNeeded(e,t){return t?a.createElement(t,null,e):e}function createConcurrentRoot(e,{hydrate:t,onCaughtError:n,onRecoverableError:r,ui:i,wrapper:a,reactStrictMode:s}){let c;if(t)try{actReleasingSuspendedWork(()=>{c=o.hydrateRoot(e,strictModeIfNeeded(wrapUiIfNeeded(i,a),s),{onCaughtError:n,onRecoverableError:r}),f.add(c)})}catch(e){throw f.delete(c),e}else c=o.createRoot(e,{onCaughtError:n,onRecoverableError:r}),f.add(c);return{hydrate(){if(!t)throw Error("Attempted to hydrate a non-hydrateable root. This is a bug in `@testing-library/react`.")},render(e){c.render(e)},unmount(){c.unmount(),f.delete(c)}}}const D=/* @__PURE__ */ new WeakMap;function resultTemplateFor(e){let t=D.get(e);return t===void 0&&(t={container:void 0,baseElement:void 0,debug:void 0,unmount:void 0,rerender:void 0,asFragment:void 0,...(0,c.getQueriesForElement)(e)},D.set(e,t)),t}function actRender(e,t,n,r,i){actReleasingSuspendedWork(()=>{n?t.hydrate():t.render(strictModeIfNeeded(wrapUiIfNeeded(e,r),i))})}function renderRoot(e,{baseElement:t,container:n,hydrate:r,queries:i,root:a,wrapper:o,reactStrictMode:l}){actRender(e,a,r,o,l);let debug=(e=t,n,r)=>Array.isArray(e)?e.forEach(e=>console.log((0,c.prettyDOM)(e,n,r))):console.log((0,c.prettyDOM)(e,n,r)),unmount=()=>{p(()=>{a.unmount()})},rerender=e=>{let rerender=()=>actRender(e,a,!1,o,l);(0,s.tracing)()?(0,s.traceSync)(`react.rerender`,`rerender(${describeElement(e)})`,rerender):rerender()},asFragment=()=>{if(typeof document.createRange==`function`)return document.createRange().createContextualFragment(n.innerHTML);let e=document.createElement(`template`);return e.innerHTML=n.innerHTML,e.content};if(i!==void 0)return{container:n,baseElement:t,debug,unmount,rerender,asFragment,...(0,c.getQueriesForElement)(t,i)};let u={...resultTemplateFor(t)};return u.container=n,u.baseElement=t,u.debug=debug,u.unmount=unmount,u.rerender=rerender,u.asFragment=asFragment,u}function legacyRootError(e){let t=/* @__PURE__ */ Error("`legacyRoot: true` is not supported in this version of React. If your app runs React 19 or later, you should remove this flag. If your app runs React 18 or earlier, visit https://react.dev/blog/2022/03/08/react-18-upgrade-guide for upgrade instructions.");return Error.captureStackTrace(t,e),t}function render(e,t){return(0,s.tracing)()?(0,s.traceSync)(`react.render`,`render(${describeElement(e)})`,()=>renderUntraced(e,t)):renderUntraced(e,t)}function describeElement(e){if(!a.isValidElement(e))return typeof e==`string`?JSON.stringify(e):String(e);let t=e;for(let e=0;e<10;e++){let e=isWrapper(t)?wrappedElement(t):null;if(e===null)break;t=e}return describeTree(t,0)}function describeTree(e,t){let n=componentName(e.type)||`Component`;if(typeof e.type!=`string`)return`<${n} />`;let r=e.props.children;if(r==null||r===!1)return`<${n} />`;let i=onlyElement(r);return i!==null&&t<2?`<${n}>${describeTree(i,t+1)}</${n}>`:`<${n}>…</${n}>`}function componentName(e){if(typeof e==`string`)return e;if(typeof e==`symbol`)return e.description?.replace(/^react\./,``)??``;let t=e;return(t?.displayName??t?.name??t?.render?.name??t?.type?.name??``).replace(/\$\d+$/,``)}const O=/(?:Providers?|Context|Router|Wrapper|Fragment|StrictMode|Suspense|Profiler)$/;function isWrapper(e){if(typeof e.type==`symbol`)return!0;let t=componentName(e.type);return O.test(t)||t===``&&onlyElement(e.props.children)!==null}function wrappedElement(e){let t=e.props;return onlyElement(t.children)??firstRouteElement(t.router?.routes)}function firstRouteElement(e){for(let t of e??[]){let e=onlyElement(t.element);if(e!==null&&componentName(e.type)!==`Outlet`)return e;let n=firstRouteElement(t.children);if(n!==null)return n}return null}function onlyElement(e){if(a.isValidElement(e))return e;if(!Array.isArray(e))return null;let t=e.filter(e=>a.isValidElement(e));return t.length===1?t[0]:null}function renderUntraced(e,{container:t,baseElement:n=t,legacyRoot:r=!1,onCaughtError:i,onUncaughtError:a,onRecoverableError:o,queries:s,hydrate:c=!1,wrapper:l,reactStrictMode:u}={}){if(a!==void 0)throw Error("onUncaughtError is not supported. The `render` call will already throw on uncaught errors.");if(r)throw legacyRootError(render);n||=document.body,t||=n.appendChild(document.createElement(`div`));let d;if(!T.has(t))d=createConcurrentRoot(t,{hydrate:c,onCaughtError:i,onRecoverableError:o,ui:e,wrapper:l,reactStrictMode:u}),E.push({container:t,root:d}),T.add(t);else for(let e=0;e<E.length;e++){let n=E[e];n.container===t&&(d=n.root)}return renderRoot(e,{container:t,baseElement:n,queries:s,hydrate:c,wrapper:l,root:d,reactStrictMode:u})}function cleanup(){for(let e=0;e<E.length;e++){let{root:t,container:n}=E[e];p(()=>{t.unmount()}),n.parentNode===document.body&&document.body.removeChild(n)}E.length=0,T.clear()}function renderHook(e,t={}){let{initialProps:n,...r}=t;if(r.legacyRoot)throw legacyRootError(renderHook);let i=a.createRef();function TestComponent({renderCallbackProps:t}){let n=e(t);return a.useEffect(()=>{i.current=n}),null}let{rerender:o,unmount:s}=render(a.createElement(TestComponent,{renderCallbackProps:n}),r);function rerender(e){return o(a.createElement(TestComponent,{renderCallbackProps:e}))}return{result:i,rerender,unmount:s}}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return fireEvent}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return setReactActEnvironment}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return __exportAll}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return __reExport}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return renderHook}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return configure}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return render}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return getIsReactActEnvironment}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return cleanup}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return getConfig}});
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./_chunks/pure-DR8LsIAA.cjs");var t=/* @__PURE__ */ e.d({act:()=>e.c,cleanup:()=>e.t,configure:()=>e.a,fireEvent:()=>e.s,getConfig:()=>e.o,render:()=>e.r,renderHook:()=>e.i});if(e.f(t,e.n),(typeof process>`u`||!process.env?.RTL_SKIP_AUTO_CLEANUP)&&(typeof afterEach==`function`?afterEach(()=>{e.t()}):typeof teardown==`function`&&teardown(()=>{e.t()}),typeof beforeAll==`function`&&typeof afterAll==`function`)){let t=e.l();beforeAll(()=>{t=e.l(),e.u(!0)}),afterAll(()=>{e.u(t)})}exports.act=e.c,exports.cleanup=e.t,exports.configure=e.a,exports.fireEvent=e.s,exports.getConfig=e.o,exports.render=e.r,exports.renderHook=e.i;var n=require("@ctrl/dom/testing-library");Object.keys(n).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return n[e]}})});
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./_chunks/pure-DABEr3FU.cjs");var t=/* @__PURE__ */ e.d({act:()=>e.o,cleanup:()=>e.t,configure:()=>e.l,fireEvent:()=>e.a,getConfig:()=>e.u,render:()=>e.r,renderHook:()=>e.i});if(e.f(t,e.n),(typeof process>`u`||!process.env?.RTL_SKIP_AUTO_CLEANUP)&&(typeof afterEach==`function`?afterEach(()=>{e.t()}):typeof teardown==`function`&&teardown(()=>{e.t()}),typeof beforeAll==`function`&&typeof afterAll==`function`)){let t=e.s();beforeAll(()=>{t=e.s(),e.c(!0)}),afterAll(()=>{e.c(t)})}exports.act=e.o,exports.cleanup=e.t,exports.configure=e.l,exports.fireEvent=e.a,exports.getConfig=e.u,exports.render=e.r,exports.renderHook=e.i;var n=require("@ctrl/dom/testing-library");Object.keys(n).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return n[e]}})});
@@ -1 +1 @@
1
- import{a as e,c as t,d as n,f as r,i,l as a,n as o,o as s,r as c,s as l,t as u,u as d}from"./_chunks/pure-ajnRI-Fp.js";export*from"@ctrl/dom/testing-library";if(r(/* @__PURE__ */ n({act:()=>t,cleanup:()=>u,configure:()=>e,fireEvent:()=>l,getConfig:()=>s,render:()=>c,renderHook:()=>i}),o),(typeof process>`u`||!process.env?.RTL_SKIP_AUTO_CLEANUP)&&(typeof afterEach==`function`?afterEach(()=>{u()}):typeof teardown==`function`&&teardown(()=>{u()}),typeof beforeAll==`function`&&typeof afterAll==`function`)){let e=a();beforeAll(()=>{e=a(),d(!0)}),afterAll(()=>{d(e)})}export{t as act,u as cleanup,e as configure,l as fireEvent,s as getConfig,c as render,i as renderHook};
1
+ import{a as e,c as t,d as n,f as r,i,l as a,n as o,o as s,r as c,s as l,t as u,u as d}from"./_chunks/pure-C0WlxYhN.js";export*from"@ctrl/dom/testing-library";if(r(/* @__PURE__ */ n({act:()=>s,cleanup:()=>u,configure:()=>a,fireEvent:()=>e,getConfig:()=>d,render:()=>c,renderHook:()=>i}),o),(typeof process>`u`||!process.env?.RTL_SKIP_AUTO_CLEANUP)&&(typeof afterEach==`function`?afterEach(()=>{u()}):typeof teardown==`function`&&teardown(()=>{u()}),typeof beforeAll==`function`&&typeof afterAll==`function`)){let e=l();beforeAll(()=>{e=l(),t(!0)}),afterAll(()=>{t(e)})}export{s as act,u as cleanup,a as configure,e as fireEvent,d as getConfig,c as render,i as renderHook};
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./_chunks/pure-DR8LsIAA.cjs");exports.act=e.c,exports.cleanup=e.t,exports.configure=e.a,exports.fireEvent=e.s,exports.getConfig=e.o,exports.render=e.r,exports.renderHook=e.i;var t=require("@ctrl/dom/testing-library");Object.keys(t).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return t[e]}})});
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./_chunks/pure-DABEr3FU.cjs");exports.act=e.o,exports.cleanup=e.t,exports.configure=e.l,exports.fireEvent=e.a,exports.getConfig=e.u,exports.render=e.r,exports.renderHook=e.i;var t=require("@ctrl/dom/testing-library");Object.keys(t).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return t[e]}})});
@@ -1 +1 @@
1
- export{c as act,t as cleanup,a as configure,s as fireEvent,o as getConfig,r as render,i as renderHook}from"./_chunks/pure-ajnRI-Fp.js";export*from"@ctrl/dom/testing-library";
1
+ export{o as act,t as cleanup,l as configure,a as fireEvent,u as getConfig,r as render,i as renderHook}from"./_chunks/pure-C0WlxYhN.js";export*from"@ctrl/dom/testing-library";
@@ -1,6 +1,14 @@
1
1
  import * as React from "react";
2
2
  export declare function setReactActEnvironment(isReactActEnvironment: boolean | undefined): void;
3
3
  export declare function getIsReactActEnvironment(): boolean | undefined;
4
+ /** Roots created by render()/renderHook(), whose suspended work survives a synchronous act. */
5
+ export declare const actRoots: Set<object>;
4
6
  /** `React.act` with `IS_REACT_ACT_ENVIRONMENT` set to true for its duration. */
5
7
  declare const act: typeof React.act;
6
8
  export default act;
9
+ /**
10
+ * `act` for RTL's own synchronous updates (render, rerender, hydrate, events): work that
11
+ * suspends on data is handed back to React's normal scheduling instead of being dropped with the
12
+ * act queue. The exported `act` keeps React's semantics.
13
+ */
14
+ export declare function actReleasingSuspendedWork(callback: () => void): void;
@@ -1,9 +1,18 @@
1
1
  import { type Config as ConfigDTL } from "./dtl.js";
2
2
  export interface Config extends ConfigDTL {
3
3
  reactStrictMode: boolean;
4
+ /**
5
+ * Ours (not upstream): when a component suspends on data inside render(), rerender(), a hydrate
6
+ * or an event, reveal the content once the data resolves (default `true`). React 19 otherwise
7
+ * leaves the boundary on its fallback; this relies on React internals (see act-compat.ts).
8
+ * `false` behaves exactly like stock @testing-library/react.
9
+ */
10
+ releaseSuspendedWork: boolean;
4
11
  }
5
12
  export interface ConfigFn {
6
13
  (existingConfig: Config): Partial<Config>;
7
14
  }
15
+ /** `releaseSuspendedWork` without building the merged config (read on every RTL act). */
16
+ export declare function releaseSuspendedWorkEnabled(): boolean;
8
17
  export declare function getConfig(): Config;
9
18
  export declare function configure(newConfig: ConfigFn | Partial<Config>): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctrl/dom",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "A fast DOM for testing React components: a drop-in replacement for jsdom and happy-dom, with Testing Library, user-event and jest-dom built in.",
5
5
  "keywords": [
6
6
  "dom",
@@ -1 +0,0 @@
1
- var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,__exportAll=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},__copyProps=(r,a,o,s)=>{if(a&&typeof a==`object`||typeof a==`function`)for(var c=n(a),l=0,u=c.length,d;l<u;l++)d=c[l],!i.call(r,d)&&d!==o&&e(r,d,{get:(e=>a[e]).bind(null,d),enumerable:!(s=t(a,d))||s.enumerable});return r},__reExport=(e,t,n)=>(__copyProps(e,t,`default`),n&&__copyProps(n,t,`default`)),__toESM=(t,n,a)=>(a=t==null?{}:{__proto__:r(t)},__copyProps(n||!t||!t.__esModule||!i.call(t,`default`)?e(a,`default`,{value:t,enumerable:!0}):a,t));let a=require("react");a=__toESM(a,1);let o=require("react-dom/client");o=__toESM(o,1);let s=require("@ctrl/dom/internal");const c=a.act;function setReactActEnvironment(e){globalThis.IS_REACT_ACT_ENVIRONMENT=e}function getIsReactActEnvironment(){return globalThis.IS_REACT_ACT_ENVIRONMENT}function isThenable(e){return typeof e==`object`&&!!e&&typeof e.then==`function`}function withGlobalActEnvironment(e){return t=>{let n=getIsReactActEnvironment();setReactActEnvironment(!0);try{let r=!1,i=e(()=>{let e=t();return isThenable(e)&&(r=!0),e});if(r){let e=i;return{then:(t,r)=>{e.then(e=>{setReactActEnvironment(n),t(e)},e=>{setReactActEnvironment(n),r(e)})}}}return setReactActEnvironment(n),i}catch(e){throw setReactActEnvironment(n),e}}}const l=withGlobalActEnvironment(c);var u=/* @__PURE__ */ __exportAll({});__reExport(u,require("@ctrl/dom/testing-library"));const fireEvent=((...e)=>(0,u.fireEvent)(...e)),d=fireEvent,f=u.fireEvent;for(let e of Object.keys(u.fireEvent))d[e]=(...t)=>f[e](...t);const p=d.mouseEnter,m=d.mouseLeave;d.mouseEnter=(...e)=>(p(...e),d.mouseOver(...e)),d.mouseLeave=(...e)=>(m(...e),d.mouseOut(...e));const h=d.pointerEnter,g=d.pointerLeave;d.pointerEnter=(...e)=>(h(...e),d.pointerOver(...e)),d.pointerLeave=(...e)=>(g(...e),d.pointerOut(...e));const _=d.select;d.select=(e,t)=>{_(e,t),e.focus(),d.keyUp(e,t)};const v=d.blur,y=d.focus;d.blur=(...e)=>(d.focusOut(...e),v(...e)),d.focus=(...e)=>(d.focusIn(...e),y(...e));let b={reactStrictMode:!1};function getConfig(){return{...(0,u.getConfig)(),...b}}function configure(e){typeof e==`function`&&(e=e(getConfig()));let{reactStrictMode:t,...n}=e;(0,u.configure)(n),b={...b,reactStrictMode:t}}var x=/* @__PURE__ */ __exportAll({act:()=>l,cleanup:()=>cleanup,configure:()=>configure,fireEvent:()=>fireEvent,getConfig:()=>getConfig,render:()=>render,renderHook:()=>renderHook});__reExport(x,u);function jestFakeTimersAreEnabled(){return typeof jest<`u`&&jest!==null?setTimeout._isMockFunction===!0||Object.prototype.hasOwnProperty.call(setTimeout,`clock`):!1}let S=!1;(0,u.configure)({unstable_advanceTimersWrapper:e=>l(e),asyncWrapper:async e=>{let t=getIsReactActEnvironment();setReactActEnvironment(!1);try{let t=await e();return await new Promise(e=>{setTimeout(()=>{e()},0),jestFakeTimersAreEnabled()&&jest.advanceTimersByTime(0)}),t}finally{setReactActEnvironment(t)}},eventWrapper:e=>{if(S)return e();S=!0;try{let t;return l(()=>{t=e()}),t}finally{S=!1}}});const C=/* @__PURE__ */ new Set,w=[];function strictModeIfNeeded(e,t){return t??getConfig().reactStrictMode?a.createElement(a.StrictMode,null,e):e}function wrapUiIfNeeded(e,t){return t?a.createElement(t,null,e):e}function createConcurrentRoot(e,{hydrate:t,onCaughtError:n,onRecoverableError:r,ui:i,wrapper:a,reactStrictMode:s}){let c;return t?l(()=>{c=o.hydrateRoot(e,strictModeIfNeeded(wrapUiIfNeeded(i,a),s),{onCaughtError:n,onRecoverableError:r})}):c=o.createRoot(e,{onCaughtError:n,onRecoverableError:r}),{hydrate(){if(!t)throw Error("Attempted to hydrate a non-hydrateable root. This is a bug in `@testing-library/react`.")},render(e){c.render(e)},unmount(){c.unmount()}}}const T=/* @__PURE__ */ new WeakMap;function resultTemplateFor(e){let t=T.get(e);return t===void 0&&(t={container:void 0,baseElement:void 0,debug:void 0,unmount:void 0,rerender:void 0,asFragment:void 0,...(0,u.getQueriesForElement)(e)},T.set(e,t)),t}function actRender(e,t,n,r,i){l(()=>{n?t.hydrate():t.render(strictModeIfNeeded(wrapUiIfNeeded(e,r),i))})}function renderRoot(e,{baseElement:t,container:n,hydrate:r,queries:i,root:a,wrapper:o,reactStrictMode:c}){actRender(e,a,r,o,c);let debug=(e=t,n,r)=>Array.isArray(e)?e.forEach(e=>console.log((0,u.prettyDOM)(e,n,r))):console.log((0,u.prettyDOM)(e,n,r)),unmount=()=>{l(()=>{a.unmount()})},rerender=e=>{let rerender=()=>actRender(e,a,!1,o,c);(0,s.tracing)()?(0,s.traceSync)(`react.rerender`,`rerender(${describeElement(e)})`,rerender):rerender()},asFragment=()=>{if(typeof document.createRange==`function`)return document.createRange().createContextualFragment(n.innerHTML);let e=document.createElement(`template`);return e.innerHTML=n.innerHTML,e.content};if(i!==void 0)return{container:n,baseElement:t,debug,unmount,rerender,asFragment,...(0,u.getQueriesForElement)(t,i)};let d={...resultTemplateFor(t)};return d.container=n,d.baseElement=t,d.debug=debug,d.unmount=unmount,d.rerender=rerender,d.asFragment=asFragment,d}function legacyRootError(e){let t=/* @__PURE__ */ Error("`legacyRoot: true` is not supported in this version of React. If your app runs React 19 or later, you should remove this flag. If your app runs React 18 or earlier, visit https://react.dev/blog/2022/03/08/react-18-upgrade-guide for upgrade instructions.");return Error.captureStackTrace(t,e),t}function render(e,t){return(0,s.tracing)()?(0,s.traceSync)(`react.render`,`render(${describeElement(e)})`,()=>renderUntraced(e,t)):renderUntraced(e,t)}function describeElement(e){if(!a.isValidElement(e))return typeof e==`string`?JSON.stringify(e):String(e);let t=e;for(let e=0;e<10;e++){let e=isWrapper(t)?wrappedElement(t):null;if(e===null)break;t=e}return describeTree(t,0)}function describeTree(e,t){let n=componentName(e.type)||`Component`;if(typeof e.type!=`string`)return`<${n} />`;let r=e.props.children;if(r==null||r===!1)return`<${n} />`;let i=onlyElement(r);return i!==null&&t<2?`<${n}>${describeTree(i,t+1)}</${n}>`:`<${n}>…</${n}>`}function componentName(e){if(typeof e==`string`)return e;if(typeof e==`symbol`)return e.description?.replace(/^react\./,``)??``;let t=e;return(t?.displayName??t?.name??t?.render?.name??t?.type?.name??``).replace(/\$\d+$/,``)}const E=/(?:Providers?|Context|Router|Wrapper|Fragment|StrictMode|Suspense|Profiler)$/;function isWrapper(e){if(typeof e.type==`symbol`)return!0;let t=componentName(e.type);return E.test(t)||t===``&&onlyElement(e.props.children)!==null}function wrappedElement(e){let t=e.props;return onlyElement(t.children)??firstRouteElement(t.router?.routes)}function firstRouteElement(e){for(let t of e??[]){let e=onlyElement(t.element);if(e!==null&&componentName(e.type)!==`Outlet`)return e;let n=firstRouteElement(t.children);if(n!==null)return n}return null}function onlyElement(e){if(a.isValidElement(e))return e;if(!Array.isArray(e))return null;let t=e.filter(e=>a.isValidElement(e));return t.length===1?t[0]:null}function renderUntraced(e,{container:t,baseElement:n=t,legacyRoot:r=!1,onCaughtError:i,onUncaughtError:a,onRecoverableError:o,queries:s,hydrate:c=!1,wrapper:l,reactStrictMode:u}={}){if(a!==void 0)throw Error("onUncaughtError is not supported. The `render` call will already throw on uncaught errors.");if(r)throw legacyRootError(render);n||=document.body,t||=n.appendChild(document.createElement(`div`));let d;if(!C.has(t))d=createConcurrentRoot(t,{hydrate:c,onCaughtError:i,onRecoverableError:o,ui:e,wrapper:l,reactStrictMode:u}),w.push({container:t,root:d}),C.add(t);else for(let e=0;e<w.length;e++){let n=w[e];n.container===t&&(d=n.root)}return renderRoot(e,{container:t,baseElement:n,queries:s,hydrate:c,wrapper:l,root:d,reactStrictMode:u})}function cleanup(){for(let e=0;e<w.length;e++){let{root:t,container:n}=w[e];l(()=>{t.unmount()}),n.parentNode===document.body&&document.body.removeChild(n)}w.length=0,C.clear()}function renderHook(e,t={}){let{initialProps:n,...r}=t;if(r.legacyRoot)throw legacyRootError(renderHook);let i=a.createRef();function TestComponent({renderCallbackProps:t}){let n=e(t);return a.useEffect(()=>{i.current=n}),null}let{rerender:o,unmount:s}=render(a.createElement(TestComponent,{renderCallbackProps:n}),r);function rerender(e){return o(a.createElement(TestComponent,{renderCallbackProps:e}))}return{result:i,rerender,unmount:s}}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return configure}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return __exportAll}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return __reExport}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return renderHook}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return getIsReactActEnvironment}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return getConfig}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return render}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return fireEvent}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return cleanup}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return setReactActEnvironment}});
@@ -1 +0,0 @@
1
- import*as e from"react";import*as t from"react-dom/client";import{traceSync as n,tracing as r}from"@ctrl/dom/internal";var i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,__exportAll=(e,t)=>{let n={};for(var r in e)i(n,r,{get:e[r],enumerable:!0});return t||i(n,Symbol.toStringTag,{value:`Module`}),n},__copyProps=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=o(t),l=0,u=c.length,d;l<u;l++)d=c[l],!s.call(e,d)&&d!==n&&i(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=a(t,d))||r.enumerable});return e},__reExport=(e,t,n)=>(__copyProps(e,t,`default`),n&&__copyProps(n,t,`default`));const c=e.act;function setReactActEnvironment(e){globalThis.IS_REACT_ACT_ENVIRONMENT=e}function getIsReactActEnvironment(){return globalThis.IS_REACT_ACT_ENVIRONMENT}function isThenable(e){return typeof e==`object`&&!!e&&typeof e.then==`function`}function withGlobalActEnvironment(e){return t=>{let n=getIsReactActEnvironment();setReactActEnvironment(!0);try{let r=!1,i=e(()=>{let e=t();return isThenable(e)&&(r=!0),e});if(r){let e=i;return{then:(t,r)=>{e.then(e=>{setReactActEnvironment(n),t(e)},e=>{setReactActEnvironment(n),r(e)})}}}return setReactActEnvironment(n),i}catch(e){throw setReactActEnvironment(n),e}}}const l=withGlobalActEnvironment(c);var u=/* @__PURE__ */ __exportAll({});import*as d from"@ctrl/dom/testing-library";__reExport(u,d);const fireEvent=((...e)=>(0,u.fireEvent)(...e)),f=fireEvent,p=u.fireEvent;for(let e of Object.keys(u.fireEvent))f[e]=(...t)=>p[e](...t);const m=f.mouseEnter,h=f.mouseLeave;f.mouseEnter=(...e)=>(m(...e),f.mouseOver(...e)),f.mouseLeave=(...e)=>(h(...e),f.mouseOut(...e));const g=f.pointerEnter,_=f.pointerLeave;f.pointerEnter=(...e)=>(g(...e),f.pointerOver(...e)),f.pointerLeave=(...e)=>(_(...e),f.pointerOut(...e));const v=f.select;f.select=(e,t)=>{v(e,t),e.focus(),f.keyUp(e,t)};const y=f.blur,b=f.focus;f.blur=(...e)=>(f.focusOut(...e),y(...e)),f.focus=(...e)=>(f.focusIn(...e),b(...e));let x={reactStrictMode:!1};function getConfig(){return{...(0,u.getConfig)(),...x}}function configure(e){typeof e==`function`&&(e=e(getConfig()));let{reactStrictMode:t,...n}=e;(0,u.configure)(n),x={...x,reactStrictMode:t}}var S=/* @__PURE__ */ __exportAll({act:()=>l,cleanup:()=>cleanup,configure:()=>configure,fireEvent:()=>fireEvent,getConfig:()=>getConfig,render:()=>render,renderHook:()=>renderHook});__reExport(S,u);function jestFakeTimersAreEnabled(){return typeof jest<`u`&&jest!==null?setTimeout._isMockFunction===!0||Object.prototype.hasOwnProperty.call(setTimeout,`clock`):!1}let C=!1;(0,u.configure)({unstable_advanceTimersWrapper:e=>l(e),asyncWrapper:async e=>{let t=getIsReactActEnvironment();setReactActEnvironment(!1);try{let t=await e();return await new Promise(e=>{setTimeout(()=>{e()},0),jestFakeTimersAreEnabled()&&jest.advanceTimersByTime(0)}),t}finally{setReactActEnvironment(t)}},eventWrapper:e=>{if(C)return e();C=!0;try{let t;return l(()=>{t=e()}),t}finally{C=!1}}});const w=/* @__PURE__ */ new Set,T=[];function strictModeIfNeeded(t,n){return n??getConfig().reactStrictMode?e.createElement(e.StrictMode,null,t):t}function wrapUiIfNeeded(t,n){return n?e.createElement(n,null,t):t}function createConcurrentRoot(e,{hydrate:n,onCaughtError:r,onRecoverableError:i,ui:a,wrapper:o,reactStrictMode:s}){let c;return n?l(()=>{c=t.hydrateRoot(e,strictModeIfNeeded(wrapUiIfNeeded(a,o),s),{onCaughtError:r,onRecoverableError:i})}):c=t.createRoot(e,{onCaughtError:r,onRecoverableError:i}),{hydrate(){if(!n)throw Error("Attempted to hydrate a non-hydrateable root. This is a bug in `@testing-library/react`.")},render(e){c.render(e)},unmount(){c.unmount()}}}const E=/* @__PURE__ */ new WeakMap;function resultTemplateFor(e){let t=E.get(e);return t===void 0&&(t={container:void 0,baseElement:void 0,debug:void 0,unmount:void 0,rerender:void 0,asFragment:void 0,...(0,u.getQueriesForElement)(e)},E.set(e,t)),t}function actRender(e,t,n,r,i){l(()=>{n?t.hydrate():t.render(strictModeIfNeeded(wrapUiIfNeeded(e,r),i))})}function renderRoot(e,{baseElement:t,container:i,hydrate:a,queries:o,root:s,wrapper:c,reactStrictMode:d}){actRender(e,s,a,c,d);let debug=(e=t,n,r)=>Array.isArray(e)?e.forEach(e=>console.log((0,u.prettyDOM)(e,n,r))):console.log((0,u.prettyDOM)(e,n,r)),unmount=()=>{l(()=>{s.unmount()})},rerender=e=>{let rerender=()=>actRender(e,s,!1,c,d);r()?n(`react.rerender`,`rerender(${describeElement(e)})`,rerender):rerender()},asFragment=()=>{if(typeof document.createRange==`function`)return document.createRange().createContextualFragment(i.innerHTML);let e=document.createElement(`template`);return e.innerHTML=i.innerHTML,e.content};if(o!==void 0)return{container:i,baseElement:t,debug,unmount,rerender,asFragment,...(0,u.getQueriesForElement)(t,o)};let f={...resultTemplateFor(t)};return f.container=i,f.baseElement=t,f.debug=debug,f.unmount=unmount,f.rerender=rerender,f.asFragment=asFragment,f}function legacyRootError(e){let t=/* @__PURE__ */ Error("`legacyRoot: true` is not supported in this version of React. If your app runs React 19 or later, you should remove this flag. If your app runs React 18 or earlier, visit https://react.dev/blog/2022/03/08/react-18-upgrade-guide for upgrade instructions.");return Error.captureStackTrace(t,e),t}function render(e,t){return r()?n(`react.render`,`render(${describeElement(e)})`,()=>renderUntraced(e,t)):renderUntraced(e,t)}function describeElement(t){if(!e.isValidElement(t))return typeof t==`string`?JSON.stringify(t):String(t);let n=t;for(let e=0;e<10;e++){let e=isWrapper(n)?wrappedElement(n):null;if(e===null)break;n=e}return describeTree(n,0)}function describeTree(e,t){let n=componentName(e.type)||`Component`;if(typeof e.type!=`string`)return`<${n} />`;let r=e.props.children;if(r==null||r===!1)return`<${n} />`;let i=onlyElement(r);return i!==null&&t<2?`<${n}>${describeTree(i,t+1)}</${n}>`:`<${n}>…</${n}>`}function componentName(e){if(typeof e==`string`)return e;if(typeof e==`symbol`)return e.description?.replace(/^react\./,``)??``;let t=e;return(t?.displayName??t?.name??t?.render?.name??t?.type?.name??``).replace(/\$\d+$/,``)}const D=/(?:Providers?|Context|Router|Wrapper|Fragment|StrictMode|Suspense|Profiler)$/;function isWrapper(e){if(typeof e.type==`symbol`)return!0;let t=componentName(e.type);return D.test(t)||t===``&&onlyElement(e.props.children)!==null}function wrappedElement(e){let t=e.props;return onlyElement(t.children)??firstRouteElement(t.router?.routes)}function firstRouteElement(e){for(let t of e??[]){let e=onlyElement(t.element);if(e!==null&&componentName(e.type)!==`Outlet`)return e;let n=firstRouteElement(t.children);if(n!==null)return n}return null}function onlyElement(t){if(e.isValidElement(t))return t;if(!Array.isArray(t))return null;let n=t.filter(t=>e.isValidElement(t));return n.length===1?n[0]:null}function renderUntraced(e,{container:t,baseElement:n=t,legacyRoot:r=!1,onCaughtError:i,onUncaughtError:a,onRecoverableError:o,queries:s,hydrate:c=!1,wrapper:l,reactStrictMode:u}={}){if(a!==void 0)throw Error("onUncaughtError is not supported. The `render` call will already throw on uncaught errors.");if(r)throw legacyRootError(render);n||=document.body,t||=n.appendChild(document.createElement(`div`));let d;if(!w.has(t))d=createConcurrentRoot(t,{hydrate:c,onCaughtError:i,onRecoverableError:o,ui:e,wrapper:l,reactStrictMode:u}),T.push({container:t,root:d}),w.add(t);else for(let e=0;e<T.length;e++){let n=T[e];n.container===t&&(d=n.root)}return renderRoot(e,{container:t,baseElement:n,queries:s,hydrate:c,wrapper:l,root:d,reactStrictMode:u})}function cleanup(){for(let e=0;e<T.length;e++){let{root:t,container:n}=T[e];l(()=>{t.unmount()}),n.parentNode===document.body&&document.body.removeChild(n)}T.length=0,w.clear()}function renderHook(t,n={}){let{initialProps:r,...i}=n;if(i.legacyRoot)throw legacyRootError(renderHook);let a=e.createRef();function TestComponent({renderCallbackProps:n}){let r=t(n);return e.useEffect(()=>{a.current=r}),null}let{rerender:o,unmount:s}=render(e.createElement(TestComponent,{renderCallbackProps:r}),i);function rerender(t){return o(e.createElement(TestComponent,{renderCallbackProps:t}))}return{result:a,rerender,unmount:s}}export{configure as a,l as c,__exportAll as d,__reExport as f,renderHook as i,getIsReactActEnvironment as l,S as n,getConfig as o,render as r,fireEvent as s,cleanup as t,setReactActEnvironment as u};