PageSourceSearch

https://dburov.com/_nuxt/CaKLvQXh.js

js dburov.com collected 2026-10-06 07:10:40 UTC 2,651 bytes, 1 lines download raw bytes

1import{ar as w,d as O,am as P,an as q,r as v,as as x,ao as B,e as G,o as U,z as I,y as D,f as d,P as M,G as N}from"#entry";import{u as L}from"./LAt3co9Y.js";const V="rovingFocusGroup.onEntryFocus",k={bubbles:!1,cancelable:!0},K={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Y(e,o){return o!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Q(e,o,a){const t=Y(e.key,a);if(!(o==="vertical"&&["ArrowLeft","ArrowRight"].includes(t))&&!(o==="horizontal"&&["ArrowUp","ArrowDown"].includes(t)))return K[t]}function $(e,o=!1){const a=w();for(const t of e)if(t===a||(t.focus({preventScroll:o}),w()!==a))return}function W(e,o){return e.map((a,t)=>e[(o+t)%e.length])}const[X,z]=B("RovingFocusGroup");var j=O({__name:"RovingFocusGroup",props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["entryFocus","update:currentTabStopId"],setup(e,{expose:o,emit:a}){const t=e,g=a,{loop:S,orientation:m,dir:T}=P(t),F=L(T),f=q(t,"currentTabStopId",g,{defaultValue:t.defaultCurrentTabStopId,passive:t.currentTabStopId===void 0}),i=v(!1),l=v(!1),p=v(0),{getItems:b,CollectionSlot:A}=x({isProvider:!0});function h(r){const s=!l.value;if(r.currentTarget&&r.target===r.currentTarget&&s&&!i.value){const u=new CustomEvent(V,k);if(r.currentTarget.dispatchEvent(u),g("entryFocus",u),!u.defaultPrevented){const c=b().map(n=>n.ref).filter(n=>n.dataset.disabled!==""),y=c.find(n=>n.getAttribute("data-active")===""),C=c.find(n=>n.getAttribute("data-highlighted")===""),_=c.find(n=>n.id===f.value),R=[y,C,_,...c].filter(Boolean);$(R,t.preventScrollOnEntryFocus)}}l.value=!1}function E(){setTimeout(()=>{l.value=!1},1)}return o({getItems:b}),z({loop:S,dir:F,orientation:m,currentTabStopId:f,onItemFocus:r=>{f.value=r},onItemShiftTab:()=>{i.value=!0},onFocusableItemAdd:()=>{p.value++},onFocusableItemRemove:()=>{p.value--}}),(r,s)=>(U(),G(d(A),null,{default:I(()=>[D(d(M),{tabindex:i.value||p.value===0?-1:0,"data-orientation":d(m),as:r.as,"as-child":r.asChild,dir:d(F),style:{outline:"none"},onMousedown:s[0]||(s[0]=u=>l.value=!0),onMouseup:E,onFocus:h,onBlur:s[1]||(s[1]=u=>i.value=!1)},{default:I(()=>[N(r.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),Z=j;export{K as M,Z as R,$ as f,Q as g,X as i,W as w};

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.