@ctrl/dom 0.3.2 → 0.3.4
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/README.md +160 -9
- package/dist/aria/_chunks/aria-query.generated-BivoZ-ec.js +4 -0
- package/dist/aria/_chunks/aria-query.generated-CeGmXXFh.cjs +4 -0
- package/dist/aria/index.cjs +1 -1
- package/dist/aria/index.js +1 -1
- package/dist/aria/internal.cjs +1 -1
- package/dist/aria/internal.js +1 -1
- package/dist/aria/types/data/aria-query.generated.d.ts +1 -0
- package/dist/aria/types/internal.d.ts +3 -1
- package/dist/aria/types/role.d.ts +2 -8
- package/dist/bridge/internal.js +1 -1
- package/dist/dom/_chunks/{src-CImID776.js → src-DR6mBc_4.js} +13 -12
- package/dist/dom/index.js +1 -1
- package/dist/dom/internal.js +1 -1
- package/dist/dom/types/css/declarations.d.ts +4 -1
- package/dist/dom/types/nodes/attributes.d.ts +1 -1
- package/dist/dom/types/nodes/cache.d.ts +1 -3
- package/dist/dom/types/nodes/constants.d.ts +2 -0
- package/dist/dom/types/window/clock.d.ts +3 -1
- package/dist/react/_chunks/pure-B2u-ZqTR.js +1 -0
- package/dist/react/_chunks/pure-DCcqflDh.cjs +1 -0
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/pure.cjs +1 -1
- package/dist/react/pure.js +1 -1
- package/dist/testing-library/index.cjs +4 -4
- package/dist/testing-library/index.js +8 -8
- package/dist/user-event/index.cjs +10 -10
- package/dist/user-event/index.js +12 -12
- package/dist/user-event/types/event/selection/getTargetTypeAndSelection.d.ts +2 -1
- package/dist/user-event/types/utils/keyDef/readNextDescriptor.d.ts +8 -1
- package/dist/vitest-environment/plugin.js +1 -1
- package/dist/vitest-environment/prewarm.js +1 -0
- package/dist/vitest-environment/types/plugin.d.ts +20 -0
- package/dist/vitest-environment/types/prewarm.d.ts +1 -0
- package/dist/vitest-environment/types/warm-forks.d.ts +60 -0
- package/package.json +5 -1
- package/dist/aria/_chunks/roles-list-CtWrIYOt.cjs +0 -4
- package/dist/aria/_chunks/roles-list-D5_w80vQ.js +0 -4
- package/dist/react/_chunks/pure-CYb0HgYU.js +0 -1
- package/dist/react/_chunks/pure-DRugbA0j.cjs +0 -1
package/dist/dom/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Mr as AbstractRange,bs as AnimationEvent,$a as Attr,an as Audio,xs as BeforeUnloadEvent,co as CDATASection,t as CSS,bi as CSSConditionRule,xi as CSSContainerRule,Si as CSSFontFaceRule,Ci as CSSGroupingRule,wi as CSSImportRule,Ti as CSSKeyframeRule,Ei as CSSKeyframesRule,Di as CSSLayerBlockRule,Oi as CSSLayerStatementRule,ki as CSSMediaRule,Ai as CSSNamespaceRule,ji as CSSNestedDeclarations,Mi as CSSPageRule,Ni as CSSPropertyRule,Pi as CSSRule,Fi as CSSRuleList,Ii as CSSScopeRule,Li as CSSStartingStyleRule,ia as CSSStyleDeclaration,Ri as CSSStyleRule,zi as CSSStyleSheet,Bi as CSSSupportsRule,lo as CharacterData,_r as Clipboard,Is as ClipboardEvent,vr as ClipboardItem,Ss as CloseEvent,Lr as CommandEvent,uo as Comment,Ls as CompositionEvent,ka as CustomElementRegistry,Cs as CustomEvent,rr as CustomStateSet,wr as DOMImplementation,Ba as DOMMatrix,Ba as WebKitCSSMatrix,Va as DOMMatrixReadOnly,Sr as DOMParser,Ha as DOMPoint,Ua as DOMPointReadOnly,O as DOMQuad,Wa as DOMRect,Wa as SVGRect,Ga as DOMRectList,Ka as DOMRectReadOnly,eo as DOMStringMap,to as DOMTokenList,T as DataTransfer,E as DataTransferItem,D as DataTransferItemList,Tr as Document,Tr as HTMLDocument,so as DocumentFragment,oo as DocumentType,Rs as DragEvent,Fa as Element,ir as ElementInternals,ws as ErrorEvent,rc as Event,cs as EventTarget,it as FileList,P as FileReader,zs as FocusEvent,z as FormData,Ts as FormDataEvent,dn as HTMLAnchorElement,fn as HTMLAreaElement,on as HTMLAudioElement,pn as HTMLBRElement,mn as HTMLBaseElement,hn as HTMLBodyElement,Y as HTMLButtonElement,gn as HTMLCanvasElement,po as HTMLCollection,_n as HTMLDListElement,vn as HTMLDataElement,H as HTMLDataListElement,rn as HTMLDetailsElement,in as HTMLDialogElement,yn as HTMLDirectoryElement,bn as HTMLDivElement,ar as HTMLElement,xn as HTMLEmbedElement,K as HTMLFieldSetElement,Sn as HTMLFontElement,ua as HTMLFormControlsCollection,V as HTMLFormElement,Cn as HTMLFrameElement,wn as HTMLFrameSetElement,Tn as HTMLHRElement,En as HTMLHeadElement,Dn as HTMLHeadingElement,On as HTMLHtmlElement,kn as HTMLIFrameElement,An as HTMLImageElement,nt as HTMLInputElement,jn as HTMLLIElement,J as HTMLLabelElement,q as HTMLLegendElement,Zt as HTMLLinkElement,Mn as HTMLMapElement,Nn as HTMLMarqueeElement,sn as HTMLMediaElement,Pn as HTMLMenuElement,Fn as HTMLMetaElement,U as HTMLMeterElement,In as HTMLModElement,Ln as HTMLOListElement,Rn as HTMLObjectElement,X as HTMLOptGroupElement,Z as HTMLOptionElement,da as HTMLOptionsCollection,W as HTMLOutputElement,zn as HTMLParagraphElement,Bn as HTMLParamElement,Vn as HTMLPictureElement,Hn as HTMLPreElement,G as HTMLProgressElement,Un as HTMLQuoteElement,Qt as HTMLScriptElement,et as HTMLSelectElement,tn as HTMLSlotElement,Wn as HTMLSourceElement,Gn as HTMLSpanElement,$t as HTMLStyleElement,Kn as HTMLTableCaptionElement,qn as HTMLTableCellElement,Jn as HTMLTableColElement,Yn as HTMLTableElement,Xn as HTMLTableRowElement,Zn as HTMLTableSectionElement,nn as HTMLTemplateElement,tt as HTMLTextAreaElement,Qn as HTMLTimeElement,en as HTMLTitleElement,$n as HTMLTrackElement,er as HTMLUListElement,tr as HTMLUnknownElement,cn as HTMLVideoElement,Es as HashChangeEvent,br as History,nr as Image,Bs as InputEvent,j as IntersectionObserver,M as IntersectionObserverEntry,Vs as KeyboardEvent,xr as Location,ot as MathMLElement,ln as MediaError,Vi as MediaList,hi as MediaQueryList,vi as MediaQueryListEvent,Ds as MessageEvent,Hs as MouseEvent,w as MutationObserver,Ho as MutationRecord,Za as NamedNodeMap,yr as Navigator,bo as Node,kr as NodeFilter,Ar as NodeIterator,Uo as NodeList,Q as Option,Os as PageTransitionEvent,Us as PointerEvent,ks as PopStateEvent,do as ProcessingInstruction,As as ProgressEvent,js as PromiseRejectionEvent,fa as RadioNodeList,Nr as Range,N as ResizeObserver,k as ResizeObserverEntry,A as ResizeObserverSize,st as SVGAElement,qt as SVGAnimatedPreserveAspectRatio,Jt as SVGAnimatedRect,ct as SVGAnimatedString,lt as SVGCircleElement,ut as SVGClipPathElement,dt as SVGDefsElement,ft as SVGDescElement,pt as SVGElement,mt as SVGEllipseElement,ht as SVGFilterElement,gt as SVGForeignObjectElement,_t as SVGGElement,vt as SVGGeometryElement,yt as SVGGradientElement,bt as SVGGraphicsElement,xt as SVGImageElement,St as SVGLineElement,Ct as SVGLinearGradientElement,wt as SVGMarkerElement,Tt as SVGMaskElement,Et as SVGMetadataElement,Yt as SVGNumber,Dt as SVGPathElement,Ot as SVGPatternElement,kt as SVGPolygonElement,At as SVGPolylineElement,Xt as SVGPreserveAspectRatio,jt as SVGRadialGradientElement,Mt as SVGRectElement,Nt as SVGSVGElement,Pt as SVGScriptElement,Ft as SVGStopElement,It as SVGStyleElement,Lt as SVGSwitchElement,Rt as SVGSymbolElement,zt as SVGTSpanElement,Bt as SVGTextContentElement,Vt as SVGTextElement,Ht as SVGTextPathElement,Ut as SVGTextPositioningElement,Wt as SVGTitleElement,Gt as SVGUseElement,Kt as SVGViewElement,hr as Screen,Or as Selection,no as ShadowRoot,Pr as StaticRange,mr as Storage,Ms as StorageEvent,Hi as StyleSheet,Ui as StyleSheetList,Ns as SubmitEvent,fo as Text,Ws as TextEvent,un as TimeRanges,Ps as ToggleEvent,Gs as Touch,Ks as TouchEvent,qs as TouchList,Fs as TransitionEvent,jr as TreeWalker,Js as UIEvent,la as ValidityState,gr as VisualViewport,Ys as WheelEvent,lr as Window,Er as XMLDocument,F as XMLHttpRequest,I as XMLHttpRequestEventTarget,L as XMLHttpRequestUpload,Cr as XMLSerializer,ur as createWindow,gs as currentDocument,_s as currentWindow,vs as currentWindowOrNull,Kr as getComputedStyle,R as installGlobals,ys as setCurrentWindow}from"./_chunks/src-
|
|
1
|
+
export{Mr as AbstractRange,bs as AnimationEvent,$a as Attr,an as Audio,xs as BeforeUnloadEvent,co as CDATASection,t as CSS,bi as CSSConditionRule,xi as CSSContainerRule,Si as CSSFontFaceRule,Ci as CSSGroupingRule,wi as CSSImportRule,Ti as CSSKeyframeRule,Ei as CSSKeyframesRule,Di as CSSLayerBlockRule,Oi as CSSLayerStatementRule,ki as CSSMediaRule,Ai as CSSNamespaceRule,ji as CSSNestedDeclarations,Mi as CSSPageRule,Ni as CSSPropertyRule,Pi as CSSRule,Fi as CSSRuleList,Ii as CSSScopeRule,Li as CSSStartingStyleRule,ia as CSSStyleDeclaration,Ri as CSSStyleRule,zi as CSSStyleSheet,Bi as CSSSupportsRule,lo as CharacterData,_r as Clipboard,Is as ClipboardEvent,vr as ClipboardItem,Ss as CloseEvent,Lr as CommandEvent,uo as Comment,Ls as CompositionEvent,ka as CustomElementRegistry,Cs as CustomEvent,rr as CustomStateSet,wr as DOMImplementation,Ba as DOMMatrix,Ba as WebKitCSSMatrix,Va as DOMMatrixReadOnly,Sr as DOMParser,Ha as DOMPoint,Ua as DOMPointReadOnly,O as DOMQuad,Wa as DOMRect,Wa as SVGRect,Ga as DOMRectList,Ka as DOMRectReadOnly,eo as DOMStringMap,to as DOMTokenList,T as DataTransfer,E as DataTransferItem,D as DataTransferItemList,Tr as Document,Tr as HTMLDocument,so as DocumentFragment,oo as DocumentType,Rs as DragEvent,Fa as Element,ir as ElementInternals,ws as ErrorEvent,rc as Event,cs as EventTarget,it as FileList,P as FileReader,zs as FocusEvent,z as FormData,Ts as FormDataEvent,dn as HTMLAnchorElement,fn as HTMLAreaElement,on as HTMLAudioElement,pn as HTMLBRElement,mn as HTMLBaseElement,hn as HTMLBodyElement,Y as HTMLButtonElement,gn as HTMLCanvasElement,po as HTMLCollection,_n as HTMLDListElement,vn as HTMLDataElement,H as HTMLDataListElement,rn as HTMLDetailsElement,in as HTMLDialogElement,yn as HTMLDirectoryElement,bn as HTMLDivElement,ar as HTMLElement,xn as HTMLEmbedElement,K as HTMLFieldSetElement,Sn as HTMLFontElement,ua as HTMLFormControlsCollection,V as HTMLFormElement,Cn as HTMLFrameElement,wn as HTMLFrameSetElement,Tn as HTMLHRElement,En as HTMLHeadElement,Dn as HTMLHeadingElement,On as HTMLHtmlElement,kn as HTMLIFrameElement,An as HTMLImageElement,nt as HTMLInputElement,jn as HTMLLIElement,J as HTMLLabelElement,q as HTMLLegendElement,Zt as HTMLLinkElement,Mn as HTMLMapElement,Nn as HTMLMarqueeElement,sn as HTMLMediaElement,Pn as HTMLMenuElement,Fn as HTMLMetaElement,U as HTMLMeterElement,In as HTMLModElement,Ln as HTMLOListElement,Rn as HTMLObjectElement,X as HTMLOptGroupElement,Z as HTMLOptionElement,da as HTMLOptionsCollection,W as HTMLOutputElement,zn as HTMLParagraphElement,Bn as HTMLParamElement,Vn as HTMLPictureElement,Hn as HTMLPreElement,G as HTMLProgressElement,Un as HTMLQuoteElement,Qt as HTMLScriptElement,et as HTMLSelectElement,tn as HTMLSlotElement,Wn as HTMLSourceElement,Gn as HTMLSpanElement,$t as HTMLStyleElement,Kn as HTMLTableCaptionElement,qn as HTMLTableCellElement,Jn as HTMLTableColElement,Yn as HTMLTableElement,Xn as HTMLTableRowElement,Zn as HTMLTableSectionElement,nn as HTMLTemplateElement,tt as HTMLTextAreaElement,Qn as HTMLTimeElement,en as HTMLTitleElement,$n as HTMLTrackElement,er as HTMLUListElement,tr as HTMLUnknownElement,cn as HTMLVideoElement,Es as HashChangeEvent,br as History,nr as Image,Bs as InputEvent,j as IntersectionObserver,M as IntersectionObserverEntry,Vs as KeyboardEvent,xr as Location,ot as MathMLElement,ln as MediaError,Vi as MediaList,hi as MediaQueryList,vi as MediaQueryListEvent,Ds as MessageEvent,Hs as MouseEvent,w as MutationObserver,Ho as MutationRecord,Za as NamedNodeMap,yr as Navigator,bo as Node,kr as NodeFilter,Ar as NodeIterator,Uo as NodeList,Q as Option,Os as PageTransitionEvent,Us as PointerEvent,ks as PopStateEvent,do as ProcessingInstruction,As as ProgressEvent,js as PromiseRejectionEvent,fa as RadioNodeList,Nr as Range,N as ResizeObserver,k as ResizeObserverEntry,A as ResizeObserverSize,st as SVGAElement,qt as SVGAnimatedPreserveAspectRatio,Jt as SVGAnimatedRect,ct as SVGAnimatedString,lt as SVGCircleElement,ut as SVGClipPathElement,dt as SVGDefsElement,ft as SVGDescElement,pt as SVGElement,mt as SVGEllipseElement,ht as SVGFilterElement,gt as SVGForeignObjectElement,_t as SVGGElement,vt as SVGGeometryElement,yt as SVGGradientElement,bt as SVGGraphicsElement,xt as SVGImageElement,St as SVGLineElement,Ct as SVGLinearGradientElement,wt as SVGMarkerElement,Tt as SVGMaskElement,Et as SVGMetadataElement,Yt as SVGNumber,Dt as SVGPathElement,Ot as SVGPatternElement,kt as SVGPolygonElement,At as SVGPolylineElement,Xt as SVGPreserveAspectRatio,jt as SVGRadialGradientElement,Mt as SVGRectElement,Nt as SVGSVGElement,Pt as SVGScriptElement,Ft as SVGStopElement,It as SVGStyleElement,Lt as SVGSwitchElement,Rt as SVGSymbolElement,zt as SVGTSpanElement,Bt as SVGTextContentElement,Vt as SVGTextElement,Ht as SVGTextPathElement,Ut as SVGTextPositioningElement,Wt as SVGTitleElement,Gt as SVGUseElement,Kt as SVGViewElement,hr as Screen,Or as Selection,no as ShadowRoot,Pr as StaticRange,mr as Storage,Ms as StorageEvent,Hi as StyleSheet,Ui as StyleSheetList,Ns as SubmitEvent,fo as Text,Ws as TextEvent,un as TimeRanges,Ps as ToggleEvent,Gs as Touch,Ks as TouchEvent,qs as TouchList,Fs as TransitionEvent,jr as TreeWalker,Js as UIEvent,la as ValidityState,gr as VisualViewport,Ys as WheelEvent,lr as Window,Er as XMLDocument,F as XMLHttpRequest,I as XMLHttpRequestEventTarget,L as XMLHttpRequestUpload,Cr as XMLSerializer,ur as createWindow,gs as currentDocument,_s as currentWindow,vs as currentWindowOrNull,Kr as getComputedStyle,R as installGlobals,ys as setCurrentWindow}from"./_chunks/src-DR6mBc_4.js";
|
package/dist/dom/internal.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,$c as t,$d as n,$i as r,$l as i,$o as a,$r as o,$s as s,$u as c,Aa as ee,Ac as te,Ad as ne,Af as re,Al as ie,Ao as ae,Au as oe,B as se,Bc as ce,Bd as le,Bf as ue,Bl as l,Bo as de,Br as fe,Bu as pe,C as me,Ca as u,Cc as he,Cd as ge,Cf as _e,Cl as ve,Co as ye,Cu as be,Da as d,Dc as xe,Dd as Se,Df as Ce,Dl as we,Do as Te,Dr as Ee,Du as De,Ea as f,Ec as Oe,Ed as ke,Ef as Ae,El as p,Eo as je,Eu as Me,Fc as m,Fd as h,Ff as g,Fl as _,Fo as v,Fr as y,Fu as b,Gc as x,Gd as Ne,Gf as Pe,Gi as Fe,Gl as S,Go as Ie,Gr as Le,Gu as Re,Hc as ze,Hd as Be,Hf as Ve,Hl as He,Hr as Ue,Hu as We,Ia as Ge,Ic as Ke,Id as qe,If as Je,Il as Ye,Io as Xe,Ir as Ze,Iu as Qe,Ja as $e,Jc as et,Jd as C,Jf as tt,Ji as nt,Jl as rt,Jo as it,Jr as at,Ju as ot,Kc as st,Kd as ct,Kf as lt,Ki as ut,Kl as dt,Ko as ft,Kr as pt,Ku as mt,La as ht,Lc as gt,Ld as _t,Lf as vt,Ll as yt,Lo as bt,Lu as xt,Ma as St,Mc as Ct,Md as wt,Mf as Tt,Ml as Et,Mo as Dt,Mu as Ot,Na as kt,Nc as At,Nd as jt,Nf as Mt,Nl as Nt,No as Pt,Nu as Ft,Oa as w,Oc as It,Od as Lt,Of as Rt,Ol as zt,Oo as Bt,Ou as Vt,Pa as Ht,Pc as Ut,Pd as Wt,Pf as Gt,Pl as Kt,Po as qt,Pu as Jt,Qa as Yt,Qc as Xt,Qd as Zt,Qi as Qt,Ql as $t,Qo as en,Qr as tn,Qs as nn,Qu as rn,Ra as an,Rc as on,Rd as sn,Rf as cn,Rl as ln,Ro as un,Rr as dn,Ru as fn,S as pn,Sa as mn,Sc as hn,Sd as gn,Sf as _n,Sl as vn,So as yn,Su as bn,Ta as xn,Tc as Sn,Td as Cn,Tf as wn,Tl as Tn,To as En,Tu as Dn,Uc as T,Ud as On,Uf as kn,Ul as E,Uo as An,Ur as jn,Uu as Mn,Vc as Nn,Vd as Pn,Vf as Fn,Vl as In,Vo as Ln,Vr as Rn,Vu as zn,Wc as Bn,Wd as Vn,Wf as Hn,Wi as Un,Wl as Wn,Wo as Gn,Wr as Kn,Wu as D,Xa as qn,Xc as Jn,Xd as Yn,Xf as Xn,Xi as Zn,Xl as Qn,Xo as $n,Xr as er,Xs as O,Xu as tr,Ya as nr,Yc as rr,Yd as k,Yf as ir,Yi as ar,Yl as or,Yo as sr,Yr as cr,Yu as lr,Zc as ur,Zd as dr,Zi as fr,Zl as pr,Zo as mr,Zr as hr,Zs as gr,Zu as _r,_ as vr,_a as yr,_c as br,_d as A,_f as xr,_i as Sr,_l as Cr,_o as wr,_u as Tr,a as Er,aa as Dr,ac as Or,ad as kr,af as Ar,ai as jr,al as Mr,ao as Nr,as as Pr,at as j,au as Fr,b as Ir,ba as Lr,bc as Rr,bd as zr,bf as Br,bl as Vr,bu as Hr,c as Ur,ca as Wr,cc as Gr,cd as Kr,cf as qr,ci as Jr,cl as Yr,cr as Xr,cu as Zr,d as Qr,dc as $r,dd as ei,df as ti,di as ni,dl as ri,dr as M,ds as ii,du as ai,ea as oi,ec as si,ed as N,ef as ci,ei as li,el as ui,es as di,eu as fi,f as pi,fc as mi,fd as hi,ff as gi,fi as _i,fl as vi,fr as yi,fs as bi,fu as xi,g as Si,ga as Ci,gc as wi,gd as Ti,gf as Ei,gi as Di,gl as Oi,go as ki,gu as Ai,h as ji,ha as Mi,hc as Ni,hd as Pi,hf as Fi,hl as Ii,ho as Li,hs as Ri,hu as zi,i as Bi,ic as Vi,id as Hi,if as Ui,ii as Wi,il as P,io as Gi,is as Ki,iu as qi,ja as Ji,jc as Yi,jd as F,jf as Xi,jl as Zi,jo as Qi,ju as $i,kc as ea,kd as ta,kf as na,kl as I,ko as ra,ku as ia,l as aa,lc as oa,ld as sa,lf as ca,li as la,ll as ua,lr as L,ls as da,lu as fa,m as R,ma as pa,mc as ma,md as ha,mf as ga,mi as _a,ml as va,mo as ya,ms as ba,mu as xa,n as Sa,na as Ca,nc as wa,nd as Ta,nf as Ea,ni as Da,nl as Oa,ns as ka,nu as Aa,o as ja,oa as Ma,oc as Na,od as Pa,of as Fa,oi as Ia,ol as La,or as Ra,os as za,ou as Ba,p as Va,pa as Ha,pc as Ua,pd as Wa,pf as Ga,pi as Ka,pl as z,po as qa,pr as Ja,ps as Ya,pu as Xa,qa as Za,qc as Qa,qd as $a,qf as eo,qi as to,ql as no,qo as ro,qr as io,qu as ao,r as oo,ra as so,rd as co,rf as lo,ri as uo,rl as fo,ro as po,rs as mo,rt as ho,ru as go,s as _o,sa as vo,sc as yo,sd as bo,sf as xo,si as So,sl as Co,sr as wo,ss as To,su as Eo,ta as Do,tc as Oo,td as ko,tf as Ao,ti as jo,tl as Mo,ts as No,tu as Po,u as Fo,uc as Io,ud as Lo,uf as Ro,ui as zo,ul as Bo,us as Vo,uu as Ho,v as Uo,va as Wo,vc as Go,vd as Ko,vf as qo,vl as Jo,vo as Yo,vs as B,vu as Xo,wa as Zo,wc as Qo,wd as $o,wf as es,wl as ts,wo as ns,wu as rs,x as is,xa as as,xc as os,xd as ss,xf as cs,xl as ls,xo as us,xu as ds,y as fs,ya as ps,yc as ms,yd as hs,yf as gs,yi as _s,yl as vs,yo as ys,yu as bs,za as xs,zc as V,zd as Ss,zf as Cs,zl as ws,zo as Ts,zr as Es,zu as Ds}from"./_chunks/src-CImID776.js";import{constants as Os,createContext as ks,runInContext as As}from"node:vm";import*as H from"node:diagnostics_channel";let U=null;function targets(){let e=/* @__PURE__ */ new Set,t=M();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(L.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 W=null;function captureInterfaceBaseline(){if(U===null){U=[],W=/* @__PURE__ */ new WeakSet;for(let e of targets())U.push(snapshot(e)),W.add(e);ownObjectCreateMaps()}}let js=null;function ownObjectCreateMaps(){if(U===null)return;let e=js??=As(`(prototypes) => prototypes.map((p) => Object.create(p))`,ks(Os.DONT_CONTEXTIFY)),t=[Object.prototype];for(let e=0;e<U.length;e++){let n=U[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=W;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(U===null)return 0;let e=0;for(let t=0;t<U.length;t++){let n=U[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 G=`ctrl-dom:span`,K=typeof H.tracingChannel==`function`?H.tracingChannel(G):null;function spanChannel(){return K}function tracing(){return K!==null&&K.hasSubscribers}function traceSync(e,t,n){let r={op:e,description:t,data:{},async:!1},i=C();return K.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=C();return K.tracePromise(e=>n(e).finally(()=>recordSkipped(e,i)),r,void 0,r)}function recordSkipped(e,t){let n=C()-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[E]!==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 q=null;function setNodeDescriber(e){q=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(q!==null)try{let t=q(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 J=`sentry-tests:failure`;let Y=null;function setFailureSnapshot(e){Y=e}function subscribeTestFailures(e){let t=H.channel(J),onFailure=t=>{let n=t,r=e();if(r==null||n.document!==r)return;let i=k();if(i!==null&&(n.contexts.clock={skipped_ms:Math.round(i.skippedMs),pending_timers:i.pendingTimers}),Y!==null&&r.body!=null)try{n.attachments.push({filename:`accessibility-snapshot.txt`,contentType:`text/plain`,data:Y(r.body)})}catch{}};return t.subscribe(onFailure),()=>t.unsubscribe(onFailure)}var FileState=class{hooks;url;constructor(){this.hooks=/* @__PURE__ */ new Map,this.url=null}};const X=/* @__PURE__ */ new WeakMap;function stateOf(e){let t=X.get(e);return t===void 0&&X.set(e,t=new FileState),t}function registerTestHooks(e,t){let n=B();if(n===null)return;let r=stateOf(n).hooks;r.set(e,{...r.get(e),...t})}function testHooks(){let e=B(),t=e===null?void 0:X.get(e);return t===void 0?[]:[...t.hooks.values()]}function resetWindowBetweenFiles(e){let t=stateOf(e);for(let e of t.hooks.values())try{e.fileEnd?.()}catch{}ct(),yi(e);let n=e[A];if(n!==null){for(let e of n)e.clear(e.handle);n.clear()}e[p]=null,e[D]=null,e[I]=null,e[l]=null;let r=e.document;r.getSelection()?.removeAllRanges();let i=r.body;i!==null&&(i.replaceChildren(),removeAttributes(i)),r.documentElement!==null&&removeAttributes(r.documentElement),e.localStorage.clear(),e.sessionStorage.clear(),e[T]=null;let a=t.url??=e.location.href;e.location.href!==a&&e._setURL(new URL(a));let o=e.history;o[z]=[{url:a,state:null}],o[S]=0}function removeAttributes(e){let t=e.getAttributeNames();for(let n=0;n<t.length;n++)e.removeAttribute(t[n])}function implOf(e){return e[E]??e}function isTypingType(e){return f(e)||e===12||e>=7&&e<=11}function isEditable(e){let t=implOf(e);return t.tag===O.input?isTypingType(u(t))&&R(t):t.tag===O.textarea?R(t):jn(t)}function supportsSelection(e){let t=implOf(e);return t.tag===O.textarea||t.tag===O.input&&d(u(t))}function hasUIValue(e){let t=implOf(e);return t.tag===O.textarea||t.tag===O.input&&w(u(t))===0}function getUIValue(e){let t=implOf(e);if(t.tag===O.input){let e=t.node;return e[V].uiValue??e.value}return t.tag===O.textarea?t.node.value:``}function setUIValue(e,t){let n=implOf(e);if(n.tag===O.input){let e=n.node,r=u(n);if(w(r)!==0)return;let i=ho(r,t,n);n.doc[F]++,e[V].value=i,e[V].dirtyValue=!0,e[V].userEdited=!0,e[V].uiValue=i===t?null:t,e[V].badInput=i===``&&t!==``&&r!==5&&!f(r);let a=t.length;e[V].selStart>a&&(e[V].selStart=a),e[V].selEnd>a&&(e[V].selEnd=a)}else if(n.tag===O.textarea){let e=n.node;n.doc[F]++,e[V].value=t,e[V].dirtyValue=!0,e[V].userEdited=!0}}function clearUIValue(e){let t=implOf(e);if(t.tag===O.input){let e=t.node;e[V].uiValue=null,e[V].badInput=!1}}function getUISelection(e){let t=implOf(e).node,n=getUIValue(e).length;return{start:Math.min(t[V].selStart,n),end:Math.min(t[V].selEnd,n),direction:t[V].selDir}}function setUISelection(e,t,n=t,r=`none`){let i=implOf(e);if(i.tag!==O.input&&i.tag!==O.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[V].selStart=s,a[V].selEnd=c,a[V].selDir=r}function setFilesFromUI(e,t){let n=implOf(e);n.tag===O.input&&u(n)===17&&(n.doc[F]++,n.node[V].files=j(t))}function setOptionSelectedFromUI(t,n){let r=implOf(t);if(r.tag!==O.option)return;let i=r.node;i._setSelectedness(n),i[P]=!0;let a=e(r);if(a!==null){let e=a.node;n&&e._deselectOthers(r),e._updateSelectedContent()}}function setCheckedFromUI(e,t){let n=implOf(e);n.tag===O.input&&n.node._setCheckedness(t,!0)}const Ms=L.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===Ms||typeof n!=`function`||se.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{Na as $_proto__,yo as $aboutBase,Gr as $active,oa as $assocGen,Io as $attr,$r as $attributes,mi as $availableToElementInternals,Ua as $baseFor,ma as $baseOverride,Ni as $baseURL,wi as $baseVersion,br as $benign,Go as $block,ms as $blockParsed,Rr as $blockText,os as $byCtor,hn as $byName,he as $cache,Qo as $callback,Sn as $childNodes,Oe as $childWindows,xe as $children,It as $classList,ea as $clipboard,te as $clonable,Yi as $closed,Ct as $coll,At as $compiled,Ut as $compiledFor,m as $condition,Ke as $constructed,gt as $constructingEntryList,on as $contentType,V as $control,ce as $controlsCache,Nn as $controlsDoc,ze as $controlsVersion,T as $cookieJar,Bn as $cookies,x as $css,st as $current,Qa as $customElements,et as $customValidity,rr as $cx,Jn as $data,ur as $dataset,Xt as $declarative,t as $defaultNamespace,ui as $defaultValueOverride,Mo as $delegatesFocus,Oa as $derived,fo as $devicePixelRatio,P as $dirtiness,Mr as $disabled,La as $disallowModification,Co as $doc,Yr as $dropEffect,ua as $ec,Bo as $effectAllowed,ri as $el,vi as $elements,z as $entries,va as $eo,Ii as $error,Oi as $file,Cr as $files,Jo as $fill,vs as $filter,Vr as $firingSubmissionEvents,ls as $focused,vn as $forLabels,ve as $form,ts as $formAttrSeen,Tn as $forms,p as $frameCallbacks,we as $frameElement,zt as $frameId,I as $frameTask,ie as $frameTime,Zi as $generation,Et as $globalObject,Nt as $hasTransients,Kt as $height,_ as $history,Ye as $home,yt as $host,ln as $href,ws as $id,l as $idleCallbacks,In as $idleId,He as $ids,E as $impl,Wn as $implementation,S as $index,dt as $indexed,no as $inflight,rt as $info,or as $innerHeight,Qn as $innerWidth,pr as $isHTML,$t as $items,i as $keyText,fi as $kind,Po as $labels,Aa as $layerName,go as $list,qi as $listeners,Fr as $localStorage,Ba as $location,Eo as $lockedForReset,Zr as $matches,fa as $media,Ho as $mediaQueryLists,ai as $mode,xi as $name,Xa as $names,xa as $namespaces,zi as $navigator,Ai as $nodes,Tr as $onchange,Xo as $options,bs as $owner,Hr as $ownerNode,ds as $ownerRule,bn as $parent,be as $parentRule,rs as $parentWindow,Dn as $pastNames,Me as $pointerBeforeReference,De as $prefix,Vt as $prelude,ia as $presentationStyle,oe as $pseudo,$i as $queries,Ot as $radios,Ft as $ranges,Jt as $readonly,b as $readyState,Qe as $rebuildVersion,xt as $record,fn as $records,Ds as $reference,pe as $result,zn as $root,We as $rules,Mn as $running,D as $runningFrame,Re as $sc,mt as $screen,ao as $scrollRestoration,ot as $scrollX,lr as $scrollY,tr as $selSet,_r as $selectedOptions,rn as $selectedness,c as $selection,N as $selector,ko as $serializable,Ta as $sessionStorage,co as $settled,Hi as $shadowRoot,kr as $shed,Pa as $sheet,bo as $sheets,Kr as $slotAssignment,sa as $so,Lo as $states,ei as $style,hi as $styleVersion,Wa as $supportsText,ha as $systemId,Pi as $target,Ti as $targets,A as $tasks,Ko as $timers,hs as $title,zr as $treeVersion,ss as $type,gn as $types,ge as $updating,$o as $updatingSelectedContent,Cn as $uri,ke as $url,Se as $userActivation,Lt as $userValidity,ta as $validity,ne as $value,F as $version,wt as $visualViewport,jt as $w,Wt as $whatToShow,h as $whenDefined,qe as $width,_t as $window,sn as $writeBuffer,Ss as $x,le as $xhr,Pn as $y,Be as $z,Ui as ATTRIBUTE_NODE,za as AttrRecord,Ar as CDATA_SECTION_NODE,Fa as COMMENT_NODE,fr as COMPAT,Qt as COMPAT_PROFILES,r as DEFAULT_COMPAT,xo as DOCUMENT_FRAGMENT_NODE,qr as DOCUMENT_NODE,ca as DOCUMENT_POSITION_CONTAINED_BY,Ro as DOCUMENT_POSITION_CONTAINS,ti as DOCUMENT_POSITION_DISCONNECTED,gi as DOCUMENT_POSITION_FOLLOWING,Ga as DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC,ga as DOCUMENT_POSITION_PRECEDING,Fi as DOCUMENT_TYPE_NODE,Dr as DeclBlock,Ei as ELEMENT_NODE,xr as ENTITY_NODE,qo as ENTITY_REFERENCE_NODE,Vi as EventState,J as FAILURE_CHANNEL,gs as F_ADOPT_HOOK,Br as F_ARIA_ATTRS,cs as F_ATTR_HOOK,_n as F_CE_CUSTOM,_e as F_CHILDREN_HOOK,es as F_CHILD_LIST,wn as F_CONNECTED,Ae as F_CONNECT_HOOK,Ce as F_CONTENTEDITABLE_ATTR,Rt as F_CUSTOM,na as F_DATA_ATTRS,re as F_FACE,Xi as F_FORM_ATTR,Tt as F_HAS_SHADOW,Mt as F_HAS_STYLE_ATTR,Gt as F_HTML,g as F_INERT_ATTR,Je as F_MO_REGISTERED,vt as F_RANGE,cn as F_RANGE_BELOW,Cs as F_RANGE_MARKS,ue as F_SHADOW_ROOT,Fn as F_TABINDEX_ATTR,ee as GLOBAL_EVENT_HANDLER_EVENTS,qa as HTMLCollection,Ve as HTML_NS,mn as INPUT_TYPE_NAMES,kn as MATHML_NS,Hn as NOTATION_NODE,ut as NodeCache,To as NodeImpl,An as NodeList,Pe as PROCESSING_INSTRUCTION_NODE,G as SPAN_CHANNEL,lt as SVG_NS,O as T,eo as TEXT_NODE,On as VirtualClock,Vn as VirtualTimeout,Ji as WINDOW_EVENT_HANDLER_EVENTS,tt as XLINK_NS,ir as XMLNS_NS,Xn as XML_NS,So as adoptedStyleSheetsOf,ae as ariaAttr,Qi as asciiLowercase,ns as assignManually,En as assignedElements,je as assignedNodes,Te as assignedSlot,Ge as attachShadowRoot,Dt as attr,Ra as attrAssociatedElement,wo as attrAssociatedElements,Yt as attrNode,Ne as canSkipZeroDelayWait,captureInterfaceBaseline,it as childAt,Pt as classTokens,clearUIValue,$a as clockNow,k as clockStats,ki as closest,y as compareBoundaryPoints,oi as compatExposes,io as computedDisplay,at as computedValue,cr as computedVisibility,dn as constructEntryList,Sa as controlValue,Ee as createEvent,j as createFileList,Jr as createLinkSheet,er as currentStyleVersion,Es as defaultButton,Do as deferredCompatMembers,ft as derivedCache,describeCall,describeNode,da as dispatch,nt as dispatchTrusted,ya as ensureCollectionIndexGetters,Gn as ensureIndexGetters,Di as evaluateMediaQueryList,vo as faceState,Bt as findFlattenedSlottables,ra as findSlot,ar as fireAnEvent,Zn as fireSyntheticPointerEvent,sr as firstElementChild,Yn as foreignImmediatesPending,pa as formOwner,qt as getAttribute,pt as getComputedStyle,getComputedStyleOverride,Vo as getCurrentEvent,ht as getElementsByClassName,an as getElementsByTagName,xs as getElementsByTagNameNS,St as getEventHandler,getUISelection,getUIValue,guardInterfaceDefinitions,v as hasAttr,hr as hasAuthorStyles,Xr as hasExplicitAttrElements,s as hasListeners,oo as hasReadonlyAttribute,hasUIValue,Ca as hiddenGlobals,fe as implicitSubmission,Ie as indexGetterTable,$n as indexOf,Bi as inputChecked,Er as inputIndeterminate,u as inputType,Zo as inputTypeFromAttr,us as inspectNode,dr as installClock,kt as installEventHandlers,Mi as isActuallyDisabled,Xe as isAsciiWhitespace,ja as isAutofilled,_o as isChecked,Zt as isClockTimer,Ur as isDefault,aa as isDisabled,tn as isDisplayNone,o as isDisplayNoneInclusive,isEditable as isEditableControl,Fo as isEnabled,Wr as isFACE,Qr as isInRange,mr as isInclusiveAncestor,pi as isIndeterminate,Va as isInvalid,Ci as isLabelable,yr as isListed,R as isMutable,xn as isNumericType,ji as isOptional,Si as isOutOfRange,vr as isPlaceholderShown,Uo as isReadOnly,fs as isReadWrite,Ir as isRequired,Wo as isResettable,Rn as isSubmitButton,ps as isSubmittable,is as isTextControl,f as isTextualType,pn as isValid,Za as isValidDoctypeName,$e as isValidElementLocalName,nr as isValidNamespacePrefix,li as isVisibilityHidden,Lr as labeledControl,as as labelsFor,en as lastElementChild,Ha as listOfOptions,si as listenerCount,n as loopTurn,Un as matchMediaText,wr as matches,Sr as mediaEnvironment,a as nextElementInTree,di as nextElementSibling,No as nextInTree,ka as nextSkippingChildren,to as nodeCache,ii as nodeGetTheParent,Ze as nodeLength,Ln as notifyMutationObservers,me as optionSelected,Ma as parseDeclBlock,Nr as parseFragment,Fe as parseMediaQueryList,ro as peekDerivedCache,jo as pointerEvents,Da as pointerEventsNone,bt as prefixFlag,mo as previousElementSibling,Ki as previousInTree,uo as pseudoContent,Yo as querySelector,ys as querySelectorAll,quote,zo as registerOwnerSheet,registerTestHooks,Oo as removeAllEventListeners,un as removeAttribute,ni as removeOwnerSheet,yn as replaceData,ba as reportException,resetWindowBetweenFiles,so as resolveCompat,restoreInterfaces,bi as retarget,wa as reusableElement,po as serializeChildren,Gi as serializeNode,_i as setAdoptedStyleSheets,Ya as setAssignedSlotLookup,Ts as setAttribute,setCheckedFromUI,Wi as setComputedColorMode,Ht as setEventHandler,setFailureSnapshot,setFilesFromUI,setNodeDescriber,Ue as setNotImplementedHandler,setOptionSelectedFromUI,Or as setTrusted,setUISelection,setUIValue,Ri as setUncaughtExceptionHandler,ci as skipIdleTime,Ao as skipZeroDelayWait,spanChannel,de as splitOnAsciiWhitespace,ye as splitText,Kn as styleElementRemoved,la as styleElementSheet,Le as styleElementUpdated,Ka as styleSheetsOf,jr as styledDisplay,subscribeTestFailures,supportsSelection,d as supportsSelectionType,gr as tagId,nn as tagName,testHooks,tracePromise,traceSync,tracing,Ja as trackGlobalTimers,Pr as treeRoot,Ia as uaDisplay,_a as unregisterOwnerSheet,qn as validateAndExtract,w as valueMode,Ea as virtualDate,lo as virtualPerformance,_s as windowHooks,M as windowInterfaces,Li as withNamedProperties};
|
|
1
|
+
import{$ as e,$c as t,$d as n,$i as r,$l as i,$o as a,$r as o,$s as s,$u as c,Aa as ee,Ac as te,Ad as ne,Af as re,Al as ie,Ao as ae,Au as oe,B as se,Bc as ce,Bd as le,Bf as ue,Bl as l,Bo as de,Br as fe,Bu as pe,C as me,Ca as u,Cc as he,Cd as ge,Cf as _e,Cl as ve,Co as ye,Cu as be,Da as d,Dc as xe,Dd as Se,Df as Ce,Dl as we,Do as Te,Dr as Ee,Du as De,Ea as f,Ec as Oe,Ed as ke,Ef as Ae,El as p,Eo as je,Eu as Me,Fc as m,Fd as h,Ff as g,Fl as _,Fo as v,Fr as y,Fu as b,Gc as x,Gd as Ne,Gf as Pe,Gi as Fe,Gl as S,Go as Ie,Gr as Le,Gu as Re,Hc as ze,Hd as Be,Hf as Ve,Hl as He,Hr as Ue,Hu as We,Ia as Ge,Ic as Ke,Id as qe,If as Je,Il as Ye,Io as Xe,Ir as Ze,Iu as Qe,Ja as $e,Jc as et,Jd as C,Jf as tt,Ji as nt,Jl as rt,Jo as it,Jr as at,Ju as ot,Kc as st,Kd as ct,Kf as lt,Ki as ut,Kl as dt,Ko as ft,Kr as pt,Ku as mt,La as ht,Lc as gt,Ld as _t,Lf as vt,Ll as yt,Lo as bt,Lu as xt,Ma as St,Mc as Ct,Md as wt,Mf as Tt,Ml as Et,Mo as Dt,Mu as Ot,Na as kt,Nc as At,Nd as jt,Nf as Mt,Nl as Nt,No as Pt,Nu as Ft,Oa as w,Oc as It,Od as Lt,Of as Rt,Ol as zt,Oo as Bt,Ou as Vt,Pa as Ht,Pc as Ut,Pd as Wt,Pf as Gt,Pl as Kt,Po as qt,Pu as Jt,Qa as Yt,Qc as Xt,Qd as Zt,Qi as Qt,Ql as $t,Qo as en,Qr as tn,Qs as nn,Qu as rn,Ra as an,Rc as on,Rd as sn,Rf as cn,Rl as ln,Ro as un,Rr as dn,Ru as fn,S as pn,Sa as mn,Sc as hn,Sd as gn,Sf as _n,Sl as vn,So as yn,Su as bn,Ta as xn,Tc as Sn,Td as Cn,Tf as wn,Tl as Tn,To as En,Tu as Dn,Uc as T,Ud as On,Uf as kn,Ul as E,Uo as An,Ur as jn,Uu as Mn,Vc as Nn,Vd as Pn,Vf as Fn,Vl as In,Vo as Ln,Vr as Rn,Vu as zn,Wc as Bn,Wd as Vn,Wf as Hn,Wi as Un,Wl as Wn,Wo as Gn,Wr as Kn,Wu as D,Xa as qn,Xc as Jn,Xd as Yn,Xf as Xn,Xi as Zn,Xl as Qn,Xo as $n,Xr as er,Xs as O,Xu as tr,Ya as nr,Yc as rr,Yd as k,Yf as ir,Yi as ar,Yl as or,Yo as sr,Yr as cr,Yu as lr,Zc as ur,Zd as dr,Zf as fr,Zi as pr,Zl as mr,Zo as hr,Zr as gr,Zs as _r,Zu as vr,_ as yr,_a as br,_c as xr,_d as A,_f as Sr,_i as Cr,_l as wr,_o as Tr,_u as Er,a as Dr,aa as Or,ac as kr,ad as Ar,af as jr,ai as Mr,al as Nr,ao as Pr,as as Fr,at as j,au as Ir,b as Lr,ba as Rr,bc as zr,bd as Br,bf as Vr,bl as Hr,bu as Ur,c as Wr,ca as Gr,cc as Kr,cd as qr,cf as Jr,ci as Yr,cl as Xr,cr as Zr,cu as Qr,d as $r,dc as ei,dd as ti,df as ni,di as ri,dl as ii,dr as M,ds as ai,du as oi,ea as si,ec as ci,ed as li,ef as ui,ei as di,el as N,es as fi,eu as pi,f as mi,fc as hi,fd as gi,ff as _i,fi as vi,fl as yi,fr as bi,fs as xi,fu as Si,g as Ci,ga as wi,gc as Ti,gd as Ei,gf as Di,gi as Oi,gl as ki,go as Ai,gu as ji,h as Mi,ha as Ni,hc as Pi,hd as Fi,hf as Ii,hl as Li,ho as Ri,hs as zi,hu as Bi,i as Vi,ic as Hi,id as Ui,if as Wi,ii as Gi,il as P,io as Ki,is as qi,iu as Ji,ja as Yi,jc as Xi,jd as F,jf as Zi,jl as Qi,jo as $i,ju as ea,kc as ta,kd as na,kf as ra,kl as I,ko as ia,ku as aa,l as oa,lc as sa,ld as ca,lf as la,li as ua,ll as da,lr as L,ls as fa,lu as pa,m as R,ma,mc as ha,md as ga,mf as _a,mi as va,ml as ya,mo as ba,ms as xa,mu as Sa,n as Ca,na as wa,nc as Ta,nd as Ea,nf as Da,ni as Oa,nl as ka,ns as Aa,nu as ja,o as Ma,oa as Na,oc as Pa,od as Fa,of as Ia,oi as La,ol as Ra,or as za,os as Ba,ou as Va,p as Ha,pa as Ua,pc as Wa,pd as Ga,pf as Ka,pi as qa,pl as z,po as Ja,pr as Ya,ps as Xa,pu as Za,qa as Qa,qc as $a,qd as eo,qf as to,qi as no,ql as ro,qo as io,qr as ao,qu as oo,r as so,ra as co,rd as lo,rf as uo,ri as fo,rl as po,ro as mo,rs as ho,rt as go,ru as _o,s as vo,sa as yo,sc as bo,sd as xo,sf as So,si as Co,sl as wo,sr as To,ss as Eo,su as Do,ta as Oo,tc as ko,td as Ao,tf as jo,ti as Mo,tl as No,ts as Po,tu as Fo,u as Io,uc as Lo,ud as Ro,uf as zo,ui as Bo,ul as Vo,us as Ho,uu as Uo,v as Wo,va as Go,vc as Ko,vd as qo,vf as Jo,vl as Yo,vo as Xo,vs as B,vu as Zo,wa as Qo,wc as $o,wd as es,wf as ts,wl as ns,wo as rs,wu as is,x as as,xa as os,xc as ss,xd as cs,xf as ls,xl as us,xo as ds,xu as fs,y as ps,ya as ms,yc as hs,yd as gs,yf as _s,yi as vs,yl as ys,yo as bs,yu as xs,za as Ss,zc as V,zd as Cs,zf as ws,zl as Ts,zo as Es,zr as Ds,zu as Os}from"./_chunks/src-DR6mBc_4.js";import{constants as ks,createContext as As,runInContext as js}from"node:vm";import*as H from"node:diagnostics_channel";let U=null;function targets(){let e=/* @__PURE__ */ new Set,t=M();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(L.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 W=null;function captureInterfaceBaseline(){if(U===null){U=[],W=/* @__PURE__ */ new WeakSet;for(let e of targets())U.push(snapshot(e)),W.add(e);ownObjectCreateMaps()}}let Ms=null;function ownObjectCreateMaps(){if(U===null)return;let e=Ms??=js(`(prototypes) => prototypes.map((p) => Object.create(p))`,As(ks.DONT_CONTEXTIFY)),t=[Object.prototype];for(let e=0;e<U.length;e++){let n=U[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=W;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(U===null)return 0;let e=0;for(let t=0;t<U.length;t++){let n=U[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 G=`ctrl-dom:span`,K=typeof H.tracingChannel==`function`?H.tracingChannel(G):null;function spanChannel(){return K}function tracing(){return K!==null&&K.hasSubscribers}function traceSync(e,t,n){let r={op:e,description:t,data:{},async:!1},i=C();return K.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=C();return K.tracePromise(e=>n(e).finally(()=>recordSkipped(e,i)),r,void 0,r)}function recordSkipped(e,t){let n=C()-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[E]!==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 q=null;function setNodeDescriber(e){q=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(q!==null)try{let t=q(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 J=`sentry-tests:failure`;let Y=null;function setFailureSnapshot(e){Y=e}function subscribeTestFailures(e){let t=H.channel(J),onFailure=t=>{let n=t,r=e();if(r==null||n.document!==r)return;let i=k();if(i!==null&&(n.contexts.clock={skipped_ms:Math.round(i.skippedMs),pending_timers:i.pendingTimers}),Y!==null&&r.body!=null)try{n.attachments.push({filename:`accessibility-snapshot.txt`,contentType:`text/plain`,data:Y(r.body)})}catch{}};return t.subscribe(onFailure),()=>t.unsubscribe(onFailure)}var FileState=class{hooks;url;constructor(){this.hooks=/* @__PURE__ */ new Map,this.url=null}};const X=/* @__PURE__ */ new WeakMap;function stateOf(e){let t=X.get(e);return t===void 0&&X.set(e,t=new FileState),t}function registerTestHooks(e,t){let n=B();if(n===null)return;let r=stateOf(n).hooks;r.set(e,{...r.get(e),...t})}function testHooks(){let e=B(),t=e===null?void 0:X.get(e);return t===void 0?[]:[...t.hooks.values()]}function resetWindowBetweenFiles(e){let t=stateOf(e);for(let e of t.hooks.values())try{e.fileEnd?.()}catch{}ct(),bi(e);let n=e[A];if(n!==null){for(let e of n)e.clear(e.handle);n.clear()}e[p]=null,e[D]=null,e[I]=null,e[l]=null;let r=e.document;r.getSelection()?.removeAllRanges();let i=r.body;i!==null&&(i.replaceChildren(),removeAttributes(i)),r.documentElement!==null&&removeAttributes(r.documentElement),e.localStorage.clear(),e.sessionStorage.clear(),e[T]=null;let a=t.url??=e.location.href;e.location.href!==a&&e._setURL(new URL(a));let o=e.history;o[z]=[{url:a,state:null}],o[S]=0}function removeAttributes(e){let t=e.getAttributeNames();for(let n=0;n<t.length;n++)e.removeAttribute(t[n])}function implOf(e){return e[E]??e}function isTypingType(e){return f(e)||e===12||e>=7&&e<=11}function isEditable(e){let t=implOf(e);return t.tag===O.input?isTypingType(u(t))&&R(t):t.tag===O.textarea?R(t):jn(t)}function supportsSelection(e){let t=implOf(e);return t.tag===O.textarea||t.tag===O.input&&d(u(t))}function hasUIValue(e){let t=implOf(e);return t.tag===O.textarea||t.tag===O.input&&w(u(t))===0}function getUIValue(e){let t=implOf(e);if(t.tag===O.input){let e=t.node;return e[V].uiValue??e.value}return t.tag===O.textarea?t.node.value:``}function setUIValue(e,t){let n=implOf(e);if(n.tag===O.input){let e=n.node,r=u(n);if(w(r)!==0)return;let i=go(r,t,n);n.doc[F]++,e[V].value=i,e[V].dirtyValue=!0,e[V].userEdited=!0,e[V].uiValue=i===t?null:t,e[V].badInput=i===``&&t!==``&&r!==5&&!f(r);let a=t.length;e[V].selStart>a&&(e[V].selStart=a),e[V].selEnd>a&&(e[V].selEnd=a)}else if(n.tag===O.textarea){let e=n.node;n.doc[F]++,e[V].value=t,e[V].dirtyValue=!0,e[V].userEdited=!0}}function clearUIValue(e){let t=implOf(e);if(t.tag===O.input){let e=t.node;e[V].uiValue=null,e[V].badInput=!1}}function getUISelection(e){let t=implOf(e).node,n=getUIValue(e).length;return{start:Math.min(t[V].selStart,n),end:Math.min(t[V].selEnd,n),direction:t[V].selDir}}function setUISelection(e,t,n=t,r=`none`){let i=implOf(e);if(i.tag!==O.input&&i.tag!==O.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[V].selStart=s,a[V].selEnd=c,a[V].selDir=r}function setFilesFromUI(e,t){let n=implOf(e);n.tag===O.input&&u(n)===17&&(n.doc[F]++,n.node[V].files=j(t))}function setOptionSelectedFromUI(t,n){let r=implOf(t);if(r.tag!==O.option)return;let i=r.node;i._setSelectedness(n),i[P]=!0;let a=e(r);if(a!==null){let e=a.node;n&&e._deselectOthers(r),e._updateSelectedContent()}}function setCheckedFromUI(e,t){let n=implOf(e);n.tag===O.input&&n.node._setCheckedness(t,!0)}const Ns=L.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===Ns||typeof n!=`function`||se.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{Pa as $_proto__,bo as $aboutBase,Kr as $active,sa as $assocGen,Lo as $attr,ei as $attributes,hi as $availableToElementInternals,Wa as $baseFor,ha as $baseOverride,Pi as $baseURL,Ti as $baseVersion,xr as $benign,Ko as $block,hs as $blockParsed,zr as $blockText,ss as $byCtor,hn as $byName,he as $cache,$o as $callback,Sn as $childNodes,Oe as $childWindows,xe as $children,It as $classList,ta as $clipboard,te as $clonable,Xi as $closed,Ct as $coll,At as $compiled,Ut as $compiledFor,m as $condition,Ke as $constructed,gt as $constructingEntryList,on as $contentType,V as $control,ce as $controlsCache,Nn as $controlsDoc,ze as $controlsVersion,T as $cookieJar,Bn as $cookies,x as $css,st as $current,$a as $customElements,et as $customValidity,rr as $cx,Jn as $data,ur as $dataset,Xt as $declarative,t as $defaultNamespace,N as $defaultValueOverride,No as $delegatesFocus,ka as $derived,po as $devicePixelRatio,P as $dirtiness,Nr as $disabled,Ra as $disallowModification,wo as $doc,Xr as $dropEffect,da as $ec,Vo as $effectAllowed,ii as $el,yi as $elements,z as $entries,ya as $eo,Li as $error,ki as $file,wr as $files,Yo as $fill,ys as $filter,Hr as $firingSubmissionEvents,us as $focused,vn as $forLabels,ve as $form,ns as $formAttrSeen,Tn as $forms,p as $frameCallbacks,we as $frameElement,zt as $frameId,I as $frameTask,ie as $frameTime,Qi as $generation,Et as $globalObject,Nt as $hasTransients,Kt as $height,_ as $history,Ye as $home,yt as $host,ln as $href,Ts as $id,l as $idleCallbacks,In as $idleId,He as $ids,E as $impl,Wn as $implementation,S as $index,dt as $indexed,ro as $inflight,rt as $info,or as $innerHeight,Qn as $innerWidth,mr as $isHTML,$t as $items,i as $keyText,pi as $kind,Fo as $labels,ja as $layerName,_o as $list,Ji as $listeners,Ir as $localStorage,Va as $location,Do as $lockedForReset,Qr as $matches,pa as $media,Uo as $mediaQueryLists,oi as $mode,Si as $name,Za as $names,Sa as $namespaces,Bi as $navigator,ji as $nodes,Er as $onchange,Zo as $options,xs as $owner,Ur as $ownerNode,fs as $ownerRule,bn as $parent,be as $parentRule,is as $parentWindow,Dn as $pastNames,Me as $pointerBeforeReference,De as $prefix,Vt as $prelude,aa as $presentationStyle,oe as $pseudo,ea as $queries,Ot as $radios,Ft as $ranges,Jt as $readonly,b as $readyState,Qe as $rebuildVersion,xt as $record,fn as $records,Os as $reference,pe as $result,zn as $root,We as $rules,Mn as $running,D as $runningFrame,Re as $sc,mt as $screen,oo as $scrollRestoration,ot as $scrollX,lr as $scrollY,tr as $selSet,vr as $selectedOptions,rn as $selectedness,c as $selection,li as $selector,Ao as $serializable,Ea as $sessionStorage,lo as $settled,Ui as $shadowRoot,Ar as $shed,Fa as $sheet,xo as $sheets,qr as $slotAssignment,ca as $so,Ro as $states,ti as $style,gi as $styleVersion,Ga as $supportsText,ga as $systemId,Fi as $target,Ei as $targets,A as $tasks,qo as $timers,gs as $title,Br as $treeVersion,cs as $type,gn as $types,ge as $updating,es as $updatingSelectedContent,Cn as $uri,ke as $url,Se as $userActivation,Lt as $userValidity,na as $validity,ne as $value,F as $version,wt as $visualViewport,jt as $w,Wt as $whatToShow,h as $whenDefined,qe as $width,_t as $window,sn as $writeBuffer,Cs as $x,le as $xhr,Pn as $y,Be as $z,Wi as ATTRIBUTE_NODE,Ba as AttrRecord,jr as CDATA_SECTION_NODE,Ia as COMMENT_NODE,pr as COMPAT,Qt as COMPAT_PROFILES,r as DEFAULT_COMPAT,So as DOCUMENT_FRAGMENT_NODE,Jr as DOCUMENT_NODE,la as DOCUMENT_POSITION_CONTAINED_BY,zo as DOCUMENT_POSITION_CONTAINS,ni as DOCUMENT_POSITION_DISCONNECTED,_i as DOCUMENT_POSITION_FOLLOWING,Ka as DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC,_a as DOCUMENT_POSITION_PRECEDING,Ii as DOCUMENT_TYPE_NODE,Or as DeclBlock,Di as ELEMENT_NODE,Sr as ENTITY_NODE,Jo as ENTITY_REFERENCE_NODE,Hi as EventState,J as FAILURE_CHANNEL,_s as F_ADOPT_HOOK,Vr as F_ARIA_ATTRS,ls as F_ATTR_HOOK,_n as F_CE_CUSTOM,_e as F_CHILDREN_HOOK,ts as F_CHILD_LIST,wn as F_CONNECTED,Ae as F_CONNECT_HOOK,Ce as F_CONTENTEDITABLE_ATTR,Rt as F_CUSTOM,ra as F_DATA_ATTRS,re as F_FACE,Zi as F_FORM_ATTR,Tt as F_HAS_SHADOW,Mt as F_HAS_STYLE_ATTR,Gt as F_HTML,g as F_INERT_ATTR,Je as F_MO_REGISTERED,vt as F_RANGE,cn as F_RANGE_BELOW,ws as F_RANGE_MARKS,ue as F_ROLE_ATTR,Fn as F_SHADOW_ROOT,Ve as F_TABINDEX_ATTR,ee as GLOBAL_EVENT_HANDLER_EVENTS,Ja as HTMLCollection,kn as HTML_NS,mn as INPUT_TYPE_NAMES,Hn as MATHML_NS,Pe as NOTATION_NODE,ut as NodeCache,Eo as NodeImpl,An as NodeList,lt as PROCESSING_INSTRUCTION_NODE,G as SPAN_CHANNEL,to as SVG_NS,O as T,tt as TEXT_NODE,On as VirtualClock,Vn as VirtualTimeout,Yi as WINDOW_EVENT_HANDLER_EVENTS,ir as XLINK_NS,Xn as XMLNS_NS,fr as XML_NS,Co as adoptedStyleSheetsOf,ae as ariaAttr,$i as asciiLowercase,rs as assignManually,En as assignedElements,je as assignedNodes,Te as assignedSlot,Ge as attachShadowRoot,Dt as attr,za as attrAssociatedElement,To as attrAssociatedElements,Yt as attrNode,Ne as canSkipZeroDelayWait,captureInterfaceBaseline,it as childAt,Pt as classTokens,clearUIValue,eo as clockNow,k as clockStats,Ai as closest,y as compareBoundaryPoints,si as compatExposes,ao as computedDisplay,at as computedValue,cr as computedVisibility,dn as constructEntryList,Ca as controlValue,Ee as createEvent,j as createFileList,Yr as createLinkSheet,er as currentStyleVersion,Ds as defaultButton,Oo as deferredCompatMembers,ft as derivedCache,describeCall,describeNode,fa as dispatch,nt as dispatchTrusted,ba as ensureCollectionIndexGetters,Gn as ensureIndexGetters,Oi as evaluateMediaQueryList,yo as faceState,Bt as findFlattenedSlottables,ia as findSlot,ar as fireAnEvent,Zn as fireSyntheticPointerEvent,sr as firstElementChild,Yn as foreignImmediatesPending,ma as formOwner,qt as getAttribute,pt as getComputedStyle,getComputedStyleOverride,Ho as getCurrentEvent,ht as getElementsByClassName,an as getElementsByTagName,Ss as getElementsByTagNameNS,St as getEventHandler,getUISelection,getUIValue,guardInterfaceDefinitions,v as hasAttr,gr as hasAuthorStyles,Zr as hasExplicitAttrElements,s as hasListeners,so as hasReadonlyAttribute,hasUIValue,wa as hiddenGlobals,fe as implicitSubmission,Ie as indexGetterTable,$n as indexOf,Vi as inputChecked,Dr as inputIndeterminate,u as inputType,Qo as inputTypeFromAttr,ds as inspectNode,dr as installClock,kt as installEventHandlers,Ni as isActuallyDisabled,Xe as isAsciiWhitespace,Ma as isAutofilled,vo as isChecked,Zt as isClockTimer,Wr as isDefault,oa as isDisabled,tn as isDisplayNone,o as isDisplayNoneInclusive,isEditable as isEditableControl,Io as isEnabled,Gr as isFACE,$r as isInRange,hr as isInclusiveAncestor,mi as isIndeterminate,Ha as isInvalid,wi as isLabelable,br as isListed,R as isMutable,xn as isNumericType,Mi as isOptional,Ci as isOutOfRange,yr as isPlaceholderShown,Wo as isReadOnly,ps as isReadWrite,Lr as isRequired,Go as isResettable,Rn as isSubmitButton,ms as isSubmittable,as as isTextControl,f as isTextualType,pn as isValid,Qa as isValidDoctypeName,$e as isValidElementLocalName,nr as isValidNamespacePrefix,di as isVisibilityHidden,Rr as labeledControl,os as labelsFor,en as lastElementChild,Ua as listOfOptions,ci as listenerCount,n as loopTurn,Un as matchMediaText,Tr as matches,Cr as mediaEnvironment,a as nextElementInTree,fi as nextElementSibling,Po as nextInTree,Aa as nextSkippingChildren,no as nodeCache,ai as nodeGetTheParent,Ze as nodeLength,Ln as notifyMutationObservers,me as optionSelected,Na as parseDeclBlock,Pr as parseFragment,Fe as parseMediaQueryList,io as peekDerivedCache,Mo as pointerEvents,Oa as pointerEventsNone,bt as prefixFlag,ho as previousElementSibling,qi as previousInTree,fo as pseudoContent,Xo as querySelector,bs as querySelectorAll,quote,Bo as registerOwnerSheet,registerTestHooks,ko as removeAllEventListeners,un as removeAttribute,ri as removeOwnerSheet,yn as replaceData,xa as reportException,resetWindowBetweenFiles,co as resolveCompat,restoreInterfaces,xi as retarget,Ta as reusableElement,mo as serializeChildren,Ki as serializeNode,vi as setAdoptedStyleSheets,Xa as setAssignedSlotLookup,Es as setAttribute,setCheckedFromUI,Gi as setComputedColorMode,Ht as setEventHandler,setFailureSnapshot,setFilesFromUI,setNodeDescriber,Ue as setNotImplementedHandler,setOptionSelectedFromUI,kr as setTrusted,setUISelection,setUIValue,zi as setUncaughtExceptionHandler,ui as skipIdleTime,jo as skipZeroDelayWait,spanChannel,de as splitOnAsciiWhitespace,ye as splitText,Kn as styleElementRemoved,ua as styleElementSheet,Le as styleElementUpdated,qa as styleSheetsOf,Mr as styledDisplay,subscribeTestFailures,supportsSelection,d as supportsSelectionType,_r as tagId,nn as tagName,testHooks,tracePromise,traceSync,tracing,Ya as trackGlobalTimers,Fr as treeRoot,La as uaDisplay,va as unregisterOwnerSheet,qn as validateAndExtract,w as valueMode,Da as virtualDate,uo as virtualPerformance,vs as windowHooks,M as windowInterfaces,Ri as withNamedProperties};
|
|
@@ -4,7 +4,8 @@ export declare class DeclBlock {
|
|
|
4
4
|
names: string[];
|
|
5
5
|
/** Specified values, already normalized. */
|
|
6
6
|
values: string[];
|
|
7
|
-
important
|
|
7
|
+
/** Created on the first !important declaration. Missing indices have normal priority. */
|
|
8
|
+
important: boolean[] | null;
|
|
8
9
|
/** Set by put()/removeOne() when they change the block (setProperty's "updated" flag). */
|
|
9
10
|
dirty: boolean;
|
|
10
11
|
/**
|
|
@@ -30,6 +31,8 @@ export declare class DeclBlock {
|
|
|
30
31
|
constructor();
|
|
31
32
|
get length(): number;
|
|
32
33
|
indexOf(name: string, from?: number): number;
|
|
34
|
+
isImportant(index: number): boolean;
|
|
35
|
+
private markImportant;
|
|
33
36
|
clear(): void;
|
|
34
37
|
/** Low-level set: update in place, or append. */
|
|
35
38
|
put(name: string, value: string, important: boolean): void;
|
|
@@ -15,7 +15,7 @@ export declare function getAttribute(el: NodeImpl, qualifiedName: string): strin
|
|
|
15
15
|
/**
|
|
16
16
|
* The presence bit an attribute local name sets on its element: F_ARIA_ATTRS / F_DATA_ATTRS for
|
|
17
17
|
* names starting with `aria-` / `data-`, F_TABINDEX_ATTR, F_CONTENTEDITABLE_ATTR or F_INERT_ATTR
|
|
18
|
-
* for those names, F_FORM_ATTR for `form`, else 0.
|
|
18
|
+
* for those names, F_FORM_ATTR / F_ROLE_ATTR for `form` / `role`, else 0.
|
|
19
19
|
*/
|
|
20
20
|
export declare function prefixFlag(localName: string): number;
|
|
21
21
|
/**
|
|
@@ -13,10 +13,8 @@ import type { NodeImpl } from "./NodeImpl.js";
|
|
|
13
13
|
export declare class NodeCache {
|
|
14
14
|
/** `Document._version` at which `role` was computed. */
|
|
15
15
|
roleVersion: number;
|
|
16
|
-
/** Testing Library's implicit role (aria/src/role.ts implicitRole), "" for none
|
|
16
|
+
/** Testing Library's implicit role (aria/src/role.ts implicitRole), "" for none. */
|
|
17
17
|
role: string;
|
|
18
|
-
/** The `role` attribute at `roleVersion`, null when absent. */
|
|
19
|
-
roleAttr: string | null;
|
|
20
18
|
/** `Document._version` at which `name` was computed. */
|
|
21
19
|
nameVersion: number;
|
|
22
20
|
/** Accessible name. */
|
|
@@ -72,6 +72,8 @@ export declare const F_INERT_ATTR: number;
|
|
|
72
72
|
* (Document[$formAttrSeen]) has no form whose controls lie outside it (html/forms/form-associated.ts).
|
|
73
73
|
*/
|
|
74
74
|
export declare const F_FORM_ATTR: number;
|
|
75
|
+
/** Element has a `role` attribute (any namespace), kept like F_ARIA_ATTRS. */
|
|
76
|
+
export declare const F_ROLE_ATTR: number;
|
|
75
77
|
/**
|
|
76
78
|
* Sticky marks for live ranges (traversal/live.ts): F_RANGE on a node that is or was a live
|
|
77
79
|
* range's start or end node, F_RANGE_BELOW on every ancestor of such a node (link() carries it
|
|
@@ -221,7 +221,9 @@ export declare function foreignImmediatesPending(): boolean;
|
|
|
221
221
|
* clock's due. Otherwise the caller gets its real turn.
|
|
222
222
|
* - Every MAX_TURNLESS_MS of real time a real turn is taken regardless, so Node's own timers (the
|
|
223
223
|
* test runner's timeout for a test that loops forever on `await user.click()`), unref'd timers
|
|
224
|
-
* and the runner's messages are never starved.
|
|
224
|
+
* and the runner's messages are never starved. That turn is asked for from the same tick
|
|
225
|
+
* callback, so `resolve` comes after the immediates the pending microtasks queued whether or
|
|
226
|
+
* not the allowance had run out: the order does not depend on how fast the machine is.
|
|
225
227
|
*
|
|
226
228
|
* Without a clock that skips idle time: `setImmediate(resolve)`.
|
|
227
229
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"react";import{canSkipZeroDelayWait as t,listenerCount as n,loopTurn as r,registerTestHooks as i,reusableElement as a,skipZeroDelayWait as o,traceSync as s,tracing as c}from"@ctrl/dom/internal";import*as l from"react-dom/client";var u=Object.defineProperty,d=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyNames,p=Object.prototype.hasOwnProperty,__exportAll=(e,t)=>{let n={};for(var r in e)u(n,r,{get:e[r],enumerable:!0});return t||u(n,Symbol.toStringTag,{value:`Module`}),n},__copyProps=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=f(t),a=0,o=i.length,s;a<o;a++)s=i[a],!p.call(e,s)&&s!==n&&u(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=d(t,s))||r.enumerable});return e},__reExport=(e,t,n)=>(__copyProps(e,t,`default`),n&&__copyProps(n,t,`default`)),m=/* @__PURE__ */ __exportAll({});import*as h from"@ctrl/dom/testing-library";__reExport(m,h);let g={reactStrictMode:!1,releaseSuspendedWork:!0};function releaseSuspendedWorkEnabled(){return g.releaseSuspendedWork}function getConfig(){return{...(0,m.getConfig)(),...g}}function configure(e){typeof e==`function`&&(e=e(getConfig()));let{reactStrictMode:t,releaseSuspendedWork:n,...r}=e;(0,m.configure)(r),g={...g,reactStrictMode:t,releaseSuspendedWork:n??g.releaseSuspendedWork}}const _=e.act;function setReactActEnvironment(e){globalThis.IS_REACT_ACT_ENVIRONMENT=e}function getIsReactActEnvironment(){return globalThis.IS_REACT_ACT_ENVIRONMENT}const v=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,y=/* @__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(v.didUsePromise=!1,r=r(!1),r!==null&&v.didUsePromise){t=!0;break}}e.length=0}catch(t){e.splice(0,n+1),v.thrownErrors.unshift(t)}if(t)for(let e of y){let t=e._internalRoot,n=t?.callbackNode;n!=null&&n.callback===void 0&&(t.callbackNode=null,t.callbackPriority=0)}if(v.thrownErrors.length>0)return v.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 b=withGlobalActEnvironment(_);function actReleasingSuspendedWork(e){if(v.actQueue!==null||!releaseSuspendedWorkEnabled()){b(e);return}let t;try{b(()=>{let n=v.actQueue;e(),t=flushReleasingSuspendedWork(n)})}catch(e){if(t===void 0)throw e;t.push(e)}if(t!==void 0){if(t.length===1)throw t[0];if(t.length>1)throw AggregateError(t)}}const fireEvent=((...e)=>(0,m.fireEvent)(...e)),x=fireEvent,S=m.fireEvent;for(let e of Object.keys(m.fireEvent))x[e]=(...t)=>S[e](...t);const C=x.mouseEnter,w=x.mouseLeave;x.mouseEnter=(...e)=>(C(...e),x.mouseOver(...e)),x.mouseLeave=(...e)=>(w(...e),x.mouseOut(...e));const T=x.pointerEnter,E=x.pointerLeave;x.pointerEnter=(...e)=>(T(...e),x.pointerOver(...e)),x.pointerLeave=(...e)=>(E(...e),x.pointerOut(...e));const D=x.select;x.select=(e,t)=>{D(e,t),e.focus(),x.keyUp(e,t)};const O=x.blur,k=x.focus;x.blur=(...e)=>(x.focusOut(...e),O(...e)),x.focus=(...e)=>(x.focusIn(...e),k(...e));var A=/* @__PURE__ */ __exportAll({act:()=>b,cleanup:()=>cleanup,configure:()=>configure,fireEvent:()=>fireEvent,getConfig:()=>getConfig,render:()=>render,renderHook:()=>renderHook});__reExport(A,m);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)}function drainWithTimer(e){setTimeout(()=>{e()},0),advanceFakeTimersIfEnabled()}let j=!1;(0,m.configure)({unstable_advanceTimersWrapper:e=>b(e),asyncWrapper:async e=>{let n=getIsReactActEnvironment();setReactActEnvironment(!1);try{let n=await e();return await new Promise(e=>{t(globalThis)?r(()=>o(globalThis)?e():drainWithTimer(e)):drainWithTimer(e)}),n}finally{setReactActEnvironment(n)}},eventWrapper:e=>{if(j)return e();j=!0;try{let t;return actReleasingSuspendedWork(()=>{t=e()}),t}finally{j=!1}}});const M=/* @__PURE__ */ new Set,N=[],P=/* @__PURE__ */ new WeakMap,F=/* @__PURE__ */ new WeakMap;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:t,onCaughtError:n,onRecoverableError:r,ui:i,wrapper:a,reactStrictMode:o}){let s;if(t)try{actReleasingSuspendedWork(()=>{s=l.hydrateRoot(e,strictModeIfNeeded(wrapUiIfNeeded(i,a),o),{onCaughtError:n,onRecoverableError:r}),y.add(s)})}catch(e){throw y.delete(s),e}else s=l.createRoot(e,{onCaughtError:n,onRecoverableError:r}),y.add(s);return{hydrate(){if(!t)throw Error("Attempted to hydrate a non-hydrateable root. This is a bug in `@testing-library/react`.")},render(e){s.render(e)},unmount(){s.unmount(),y.delete(s)}}}const I=/* @__PURE__ */ new WeakMap;function resultTemplateFor(e){let t=I.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,m.getQueriesForElement)(e)},I.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,m.prettyDOM)(e,n,r))):console.log((0,m.prettyDOM)(e,n,r)),unmount=()=>{b(()=>{a.unmount()})},rerender=e=>{let rerender=()=>actRender(e,a,!1,o,l);c()?s(`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,m.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 c()?s(`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 L=/(?:Providers?|Context|Router|Wrapper|Fragment|StrictMode|Suspense|Profiler)$/;function isWrapper(e){if(typeof e.type==`symbol`)return!0;let t=componentName(e.type);return L.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:r=t,legacyRoot:i=!1,onCaughtError:a,onUncaughtError:o,onRecoverableError:s,queries:c,hydrate:l=!1,wrapper:u,reactStrictMode:d}={}){if(o!==void 0)throw Error("onUncaughtError is not supported. The `render` call will already throw on uncaught errors.");if(i)throw legacyRootError(render);r||=document.body;let f=!1;if(!t){let e=P.get(document)?.pop();f=e===void 0,t=r.appendChild(e??document.createElement(`div`))}let p;if(!M.has(t))p=createConcurrentRoot(t,{hydrate:l,onCaughtError:a,onRecoverableError:s,ui:e,wrapper:u,reactStrictMode:d}),f&&F.set(t,{listeners:n(t),keys:Object.keys(t).length}),N.push({container:t,root:p}),M.add(t);else for(let e=0;e<N.length;e++){let n=N[e];n.container===t&&(p=n.root)}return renderRoot(e,{container:t,baseElement:r,queries:c,hydrate:l,wrapper:u,root:p,reactStrictMode:d})}function cleanup(){for(let e=0;e<N.length;e++){let{root:t,container:n}=N[e];if(b(()=>{t.unmount()}),n.parentNode===document.body){document.body.removeChild(n);let e=F.get(n);if(e!==void 0&&(n.onclick=null),e!==void 0&&a(n,e.listeners)&&Object.keys(n).length===e.keys){let e=P.get(document);e===void 0&&P.set(document,e=[]),e.length<8&&e.push(n)}}}N.length=0,M.clear()}i(`react`,{fileEnd(){cleanup(),dropHoistedResources()}});function dropHoistedResources(){for(let e of Object.keys(document)){if(!e.startsWith(`__reactResources$`))continue;let t=document[e];for(let e of[t?.hoistableStyles,t?.hoistableScripts])if(e instanceof Map)for(let t of e.values()){let e=t?.instance??t;typeof e?.remove==`function`&&e.remove()}delete document[e]}}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,A as n,b 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("@ctrl/dom/internal"),s=require("react-dom/client");s=__toESM(s,1);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)}if(d.thrownErrors.length>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){if(t===void 0)throw e;t.push(e)}if(t!==void 0){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)}function drainWithTimer(e){setTimeout(()=>{e()},0),advanceFakeTimersIfEnabled()}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=>{(0,o.canSkipZeroDelayWait)(globalThis)?(0,o.loopTurn)(()=>(0,o.skipZeroDelayWait)(globalThis)?e():drainWithTimer(e)):drainWithTimer(e)}),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=[],D=/* @__PURE__ */ new WeakMap,O=/* @__PURE__ */ new WeakMap;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:o}){let c;if(t)try{actReleasingSuspendedWork(()=>{c=s.hydrateRoot(e,strictModeIfNeeded(wrapUiIfNeeded(i,a),o),{onCaughtError:n,onRecoverableError:r}),f.add(c)})}catch(e){throw f.delete(c),e}else c=s.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 k=/* @__PURE__ */ new WeakMap;function resultTemplateFor(e){let t=k.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)},k.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:s,reactStrictMode:l}){actRender(e,a,r,s,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,s,l);(0,o.tracing)()?(0,o.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,o.tracing)()?(0,o.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 A=/(?:Providers?|Context|Router|Wrapper|Fragment|StrictMode|Suspense|Profiler)$/;function isWrapper(e){if(typeof e.type==`symbol`)return!0;let t=componentName(e.type);return A.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:s,queries:c,hydrate:l=!1,wrapper:u,reactStrictMode:d}={}){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;let f=!1;if(!t){let e=D.get(document)?.pop();f=e===void 0,t=n.appendChild(e??document.createElement(`div`))}let p;if(!T.has(t))p=createConcurrentRoot(t,{hydrate:l,onCaughtError:i,onRecoverableError:s,ui:e,wrapper:u,reactStrictMode:d}),f&&O.set(t,{listeners:(0,o.listenerCount)(t),keys:Object.keys(t).length}),E.push({container:t,root:p}),T.add(t);else for(let e=0;e<E.length;e++){let n=E[e];n.container===t&&(p=n.root)}return renderRoot(e,{container:t,baseElement:n,queries:c,hydrate:l,wrapper:u,root:p,reactStrictMode:d})}function cleanup(){for(let e=0;e<E.length;e++){let{root:t,container:n}=E[e];if(p(()=>{t.unmount()}),n.parentNode===document.body){document.body.removeChild(n);let e=O.get(n);if(e!==void 0&&(n.onclick=null),e!==void 0&&(0,o.reusableElement)(n,e.listeners)&&Object.keys(n).length===e.keys){let e=D.get(document);e===void 0&&D.set(document,e=[]),e.length<8&&e.push(n)}}}E.length=0,T.clear()}(0,o.registerTestHooks)(`react`,{fileEnd(){cleanup(),dropHoistedResources()}});function dropHoistedResources(){for(let e of Object.keys(document)){if(!e.startsWith(`__reactResources$`))continue;let t=document[e];for(let e of[t?.hoistableStyles,t?.hoistableScripts])if(e instanceof Map)for(let t of e.values()){let e=t?.instance??t;typeof e?.remove==`function`&&e.remove()}delete document[e]}}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}});
|
package/dist/react/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./_chunks/pure-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./_chunks/pure-DCcqflDh.cjs");let t=require("@ctrl/dom/internal");var n=/* @__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(n,e.n),(typeof process>`u`||!process.env?.RTL_SKIP_AUTO_CLEANUP)&&(typeof afterEach==`function`?(afterEach(()=>{e.t()}),(0,t.registerTestHooks)(`react`,{afterEach:e.t})):typeof teardown==`function`&&teardown(()=>{e.t()}),typeof beforeAll==`function`&&typeof afterAll==`function`)){let n=e.s(),enterActEnvironment=()=>{n=e.s(),e.c(!0)},leaveActEnvironment=()=>{e.c(n)};beforeAll(enterActEnvironment),afterAll(leaveActEnvironment),(0,t.registerTestHooks)(`react`,{beforeAll:enterActEnvironment,afterAll:leaveActEnvironment})}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 r=require("@ctrl/dom/testing-library");Object.keys(r).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return r[e]}})});
|
package/dist/react/index.js
CHANGED
|
@@ -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-
|
|
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-B2u-ZqTR.js";import{registerTestHooks as f}from"@ctrl/dom/internal";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()}),f(`react`,{afterEach:u})):typeof teardown==`function`&&teardown(()=>{u()}),typeof beforeAll==`function`&&typeof afterAll==`function`)){let e=l(),enterActEnvironment=()=>{e=l(),t(!0)},leaveActEnvironment=()=>{t(e)};beforeAll(enterActEnvironment),afterAll(leaveActEnvironment),f(`react`,{beforeAll:enterActEnvironment,afterAll:leaveActEnvironment})}export{s as act,u as cleanup,a as configure,e as fireEvent,d as getConfig,c as render,i as renderHook};
|
package/dist/react/pure.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./_chunks/pure-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./_chunks/pure-DCcqflDh.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]}})});
|
package/dist/react/pure.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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-
|
|
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-B2u-ZqTR.js";export*from"@ctrl/dom/testing-library";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./_chunks/aria-snapshot-diff-B95LLutl.cjs");let t=require("@ctrl/dom/internal"),n=require("@ctrl/dom/aria/internal"),r=require("@ctrl/dom/aria"),i=require("node:async_hooks");function isLabelledNodeName(e){if(e.prefix!==null)return!1;switch((0,t.asciiLowercase)(e.name)){case`button`:case`meter`:case`output`:case`progress`:case`select`:case`textarea`:case`input`:return!0}return!1}function buildIdMap(e,n){let r=/* @__PURE__ */ new Map;n&&e.type===t.ELEMENT_NODE&&e.id!==``&&r.set(e.id,e);for(let n=e.first;n!==null;n=(0,t.nextInTree)(n,e))n.type===t.ELEMENT_NODE&&n.id!==``&&!r.has(n.id)&&r.set(n.id,n);return r}var LabelContext=class{container;containerIds;sameTree;labelMap;constructor(e,t=!1){this.container=e,this.containerIds=null,this.sameTree=t,this.labelMap=null}labelsOf(e){return this.sameTree?(this.labelMap??=(0,n.labelMapForTree)(this.container)).get(e)??a:(0,n.labelsOf)(e)??a}byIdInContainer(e){let t=this.containerIds;return t===null&&(t=this.containerIds=buildIdMap(this.container,!1)),t.get(e)??null}};const a=[];function getTextContent(e){if(e.type===t.ELEMENT_NODE&&isLabelledNodeName(e))return``;if(e.type===t.TEXT_NODE)return e.data;let n=``;for(let t=e.first;t!==null;t=t.next)n+=getTextContent(t);return n}function getLabelContentImpl(e){if(e.tag===t.T.label&&e.ns===t.HTML_NS)return getTextContent(e);let n=e.node;return n.value||n.textContent}const o=/* @__PURE__ */ new Set([`button`,`input`,`meter`,`output`,`progress`,`select`,`textarea`]);function labelledFormControl(n,r){for(let i=n.first;i!==null;i=(0,t.nextInTree)(i,n))if(i.type===t.ELEMENT_NODE&&o.has(i.name)&&(r===`*`||e.T(i,r)))return i}function getLabelsImpl(e,n,r=`*`){let i=(0,t.ariaAttr)(n,`aria-labelledby`),a=i?i.split(` `):[];return a.length?a.map(t=>{let n=e.byIdInContainer(t);return n?{content:getLabelContentImpl(n),formControl:null}:{content:``,formControl:null}}):e.labelsOf(n).map(e=>({content:getLabelContentImpl(e),formControl:labelledFormControl(e,r)}))}function assertNotNullOrUndefined(e){if(e==null)throw Error(`It looks like ${e} was passed instead of a matcher. Did you do something like getByText(${e})?`)}function fuzzyMatches(e,t,n,r){if(typeof e!=`string`)return!1;assertNotNullOrUndefined(n);let i=r(e);return typeof n==`string`||typeof n==`number`?i.toLowerCase().includes(n.toString().toLowerCase()):typeof n==`function`?n(i,t):matchRegExp(n,i)}function matches(e,t,n,r){if(typeof e!=`string`)return!1;assertNotNullOrUndefined(n);let i=r(e);return n instanceof Function?n(i,t):n instanceof RegExp?matchRegExp(n,i):i===String(n)}function isRegExpWhitespace(e){return e<=32?e===32||e>=9&&e<=13:e<160?!1:e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}function changedByNormalizing(e,t,n){let r=e.length-1,i=!1;for(let a=0;a<=r;a++){let o=e.charCodeAt(a),s=isRegExpWhitespace(o);if(s&&(t&&(a===0||a===r)||n&&(i||o!==32)))return!0;i=s}return!1}const s=/\s+/g;function getDefaultNormalizer({trim:e=!0,collapseWhitespace:t=!0}={}){return n=>{if(!changedByNormalizing(n,e,t))return n;let r=n;return r=e?r.trim():r,r=t?r.replace(s,` `):r,r}}const c=getDefaultNormalizer();function textMatcher(e,t,n){if(!e)return(e,r)=>fuzzyMatches(e,r,t,n);if(n===c&&isPlainRegExp(t)){let e;return n=>typeof n==`string`?n.length===0?e??=t.test(``):t.test(c(n)):!1}if(n!==c||typeof t!=`string`&&typeof t!=`number`)return(e,r)=>matches(e,r,t,n);let r=String(t);if(changedByNormalizing(r,!0,!0))return()=>!1;let i=r.length,a=r.charCodeAt(0),o=r.charCodeAt(i-1);return e=>{if(typeof e!=`string`||e.length<i)return!1;if(i!==0){let t=e.charCodeAt(0);if(t!==a&&!isRegExpWhitespace(t))return!1;let n=e.charCodeAt(e.length-1);if(n!==o&&!isRegExpWhitespace(n))return!1}return c(e)===r}}function makeNormalizer({trim:e,collapseWhitespace:t,normalizer:n}){if(!n)return e===void 0&&t===void 0?c:getDefaultNormalizer({trim:e,collapseWhitespace:t});if(e!==void 0||t!==void 0)throw Error(`trim and collapseWhitespace are not supported with a normalizer. If you want to use the default trim and collapseWhitespace logic in your normalizer, use "getDefaultNormalizer({trim, collapseWhitespace})" and compose that into your normalizer`);return n}const l=RegExp.prototype.exec;function isPlainRegExp(e){return e instanceof RegExp&&!e.global&&!e.sticky&&Object.getPrototypeOf(e)===RegExp.prototype&&!Object.hasOwn(e,`exec`)&&!Object.hasOwn(e,`test`)&&RegExp.prototype.exec===l&&RegExp.prototype.test===u}const u=RegExp.prototype.test;function matchRegExp(e,t){let n=e.test(t);return e.global&&e.lastIndex!==0&&(console.warn(`To match all elements we had to reset the lastIndex of the RegExp because the global flag is enabled. We encourage to remove the global flag from the RegExp.`),e.lastIndex=0),n}function isButtonLikeInput(e){if(e.tag!==t.T.input||e.ns!==t.HTML_NS)return!1;let n=(0,t.attr)(e,`type`);if(n===null)return!1;let r=(0,t.asciiLowercase)(n);return r===`submit`||r===`button`||r===`reset`}function getNodeTextImpl(e){if(isButtonLikeInput(e))return e.node.value;let n=``;for(let r=e.first;r!==null;r=r.next)r.type===t.TEXT_NODE&&(n+=r.data);return n}function getNodeText(n){let r=e.A(n);return r.type===t.ELEMENT_NODE?getNodeTextImpl(r):n.matches(`input[type=submit], input[type=button], input[type=reset]`)}const d={computedStyleSupportsPseudoElements:!0};function styleOverride(e){return(0,t.getComputedStyleOverride)(e)}function nameOptions(e,t){return t===null?e?d:void 0:{computedStyleSupportsPseudoElements:e,getComputedStyle:t}}const f={implicitRole(e){let t=(0,n.implicitRole)(e);return t===``?null:t},
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./_chunks/aria-snapshot-diff-B95LLutl.cjs");let t=require("@ctrl/dom/internal"),n=require("@ctrl/dom/aria/internal"),r=require("@ctrl/dom/aria"),i=require("node:async_hooks");function isLabelledNodeName(e){if(e.prefix!==null)return!1;switch((0,t.asciiLowercase)(e.name)){case`button`:case`meter`:case`output`:case`progress`:case`select`:case`textarea`:case`input`:return!0}return!1}function buildIdMap(e,n){let r=/* @__PURE__ */ new Map;n&&e.type===t.ELEMENT_NODE&&e.id!==``&&r.set(e.id,e);for(let n=e.first;n!==null;n=(0,t.nextInTree)(n,e))n.type===t.ELEMENT_NODE&&n.id!==``&&!r.has(n.id)&&r.set(n.id,n);return r}var LabelContext=class{container;containerIds;sameTree;labelMap;constructor(e,t=!1){this.container=e,this.containerIds=null,this.sameTree=t,this.labelMap=null}labelsOf(e){return this.sameTree?(this.labelMap??=(0,n.labelMapForTree)(this.container)).get(e)??a:(0,n.labelsOf)(e)??a}byIdInContainer(e){let t=this.containerIds;return t===null&&(t=this.containerIds=buildIdMap(this.container,!1)),t.get(e)??null}};const a=[];function getTextContent(e){if(e.type===t.ELEMENT_NODE&&isLabelledNodeName(e))return``;if(e.type===t.TEXT_NODE)return e.data;let n=``;for(let t=e.first;t!==null;t=t.next)n+=getTextContent(t);return n}function getLabelContentImpl(e){if(e.tag===t.T.label&&e.ns===t.HTML_NS)return getTextContent(e);let n=e.node;return n.value||n.textContent}const o=/* @__PURE__ */ new Set([`button`,`input`,`meter`,`output`,`progress`,`select`,`textarea`]);function labelledFormControl(n,r){for(let i=n.first;i!==null;i=(0,t.nextInTree)(i,n))if(i.type===t.ELEMENT_NODE&&o.has(i.name)&&(r===`*`||e.T(i,r)))return i}function getLabelsImpl(e,n,r=`*`){let i=(0,t.ariaAttr)(n,`aria-labelledby`),a=i?i.split(` `):[];return a.length?a.map(t=>{let n=e.byIdInContainer(t);return n?{content:getLabelContentImpl(n),formControl:null}:{content:``,formControl:null}}):e.labelsOf(n).map(e=>({content:getLabelContentImpl(e),formControl:labelledFormControl(e,r)}))}function assertNotNullOrUndefined(e){if(e==null)throw Error(`It looks like ${e} was passed instead of a matcher. Did you do something like getByText(${e})?`)}function fuzzyMatches(e,t,n,r){if(typeof e!=`string`)return!1;assertNotNullOrUndefined(n);let i=r(e);return typeof n==`string`||typeof n==`number`?i.toLowerCase().includes(n.toString().toLowerCase()):typeof n==`function`?n(i,t):matchRegExp(n,i)}function matches(e,t,n,r){if(typeof e!=`string`)return!1;assertNotNullOrUndefined(n);let i=r(e);return n instanceof Function?n(i,t):n instanceof RegExp?matchRegExp(n,i):i===String(n)}function isRegExpWhitespace(e){return e<=32?e===32||e>=9&&e<=13:e<160?!1:e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}function changedByNormalizing(e,t,n){let r=e.length-1,i=!1;for(let a=0;a<=r;a++){let o=e.charCodeAt(a),s=isRegExpWhitespace(o);if(s&&(t&&(a===0||a===r)||n&&(i||o!==32)))return!0;i=s}return!1}const s=/\s+/g;function getDefaultNormalizer({trim:e=!0,collapseWhitespace:t=!0}={}){return n=>{if(!changedByNormalizing(n,e,t))return n;let r=n;return r=e?r.trim():r,r=t?r.replace(s,` `):r,r}}const c=getDefaultNormalizer();function textMatcher(e,t,n){if(!e)return(e,r)=>fuzzyMatches(e,r,t,n);if(n===c&&isPlainRegExp(t)){let e;return n=>typeof n==`string`?n.length===0?e??=t.test(``):t.test(c(n)):!1}if(n!==c||typeof t!=`string`&&typeof t!=`number`)return(e,r)=>matches(e,r,t,n);let r=String(t);if(changedByNormalizing(r,!0,!0))return()=>!1;let i=r.length,a=r.charCodeAt(0),o=r.charCodeAt(i-1);return e=>{if(typeof e!=`string`||e.length<i)return!1;if(i!==0){let t=e.charCodeAt(0);if(t!==a&&!isRegExpWhitespace(t))return!1;let n=e.charCodeAt(e.length-1);if(n!==o&&!isRegExpWhitespace(n))return!1}return c(e)===r}}function makeNormalizer({trim:e,collapseWhitespace:t,normalizer:n}){if(!n)return e===void 0&&t===void 0?c:getDefaultNormalizer({trim:e,collapseWhitespace:t});if(e!==void 0||t!==void 0)throw Error(`trim and collapseWhitespace are not supported with a normalizer. If you want to use the default trim and collapseWhitespace logic in your normalizer, use "getDefaultNormalizer({trim, collapseWhitespace})" and compose that into your normalizer`);return n}const l=RegExp.prototype.exec;function isPlainRegExp(e){return e instanceof RegExp&&!e.global&&!e.sticky&&Object.getPrototypeOf(e)===RegExp.prototype&&!Object.hasOwn(e,`exec`)&&!Object.hasOwn(e,`test`)&&RegExp.prototype.exec===l&&RegExp.prototype.test===u}const u=RegExp.prototype.test;function matchRegExp(e,t){let n=e.test(t);return e.global&&e.lastIndex!==0&&(console.warn(`To match all elements we had to reset the lastIndex of the RegExp because the global flag is enabled. We encourage to remove the global flag from the RegExp.`),e.lastIndex=0),n}function isButtonLikeInput(e){if(e.tag!==t.T.input||e.ns!==t.HTML_NS)return!1;let n=(0,t.attr)(e,`type`);if(n===null)return!1;let r=(0,t.asciiLowercase)(n);return r===`submit`||r===`button`||r===`reset`}function getNodeTextImpl(e){if(isButtonLikeInput(e))return e.node.value;let n=``;for(let r=e.first;r!==null;r=r.next)r.type===t.TEXT_NODE&&(n+=r.data);return n}function getNodeText(n){let r=e.A(n);return r.type===t.ELEMENT_NODE?getNodeTextImpl(r):n.matches(`input[type=submit], input[type=button], input[type=reset]`)}const d={computedStyleSupportsPseudoElements:!0};function styleOverride(e){return(0,t.getComputedStyleOverride)(e)}function nameOptions(e,t){return t===null?e?d:void 0:{computedStyleSupportsPseudoElements:e,getComputedStyle:t}}const f={implicitRole(e){let t=(0,n.implicitRole)(e);return t===``?null:t},roleMatcher:n.tlRoleMatcher,roleSupportsProp(e,t){return typeof e==`string`&&(0,r.roleSupportsProp)(e,t)},computeAccessibleName(e,t,r){return(0,n.computeAccessibleNameImpl)(e,nameOptions(t,r),5)},computeAccessibleDescription(e,t,r){return(0,n.computeAccessibleDescriptionImpl)(e,nameOptions(t,r),5)},isInaccessible:n.isInaccessibleImpl,isInaccessibleWithStyle:n.isInaccessibleWithStyle,isSubtreeInaccessible:n.isSubtreeInaccessibleImpl};function parentElement(e){let n=e.parent;return n!==null&&n.type===t.ELEMENT_NODE?n:null}function isInaccessibleImpl$1(e){return f.isInaccessible(e)}e.M(isInaccessibleImpl$1,`isInaccessibleImpl`);function isInaccessibleChecked(e){let t=styleOverride(e);return t===null?f.isInaccessible(e):f.isInaccessibleWithStyle(e,t,null)}function isInaccessible(t,r={}){let i=e.A(t),a=r.isSubtreeInaccessible,o=styleOverride(i);if(a===void 0)return o===null?isInaccessibleImpl$1(i):f.isInaccessibleWithStyle(i,o,null);if(o===null?(0,n.isVisibilityHidden)(i):o(t).visibility===`hidden`)return!0;for(let e=i;e!==null;e=parentElement(e))if(a(e.node))return!0;return!1}function getImplicitAriaRolesImpl(e){let t=f.implicitRole(e);return t===null?[]:[t]}function getRoles(n,{hidden:r=!1}={}){let i=e.A(n),a={},o=r===!1?styleOverride(i):null,s=o===null?null:/* @__PURE__ */ new Map,visit=e=>{if(r!==!1||(o===null?isInaccessibleImpl$1(e):f.isInaccessibleWithStyle(e,o,s))===!1){let n=(0,t.attr)(e,`role`),r=n===null?getImplicitAriaRolesImpl(e):n.split(` `).slice(0,1);for(let t of r){let n=a[t];Array.isArray(n)?n.push(e.node):a[t]=[e.node]}}for(let n=e.first;n!==null;n=n.next)n.type===t.ELEMENT_NODE&&visit(n)};return visit(i),a}const p={format:`pretty`};function prettyRoles(t,{hidden:n,includeDescription:r}){let i=getRoles(t,{hidden:n}),a=e.i().computedStyleSupportsPseudoElements,o=styleOverride(e.A(t));return Object.entries(i).filter(([e])=>e!==`generic`).map(([t,n])=>{let i=`-`.repeat(50);return`${t}:\n\n${n.map(t=>{let n=e.A(t),i=`Name "${f.computeAccessibleName(n,a,o)}":\n`,s=e.s(t.cloneNode(!1),void 0,p);return r?`${i}${`Description "${f.computeAccessibleDescription(n,a,o)}":\n`}${s}`:`${i}${s}`}).join(`
|
|
2
2
|
|
|
3
3
|
`)}\n\n${i}`}).join(`
|
|
4
4
|
`)}const logRoles=(e,{hidden:t=!1}={})=>console.log(prettyRoles(e,{hidden:t}));function checkBooleanAttribute(e,n){let r=(0,t.attr)(e,n);if(r===`true`)return!0;if(r===`false`)return!1}function computeAriaSelected(e){return e.tag===t.T.option&&e.ns===t.HTML_NS?e.node.selected:checkBooleanAttribute(e,`aria-selected`)}function computeAriaBusy(e){return(0,t.ariaAttr)(e,`aria-busy`)===`true`}function computeAriaChecked(e){let t=e.node;if(!(`indeterminate`in t&&t.indeterminate))return`checked`in t?t.checked:checkBooleanAttribute(e,`aria-checked`)}function computeAriaPressed(e){return checkBooleanAttribute(e,`aria-pressed`)}function computeAriaCurrent(e){return checkBooleanAttribute(e,`aria-current`)??(0,t.ariaAttr)(e,`aria-current`)??!1}function computeAriaExpanded(e){return checkBooleanAttribute(e,`aria-expanded`)}function computeHeadingLevelImpl(e){let n=(0,t.ariaAttr)(e,`aria-level`),r=n&&Number(n);if(r)return r;if(e.ns===t.HTML_NS)switch(e.tag){case t.T.h1:return 1;case t.T.h2:return 2;case t.T.h3:return 3;case t.T.h4:return 4;case t.T.h5:return 5;case t.T.h6:return 6}}function computeAriaValueNow(e){let n=(0,t.ariaAttr)(e,`aria-valuenow`);return n===null?void 0:+n}function computeAriaValueMax(e){let n=(0,t.ariaAttr)(e,`aria-valuemax`);return n===null?void 0:+n}function computeAriaValueMin(e){let n=(0,t.ariaAttr)(e,`aria-valuemin`);return n===null?void 0:+n}function computeAriaValueText(e){let n=(0,t.ariaAttr)(e,`aria-valuetext`);return n===null?void 0:n}const m=getDefaultNormalizer();function escapeRegExp(e){return e.replace(/[.*+\-?^${}()|[\]\\]/g,`\\$&`)}function getRegExpMatcher(e){return new RegExp(escapeRegExp(e.toLowerCase()),`i`)}function makeSuggestion(t,n,r,{variant:i,name:a}){let o=``,s={},c=[[`Role`,`TestId`].includes(t)?r:getRegExpMatcher(r)];a&&(s.name=getRegExpMatcher(a)),t===`Role`&&isInaccessibleChecked(e.A(n))&&(s.hidden=!0,o=`Element is inaccessible. This means that the element and all its children are invisible to screen readers.
|
|
@@ -15,7 +15,7 @@ ${t.toString()}
|
|
|
15
15
|
`,n)}function makeGetAllQuery(t,n){return(r,...i)=>{let a=t(r,...i);if(!a.length)throw e.i().getElementError(n(r,...i),r);return a}}function makeFindQuery(e,n=`find`){return(r,i,a,o)=>{let find=t=>waitForInSpan(()=>e(r,i,a),{container:r,...o},t);return(0,t.tracing)()?(0,t.tracePromise)(h,(0,t.describeCall)(n,[i,a]),async e=>{let t=await find(e);return e.data.matches=matchCount(t),t}):find(null)}}const h=`testing-library.query`,matchCount=e=>Array.isArray(e)?e.length:+!!e;function traceQuery(e,n){return(r,...i)=>(0,t.tracing)()?(0,t.traceSync)(h,(0,t.describeCall)(e,i),e=>{let t=n(r,...i);return e.data.matches=matchCount(t),t}):n(r,...i)}const wrapSingleQueryWithSuggestion=(t,n,r)=>(i,...a)=>{let o=t(i,...a),[{suggest:s=e.i().throwSuggestions}={}]=a.slice(-1);if(o&&s){let e=getSuggestedQuery(o,r);if(e&&!n.endsWith(e.queryName))throw getSuggestionError(e.toString(),i)}return o},wrapAllByQueryWithSuggestion=(t,n,r)=>(i,...a)=>{let o=t(i,...a),[{suggest:s=e.i().throwSuggestions}={}]=a.slice(-1);if(o.length&&s){let e=[...new Set(o.map(e=>getSuggestedQuery(e,r)?.toString()))];if(e.length===1&&!n.endsWith(getSuggestedQuery(o[0],r).queryName))throw getSuggestionError(e[0],i)}return o};function buildQueries(e,t,n){let r=wrapSingleQueryWithSuggestion(makeSingleQuery(e,t),e.name,`query`),i=makeGetAllQuery(e,n),a=makeSingleQuery(i,t),o=wrapSingleQueryWithSuggestion(a,e.name,`get`),s=wrapAllByQueryWithSuggestion(i,e.name.replace(`query`,`get`),`getAll`),c=e.name.startsWith(`queryAll`)?e.name.slice(8):``,l=makeFindQuery(wrapAllByQueryWithSuggestion(i,e.name,`findAll`),`findAll${c}`),u=makeFindQuery(wrapSingleQueryWithSuggestion(a,e.name,`find`),`find${c}`);return[traceQuery(`query${c}`,r),traceQuery(`getAll${c}`,s),traceQuery(`get${c}`,o),l,u]}const g=/* @__PURE__ */ new Set([``,`generic`,`none`,`presentation`]),_=/* @__PURE__ */ e.M(e=>e,`identity`);function normalize(e){return e.replace(/\s+/g,` `).trim()}function similarity(e,t){let n=normalize(e).toLowerCase(),r=normalize(t).toLowerCase();if(n===``||r===``)return-1;if(n===r)return 0;if(n.includes(r)||r.includes(n))return 1;let i=r.split(` `);for(let e=0;e<i.length;e++)if(i[e].length>2&&n.includes(i[e]))return 2;return-1}function closeness(e,t,n,r,i=!0){if((i?matches:fuzzyMatches)(e,t,n,r))return 0;if(typeof n==`string`||typeof n==`number`){let t=similarity(r(e),String(n));return t===-1?-1:t+1}return-1}function line(t,n,r,i,a){let o={role:n,name:r,props:e.v(t,n,!1,i),value:null,url:null,children:[],element:t};return`- ${e._(o,80)} # ${a}`}function format(e,t){if(t.length===0)return``;t.sort((e,t)=>e.rank-t.rank);let n=t.slice(0,10).map(e=>e.line);return t.length>10&&n.push(`# … ${t.length-10} more`),`${e}:\n${n.join(`
|
|
16
16
|
`)}`}function nameOf(e){return normalize((0,n.computeAccessibleNameImpl)(e,void 0,5))}function roleCandidates(r,i){let a=e.A(r),o=[],s=i.name;for(let r=a.first;r!==null;r=(0,t.nextInTree)(r,a)){if(r.type!==t.ELEMENT_NODE)continue;let a=(0,n.isInaccessibleImpl)(r),c=(0,n.tlRole)(r);if((0,n.tlRoleMatches)(r,i.role,i.queryFallbacks)){let t=nameOf(r),n=s===void 0?0:closeness(t,r.node,s,_),l=i.matchesState(r);n===0&&l?a&&!i.hidden&&o.push({line:line(r,c,t,!0,`hidden: ${e.h(r)} (or pass { hidden: true })`),rank:0}):n===0?o.push({line:line(r,c,t,a&&!i.hidden,`role and name match, state is not ${i.stateHint}`),rank:1}):(!a||i.hidden)&&o.push({line:line(r,c,t,!1,n>0?`similar name`:`same role, other name`),rank:n>0?2+n:10});continue}if(s===void 0)continue;if(!g.has(c)){let e=nameOf(r);if(e===``)continue;let t=closeness(e,r.node,s,_);t>=0&&o.push({line:line(r,c,e,a&&!i.hidden,`same name, role "${c}"`),rank:2+t});continue}let l=normalize(getNodeTextImpl(r));l!==``&&closeness(l,r.node,s,_)===0&&o.push({line:`- text: ${e.y(e.x(l,80))} # in ${e.p(r)}, which has no role: give it role="${i.role}" or use getByText`,rank:2})}return format(`Closest matches`,o)}function roleOrTag(t){let r=(0,n.tlRole)(t);return g.has(r)?e.p(t):r}function textCandidates(n,r,i,a,o,s){if(typeof r==`function`)return``;let c=e.A(n),l=[],u=[];for(let n=c.first;n!==null;n=(0,t.nextInTree)(n,c)){if(n.type!==t.ELEMENT_NODE||o&&typeof o==`string`&&e.T(n,o))continue;let c=getNodeTextImpl(n),d=c.trim()===``?-1:closeness(c,n.node,r,i,s);d===0?l.push({line:`- ${roleOrTag(n)}: ${e.y(e.x(i(c),80))} # matches, but not selector "${a}"`,rank:0}):d>0&&l.push({line:`- ${roleOrTag(n)}: ${e.y(e.x(i(c),80))} # similar text in ${e.p(n)}`,rank:1+d}),d!==0&&n.first!==null&&n.first!==n.last&&(s?matches:fuzzyMatches)(n.node.textContent,n.node,r,i)&&u.push(n)}for(let t=0;t<u.length;t++){let n=u[t],r=!1;for(let e=t+1;e<u.length&&!r;e++)isAncestor(n,u[e])&&(r=!0);r||l.push({line:`- ${roleOrTag(n)}: ${e.y(e.x(i(n.node.textContent),80))} # text split across child elements of ${e.p(n)}: use a function matcher or getByRole`,rank:0})}return format(`Closest matches`,l)}function isAncestor(e,t){for(let n=t.parent;n!==null;n=n.parent)if(n===e)return!0;return!1}const v=/* @__PURE__ */ new Set([`textbox`,`searchbox`,`combobox`,`listbox`,`checkbox`,`radio`,`switch`,`slider`,`spinbutton`]);function labelCandidates(r,i,a,o){if(typeof i==`function`)return``;let s=e.A(r),c=[];for(let r=s.first;r!==null;r=(0,t.nextInTree)(r,s)){if(r.type!==t.ELEMENT_NODE)continue;let s=(0,n.tlRole)(r);if(!v.has(s))continue;let l=nameOf(r),u=(0,n.isInaccessibleImpl)(r);if(l===``){let n=(0,t.attr)(r,`placeholder`),o=n?`no label, placeholder ${e.y(n)}: use getByPlaceholderText or add a <label>`:`no label: add a <label>, aria-label or aria-labelledby`;c.push({line:line(r,s,``,u,o),rank:n&&closeness(n,r.node,i,a)>=0?1:5});continue}let d=closeness(l,r.node,i,a,o);c.push({line:line(r,s,l,u,d>=0?`similar label`:`labelled control`),rank:d>=0?2+d:10})}return format(`Labelled form controls`,c)}function queryAllLabels(n){let r=e.A(n),i=[];for(let e=r.first;e!==null;e=(0,t.nextInTree)(e,r)){if(e.type!==t.ELEMENT_NODE||e.name!==`label`&&e.name!==`input`)continue;let n=getLabelContentImpl(e);n!==null&&i.push({node:e.node,textToMatch:n})}return i}function queryAllLabelsByText(e,t,{exact:n=!0,trim:r,collapseWhitespace:i,normalizer:a}={}){let o=textMatcher(n,t,makeNormalizer({collapseWhitespace:i,trim:r,normalizer:a}));return queryAllLabels(e).filter(({node:e,textToMatch:t})=>o(t,e)).map(({node:e})=>e)}function queryAllByLabelText(r,i,{selector:a=`*`,exact:o=!0,collapseWhitespace:s,trim:c,normalizer:l}={}){e.D(r);let u=textMatcher(o,i,makeNormalizer({collapseWhitespace:s,trim:c,normalizer:l})),d=e.A(r),f=new LabelContext(d,!0),p=[],m=[];for(let e=d.first;e!==null;e=(0,t.nextInTree)(e,d))e.type===t.ELEMENT_NODE&&((0,t.ariaAttr)(e,`aria-label`)!==null&&m.push(e),((0,t.ariaAttr)(e,`aria-labelledby`)!==null||(0,n.isLabelable)(e)&&f.labelsOf(e).length!==0)&&collectLabelled(f,e,a,u,p));for(let e=0;e<m.length;e++){let n=m[e];u((0,t.ariaAttr)(n,`aria-label`),n.node)&&p.push(n.node)}let h=Array.from(new Set(p));return a===`*`?h:h.filter(n=>e.T(n[t.$impl],a))}function collectLabelled(e,t,n,r,i){let a=getLabelsImpl(e,t,n);if(a.length===1){let e=a[0];e.formControl&&r(e.content,e.formControl.node)&&i.push(e.formControl.node),r(`${e.content||``}`,t.node)&&i.push(t.node);return}for(let e of a){if(!e.formControl)continue;let t=e.formControl.node;r(e.content,t)&&i.push(t)}let o=a.filter(e=>!!e.content).map(e=>e.content),s=t.node;r(o.join(` `),s)&&i.push(s),o.length>1&&o.forEach((e,t)=>{r(e,s)&&i.push(s);let n=[...o];n.splice(t,1),n.length>1&&r(n.join(` `),s)&&i.push(s)})}function getAllByLabelText(t,n,...r){let i=queryAllByLabelText(t,n,...r);if(!i.length){let i=queryAllLabelsByText(t,n,...r);if(i.length){let r=i.map(e=>getTagNameOfElementAssociatedWithLabelViaFor(t,e)).filter(e=>!!e);throw r.length?e.i().getElementError(r.map(e=>`Found a label with the text of: ${n}, however the element associated with this label (<${e} />) is non-labellable [https://html.spec.whatwg.org/multipage/forms.html#category-label]. If you really need to label a <${e} />, you can use aria-label or aria-labelledby instead.`).join(`
|
|
17
17
|
|
|
18
|
-
`),t):e.i().getElementError(`Found a label with the text of: ${n}, however no form control was found associated to that label. Make sure you're using the "for" attribute or "aria-labelledby" attribute correctly.`,t)}throw e.i().getElementError(withLabelCandidates(`Unable to find a label with the text of: ${n}`,t,n,r[0]),t)}return i}function withLabelCandidates(t,n,r,i={}){if(e.w()===null)return t;let{exact:a=!0,trim:o,collapseWhitespace:s,normalizer:c}=i,l=labelCandidates(n,r,makeNormalizer({trim:o,collapseWhitespace:s,normalizer:c}),a);return l===``?t:`${t}\n\n${l}`}function getTagNameOfElementAssociatedWithLabelViaFor(t,n){let r=n.getAttribute(`for`);if(!r)return null;let i=new LabelContext(e.A(t)).byIdInContainer(r);return i?i.node.tagName.toLowerCase():null}const y=/* @__PURE__ */ e.M((e,t)=>`Found multiple elements with the text of: ${t}`,`getMultipleError`),b=wrapSingleQueryWithSuggestion(makeSingleQuery(queryAllByLabelText,y),queryAllByLabelText.name,`query`),x=makeSingleQuery(getAllByLabelText,y),S=makeFindQuery(wrapAllByQueryWithSuggestion(getAllByLabelText,getAllByLabelText.name,`findAll`)),C=makeFindQuery(wrapSingleQueryWithSuggestion(x,getAllByLabelText.name,`find`)),w=wrapAllByQueryWithSuggestion(getAllByLabelText,getAllByLabelText.name,`getAll`),T=wrapSingleQueryWithSuggestion(x,getAllByLabelText.name,`get`),
|
|
18
|
+
`),t):e.i().getElementError(`Found a label with the text of: ${n}, however no form control was found associated to that label. Make sure you're using the "for" attribute or "aria-labelledby" attribute correctly.`,t)}throw e.i().getElementError(withLabelCandidates(`Unable to find a label with the text of: ${n}`,t,n,r[0]),t)}return i}function withLabelCandidates(t,n,r,i={}){if(e.w()===null)return t;let{exact:a=!0,trim:o,collapseWhitespace:s,normalizer:c}=i,l=labelCandidates(n,r,makeNormalizer({trim:o,collapseWhitespace:s,normalizer:c}),a);return l===``?t:`${t}\n\n${l}`}function getTagNameOfElementAssociatedWithLabelViaFor(t,n){let r=n.getAttribute(`for`);if(!r)return null;let i=new LabelContext(e.A(t)).byIdInContainer(r);return i?i.node.tagName.toLowerCase():null}const y=/* @__PURE__ */ e.M((e,t)=>`Found multiple elements with the text of: ${t}`,`getMultipleError`),b=wrapSingleQueryWithSuggestion(makeSingleQuery(queryAllByLabelText,y),queryAllByLabelText.name,`query`),x=makeSingleQuery(getAllByLabelText,y),S=makeFindQuery(wrapAllByQueryWithSuggestion(getAllByLabelText,getAllByLabelText.name,`findAll`)),C=makeFindQuery(wrapSingleQueryWithSuggestion(x,getAllByLabelText.name,`find`)),w=wrapAllByQueryWithSuggestion(getAllByLabelText,getAllByLabelText.name,`getAll`),T=wrapSingleQueryWithSuggestion(x,getAllByLabelText.name,`get`),E=wrapAllByQueryWithSuggestion(queryAllByLabelText,queryAllByLabelText.name,`queryAll`);function queryAllByPlaceholderText(...t){return e.D(t[0]),queryAllByAttribute(`placeholder`,...t)}const ee=/* @__PURE__ */ e.M((e,t)=>`Found multiple elements with the placeholder text of: ${t}`,`getMultipleError`),te=/* @__PURE__ */ e.M((e,t)=>`Unable to find an element with the placeholder text of: ${t}`,`getMissingError`),ne=wrapAllByQueryWithSuggestion(queryAllByPlaceholderText,queryAllByPlaceholderText.name,`queryAll`),[re,D,O,k,A]=buildQueries(queryAllByPlaceholderText,ee,te);function isScriptStyleIgnore(e){return e===`script, style`||e===`script,style`}function isScriptOrStyle(e){let t=e.name;return t===`script`||t===`style`}function queryAllByText(n,r,{selector:i=`*`,exact:a=!0,collapseWhitespace:o,trim:s,ignore:c=e.i().defaultIgnore,normalizer:l}={}){e.D(n);let u=textMatcher(a,r,makeNormalizer({collapseWhitespace:o,trim:s,normalizer:l})),d=e.A(n),f=i===`*`,p=isScriptStyleIgnore(c),m=[],visit=t=>{(f||e.T(t,i))&&(c&&(p?isScriptOrStyle(t):e.T(t,c))||u(getNodeTextImpl(t),t.node)&&m.push(t.node))};d.type===t.ELEMENT_NODE&&visit(d);for(let e=d.first;e!==null;e=(0,t.nextInTree)(e,d))e.type===t.ELEMENT_NODE&&visit(e);return m}const ie=/* @__PURE__ */ e.M((e,t)=>`Found multiple elements with the text: ${t}`,`getMultipleError`),ae=/* @__PURE__ */ e.M((t,n,r={})=>{let{collapseWhitespace:i,trim:a,normalizer:o,selector:s}=r,c=makeNormalizer({collapseWhitespace:i,trim:a,normalizer:o}),l=c(n.toString()),u=l!==n.toString(),d=(s??`*`)!==`*`,f=`Unable to find an element with the text: ${u?`${l} (normalized from '${n}')`:n}${d?`, which matches selector '${s}'`:``}. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.`;if(e.w()===null)return f;let{exact:p=!0,ignore:m=e.i().defaultIgnore}=r,h=textCandidates(t,n,c,s??`*`,m,p);return h===``?f:`${f}\n\n${h}`},`getMissingError`),j=wrapAllByQueryWithSuggestion(queryAllByText,queryAllByText.name,`queryAll`),[M,N,P,F,I]=buildQueries(queryAllByText,ie,ae);function queryAllByDisplayValue(n,r,{exact:i=!0,collapseWhitespace:a,trim:o,normalizer:s}={}){e.D(n);let c=textMatcher(i,r,makeNormalizer({collapseWhitespace:a,trim:o,normalizer:s})),l=e.A(n),u=[];for(let e=l.first;e!==null;e=(0,t.nextInTree)(e,l)){if(e.type!==t.ELEMENT_NODE)continue;let n=e.name;if(n!==`input`&&n!==`textarea`&&n!==`select`)continue;let r=e.node;if(e.tag===t.T.select&&e.ns===t.HTML_NS){let e=r.options,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(i.selected&&c(getNodeTextImpl(i[t.$impl]),i)){n=!0;break}}n&&u.push(r)}else c(r.value,r)&&u.push(r)}return u}const oe=/* @__PURE__ */ e.M((e,t)=>`Found multiple elements with the display value: ${t}.`,`getMultipleError`),se=/* @__PURE__ */ e.M((e,t)=>`Unable to find an element with the display value: ${t}.`,`getMissingError`),L=wrapAllByQueryWithSuggestion(queryAllByDisplayValue,queryAllByDisplayValue.name,`queryAll`),[R,z,B,V,H]=buildQueries(queryAllByDisplayValue,oe,se),ce=/^(img|input|area|.+-.+)$/i;function queryAllByAltText(t,n,r={}){return e.D(t),queryAllByAttribute(`alt`,t,n,r).filter(e=>ce.test(e.tagName))}const le=/* @__PURE__ */ e.M((e,t)=>`Found multiple elements with the alt text: ${t}`,`getMultipleError`),ue=/* @__PURE__ */ e.M((e,t)=>`Unable to find an element with the alt text: ${t}`,`getMissingError`),U=wrapAllByQueryWithSuggestion(queryAllByAltText,queryAllByAltText.name,`queryAll`),[W,G,K,q,de]=buildQueries(queryAllByAltText,le,ue);function isSvgTitle(e){let n=e.parent;return(0,t.asciiLowercase)(e.prefix===null?e.name:e.prefix+`:`+e.name)===`title`&&n!==null&&n.type===t.ELEMENT_NODE&&(0,t.asciiLowercase)(n.prefix===null?n.name:n.prefix+`:`+n.name)===`svg`}function queryAllByTitle(n,r,{exact:i=!0,collapseWhitespace:a,trim:o,normalizer:s}={}){e.D(n);let c=textMatcher(i,r,makeNormalizer({collapseWhitespace:a,trim:o,normalizer:s})),l=e.A(n),u=[];for(let e=l.first;e!==null;e=(0,t.nextInTree)(e,l)){if(e.type!==t.ELEMENT_NODE)continue;let n=e.attrs===null?null:(0,t.attr)(e,`title`),r=e.name===`title`&&e.parent!==null&&e.parent.type===t.ELEMENT_NODE&&e.parent.name===`svg`;(n!==null||r)&&(c(n,e.node)||isSvgTitle(e)&&c(getNodeTextImpl(e),e.node))&&u.push(e.node)}return u}const fe=/* @__PURE__ */ e.M((e,t)=>`Found multiple elements with the title: ${t}.`,`getMultipleError`),pe=/* @__PURE__ */ e.M((e,t)=>`Unable to find an element with the title: ${t}.`,`getMissingError`),J=wrapAllByQueryWithSuggestion(queryAllByTitle,queryAllByTitle.name,`queryAll`),[Y,me,he,ge,_e]=buildQueries(queryAllByTitle,fe,pe),identity=e=>e;function assertSupported(e,t){if(!f.roleSupportsProp(e,t))throw Error(`"${t}" is not supported on role "${e}".`)}function queryAllByRole(n,r,{hidden:i=e.i().defaultHidden,name:a,description:o,queryFallbacks:s=!1,selected:c,busy:l,checked:u,pressed:d,current:p,level:m,expanded:h,value:{now:g,min:_,max:v,text:y}={}}={}){if(e.D(n),c!==void 0&&assertSupported(r,`aria-selected`),l!==void 0&&assertSupported(r,`aria-busy`),u!==void 0&&assertSupported(r,`aria-checked`),d!==void 0&&assertSupported(r,`aria-pressed`),p!==void 0&&assertSupported(r,`aria-current`),m!==void 0&&r!==`heading`)throw Error(`Role "${r}" cannot have "level" property.`);g!==void 0&&assertSupported(r,`aria-valuenow`),v!==void 0&&assertSupported(r,`aria-valuemax`),_!==void 0&&assertSupported(r,`aria-valuemin`),y!==void 0&&assertSupported(r,`aria-valuetext`),h!==void 0&&assertSupported(r,`aria-expanded`);let b={selected:c,busy:l,checked:u,pressed:d,current:p,level:m,expanded:h,valueNow:g,valueMin:_,valueMax:v,valueText:y},x=e.i().computedStyleSupportsPseudoElements,S=e.A(n),C=[],w=styleOverride(S),T=w!==null&&i===!1?/* @__PURE__ */ new Map:null,E=f.roleMatcher(r,s);for(let e=S.first;e!==null;e=(0,t.nextInTree)(e,S))e.type===t.ELEMENT_NODE&&E(e)&&matchesState(e,b)&&(i===!1&&(w===null?isInaccessibleImpl$1(e):f.isInaccessibleWithStyle(e,w,T))||(a===void 0||matches(f.computeAccessibleName(e,x,w),e.node,a,identity))&&(o===void 0||matches(f.computeAccessibleDescription(e,x,w),e.node,o,identity))&&C.push(e.node));return C}function matchesState(e,t){if(t.selected!==void 0)return t.selected===computeAriaSelected(e);if(t.busy!==void 0)return t.busy===computeAriaBusy(e);if(t.checked!==void 0)return t.checked===computeAriaChecked(e);if(t.pressed!==void 0)return t.pressed===computeAriaPressed(e);if(t.current!==void 0)return t.current===computeAriaCurrent(e);if(t.expanded!==void 0)return t.expanded===computeAriaExpanded(e);if(t.level!==void 0)return t.level===computeHeadingLevelImpl(e);if(t.valueNow!==void 0||t.valueMax!==void 0||t.valueMin!==void 0||t.valueText!==void 0){let n=!0;return t.valueNow!==void 0&&(n&&=t.valueNow===computeAriaValueNow(e)),t.valueMax!==void 0&&(n&&=t.valueMax===computeAriaValueMax(e)),t.valueMin!==void 0&&(n&&=t.valueMin===computeAriaValueMin(e)),t.valueText!==void 0&&(n&&=matches(computeAriaValueText(e)??null,e.node,t.valueText,identity)),n}return!0}const getNameHint=e=>{let t=``;return t=e===void 0?``:typeof e==`string`?` and name "${e}"`:` and name \`${e}\``,t},ve=/* @__PURE__ */ e.M((e,t,{name:n}={})=>`Found multiple elements with the role "${t}"${getNameHint(n)}`,`getMultipleError`),ye=/* @__PURE__ */ e.M((t,n,r={})=>{let{hidden:i=e.i().defaultHidden,name:a,description:o}=r;if(e.w()!==null)return agentMissingError(t,n,r,i);if(e.i()._disableExpensiveErrorDiagnostics)return`Unable to find role="${n}"${getNameHint(a)}`;let s=``;Array.from(t.children).forEach(e=>{s+=prettyRoles(e,{hidden:i,includeDescription:o!==void 0})});let c;c=s.length===0?i===!1?"There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole":`There are no available roles.`:`
|
|
19
19
|
Here are the ${i===!1?`accessible`:`available`} roles:
|
|
20
20
|
|
|
21
21
|
${s.replace(/\n/g,`
|
|
@@ -25,5 +25,5 @@ Here are the ${i===!1?`accessible`:`available`} roles:
|
|
|
25
25
|
`.trim();let l=``;l=a===void 0?``:typeof a==`string`?` and name "${a}"`:` and name \`${a}\``;let u=``;return u=o===void 0?``:typeof o==`string`?` and description "${o}"`:` and description \`${o}\``,`
|
|
26
26
|
Unable to find an ${i===!1?`accessible `:``}element with the role "${n}"${l}${u}
|
|
27
27
|
|
|
28
|
-
${c}`.trim()},`getMissingError`);function agentMissingError(e,t,n,r){let{name:i,description:a,queryFallbacks:o=!1,value:{now:s,min:c,max:l,text:u}={}}=n,{selected:d,busy:f,checked:p,pressed:m,current:h,level:g,expanded:_}=n,v={selected:d,busy:f,checked:p,pressed:m,current:h,level:g,expanded:_,valueNow:s,valueMin:c,valueMax:l,valueText:u},y=Object.entries({selected:d,busy:f,checked:p,pressed:m,current:h,level:g,expanded:_,value:n.value}).filter(([,e])=>e!==void 0).map(([e,t])=>`${e}: ${JSON.stringify(t)}`).join(`, `),b=a===void 0?``:typeof a==`string`?` and description "${a}"`:` and description \`${a}\``,x=`Unable to find an ${r===!1?`accessible `:``}element with the role "${t}"${getNameHint(i)}${b}`,S=roleCandidates(e,{role:String(t),name:i,hidden:r,queryFallbacks:o,matchesState:e=>matchesState(e,v),stateHint:`{ ${y} }`});return S===``?x:`${x}\n\n${S}`}const be=wrapAllByQueryWithSuggestion(queryAllByRole,queryAllByRole.name,`queryAll`),[xe,Se,Ce,we,Te]=buildQueries(queryAllByRole,ve,ye),getTestIdAttribute=()=>e.i().testIdAttribute;function queryAllByTestId(...t){return e.D(t[0]),queryAllByAttribute(getTestIdAttribute(),...t)}const getMultipleError=(e,t)=>`Found multiple elements by: [${getTestIdAttribute()}="${t}"]`,getMissingError=(e,t)=>`Unable to find an element by: [${getTestIdAttribute()}="${t}"]`,Ee=wrapAllByQueryWithSuggestion(queryAllByTestId,queryAllByTestId.name,`queryAll`),[De,Oe,ke,Ae,X]=buildQueries(queryAllByTestId,getMultipleError,getMissingError),Z={findAllByLabelText:S,findByLabelText:C,getAllByLabelText:w,getByLabelText:T,queryAllByLabelText:ee,queryByLabelText:b,findAllByPlaceholderText:k,findByPlaceholderText:A,getAllByPlaceholderText:D,getByPlaceholderText:O,queryAllByPlaceholderText:re,queryByPlaceholderText:E,findAllByText:F,findByText:I,getAllByText:N,getByText:P,queryAllByText:j,queryByText:M,findAllByDisplayValue:V,findByDisplayValue:H,getAllByDisplayValue:z,getByDisplayValue:B,queryAllByDisplayValue:L,queryByDisplayValue:R,findAllByAltText:de,findByAltText:q,getAllByAltText:G,getByAltText:K,queryAllByAltText:U,queryByAltText:W,findAllByTitle:ge,findByTitle:_e,getAllByTitle:me,getByTitle:he,queryAllByTitle:J,queryByTitle:Y,findAllByRole:we,findByRole:Te,getAllByRole:Se,getByRole:Ce,queryAllByRole:be,queryByRole:xe,findAllByTestId:Ae,findByTestId:X,getAllByTestId:Oe,getByTestId:ke,queryAllByTestId:Ee,queryByTestId:De};function getQueriesForElement(e,t=Z,n){if(n===void 0){if(t===Z&&hasDefaultKeys(t))return bindDefaultQueries(t,e);n={}}return Object.keys(t).reduce((n,r)=>(n[r]=t[r].bind(null,e),n),n)}const je=/* @__PURE__ */ `findAllByLabelText.findByLabelText.getAllByLabelText.getByLabelText.queryAllByLabelText.queryByLabelText.findAllByPlaceholderText.findByPlaceholderText.getAllByPlaceholderText.getByPlaceholderText.queryAllByPlaceholderText.queryByPlaceholderText.findAllByText.findByText.getAllByText.getByText.queryAllByText.queryByText.findAllByDisplayValue.findByDisplayValue.getAllByDisplayValue.getByDisplayValue.queryAllByDisplayValue.queryByDisplayValue.findAllByAltText.findByAltText.getAllByAltText.getByAltText.queryAllByAltText.queryByAltText.findAllByTitle.findByTitle.getAllByTitle.getByTitle.queryAllByTitle.queryByTitle.findAllByRole.findByRole.getAllByRole.getByRole.queryAllByRole.queryByRole.findAllByTestId.findByTestId.getAllByTestId.getByTestId.queryAllByTestId.queryByTestId`.split(`.`);function hasDefaultKeys(e){let t=Object.keys(e);if(t.length!==je.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==je[e])return!1;return!0}function bindDefaultQueries(e,t){return{findAllByLabelText:e.findAllByLabelText.bind(null,t),findByLabelText:e.findByLabelText.bind(null,t),getAllByLabelText:e.getAllByLabelText.bind(null,t),getByLabelText:e.getByLabelText.bind(null,t),queryAllByLabelText:e.queryAllByLabelText.bind(null,t),queryByLabelText:e.queryByLabelText.bind(null,t),findAllByPlaceholderText:e.findAllByPlaceholderText.bind(null,t),findByPlaceholderText:e.findByPlaceholderText.bind(null,t),getAllByPlaceholderText:e.getAllByPlaceholderText.bind(null,t),getByPlaceholderText:e.getByPlaceholderText.bind(null,t),queryAllByPlaceholderText:e.queryAllByPlaceholderText.bind(null,t),queryByPlaceholderText:e.queryByPlaceholderText.bind(null,t),findAllByText:e.findAllByText.bind(null,t),findByText:e.findByText.bind(null,t),getAllByText:e.getAllByText.bind(null,t),getByText:e.getByText.bind(null,t),queryAllByText:e.queryAllByText.bind(null,t),queryByText:e.queryByText.bind(null,t),findAllByDisplayValue:e.findAllByDisplayValue.bind(null,t),findByDisplayValue:e.findByDisplayValue.bind(null,t),getAllByDisplayValue:e.getAllByDisplayValue.bind(null,t),getByDisplayValue:e.getByDisplayValue.bind(null,t),queryAllByDisplayValue:e.queryAllByDisplayValue.bind(null,t),queryByDisplayValue:e.queryByDisplayValue.bind(null,t),findAllByAltText:e.findAllByAltText.bind(null,t),findByAltText:e.findByAltText.bind(null,t),getAllByAltText:e.getAllByAltText.bind(null,t),getByAltText:e.getByAltText.bind(null,t),queryAllByAltText:e.queryAllByAltText.bind(null,t),queryByAltText:e.queryByAltText.bind(null,t),findAllByTitle:e.findAllByTitle.bind(null,t),findByTitle:e.findByTitle.bind(null,t),getAllByTitle:e.getAllByTitle.bind(null,t),getByTitle:e.getByTitle.bind(null,t),queryAllByTitle:e.queryAllByTitle.bind(null,t),queryByTitle:e.queryByTitle.bind(null,t),findAllByRole:e.findAllByRole.bind(null,t),findByRole:e.findByRole.bind(null,t),getAllByRole:e.getAllByRole.bind(null,t),getByRole:e.getByRole.bind(null,t),queryAllByRole:e.queryAllByRole.bind(null,t),queryByRole:e.queryByRole.bind(null,t),findAllByTestId:e.findAllByTestId.bind(null,t),findByTestId:e.findByTestId.bind(null,t),getAllByTestId:e.getAllByTestId.bind(null,t),getByTestId:e.getByTestId.bind(null,t),queryAllByTestId:e.queryAllByTestId.bind(null,t),queryByTestId:e.queryByTestId.bind(null,t)}}const isRemoved=e=>!e||Array.isArray(e)&&!e.length;function initialCheck(e){if(isRemoved(e))throw Error(`The element(s) given to waitForElementToBeRemoved are already removed. waitForElementToBeRemoved requires that the element(s) exist(s) before waiting for removal.`)}async function waitForElementToBeRemoved(callback,e){let t=/* @__PURE__ */ Error(`Timed out in waitForElementToBeRemoved.`);if(typeof callback!=`function`){initialCheck(callback);let e=(Array.isArray(callback)?callback:[callback]).map(e=>{let t=e.parentElement;if(t===null)return()=>null;for(;t.parentElement;)t=t.parentElement;return()=>t.contains(e)?e:null});callback=()=>e.map(e=>e()).filter(Boolean)}let n=callback;return initialCheck(n()),waitFor(()=>{let e;try{e=n()}catch(e){if(e.name===`TestingLibraryElementError`)return;throw e}if(!isRemoved(e))throw t},e)}const Me={copy:{EventType:`ClipboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},cut:{EventType:`ClipboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},paste:{EventType:`ClipboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},compositionEnd:{EventType:`CompositionEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},compositionStart:{EventType:`CompositionEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},compositionUpdate:{EventType:`CompositionEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},keyDown:{EventType:`KeyboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,charCode:0,composed:!0}},keyPress:{EventType:`KeyboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,charCode:0,composed:!0}},keyUp:{EventType:`KeyboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,charCode:0,composed:!0}},focus:{EventType:`FocusEvent`,defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},blur:{EventType:`FocusEvent`,defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},focusIn:{EventType:`FocusEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},focusOut:{EventType:`FocusEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},change:{EventType:`Event`,defaultInit:{bubbles:!0,cancelable:!1}},input:{EventType:`InputEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},invalid:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!0}},submit:{EventType:`Event`,defaultInit:{bubbles:!0,cancelable:!0}},reset:{EventType:`Event`,defaultInit:{bubbles:!0,cancelable:!0}},click:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,button:0,composed:!0}},contextMenu:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dblClick:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},drag:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dragEnd:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},dragEnter:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dragExit:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},dragLeave:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},dragOver:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dragStart:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},drop:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseDown:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseEnter:{EventType:`MouseEvent`,defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},mouseLeave:{EventType:`MouseEvent`,defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},mouseMove:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseOut:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseOver:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseUp:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},select:{EventType:`Event`,defaultInit:{bubbles:!0,cancelable:!1}},touchCancel:{EventType:`TouchEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},touchEnd:{EventType:`TouchEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},touchMove:{EventType:`TouchEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},touchStart:{EventType:`TouchEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},resize:{EventType:`UIEvent`,defaultInit:{bubbles:!1,cancelable:!1}},scroll:{EventType:`UIEvent`,defaultInit:{bubbles:!1,cancelable:!1}},wheel:{EventType:`WheelEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},abort:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},canPlay:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},canPlayThrough:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},durationChange:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},emptied:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},encrypted:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},ended:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},loadedData:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},loadedMetadata:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},loadStart:{EventType:`ProgressEvent`,defaultInit:{bubbles:!1,cancelable:!1}},pause:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},play:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},playing:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},progress:{EventType:`ProgressEvent`,defaultInit:{bubbles:!1,cancelable:!1}},rateChange:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},seeked:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},seeking:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},stalled:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},suspend:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},timeUpdate:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},volumeChange:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},waiting:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},load:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},error:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},animationStart:{EventType:`AnimationEvent`,defaultInit:{bubbles:!0,cancelable:!1}},animationEnd:{EventType:`AnimationEvent`,defaultInit:{bubbles:!0,cancelable:!1}},animationIteration:{EventType:`AnimationEvent`,defaultInit:{bubbles:!0,cancelable:!1}},transitionCancel:{EventType:`TransitionEvent`,defaultInit:{bubbles:!0,cancelable:!1}},transitionEnd:{EventType:`TransitionEvent`,defaultInit:{bubbles:!0,cancelable:!0}},transitionRun:{EventType:`TransitionEvent`,defaultInit:{bubbles:!0,cancelable:!1}},transitionStart:{EventType:`TransitionEvent`,defaultInit:{bubbles:!0,cancelable:!1}},pointerOver:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerEnter:{EventType:`PointerEvent`,defaultInit:{bubbles:!1,cancelable:!1}},pointerDown:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerMove:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerUp:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerCancel:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},pointerOut:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerLeave:{EventType:`PointerEvent`,defaultInit:{bubbles:!1,cancelable:!1}},gotPointerCapture:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},lostPointerCapture:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},popState:{EventType:`PopStateEvent`,defaultInit:{bubbles:!0,cancelable:!1}},offline:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},online:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},pageHide:{EventType:`PageTransitionEvent`,defaultInit:{bubbles:!0,cancelable:!0}},pageShow:{EventType:`PageTransitionEvent`,defaultInit:{bubbles:!0,cancelable:!0}}},Ne={doubleClick:`dblClick`};function fireEvent_(e,n){return(0,t.tracing)()&&n&&e?(0,t.traceSync)(`testing-library.fire_event`,`fireEvent.${n.type}(${(0,t.describeNode)(e)})`,()=>fireEventUntraced(e,n)):fireEventUntraced(e,n)}function fireEventUntraced(t,n){return e.i().eventWrapper(()=>{if(!n)throw Error(`Unable to fire an event - please provide an event object.`);if(!t)throw Error(`Unable to fire a "${n.type}" event - please provide a DOM element.`);return t.dispatchEvent(n)})}function createEvent_(t,n,r,{EventType:i=`Event`,defaultInit:a={}}={}){if(!n)throw Error(`Unable to fire a "${t}" event - please provide a DOM element.`);let o={...a,...r},{target:{value:s,files:c,...l}={}}=o;s!==void 0&&setNativeValue(n,s),c!==void 0&&Object.defineProperty(n,"files",{configurable:!0,enumerable:!0,writable:!0,value:c}),Object.assign(n,l);let u=e.k(n),d=u[i]||u.Event,f;if(typeof d==`function`)f=new d(t,o);else{f=u.document.createEvent(i);let{bubbles:e,cancelable:n,detail:r,...a}=o;f.initEvent(t,e,n,r),Object.keys(a).forEach(e=>{f[e]=a[e]})}return[`dataTransfer`,`clipboardData`].forEach(e=>{let t=o[e];typeof t==`object`&&(typeof u.DataTransfer==`function`?Object.defineProperty(f,e,{value:Object.getOwnPropertyNames(t).reduce((e,n)=>(Object.defineProperty(e,n,{value:t[n]}),e),new u.DataTransfer)}):Object.defineProperty(f,e,{value:t}))}),f}function setNativeValue(e,t){let{set:n}=Object.getOwnPropertyDescriptor(e,`value`)||{},r=Object.getPrototypeOf(e),{set:i}=Object.getOwnPropertyDescriptor(r,`value`)||{};if(i&&n!==i)i.call(e,t);else if(n)n.call(e,t);else throw Error(`The given element does not have a value setter`)}Object.defineProperty(fireEvent_,"name",{value:`fireEvent`}),Object.defineProperty(createEvent_,"name",{value:`createEvent`});const Q=fireEvent_,$=createEvent_;Object.keys(Me).forEach(e=>{let{EventType:t,defaultInit:n}=Me[e],r=e.toLowerCase();$[e]=(e,i)=>$(r,e,i,{EventType:t,defaultInit:n}),Q[e]=(t,n)=>Q(t,$[e](t,n))}),Object.keys(Ne).forEach(e=>{let t=Ne[e];Q[e]=(...e)=>Q[t](...e)});const Pe=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$`;var BitWriter=class{out=[];val=0;pos=0;write(e,t){for(let n=0;n<t;n++)this.val=this.val<<1|e&1,this.pos===5?(this.pos=0,this.out.push(Pe.charAt(this.val)),this.val=0):this.pos++,e>>=1}flush(){for(;;){if(this.val<<=1,this.pos===5){this.out.push(Pe.charAt(this.val));break}this.pos++}return this.out.join(``)}};function compressToEncodedURIComponent(e){if(e==null)return``;let t=/* @__PURE__ */ new Map,n=/* @__PURE__ */ new Set,r=new BitWriter,i=``,a=2,o=3,s=2,emit=e=>{if(n.has(e)){let t=e.charCodeAt(0);t<256?(r.write(0,s),r.write(t,8)):(r.write(1,s),r.write(t,16)),a--,a===0&&(a=2**s,s++),n.delete(e)}else r.write(t.get(e),s);a--,a===0&&(a=2**s,s++)};for(let r=0;r<e.length;r++){let a=e.charAt(r);t.has(a)||(t.set(a,o++),n.add(a));let s=i+a;t.has(s)?i=s:(emit(i),t.set(s,o++),i=a)}return i!==``&&emit(i),r.write(2,s),r.flush()}function unindent(e){return e.replace(/[ \t]*[\n][ \t]*/g,`
|
|
29
|
-
`)}function encode(e){return compressToEncodedURIComponent(unindent(e))}function getPlaygroundUrl(e){return`https://testing-playground.com/#markup=${encode(e)}`}const debug=(t,n,r)=>Array.isArray(t)?t.forEach(t=>e.o(t,n,r)):e.o(t,n,r),logTestingPlaygroundURL=(t=e.O().body)=>{if(!t||!(`innerHTML`in t)){console.log(`The element you're providing isn't a valid DOM element.`);return}if(!t.innerHTML){console.log(`The provided element doesn't have any children.`);return}let n=getPlaygroundUrl(t.innerHTML);return console.log(`Open this URL in your browser\n\n${n}`),n},Fe={debug,logTestingPlaygroundURL,ariaSnapshot:e.l},Ie=typeof document<`u`&&document.body?getQueriesForElement(document.body,Z,Fe):Object.keys(Z).reduce((e,t)=>(e[t]=()=>{throw TypeError(`For queries bound to document.body a global document has to be available... Learn more: https://testing-library.com/s/screen-global-error`)},e),Fe),Le={getElementError,wrapAllByQueryWithSuggestion,wrapSingleQueryWithSuggestion,getMultipleElementsFoundError,queryAllByAttribute,queryByAttribute,makeSingleQuery,makeGetAllQuery,makeFindQuery,buildQueries};exports.ariaSnapshot=e.l,exports.buildQueries=buildQueries,exports.configure=e.r,exports.createEvent=$,exports.diffAriaSnapshots=e.t,exports.findAllByAltText=
|
|
28
|
+
${c}`.trim()},`getMissingError`);function agentMissingError(e,t,n,r){let{name:i,description:a,queryFallbacks:o=!1,value:{now:s,min:c,max:l,text:u}={}}=n,{selected:d,busy:f,checked:p,pressed:m,current:h,level:g,expanded:_}=n,v={selected:d,busy:f,checked:p,pressed:m,current:h,level:g,expanded:_,valueNow:s,valueMin:c,valueMax:l,valueText:u},y=Object.entries({selected:d,busy:f,checked:p,pressed:m,current:h,level:g,expanded:_,value:n.value}).filter(([,e])=>e!==void 0).map(([e,t])=>`${e}: ${JSON.stringify(t)}`).join(`, `),b=a===void 0?``:typeof a==`string`?` and description "${a}"`:` and description \`${a}\``,x=`Unable to find an ${r===!1?`accessible `:``}element with the role "${t}"${getNameHint(i)}${b}`,S=roleCandidates(e,{role:String(t),name:i,hidden:r,queryFallbacks:o,matchesState:e=>matchesState(e,v),stateHint:`{ ${y} }`});return S===``?x:`${x}\n\n${S}`}const be=wrapAllByQueryWithSuggestion(queryAllByRole,queryAllByRole.name,`queryAll`),[xe,Se,Ce,we,Te]=buildQueries(queryAllByRole,ve,ye),getTestIdAttribute=()=>e.i().testIdAttribute;function queryAllByTestId(...t){return e.D(t[0]),queryAllByAttribute(getTestIdAttribute(),...t)}const getMultipleError=(e,t)=>`Found multiple elements by: [${getTestIdAttribute()}="${t}"]`,getMissingError=(e,t)=>`Unable to find an element by: [${getTestIdAttribute()}="${t}"]`,Ee=wrapAllByQueryWithSuggestion(queryAllByTestId,queryAllByTestId.name,`queryAll`),[De,Oe,ke,Ae,X]=buildQueries(queryAllByTestId,getMultipleError,getMissingError),Z={findAllByLabelText:S,findByLabelText:C,getAllByLabelText:w,getByLabelText:T,queryAllByLabelText:E,queryByLabelText:b,findAllByPlaceholderText:k,findByPlaceholderText:A,getAllByPlaceholderText:D,getByPlaceholderText:O,queryAllByPlaceholderText:ne,queryByPlaceholderText:re,findAllByText:F,findByText:I,getAllByText:N,getByText:P,queryAllByText:j,queryByText:M,findAllByDisplayValue:V,findByDisplayValue:H,getAllByDisplayValue:z,getByDisplayValue:B,queryAllByDisplayValue:L,queryByDisplayValue:R,findAllByAltText:q,findByAltText:de,getAllByAltText:G,getByAltText:K,queryAllByAltText:U,queryByAltText:W,findAllByTitle:ge,findByTitle:_e,getAllByTitle:me,getByTitle:he,queryAllByTitle:J,queryByTitle:Y,findAllByRole:we,findByRole:Te,getAllByRole:Se,getByRole:Ce,queryAllByRole:be,queryByRole:xe,findAllByTestId:Ae,findByTestId:X,getAllByTestId:Oe,getByTestId:ke,queryAllByTestId:Ee,queryByTestId:De};function getQueriesForElement(e,t=Z,n){if(n===void 0){if(t===Z&&hasDefaultKeys(t))return bindDefaultQueries(t,e);n={}}return Object.keys(t).reduce((n,r)=>(n[r]=t[r].bind(null,e),n),n)}const je=/* @__PURE__ */ `findAllByLabelText.findByLabelText.getAllByLabelText.getByLabelText.queryAllByLabelText.queryByLabelText.findAllByPlaceholderText.findByPlaceholderText.getAllByPlaceholderText.getByPlaceholderText.queryAllByPlaceholderText.queryByPlaceholderText.findAllByText.findByText.getAllByText.getByText.queryAllByText.queryByText.findAllByDisplayValue.findByDisplayValue.getAllByDisplayValue.getByDisplayValue.queryAllByDisplayValue.queryByDisplayValue.findAllByAltText.findByAltText.getAllByAltText.getByAltText.queryAllByAltText.queryByAltText.findAllByTitle.findByTitle.getAllByTitle.getByTitle.queryAllByTitle.queryByTitle.findAllByRole.findByRole.getAllByRole.getByRole.queryAllByRole.queryByRole.findAllByTestId.findByTestId.getAllByTestId.getByTestId.queryAllByTestId.queryByTestId`.split(`.`);function hasDefaultKeys(e){let t=Object.keys(e);if(t.length!==je.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==je[e])return!1;return!0}function bindDefaultQueries(e,t){return{findAllByLabelText:e.findAllByLabelText.bind(null,t),findByLabelText:e.findByLabelText.bind(null,t),getAllByLabelText:e.getAllByLabelText.bind(null,t),getByLabelText:e.getByLabelText.bind(null,t),queryAllByLabelText:e.queryAllByLabelText.bind(null,t),queryByLabelText:e.queryByLabelText.bind(null,t),findAllByPlaceholderText:e.findAllByPlaceholderText.bind(null,t),findByPlaceholderText:e.findByPlaceholderText.bind(null,t),getAllByPlaceholderText:e.getAllByPlaceholderText.bind(null,t),getByPlaceholderText:e.getByPlaceholderText.bind(null,t),queryAllByPlaceholderText:e.queryAllByPlaceholderText.bind(null,t),queryByPlaceholderText:e.queryByPlaceholderText.bind(null,t),findAllByText:e.findAllByText.bind(null,t),findByText:e.findByText.bind(null,t),getAllByText:e.getAllByText.bind(null,t),getByText:e.getByText.bind(null,t),queryAllByText:e.queryAllByText.bind(null,t),queryByText:e.queryByText.bind(null,t),findAllByDisplayValue:e.findAllByDisplayValue.bind(null,t),findByDisplayValue:e.findByDisplayValue.bind(null,t),getAllByDisplayValue:e.getAllByDisplayValue.bind(null,t),getByDisplayValue:e.getByDisplayValue.bind(null,t),queryAllByDisplayValue:e.queryAllByDisplayValue.bind(null,t),queryByDisplayValue:e.queryByDisplayValue.bind(null,t),findAllByAltText:e.findAllByAltText.bind(null,t),findByAltText:e.findByAltText.bind(null,t),getAllByAltText:e.getAllByAltText.bind(null,t),getByAltText:e.getByAltText.bind(null,t),queryAllByAltText:e.queryAllByAltText.bind(null,t),queryByAltText:e.queryByAltText.bind(null,t),findAllByTitle:e.findAllByTitle.bind(null,t),findByTitle:e.findByTitle.bind(null,t),getAllByTitle:e.getAllByTitle.bind(null,t),getByTitle:e.getByTitle.bind(null,t),queryAllByTitle:e.queryAllByTitle.bind(null,t),queryByTitle:e.queryByTitle.bind(null,t),findAllByRole:e.findAllByRole.bind(null,t),findByRole:e.findByRole.bind(null,t),getAllByRole:e.getAllByRole.bind(null,t),getByRole:e.getByRole.bind(null,t),queryAllByRole:e.queryAllByRole.bind(null,t),queryByRole:e.queryByRole.bind(null,t),findAllByTestId:e.findAllByTestId.bind(null,t),findByTestId:e.findByTestId.bind(null,t),getAllByTestId:e.getAllByTestId.bind(null,t),getByTestId:e.getByTestId.bind(null,t),queryAllByTestId:e.queryAllByTestId.bind(null,t),queryByTestId:e.queryByTestId.bind(null,t)}}const isRemoved=e=>!e||Array.isArray(e)&&!e.length;function initialCheck(e){if(isRemoved(e))throw Error(`The element(s) given to waitForElementToBeRemoved are already removed. waitForElementToBeRemoved requires that the element(s) exist(s) before waiting for removal.`)}async function waitForElementToBeRemoved(callback,e){let t=/* @__PURE__ */ Error(`Timed out in waitForElementToBeRemoved.`);if(typeof callback!=`function`){initialCheck(callback);let e=(Array.isArray(callback)?callback:[callback]).map(e=>{let t=e.parentElement;if(t===null)return()=>null;for(;t.parentElement;)t=t.parentElement;return()=>t.contains(e)?e:null});callback=()=>e.map(e=>e()).filter(Boolean)}let n=callback;return initialCheck(n()),waitFor(()=>{let e;try{e=n()}catch(e){if(e.name===`TestingLibraryElementError`)return;throw e}if(!isRemoved(e))throw t},e)}const Me={copy:{EventType:`ClipboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},cut:{EventType:`ClipboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},paste:{EventType:`ClipboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},compositionEnd:{EventType:`CompositionEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},compositionStart:{EventType:`CompositionEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},compositionUpdate:{EventType:`CompositionEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},keyDown:{EventType:`KeyboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,charCode:0,composed:!0}},keyPress:{EventType:`KeyboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,charCode:0,composed:!0}},keyUp:{EventType:`KeyboardEvent`,defaultInit:{bubbles:!0,cancelable:!0,charCode:0,composed:!0}},focus:{EventType:`FocusEvent`,defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},blur:{EventType:`FocusEvent`,defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},focusIn:{EventType:`FocusEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},focusOut:{EventType:`FocusEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},change:{EventType:`Event`,defaultInit:{bubbles:!0,cancelable:!1}},input:{EventType:`InputEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},invalid:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!0}},submit:{EventType:`Event`,defaultInit:{bubbles:!0,cancelable:!0}},reset:{EventType:`Event`,defaultInit:{bubbles:!0,cancelable:!0}},click:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,button:0,composed:!0}},contextMenu:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dblClick:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},drag:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dragEnd:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},dragEnter:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dragExit:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},dragLeave:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},dragOver:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dragStart:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},drop:{EventType:`DragEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseDown:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseEnter:{EventType:`MouseEvent`,defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},mouseLeave:{EventType:`MouseEvent`,defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},mouseMove:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseOut:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseOver:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseUp:{EventType:`MouseEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},select:{EventType:`Event`,defaultInit:{bubbles:!0,cancelable:!1}},touchCancel:{EventType:`TouchEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},touchEnd:{EventType:`TouchEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},touchMove:{EventType:`TouchEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},touchStart:{EventType:`TouchEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},resize:{EventType:`UIEvent`,defaultInit:{bubbles:!1,cancelable:!1}},scroll:{EventType:`UIEvent`,defaultInit:{bubbles:!1,cancelable:!1}},wheel:{EventType:`WheelEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},abort:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},canPlay:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},canPlayThrough:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},durationChange:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},emptied:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},encrypted:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},ended:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},loadedData:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},loadedMetadata:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},loadStart:{EventType:`ProgressEvent`,defaultInit:{bubbles:!1,cancelable:!1}},pause:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},play:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},playing:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},progress:{EventType:`ProgressEvent`,defaultInit:{bubbles:!1,cancelable:!1}},rateChange:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},seeked:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},seeking:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},stalled:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},suspend:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},timeUpdate:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},volumeChange:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},waiting:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},load:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},error:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},animationStart:{EventType:`AnimationEvent`,defaultInit:{bubbles:!0,cancelable:!1}},animationEnd:{EventType:`AnimationEvent`,defaultInit:{bubbles:!0,cancelable:!1}},animationIteration:{EventType:`AnimationEvent`,defaultInit:{bubbles:!0,cancelable:!1}},transitionCancel:{EventType:`TransitionEvent`,defaultInit:{bubbles:!0,cancelable:!1}},transitionEnd:{EventType:`TransitionEvent`,defaultInit:{bubbles:!0,cancelable:!0}},transitionRun:{EventType:`TransitionEvent`,defaultInit:{bubbles:!0,cancelable:!1}},transitionStart:{EventType:`TransitionEvent`,defaultInit:{bubbles:!0,cancelable:!1}},pointerOver:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerEnter:{EventType:`PointerEvent`,defaultInit:{bubbles:!1,cancelable:!1}},pointerDown:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerMove:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerUp:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerCancel:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},pointerOut:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerLeave:{EventType:`PointerEvent`,defaultInit:{bubbles:!1,cancelable:!1}},gotPointerCapture:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},lostPointerCapture:{EventType:`PointerEvent`,defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},popState:{EventType:`PopStateEvent`,defaultInit:{bubbles:!0,cancelable:!1}},offline:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},online:{EventType:`Event`,defaultInit:{bubbles:!1,cancelable:!1}},pageHide:{EventType:`PageTransitionEvent`,defaultInit:{bubbles:!0,cancelable:!0}},pageShow:{EventType:`PageTransitionEvent`,defaultInit:{bubbles:!0,cancelable:!0}}},Ne={doubleClick:`dblClick`};function fireEvent_(e,n){return(0,t.tracing)()&&n&&e?(0,t.traceSync)(`testing-library.fire_event`,`fireEvent.${n.type}(${(0,t.describeNode)(e)})`,()=>fireEventUntraced(e,n)):fireEventUntraced(e,n)}function fireEventUntraced(t,n){return e.i().eventWrapper(()=>{if(!n)throw Error(`Unable to fire an event - please provide an event object.`);if(!t)throw Error(`Unable to fire a "${n.type}" event - please provide a DOM element.`);return t.dispatchEvent(n)})}function createEvent_(t,n,r,{EventType:i=`Event`,defaultInit:a={}}={}){if(!n)throw Error(`Unable to fire a "${t}" event - please provide a DOM element.`);let o={...a,...r},{target:{value:s,files:c,...l}={}}=o;s!==void 0&&setNativeValue(n,s),c!==void 0&&Object.defineProperty(n,"files",{configurable:!0,enumerable:!0,writable:!0,value:c}),Object.assign(n,l);let u=e.k(n),d=u[i]||u.Event,f;if(typeof d==`function`)f=new d(t,o);else{f=u.document.createEvent(i);let{bubbles:e,cancelable:n,detail:r,...a}=o;f.initEvent(t,e,n,r),Object.keys(a).forEach(e=>{f[e]=a[e]})}return[`dataTransfer`,`clipboardData`].forEach(e=>{let t=o[e];typeof t==`object`&&(typeof u.DataTransfer==`function`?Object.defineProperty(f,e,{value:Object.getOwnPropertyNames(t).reduce((e,n)=>(Object.defineProperty(e,n,{value:t[n]}),e),new u.DataTransfer)}):Object.defineProperty(f,e,{value:t}))}),f}function setNativeValue(e,t){let{set:n}=Object.getOwnPropertyDescriptor(e,`value`)||{},r=Object.getPrototypeOf(e),{set:i}=Object.getOwnPropertyDescriptor(r,`value`)||{};if(i&&n!==i)i.call(e,t);else if(n)n.call(e,t);else throw Error(`The given element does not have a value setter`)}Object.defineProperty(fireEvent_,"name",{value:`fireEvent`}),Object.defineProperty(createEvent_,"name",{value:`createEvent`});const Q=fireEvent_,$=createEvent_;Object.keys(Me).forEach(e=>{let{EventType:t,defaultInit:n}=Me[e],r=e.toLowerCase();$[e]=(e,i)=>$(r,e,i,{EventType:t,defaultInit:n}),Q[e]=(t,n)=>Q(t,$[e](t,n))}),Object.keys(Ne).forEach(e=>{let t=Ne[e];Q[e]=(...e)=>Q[t](...e)});const Pe=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$`;var BitWriter=class{out=[];val=0;pos=0;write(e,t){for(let n=0;n<t;n++)this.val=this.val<<1|e&1,this.pos===5?(this.pos=0,this.out.push(Pe.charAt(this.val)),this.val=0):this.pos++,e>>=1}flush(){for(;;){if(this.val<<=1,this.pos===5){this.out.push(Pe.charAt(this.val));break}this.pos++}return this.out.join(``)}};function compressToEncodedURIComponent(e){if(e==null)return``;let t=/* @__PURE__ */ new Map,n=/* @__PURE__ */ new Set,r=new BitWriter,i=``,a=2,o=3,s=2,emit=e=>{if(n.has(e)){let t=e.charCodeAt(0);t<256?(r.write(0,s),r.write(t,8)):(r.write(1,s),r.write(t,16)),a--,a===0&&(a=2**s,s++),n.delete(e)}else r.write(t.get(e),s);a--,a===0&&(a=2**s,s++)};for(let r=0;r<e.length;r++){let a=e.charAt(r);t.has(a)||(t.set(a,o++),n.add(a));let s=i+a;t.has(s)?i=s:(emit(i),t.set(s,o++),i=a)}return i!==``&&emit(i),r.write(2,s),r.flush()}function unindent(e){return e.replace(/[ \t]*[\n][ \t]*/g,`
|
|
29
|
+
`)}function encode(e){return compressToEncodedURIComponent(unindent(e))}function getPlaygroundUrl(e){return`https://testing-playground.com/#markup=${encode(e)}`}const debug=(t,n,r)=>Array.isArray(t)?t.forEach(t=>e.o(t,n,r)):e.o(t,n,r),logTestingPlaygroundURL=(t=e.O().body)=>{if(!t||!(`innerHTML`in t)){console.log(`The element you're providing isn't a valid DOM element.`);return}if(!t.innerHTML){console.log(`The provided element doesn't have any children.`);return}let n=getPlaygroundUrl(t.innerHTML);return console.log(`Open this URL in your browser\n\n${n}`),n},Fe={debug,logTestingPlaygroundURL,ariaSnapshot:e.l},Ie=typeof document<`u`&&document.body?getQueriesForElement(document.body,Z,Fe):Object.keys(Z).reduce((e,t)=>(e[t]=()=>{throw TypeError(`For queries bound to document.body a global document has to be available... Learn more: https://testing-library.com/s/screen-global-error`)},e),Fe),Le={getElementError,wrapAllByQueryWithSuggestion,wrapSingleQueryWithSuggestion,getMultipleElementsFoundError,queryAllByAttribute,queryByAttribute,makeSingleQuery,makeGetAllQuery,makeFindQuery,buildQueries};exports.ariaSnapshot=e.l,exports.buildQueries=buildQueries,exports.configure=e.r,exports.createEvent=$,exports.diffAriaSnapshots=e.t,exports.findAllByAltText=q,exports.findAllByDisplayValue=V,exports.findAllByLabelText=S,exports.findAllByPlaceholderText=k,exports.findAllByRole=we,exports.findAllByTestId=Ae,exports.findAllByText=F,exports.findAllByTitle=ge,exports.findByAltText=de,exports.findByDisplayValue=H,exports.findByLabelText=C,exports.findByPlaceholderText=A,exports.findByRole=Te,exports.findByTestId=X,exports.findByText=I,exports.findByTitle=_e,exports.fireEvent=Q,exports.getAllByAltText=G,exports.getAllByDisplayValue=z,exports.getAllByLabelText=w,exports.getAllByPlaceholderText=D,exports.getAllByRole=Se,exports.getAllByTestId=Oe,exports.getAllByText=N,exports.getAllByTitle=me,exports.getByAltText=K,exports.getByDisplayValue=B,exports.getByLabelText=T,exports.getByPlaceholderText=O,exports.getByRole=Ce,exports.getByTestId=ke,exports.getByText=P,exports.getByTitle=he,exports.getConfig=e.i,exports.getDefaultNormalizer=getDefaultNormalizer,exports.getElementError=getElementError,exports.getMultipleElementsFoundError=getMultipleElementsFoundError,exports.getNodeText=getNodeText,exports.getQueriesForElement=getQueriesForElement,exports.within=getQueriesForElement,exports.getRoles=getRoles,exports.getSuggestedQuery=getSuggestedQuery,exports.isInaccessible=isInaccessible,exports.logDOM=e.o,exports.logRoles=logRoles,exports.makeFindQuery=makeFindQuery,exports.makeGetAllQuery=makeGetAllQuery,exports.makeSingleQuery=makeSingleQuery,exports.prettyDOM=e.s,exports.prettyFormat=e.c,exports.queries=Z,exports.queryAllByAltText=U,exports.queryAllByAttribute=queryAllByAttribute,exports.queryAllByDisplayValue=L,exports.queryAllByLabelText=E,exports.queryAllByPlaceholderText=ne,exports.queryAllByRole=be,exports.queryAllByTestId=Ee,exports.queryAllByText=j,exports.queryAllByTitle=J,exports.queryByAltText=W,exports.queryByAttribute=queryByAttribute,exports.queryByDisplayValue=R,exports.queryByLabelText=b,exports.queryByPlaceholderText=re,exports.queryByRole=xe,exports.queryByTestId=De,exports.queryByText=M,exports.queryByTitle=Y,exports.queryHelpers=Le,exports.screen=Ie,exports.waitFor=waitFor,exports.waitForElementToBeRemoved=waitForElementToBeRemoved,exports.wrapAllByQueryWithSuggestion=wrapAllByQueryWithSuggestion,exports.wrapSingleQueryWithSuggestion=wrapSingleQueryWithSuggestion;
|