1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`3f379429-1fc2-42ac-9a9a-18a83265092a`,e._sentryDebugIdIdentifier=`sentry-dbid-3f379429-1fc2-42ac-9a9a-18a83265092a`)}catch{}})();import{it as e,st as t}from"./components-CLmTExWJ.js";import{a as n}from"./useId-DlmH-COD.js";import{S as r,f as i,g as a,n as o,t as s,x as c}from"./focusSafely-Dmny9hhe.js";function l(e){let t=r(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:i}=e.style,a=n!==`none`&&i!==`hidden`&&i!==`collapse`;if(a){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:n,visibility:r}=t(e);a=n!==`none`&&r!==`hidden`&&r!==`collapse`}return a}function u(e,t){return!e.hasAttribute(`hidden`)&&!e.hasAttribute(`data-react-aria-prevent-focus`)&&(e.nodeName===`DETAILS`&&t&&t.nodeName!==`SUMMARY`?e.hasAttribute(`open`):!0)}function d(e,t){return e.nodeName!==`#comment`&&l(e)&&u(e,t)&&(!e.parentElement||d(e.parentElement,e))}var f=t(e(),1),p=f.createContext(null),m=`react-aria-focus-scope-restore`,h=null;function g(e){let{children:t,contain:r,restoreFocus:i,autoFocus:a}=e,o=(0,f.useRef)(null),s=(0,f.useRef)(null),l=(0,f.useRef)([]),{parentNode:u}=(0,f.useContext)(p)||{},d=(0,f.useMemo)(()=>new U({scopeRef:l}),[l]);n(()=>{let e=u||W.root;if(W.getTreeNode(e.scopeRef)&&h&&!A(h,e.scopeRef)){let t=W.getTreeNode(h);t&&(e=t)}e.addChild(d),W.addNode(d)},[d,u]),n(()=>{let e=W.getTreeNode(l);e&&(e.contain=!!r)},[r]),n(()=>{let e=o.current?.nextSibling,t=[],n=e=>e.stopPropagation();for(;e&&e!==s.current;)t.push(e),e.addEventListener(m,n),e=e.nextSibling;return l.current=t,()=>{for(let e of t)e.removeEventListener(m,n)}},[t]),F(l,i,r),T(l,r),L(l,i,r),P(l,a),(0,f.useEffect)(()=>{let e=c(l.current?l.current[0]:void 0).activeElement,t=null;if(D(e,l.current)){for(let n of W.traverse())n.scopeRef&&D(e,n.scopeRef.current)&&(t=n);t===W.getTreeNode(l)&&(h=t.scopeRef)}},[l]),n(()=>()=>{let e=W.getTreeNode(l)?.parent?.scopeRef??null;(l===h||A(l,h))&&(!e||W.getTreeNode(e))&&(h=e),W.removeTreeNode(l)},[l]);let g=(0,f.useMemo)(()=>v(l),[]),_=(0,f.useMemo)(()=>({focusManager:g,parentNode:d}),[d,g]);return f.createElement(p.Provider,{value:_},f.createElement(`span`,{"data-focus-scope-start":!0,hidden:!0,ref:o}),t,f.createElement(`span`,{"data-focus-scope-end":!0,hidden:!0,ref:s}))}function _(){return(0,f.useContext)(p)?.focusManager}function v(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:a,accept:o}=t,s=r||c(n[0]).activeElement,l=n[0].previousElementSibling,u=z(C(n),{tabbable:i,accept:o},n);u.currentNode=D(s,n)?s:l;let d=u.nextNode();return!d&&a&&(u.currentNode=l,d=u.nextNode()),d&&j(d,!0),d},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:a,accept:o}=t,s=r||c(n[0]).activeElement,l=n[n.length-1].nextElementSibling,u=z(C(n),{tabbable:i,accept:o},n);u.currentNode=D(s,n)?s:l;let d=u.previousNode();return!d&&a&&(u.currentNode=l,d=u.previousNode()),d&&j(d,!0),d},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=z(C(n),{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let o=a.nextNode();return o&&j(o,!0),o},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=z(C(n),{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let o=a.previousNode();return o&&j(o,!0),o}}}var y=[`input:not([disabled]):not([type=hidden])`,`select:not([disabled])`,`textarea:not([disabled])`,`button:not([disabled])`,`a[href]`,`area[href]`,`summary`,`iframe`,`object`,`embed`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable^="false"])`],b=y.join(`:not([hidden]),`)+`,[tabindex]:not([disabled]):not([hidden])`;y.push(`[tabindex]:not([tabindex="-1"]):not([disabled])`);var x=y.join(`:not([hidden]):not([tabindex="-1"]),`);function S(e){return e.matches(b)}function C(e){return e[0].parentElement}function w(e){let t=W.getTreeNode(h);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function T(e,t){let r=(0,f.useRef)(void 0),s=(0,f.useRef)(void 0);n(()=>{let n=e.current;if(!t){s.current&&=(cancelAnimationFrame(s.current),void 0);return}let l=c(n?n[0]:void 0),u=t=>{if(t.key!==`Tab`||t.altKey||t.ctrlKey||t.metaKey||!w(e)||t.isComposing)return;let n=l.activeElement,r=e.current;if(!r||!D(n,r))return;let i=z(C(r),{tabbable:!0},r);if(!n)return;i.currentNode=n;let a=t.shiftKey?i.previousNode():i.nextNode();a||=(i.currentNode=t.shiftKey?r[r.length-1].nextElementSibling:r[0].previousElementSibling,t.shiftKey?i.previousNode():i.nextNode()),t.preventDefault(),a&&j(a,!0)},d=t=>{(!h||A(h,e))&&D(t.target,e.current)?(h=e,r.current=t.target):w(e)&&!O(t.target,e)?r.current?r.current.focus():h&&h.
1current&&N(h.current):w(e)&&(r.current=t.target)},f=t=>{s.current&&cancelAnimationFrame(s.current),s.current=requestAnimationFrame(()=>{let n=o();if(!((n===`virtual`||n===null)&&a()&&i())&&l.activeElement&&w(e)&&!O(l.activeElement,e))if(h=e,l.body.contains(t.target)){var s;r.current=t.target,(s=r.current)==null||s.focus()}else h.current&&N(h.current)})};return l.addEventListener(`keydown`,u,!1),l.addEventListener(`focusin`,d,!1),n?.forEach(e=>e.addEventListener(`focusin`,d,!1)),n?.forEach(e=>e.addEventListener(`focusout`,f,!1)),()=>{l.removeEventListener(`keydown`,u,!1),l.removeEventListener(`focusin`,d,!1),n?.forEach(e=>e.removeEventListener(`focusin`,d,!1)),n?.forEach(e=>e.removeEventListener(`focusout`,f,!1))}},[e,t]),n(()=>()=>{s.current&&cancelAnimationFrame(s.current)},[s])}function E(e){return O(e)}function D(e,t){return!e||!t?!1:t.some(t=>t.contains(e))}function O(e,t=null){if(e instanceof Element&&e.closest(`[data-react-aria-top-layer]`))return!0;for(let{scopeRef:n}of W.traverse(W.getTreeNode(t)))if(n&&D(e,n.current))return!0;return!1}function k(e){return O(e,h)}function A(e,t){let n=W.getTreeNode(t)?.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function j(e,t=!1){if(e!=null&&!t)try{s(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function M(e,t=!0){let n=e[0].previousElementSibling,r=C(e),i=z(r,{tabbable:t},e);i.currentNode=n;let a=i.nextNode();return t&&!a&&(r=C(e),i=z(r,{tabbable:!1},e),i.currentNode=n,a=i.nextNode()),a}function N(e,t=!0){j(M(e,t))}function P(e,t){let n=f.useRef(t);(0,f.useEffect)(()=>{n.current&&(h=e,!D(c(e.current?e.current[0]:void 0).activeElement,h.current)&&e.current&&N(e.current)),n.current=!1},[e])}function F(e,t,r){n(()=>{if(t||r)return;let n=e.current,i=c(n?n[0]:void 0),a=t=>{let n=t.target;D(n,e.current)?h=e:E(n)||(h=null)};return i.addEventListener(`focusin`,a,!1),n?.forEach(e=>e.addEventListener(`focusin`,a,!1)),()=>{i.removeEventListener(`focusin`,a,!1),n?.forEach(e=>e.removeEventListener(`focusin`,a,!1))}},[e,t,r])}function I(e){let t=W.getTreeNode(h);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function L(e,t,r){let i=(0,f.useRef)(typeof document<`u`?c(e.current?e.current[0]:void 0).activeElement:null);n(()=>{let n=e.current,i=c(n?n[0]:void 0);if(!t||r)return;let a=()=>{(!h||A(h,e))&&D(i.activeElement,e.current)&&(h=e)};return i.addEventListener(`focusin`,a,!1),n?.forEach(e=>e.addEventListener(`focusin`,a,!1)),()=>{i.removeEventListener(`focusin`,a,!1),n?.forEach(e=>e.removeEventListener(`focusin`,a,!1))}},[e,r]),n(()=>{let n=c(e.current?e.current[0]:void 0);if(!t)return;let i=t=>{if(t.key!==`Tab`||t.altKey||t.ctrlKey||t.metaKey||!w(e)||t.isComposing)return;let r=n.activeElement;if(!O(r,e)||!I(e))return;let i=W.getTreeNode(e);if(!i)return;let a=i.nodeToRestore,o=z(n.body,{tabbable:!0});o.currentNode=r;let s=t.shiftKey?o.previousNode():o.nextNode();if((!a||!n.body.contains(a)||a===n.body)&&(a=void 0,i.nodeToRestore=void 0),(!s||!O(s,e))&&a){o.currentNode=a;do s=t.shiftKey?o.previousNode():o.nextNode();while(O(s,e));t.preventDefault(),t.stopPropagation(),s?j(s,!0):E(a)?j(a,!0):r.blur()}};return r||n.addEventListener(`keydown`,i,!0),()=>{r||n.removeEventListener(`keydown`,i,!0)}},[e,t,r]),n(()=>{let n=c(e.current?e.current[0]:void 0);if(!t)return;let r=W.getTreeNode(e);if(r)return r.nodeToRestore=i.current??void 0,()=>{let r=W.getTreeNode(e);if(!r)return;let i=r.nodeToRestore;if(t&&i&&(n.activeElement&&O(n.activeElement,e)||n.activeElement===n.body&&I(e))){let t=W.clone();requestAnimationFrame(()=>{if(n.activeElement===n.body){let n=t.getTreeNode(e);for(;n;){if(n.nodeToRestore&&n.nodeToRestore.isConnected){R(n.nodeToRestore);return}n=n.parent}for(n=t.getTreeNode(e);n;){if(n.scopeRef&&n.scopeRef.current&&W.getTreeNode(n.scopeRef)){R(M(n.scopeRef.current,!0));return}n=n.parent}}})}}},[e,t])}function R(e){e.dispatchEvent(new CustomEvent(m,{bubbles:!0,cancelable:!0}))&&j(e)}function z(e,t,n){let r=t?.tabbable?x:b,i=c(e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){return t!=null&&t.from?.contains(e)?NodeFilter.FILTER_REJECT:e.matches(r)&&d(e)&&(!n||D(e,n))&&
vendor: 2,482 bytes, lines 1-2
1(!t?.accept||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(i.currentNode=t.from),i}function B(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return null;let{from:i,tabbable:a=t.tabbable,wrap:o=t.wrap,accept:s=t.accept}=n,l=i||c(r).activeElement,u=z(r,{tabbable:a,accept:s});r.contains(l)&&(u.currentNode=l);let d=u.nextNode();return!d&&o&&(u.currentNode=r,d=u.nextNode()),d&&j(d,!0),d},focusPrevious(n=t){let r=e.current;if(!r)return null;let{from:i,tabbable:a=t.tabbable,wrap:o=t.wrap,accept:s=t.accept}=n,l=i||c(r).activeElement,u=z(r,{tabbable:a,accept:s});if(r.contains(l))u.currentNode=l;else{let e=V(u);return e&&j(e,!0),e??null}let d=u.previousNode();if(!d&&o){u.currentNode=r;let e=V(u);if(!e)return null;d=e}return d&&j(d,!0),d??null},focusFirst(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:a=t.accept}=n,o=z(r,{tabbable:i,accept:a}).nextNode();return o&&j(o,!0),o},focusLast(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:a=t.accept}=n,o=V(z(r,{tabbable:i,accept:a}));return o&&j(o,!0),o??null}}}function V(e){let t,n;do n=e.lastChild(),n&&(t=n);while(n);return t}var H=class e{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let r=this.fastMap.get(t??null);if(!r)return;let i=new U({scopeRef:e});r.addChild(i),i.parent=r,this.fastMap.set(e,i),n&&(i.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&D(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let r=t.children;n&&(n.removeChild(t),r.size>0&&r.forEach(e=>n&&n.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){let t=new e;for(let e of this.traverse())t.addTreeNode(e.scopeRef,e.parent?.scopeRef??null,e.nodeToRestore);return t}constructor(){this.fastMap=new Map,this.root=new U({scopeRef:null}),this.fastMap.set(null,this.root)}},U=class{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}},W=new H;export{S as a,z as i,k as n,B as o,g as r,_ as t}; 2//# sourceMappingURL=FocusScope-O8uRcE-B.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.