PageSourceSearch

https://fapemig.br/_nuxt/CGXAhkZX.js

js fapemig.br collected 2026-09-24 09:00:08 UTC 4,096 bytes, 1 lines download raw bytes

1import{d as j,u as G,r as d,w as g,z as H,ab as h,aa as K,c as _,a1 as z,K as w,e as f,f as E,F,g as r,p as P,q as J,a6 as Q,k as M,o as y,t as X,l as Y}from"./CPl0olws.js";import{I as Z}from"./RaRdeYfi.js";import{u as ee}from"./Mw2uc-_D.js";const te={class:"f_tabs-scroll-button"},ae={class:"f_tabs-track"},le=["aria-label","aria-selected","onClick"],oe={class:"f_tabs-button__label"},se={class:"f_tabs-scroll-button"},ne=j({__name:"FTabs",props:{modelValue:{default:""},items:{default:()=>[]},width:{default:"max-content"},fullWidth:{type:Boolean,default:!1},bgColor:{default:""},bgColorMobile:{default:""}},emits:["update:modelValue"],setup(B,{emit:R}){const{isMobile:$}=G(),l=B,D=R,u=M(()=>l.items?.map(e=>typeof e=="string"?{label:e,value:e}:e)??[]),s=d(u.value[0]?.value||""),b=d(!1),m=d(!1),p=d(!1),c=d([]);g(s,e=>{D("update:modelValue",e),V()}),g(()=>l.modelValue,e=>{e&&e!==s.value&&(s.value=e)},{immediate:!0});const{containerRef:o,onMouseDown:L,onMouseMove:k,onMouseUp:C,onMouseLeave:x}=ee(),q=M(()=>$.value?"100%":l.width),S=M(()=>({"bg-primary-100 dark:bg-dark-primary-100":!l.bgColor,[l.bgColor||""]:!!l.bgColor,"sm:bg-primary-100 sm:dark:bg-dark-primary-100":!l.bgColorMobile,[l.bgColorMobile||"sm:bg-primary-100 sm:dark:bg-dark-primary-100"]:!!l.bgColorMobile}));function W(e){return`${e.label}${e.count||e.count===0?` (${e.count})`:""}`}function A(e,a){e instanceof HTMLElement&&(c.value[a]=e)}function i(){if(!o.value){b.value=!1,m.value=!1,p.value=!1;return}const{scrollLeft:e,clientWidth:a,scrollWidth:t}=o.value,n=Math.max(t-a,0);p.value=t>a+1,b.value=e>1,m.value=e<n-1}function N(e){if(!o.value)return null;const a=e==="right"?o.value.scrollLeft+o.value.clientWidth:o.value.scrollLeft;return c.value.reduce((t,n)=>{const v=e==="right"?n.offsetLeft+n.offsetWidth:n.offsetLeft;if(!t)return n;const U=e==="right"?t.offsetLeft+t.offsetWidth:t.offsetLeft;return Math.abs(v-a)<Math.abs(U-a)?n:t},null)??null}function I(e){if(!o.value)return;const a=N(e);if(!a)return;const t=Math.max(o.value.scrollWidth-o.value.clientWidth,0),n=e==="right"?o.value.scrollLeft+a.offsetWidth:o.value.scrollLeft-a.offsetWidth;o.value.scrollTo({left:Math.min(Math.max(n,0),t),behavior:"smooth"})}async function V(){await h();const e=u.value.findIndex(t=>t.value===s.value);c.value[e]?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"}),i()}function O(){const e=u.value.map(a=>a.value);if(!e.length){s.value="";return}if(l.modelValue&&e.includes(l.modelValue)){s.value=l.modelValue;return}!e.includes(s.value)&&e[0]&&(s.value=e[0])}function T(){i()}return g(u,async()=>{c.value=[],O(),await h(),i()},{immediate:!0}),H(async()=>{await h(),i(),V(),typeof window<"u"&&window.addEventListener("resize",T)}),K(()=>{typeof window<"u"&&window.removeEventListener("resize",T)}),(e,a)=>(y(),_("nav",{class:w(["f_tabs",S.value]),style:z({width:q.value})},[f("div",te,[E(F,{class:"max-sm:hidden",size:"rounded",text:"","icon-src":Z,"aria-label":"Ir para a esquerda",disabled:!b.value,onClick:a[0]||(a[0]=t=>I("left"))},null,8,["disabled"])]),f("div",ae,[f("div",{ref_key:"containerRef",ref:o,role:"tablist","aria-orientation":"horizontal",class:w(["f_tabs-buttons",S.value,l.fullWidth?"w-full":""]),style:z({cursor:p.value?"grab":"default"}),onScroll:i,onMousedown:a[1]||(a[1]=(...t)=>r(L)&&r(L)(...t)),onMouseup:a[2]||(a[2]=(...t)=>r(C)&&r(C)(...t)),onMouseleave:a[3]||(a[3]=(...t)=>r(x)&&r(x)(...t)),onMousemove:a[4]||(a[4]=(...t)=>r(k)&&r(k)(...t))},[(y(!0),_(P,null,J(u.value,(t,n)=>(y(),_("button",{ref_for:!0,ref:v=>A(v,n),key:t.value,type:"button",role:"tab","aria-label":W(t),"aria-selected":t.value===s.value,class:w(["f_tabs-button",l.fullWidth?"f_tabs-button--full":"",t.value===s.value?"f_tabs-button--active":"f_tabs-button--inactive"]),onClick:v=>s.value=t.value},[f("span",oe,X(W(t)),1)],10,le))),128))],38)]),f("div",se,[E(F,{size:"rounded",text:"","icon-src":Q,"aria-label":"Ir para a direita",disabled:!m.value,onClick:a[5]||(a[5]=t=>I("right"))},null,8,["disabled"])])],6))}}),de=Object.assign(Y(ne,[["__scopeId","data-v-952e7b76"]]),{__name:"GeneralFTabs"});export{de as F};

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.