PageSourceSearch

https://www.anchorwe.com/_nuxt/eCuT5rYW.js

js anchorwe.com collected 2026-10-09 22:58:29 UTC 9,066 bytes, 1 lines download raw bytes

1import{a3 as ge,a4 as _e,a5 as Ce,a6 as K,a7 as Q,a8 as oe,i as M,a9 as Z,aa as ee,ab as U,r as w,a1 as L,a2 as te,ac as G,ad as Ne,o as re,c as ie,q as ce,u as z,ae as Te,af as ue,ag as ae,ah as A,ai as Pe,aj as we,ak as V,l as de,al as Se,d,a0 as D,am as Ee,an as $e,ao as xe,ap as I,aq as Be,S as J,ar as Oe,as as be,at as se,au as ke,av as Re,aw as ze,ax as ne,O as Ae,R as Fe,p as Le,v as Me,z as Ve,ay as De,az as Ie}from"./C3QhlAmE.js";const Ke=(e,l,b)=>_e(e.subTree).filter(s=>{var u;return Ce(s)&&((u=s.type)==null?void 0:u.name)===l&&!!s.component}).map(s=>s.component.uid).map(s=>b[s]).filter(s=>!!s),Ue=(e,l)=>{const b={},v=ge([]);return{children:v,addChild:u=>{b[u.uid]=u,v.value=Ke(e,l,b)},removeChild:u=>{delete b[u],v.value=v.value.filter(f=>f.uid!==u)}}},q=Symbol("tabsRootContextKey"),qe=K({tabs:{type:Q(Array),default:()=>oe([])}}),ve="ElTabBar",We=M({name:ve}),je=M({...We,props:qe,setup(e,{expose:l}){const b=e,v=ae(),t=Z(q);t||ee(ve,"<el-tabs><el-tab-bar /></el-tabs>");const s=U("tabs"),u=w(),f=w(),h=()=>{let o=0,y=0;const m=["top","bottom"].includes(t.props.tabPosition)?"width":"height",R=m==="width"?"x":"y",n=R==="x"?"left":"top";return b.tabs.every($=>{var x,B;const S=(B=(x=v.parent)==null?void 0:x.refs)==null?void 0:B[`tab-${$.uid}`];if(!S)return!1;if(!$.active)return!0;o=S[`offset${A(n)}`],y=S[`client${A(m)}`];const O=window.getComputedStyle(S);return m==="width"&&(y-=Number.parseFloat(O.paddingLeft)+Number.parseFloat(O.paddingRight),o+=Number.parseFloat(O.paddingLeft)),!1}),{[m]:`${y}px`,transform:`translate${A(R)}(${o}px)`}},N=()=>f.value=h(),_=[],i=()=>{var o;_.forEach(m=>m.stop()),_.length=0;const y=(o=v.parent)==null?void 0:o.refs;if(y){for(const m in y)if(m.startsWith("tab-")){const R=y[m];R&&_.push(G(R,N))}}};L(()=>b.tabs,async()=>{await te(),N(),i()},{immediate:!0});const p=G(u,()=>N());return Ne(()=>{_.forEach(o=>o.stop()),_.length=0,p.stop()}),l({ref:u,update:N}),(o,y)=>(re(),ie("div",{ref_key:"barRef",ref:u,class:ce([z(s).e("active-bar"),z(s).is(z(t).props.tabPosition)]),style:Te(f.value)},null,6))}});var He=ue(je,[["__file","tab-bar.vue"]]);const Xe=K({panes:{type:Q(Array),default:()=>oe([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),Ye={tabClick:(e,l,b)=>b instanceof Event,tabRemove:(e,l)=>l instanceof Event},le="ElTabNav",Ge=M({name:le,props:Xe,emits:Ye,setup(e,{expose:l,emit:b}){const v=Z(q);v||ee(le,"<el-tabs><tab-nav /></el-tabs>");const t=U("tabs"),s=Pe(),u=we(),f=w(),h=w(),N=w(),_=w(),i=w(!1),p=w(0),o=w(!1),y=w(!0),m=V(()=>["top","bottom"].includes(v.props.tabPosition)?"width":"height"),R=V(()=>({transform:`translate${m.value==="width"?"X":"Y"}(-${p.value}px)`})),n=()=>{if(!f.value)return;const r=f.value[`offset${A(m.value)}`],c=p.value;if(!c)return;const a=c>r?c-r:0;p.value=a},$=()=>{if(!f.value||!h.value)return;const r=h.value[`offset${A(m.value)}`],c=f.value[`offset${A(m.value)}`],a=p.value;if(r-a<=c)return;const T=r-a>c*2?a+c:r-c;p.value=T},x=async()=>{const r=h.value;if(!i.value||!N.value||!f.value||!r)return;await te();const c=N.value.querySelector(".is-active");if(!c)return;const a=f.value,T=["top","bottom"].includes(v.props.tabPosition),P=c.getBoundingClientRect(),C=a.getBoundingClientRect(),k=T?r.offsetWidth-C.width:r.offsetHeight-C.height,E=p.value;let g=E;T?(P.left<C.left&&(g=E-(C.left-P.left)),P.right>C.right&&(g=E+P.right-C.right)):(P.top<C.top&&(g=E-(C.top-P.top)),P.bottom>C.bottom&&(g=E+(P.bottom-C.bottom))),g=Math.max(g,0),p.value=Math.min(g,k)},B=()=>{var r;if(!h.value||!f.value)return;e.stretch&&((r=_.value)==null||r.update());const c=h.value[`offset${A(m.value)}`],a=f.value[`offset${A(m.value)}`],T=p.value;a<c?(i.value=i.value||{},i.value.prev=T,i.value.next=T+a<c,c-T<a&&(p.value=c-a)):(i.value=!1,T>0&&(p.value=0))},S=r=>{const c=r.code,{up:a,down:T,left:P,right:C}=I;if(![a,T,P,C].includes(c))return;const k=Array.from(r.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")),E=k.indexOf(r.target);let g;c===P||c===a?E===0?g=k.length-1:g=E-1:E<k.length-1?g=E+1:g=0,k[g].focus({preventScroll:!0}),k[g].click(),O()},O=()=>{y.value&&(o.value=!0)},W=()=>o.value=!1;return L(s,r=>{r==="hidden"?y.value=!1:r==="visible"&&setTimeout(()=>y.value=!0,50)}),L(u,r=>{r?setTimeout(()=>y.value=!0,50):y.value=!1}),G(N,B),de(()=>setTimeout(()=>x(),0)),Se(()=>B()),l({scrollToActiveTab:x,removeFocus:W}),()=>
1{const r=i.value?[d("span",{class:[t.e("nav-prev"),t.is("disabled",!i.value.prev)],onClick:n},[d(D,null,{default:()=>[d(Ee,null,null)]})]),d("span",{class:[t.e("nav-next"),t.is("disabled",!i.value.next)],onClick:$},[d(D,null,{default:()=>[d($e,null,null)]})])]:null,c=e.panes.map((a,T)=>{var P,C,k,E;const g=a.uid,j=a.props.disabled,H=(C=(P=a.props.name)!=null?P:a.index)!=null?C:`${T}`,X=!j&&(a.isClosable||e.editable);a.index=`${T}`;const me=X?d(D,{class:"is-icon-close",onClick:F=>b("tabRemove",a,F)},{default:()=>[d(xe,null,null)]}):null,he=((E=(k=a.slots).label)==null?void 0:E.call(k))||a.props.label,ye=!j&&a.active?0:-1;return d("div",{ref:`tab-${g}`,class:[t.e("item"),t.is(v.props.tabPosition),t.is("active",a.active),t.is("disabled",j),t.is("closable",X),t.is("focus",o.value)],id:`tab-${H}`,key:`tab-${g}`,"aria-controls":`pane-${H}`,role:"tab","aria-selected":a.active,tabindex:ye,onFocus:()=>O(),onBlur:()=>W(),onClick:F=>{W(),b("tabClick",a,H,F)},onKeydown:F=>{X&&(F.code===I.delete||F.code===I.backspace)&&b("tabRemove",a,F)}},[he,me])});return d("div",{ref:N,class:[t.e("nav-wrap"),t.is("scrollable",!!i.value),t.is(v.props.tabPosition)]},[r,d("div",{class:t.e("nav-scroll"),ref:f},[d("div",{class:[t.e("nav"),t.is(v.props.tabPosition),t.is("stretch",e.stretch&&["top","bottom"].includes(v.props.tabPosition))],ref:h,style:R.value,role:"tablist",onKeydown:S},[e.type?null:d(He,{ref:_,tabs:[...e.panes]},null),c])])])}}}),Je=K({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:Q(Function),default:()=>!0},stretch:Boolean}),Y=e=>ke(e)||Re(e),Qe={[be]:e=>Y(e),tabClick:(e,l)=>l instanceof Event,tabChange:e=>Y(e),edit:(e,l)=>["remove","add"].includes(l),tabRemove:e=>Y(e),tabAdd:()=>!0},Ze=M({name:"ElTabs",props:Je,emits:Qe,setup(e,{emit:l,slots:b,expose:v}){var t;const s=U("tabs"),u=V(()=>["left","right"].includes(e.tabPosition)),{children:f,addChild:h,removeChild:N}=Ue(ae(),"ElTabPane"),_=w(),i=w((t=e.modelValue)!=null?t:"0"),p=async(n,$=!1)=>{var x,B,S;if(!(i.value===n||se(n)))try{await((x=e.beforeLeave)==null?void 0:x.call(e,n,i.value))!==!1&&(i.value=n,$&&(l(be,n),l("tabChange",n)),(S=(B=_.value)==null?void 0:B.removeFocus)==null||S.call(B))}catch{}},o=(n,$,x)=>{n.props.disabled||(p($,!0),l("tabClick",n,x))},y=(n,$)=>{n.props.disabled||se(n.props.name)||($.stopPropagation(),l("edit",n.props.name,"remove"),l("tabRemove",n.props.name))},m=()=>{l("edit",void 0,"add"),l("tabAdd")};L(()=>e.modelValue,n=>p(n)),L(i,async()=>{var n;await te(),(n=_.value)==null||n.scrollToActiveTab()}),Be(q,{props:e,currentName:i,registerPane:n=>{f.value.push(n)},sortPane:h,unregisterPane:N}),v({currentName:i});const R=({render:n})=>n();return()=>{const n=b["add-icon"],$=e.editable||e.addable?d("div",{class:[s.e("new-tab"),u.value&&s.e("new-tab-vertical")],tabindex:"0",onClick:m,onKeydown:S=>{S.code===I.enter&&m()}},[n?J(b,"add-icon"):d(D,{class:s.is("icon-plus")},{default:()=>[d(Oe,null,null)]})]):null,x=d("div",{class:[s.e("header"),u.value&&s.e("header-vertical"),s.is(e.tabPosition)]},[d(R,{render:()=>{const S=f.value.some(O=>O.slots.label);return d(Ge,{ref:_,currentName:i.value,editable:e.editable,type:e.type,panes:f.value,stretch:e.stretch,onTabClick:o,onTabRemove:y},{$stable:!S})}},null),$]),B=d("div",{class:s.e("content")},[J(b,"default")]);return d("div",{class:[s.b(),s.m(e.tabPosition),{[s.m("card")]:e.type==="card",[s.m("border-card")]:e.type==="border-card"}]},[B,x])}}}),et=K({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),fe="ElTabPane",tt=M({name:fe}),at=M({...tt,props:et,setup(e){const l=e,b=ae(),v=ze(),t=Z(q);t||ee(fe,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const s=U("tab-pane"),u=w(),f=V(()=>l.closable||t.props.closable),h=ne(()=>{var o;return t.currentName.value===((o=l.name)!=null?o:u.value)}),N=w(h.value),_=V(()=>{var o;return(o=l.name)!=null?o:u.value}),i=ne(()=>!l.lazy||N.value||h.value);L(h,o=>{o&&(N.value=!0)});const p=Ae({uid:b.uid,slots:v,props:l,paneName:_,active:h,index:u,isClosable:f});return t.registerPane(p),de(()=>{t.sortPane(p)}),Fe(()=>{t.unregisterPane(p.uid)}),(o,y)=>z(i)?Le((re(),ie("div",{key:0,id:`pane-${z(_)}`,class:ce(z(s).b()),role:"tabpanel","aria-hidden":!z(h),"aria-labelledby":`tab-${z(_)}`},[J(o.$slots,"default")],10,["id","aria-hidden","aria-labelledby"])),[[Me,z(h)]]):Ve("v-if",!0)}});var pe=ue(at,[["__file","tab-pane.vue"]]);const nt=De(Ze,{TabPane:pe}),lt=Ie(pe);export{lt as E,nt as a};

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.