PageSourceSearch

https://www.name.com/_nuxt/iQfhRfq4.js

js name.com collected 2026-09-24 10:24:06 UTC 5,317 bytes, 1 lines download raw bytes

1import{s as e,aA as t,aO as a,al as o,aP as r,L as l,P as s,A as n,l as u,I as i,aQ as d,K as c,e as m,aR as v,aS as p,aG as f,aT as h,a0 as w,p as b,U as x,J as y,ae as g,o as T,a as k,y as $,d as z,w as I,c as P,ay as B,az as M,F as C}from"./U_BMSM8o.js";import{T as O}from"./Djs8wled.js";var V=c({name:"NMenuRender",props:{menu:{required:!0,type:Object}},emits:["deactivate"],setup(c,{emit:m}){const v=u(0),p=u(),{width:f,height:h}=d(),w=e(t,!1),b=a(p),x=i(()=>"top"===T.value?"bottom":"bottom"===T.value?"top":"left"===g.value?"right":"right"===g.value?"left":"top"),y=i(()=>{let e,t;return"boolean"==typeof c.menu.arrow?e="auto":"string"==typeof c.menu.arrow?e=c.menu.arrow:(e=c.menu.arrow?.position,t=c.menu.arrow?.offset),"auto"===e&&(e=x.value),e||="top",{horizontal:["top","bottom"].includes(e),position:e||"top",offset:t||"0%"}}),g=i(()=>{const{menu:e}=c;return"auto"===e.xPosition?e.box.left+e.box.width/2>f.value/2?"left":"right":e.xPosition}),T=i(()=>{const{menu:e}=c;return"auto"===e.yPosition?e.box.top+e.box.height/2>h.value/2?"top":"bottom":e.yPosition}),k=()=>{if(c.menu.arrow)return o("div",{class:`n-menu-arrow n-menu-arrow-${y.value.position}`,style:{[y.value.horizontal?"left":"top"]:`clamp(calc(5px + var(--arrow-size)), calc(${y.value.offset} + ${v.value}px), calc(100% - 5px - var(--arrow-size)))`}})},$=e=>{const t=e.fixed?0:window.scrollX,a=e.fixed?0:window.scrollY,o={top:void 0,left:void 0,right:void 0,bottom:void 0,width:void 0,position:"absolute",transform:""},r={left:0,xTransform:0,top:0,yTransform:0,width:0};switch("string"==typeof e.width&&e.width.includes("%")?r.width=e.box.width*(Number.parseFloat(e.width)/100):r.width=Number.parseFloat(String(e.width)),r.left=e.box.left,r.top=e.box.top,e.fixed&&(o.position="fixed"),r.left+=t,r.top+=a,g.value){case"center":r.left+=e.box.width/2,r.xTransform=-.5;break;case"start":break;case"end":r.left+=e.box.width,r.xTransform=-1;break;case"left":r.left-=10,r.xTransform=-1;break;case"right":r.left=r.left+e.box.width+10}switch(T.value){case"center":r.top+=e.box.height/2,r.yTransform=-.5;break;case"start":break;case"end":r.top+=e.box.height,r.yTransform=-1;break;case"top":r.top-=10,r.yTransform=-1;break;case"bottom":r.top=r.top+e.box.height+10}if(v.value=y.value.horizontal?-r.xTransform*b.width.value:-r.yTransform*b.height.value,e.clampViewport){const l=r.xTransform*b.width.value,s=r.yTransform*b.height.value,n=r.left+l+b.width.value>t+f.value,u=r.left+l<t,i=r.top+s<a,d=r.top+s+b.height.value>a+h.value;o.zIndex=300,!e.fixed&&(n||u||i||d)&&(o.position="fixed",r.left-=t,r.top-=a),u&&(r.left=0,r.xTransform=0),n&&(r.left=f.value,r.xTransform=-1),i&&(r.top=0,r.yTransform=0),d&&(r.to
1p=h.value,r.yTransform=-1)}return o.transform=`translate(${100*r.xTransform+"%"}, ${100*r.yTransform+"%"})`,o.left=`${r.left}px`,o.top=`${r.top}px`,o.width=`${r.width}px`,o};return()=>o(O,()=>(c.menu.closeOnClickOutside&&(c.menu.clickable?r(p,e=>{c.menu.activatorEl&&e.composedPath().includes(c.menu.activatorEl)||setTimeout(()=>{m("deactivate")})}):r(l(c.menu,"activatorEl"),()=>{setTimeout(()=>{m("deactivate")})})),c.menu.active?o("div",{...c.menu.attrs,key:c.menu.id,class:`${s({"n-menus-menu":!0,[""+(n(w)?"z-[300]":"z-50")]:!0,"bg-white-auto rounded border-gray-300 dark:border-gray-700 border shadow-xl":!c.menu.plain})} ${s(c.menu.attrs?.class)}`,style:$(c.menu),ref:p,role:"menu",id:c.menu.menuId,"aria-labeledby":c.menu.id},[...c.menu.arrow?[k()]:[],o("div",c.menu.content())]):[]))}},[["__scopeId","data-v-b54b5849"]]),A=m({...m({inheritAttrs:!1}),__name:"NMenu",props:{targetClosest:{default:void 0},targetInner:{default:void 0},activator:{default:"click"},xPosition:{default:"center"},yPosition:{default:"auto"},closeDelay:{default:0},arrow:{default:void 0},closeOnClickOutside:{type:Boolean,default:!0},clickable:{type:Boolean,default:!0},toggle:{type:Boolean},width:{default:"100%"},fixed:{type:Boolean},plain:{type:Boolean},clampViewport:{type:Boolean},modelValue:{type:Boolean,default:!1}},emits:["update:activatorAttrs","update:modelValue"],setup(e,{emit:t}){const o=t,r=e,l=v(r,"modelValue"),s=p(),n=`n-menu-${f()}`,d=i(()=>`${n}-menu`),c=u(null),m=u(null),O=a(()=>c.value||m.value),A=()=>{m.value=document.querySelector(`#${n}`),r.targetClosest?c.value=m.value?.closest(r.targetClosest):r.targetInner?c.value=m.value?.querySelector(r.targetInner):c.value=null,setTimeout(O.update,500)};let N;h(A),w(A),b(()=>r.targetClosest||r.targetInner,A);const _=()=>{clearTimeout(N),l.value=!0},D=()=>{r.closeDelay?N=setTimeout(()=>{l.value=!1},r.closeDelay):l.value=!1},E=()=>{(l.value?D:_)()},F=i(()=>"click"===r.activator?{onClick:r.toggle?E:_}:"focus"===r.activator?{onFocus:_,onBlur:r.toggle?D:void 0}:"hover"===r.activator?{onMouseover:_,onMouseout:r.toggle?D:void 0}:{}),S=i(()=>({id:n,"aria-haspopup":!0,...l.value?{"aria-controls":d.value,"aria-owns":d.value}:{},...F.value}));b(S,e=>{o("update:activatorAttrs",e)},{immediate:!0});const j=x(),q=y({id:n,menuId:d,active:l,content:s.default,activatorEl:m,box:O,attrs:i(()=>({...j,onMouseover:F.value.onMouseover,onMouseout:F.value.onMouseout})),...g(r)});return(e,t)=>(T(),k(C,null,[$(e.$slots,"activator",{attrs:S.value}),z(M,null,{default:I(()=>[(T(),P(B,{to:"#teleports"},[z(V,{menu:q,onDeactivate:t[0]||(t[0]=e=>q.active=!1)},null,8,["menu"])]))]),_:1})],64))}});export{A as N};

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.