PageSourceSearch

https://cdn-img.daxuesoutijiang.com/dx-college/_nuxt/bCtvC97J.js

js daxuesoutijiang.com collected 2026-09-24 10:20:03 UTC 6,256 bytes, 2 lines download raw bytes

1import{ai as $,r as _,o as R,aa as I,ak as q,aq as Z,a6 as se,d as oe,a4 as ae,C as g,i as T,n as M,aQ as re,a9 as ue}from"./DXgSIwu3.js";import{i as ce}from"./CiS8iwFx.js";const ie='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',de=e=>getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,Ae=e=>Array.from(e.querySelectorAll(ie)).filter(n=>ee(n)&&de(n)),ee=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.tabIndex<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},w="focus-trap.focus-after-trapped",O="focus-trap.focus-after-released",fe="focus-trap.focusout-prevented",j={cancelable:!0,bubbles:!1},le={cancelable:!0,bubbles:!1},W="focusAfterTrapped",J="focusAfterReleased",ve=Symbol("elFocusTrap"),N=_(),S=_(0),U=_(0);let m=0;const te=e=>{const n=[],s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0||o===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)n.push(s.currentNode);return n},Q=(e,n)=>{for(const s of e)if(!Ee(s,n))return s},Ee=(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},pe=e=>{const n=te(e),s=Q(n,e),o=Q(n.reverse(),e);return[s,o]},be=e=>e instanceof HTMLInputElement&&"select"in e,l=(e,n)=>{if(e&&e.focus){const s=document.activeElement;let o=!1;$(e)&&!ee(e)&&!e.getAttribute("tabindex")&&(e.setAttribute("tabindex","-1"),o=!0),e.focus({preventScroll:!0}),U.value=window.performance.now(),e!==s&&be(e)&&n&&e.select(),$(e)&&o&&e.removeAttribute("tabindex")}};function X(e,n){const s=[...e],o=e.indexOf(n);return o!==-1&&s.splice(o,1),s}const Te=()=>{let e=[];return{push:o=>{const r=e[0];r&&o!==r&&r.pause(),e=X(e,o),e.unshift(o)},remove:o=>{var r,d;e=X(e,o),(d=(r=e[0])==null?void 0:r.resume)==null||d.call(r)}}},me=(e,n=!1)=>{const s=document.activeElement;for(const o of e)if(l(o,n),document.activeElement!==s)return},Y=Te(),Fe=()=>S.value>U.value,F=()=>{N.value="pointer",S.value=window.performance.now()},z=()=>{N.value="keyboard",S.value=window.performance.now()},ye=()=>(R(()=>{m===0&&(document.addEventListener("mousedown",F),document.addEventListener("touchstart",F),document.addEventListener("keydown",z)),m++}),I(()=>{m--,m<=0&&(document.removeEventListener("mousedown",F),document.removeEventListener("touchstart",F),document.removeEventListener("keydown",z))}),{focusReason:N,lastUserFocusTimestamp:S,lastAutomatedFocusTimestamp:U}),y=e=>new CustomEvent(fe,{...le,detail:e});let E=[];const G=e=>{e.code===Z.esc&&E.forEach(n=>n(e))},_e=e=>{R(()=>{E.length===0&&document.addEventListener("keydown",G),q&&E.push(e)}),I(()=>{E=E.filter(n=>n!==e),E.length===0&&q&&document.removeEventListener("keydown",G)})},Se=oe({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[W,J,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:n}){const s=_();let o,r;const{focusReason:d}=ye();_e(t=>{e.trapped&&!v.paused&&n("release-requested",t)});const v={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},p=t=>{if(!e.loop&&!e.trapped||v.paused)return;const{code:a,altKey:u,ctrlKey:c,metaKey:i,currentTarget:B,shiftKey:V}=t,{loop:H}=e,ne=a===Z.tab&&!u&&!c&&!i,b=document.activeElement;if(ne&&b){const P=B,[C,A]=pe(P);if(C&&A){if(!V&&b===A){const f=y({focusReason:d.value});n("focusout-prevented",f),f.defaultPrevented||(t.preventDefault(),H&&l(C,!0))}else if(V&&[C,P].includes(b)){const f=y({focusReason:d.value});n("focusout-prevented",f),f.defaultPrevented||(t.preventDefault(),H&&l(A,!0))}}else if(b===P){const f=y({focusReason:d.value});n("focusout-prevented",f),f.defaultPrevented||t.preventDefault()}}};ue(ve,{focusTrapRef:s,onKeydown:p}),g(()=>e.focusTrapEl,t=>{t&&(s.value=t)},{immediate:!0}),g([s],([t],[a])=>{t&&(t.addEventListener("keydown",p),t.addEventListener("focusin",L),t.addEventListener("focusout",h)),a&&(a.removeEventListener("keydown",p),a.removeEventListener("focusin",L),a.removeEventListener("focusout",h))});const k=t=>{n(W,t)},x=t=>n(J,t),L=t=>{const a=T(s);if(!a)return;const u=t.target,c=t.relatedTarget,i=u&&a.contains(u);e.trapped||c&&a.contains(c)||(o=c),i&&n("focusin",t),!v.paused&&e.trapped&&(i?r=u:l(r,!0))},h=t=>{const a=T(s);if(!(v.paused||!a))if(e.trapped){const u=t.relatedTarget;!ce(u)&&!a.contains(u)&&setTimeout(()=>
1{if(!v.paused&&e.trapped){const c=y({focusReason:d.value});n("focusout-prevented",c),c.defaultPrevented||l(r,!0)}},0)}else{const u=t.target;u&&a.contains(u)||n("focusout",t)}};async function K(){await M();const t=T(s);if(t){Y.push(v);const a=t.contains(document.activeElement)?o:document.activeElement;if(o=a,!t.contains(a)){const c=new Event(w,j);t.addEventListener(w,k),t.dispatchEvent(c),c.defaultPrevented||M(()=>{let i=e.focusStartEl;re(i)||(l(i),document.activeElement!==i&&(i="first")),i==="first"&&me(te(t),!0),(document.activeElement===a||i==="container")&&l(t)})}}}function D(){const t=T(s);if(t){t.removeEventListener(w,k);const a=new CustomEvent(O,{...j,detail:{focusReason:d.value}});t.addEventListener(O,x),t.dispatchEvent(a),!a.defaultPrevented&&(d.value=="keyboard"||!Fe()||t.contains(document.activeElement))&&l(o??document.body),t.removeEventListener(O,x),Y.remove(v)}}return R(()=>{e.trapped&&K(),g(()=>e.trapped,t=>{t?K():D()})}),I(()=>{e.trapped&&D(),s.value&&(s.value.removeEventListener("keydown",p),s.value.removeEventListener("focusin",L),s.value.removeEventListener("focusout",h),s.value=void 0)}),{onKeydown:p}}});function Le(e,n,s,o,r,d){return ae(e.$slots,"default",{handleKeydown:e.onKeydown})}var ge=se(Se,[["render",Le],["__file","focus-trap.vue"]]);export{ge as E,ve as F,ee as i,Ae as o,l as t};
2//# sourceMappingURL=bCtvC97J.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.