PageSourceSearch

https://cdn.aikissfiy.com/releases/aikissfiy/versions/2026/09/30/5fdce8e2/sources/BbQhTpGP.js

js aikissfiy.com collected 2026-10-07 10:46:42 UTC 5,790 bytes, 1 lines download raw bytes

1import{f as oe}from"./BXOgFJg-.js";import{o as I,M as N,r as y,aQ as M,bC as Z,aD as ee,ac as te,az as k,v as O,e as T,n as q,bi as re,aV as ae,aA as ce,aH as ue,j as ie,a as de,b8 as fe,aW as le}from"./BW8Gosg2.js";import{i as ve}from"./BuA_bKv5.js";const g="focus-trap.focus-after-trapped",R="focus-trap.focus-after-released",pe="focus-trap.focusout-prevented",x={cancelable:!0,bubbles:!1},Ee={cancelable:!0,bubbles:!1},W="focusAfterTrapped",z="focusAfterReleased",me=Symbol("elFocusTrap"),A=y(),P=y(0),U=y(0);let F=0;const ne=e=>{const n=[],s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0||o===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)n.push(s.currentNode);return n},J=(e,n)=>{for(const s of e)if(!Te(s,n))return s},Te=(e,n)=>{if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},Fe=e=>{const n=ne(e),s=J(n,e),o=J(n.reverse(),e);return[s,o]},be=e=>e instanceof HTMLInputElement&&"select"in e,l=(e,n)=>{if(e){const s=document.activeElement;oe(e,{preventScroll:!0}),U.value=window.performance.now(),e!==s&&be(e)&&n&&e.select()}};function Q(e,n){const s=[...e],o=e.indexOf(n);return o!==-1&&s.splice(o,1),s}const _e=()=>{let e=[];return{push:o=>{const a=e[0];a&&o!==a&&a.pause(),e=Q(e,o),e.unshift(o)},remove:o=>{var a,d;e=Q(e,o),(d=(a=e[0])==null?void 0:a.resume)==null||d.call(a)}}},ye=(e,n=!1)=>{const s=document.activeElement;for(const o of e)if(l(o,n),document.activeElement!==s)return},Y=_e(),Pe=()=>P.value>U.value,b=()=>{A.value="pointer",P.value=window.performance.now()},G=()=>{A.value="keyboard",P.value=window.performance.now()},Le=()=>(I(()=>{F===0&&(document.addEventListener("mousedown",b),document.addEventListener("touchstart",b),document.addEventListener("keydown",G)),F++}),N(()=>{F--,F<=0&&(document.removeEventListener("mousedown",b),document.removeEventListener("touchstart",b),document.removeEventListener("keydown",G))}),{focusReason:A,lastUserFocusTimestamp:P,lastAutomatedFocusTimestamp:U}),_=e=>new CustomEvent(pe,{...Ee,detail:e});let p=[];const X=e=>{e.code===Z.esc&&p.forEach(n=>n(e))},Se=e=>{I(()=>{p.length===0&&document.addEventListener("keydown",X),M&&p.push(e)}),N(()=>{p=p.filter(n=>n!==e),p.length===0&&M&&document.removeEventListener("keydown",X)})},he=te({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[W,z,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:n}){const s=y();let o,a;const{focusReason:d}=Le();Se(t=>{e.trapped&&!v.paused&&n("release-requested",t)});const v={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},E=t=>{if(!e.loop&&!e.trapped||v.paused)return;const{code:r,altKey:c,ctrlKey:u,metaKey:i,currentTarget:H,shiftKey:V}=t,{loop:j}=e,se=r===Z.tab&&!c&&!u&&!i,m=document.activeElement;if(se&&m){const h=H,[w,C]=Fe(h);if(w&&C){if(!V&&m===C){const f=_({focusReason:d.value});n("focusout-prevented",f),f.defaultPrevented||(t.preventDefault(),j&&l(w,!0))}else if(V&&[w,h].includes(m)){const f=_({focusReason:d.value});n("focusout-prevented",f),f.defaultPrevented||(t.preventDefault(),j&&l(C,!0))}}else if(m===h){const f=_({focusReason:d.value});n("focusout-prevented",f),f.defaultPrevented||t.preventDefault()}}};ae(me,{focusTrapRef:s,onKeydown:E}),O(()=>e.focusTrapEl,t=>{t&&(s.value=t)},{immediate:!0}),O([s],([t],[r])=>{t&&(t.addEventListener("keydown",E),t.addEventListener("focusin",L),t.addEventListener("focusout",S)),r&&(r.removeEventListener("keydown",E),r.removeEventListener("focusin",L),r.removeEventListener("focusout",S))});const K=t=>{n(W,t)},D=t=>n(z,t),L=t=>{const r=T(s);if(!r)return;const c=t.target,u=t.relatedTarget,i=c&&r.contains(c);e.trapped||u&&r.contains(u)||(o=u),i&&n("focusin",t),!v.paused&&e.trapped&&(i?a=c:l(a,!0))},S=t=>{const r=T(s);if(!(v.paused||!r))if(e.trapped){const c=t.relatedTarget;!ve(c)&&!r.contains(c)&&setTimeout(()=>{if(!v.paused&&e.trapped){const u=_({focusReason:d.value});n("focusout-prevented",u),u.defaultPrevented||l(a,!0)}},0)}else{const c=t.target;c&&r.contains(c)||n("focusout",t)}};async function $(){await q();const t=T(s);if(t){Y.push(v);const r=t.contains(document.activeElement)?o:document.activeElement;if(o=r,!t.contains(r)){const u=new Event(g,x);
1t.addEventListener(g,K),t.dispatchEvent(u),u.defaultPrevented||q(()=>{let i=e.focusStartEl;re(i)||(l(i),document.activeElement!==i&&(i="first")),i==="first"&&ye(ne(t),!0),(document.activeElement===r||i==="container")&&l(t)})}}}function B(){const t=T(s);if(t){t.removeEventListener(g,K);const r=new CustomEvent(R,{...x,detail:{focusReason:d.value}});t.addEventListener(R,D),t.dispatchEvent(r),!r.defaultPrevented&&(d.value=="keyboard"||!Pe()||t.contains(document.activeElement))&&l(o??document.body),t.removeEventListener(R,D),Y.remove(v),o=null,a=null}}return I(()=>{e.trapped&&$(),O(()=>e.trapped,t=>{t?$():B()})}),N(()=>{e.trapped&&B(),s.value&&(s.value.removeEventListener("keydown",E),s.value.removeEventListener("focusin",L),s.value.removeEventListener("focusout",S),s.value=void 0)}),{onKeydown:E}}});function we(e,n,s,o,a,d){return k(e.$slots,"default",{handleKeydown:e.onKeydown})}var Ae=ee(he,[["render",we],["__file","focus-trap.vue"]]);const Ce=ce({to:{type:ue([String,Object]),required:!0},disabled:Boolean}),Oe=te({__name:"teleport",props:Ce,setup(e){return(n,s)=>n.disabled?k(n.$slots,"default",{key:0}):(de(),ie(fe,{key:1,to:n.to},[k(n.$slots,"default")],8,["to"]))}});var ge=ee(Oe,[["__file","teleport.vue"]]);const Ue=le(ge);export{Ae as E,me as F,Ue as a,Ce as t,Se as u};

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.