PageSourceSearch

https://www.invoxia.com/_nuxt/D-iS6dxw.js

js invoxia.com collected 2026-09-24 09:16:39 UTC 3,717 bytes, 1 lines download raw bytes

1import{i as e}from"./DFKnjcOR.js";import{D as t,Ht as n,Zn as r,_ as i,b as a,ct as o,g as s,it as c,k as l,mt as u,tt as d,vn as f,xt as p,y as m}from"./B4b-2GOK.js";import{t as h}from"./BDNMzG2s2.js";import{t as g}from"./CewcRIFV.js";var _={class:`relative w-full overflow-hidden`},v=[`is-next-active`,`is-prev-active`],y={class:`flex w-full justify-center gap-8 pt-6 pb-2 md:hidden`},b=l({__name:`CardsScrollerContainer`,props:{showArrows:{type:Boolean,default:!1},scrollerClass:{}},setup(e,{expose:l}){let h=e,b=f(null),x=f(0),S=f(0),C=f(0),w=f(0),T=f(0),E=s(()=>b.value),D=s(()=>h.showArrows&&!(T.value<w.value)),O=()=>{let e=E.value;if(!e)return{items:[],parent:null};let t=Array.from(e.children).filter(e=>e instanceof HTMLElement);if(t.length===1){let e=t[0],n=Array.from(e.children).filter(e=>e instanceof HTMLElement);if(n.length>0)return{items:n,parent:e}}return{items:t,parent:e}},k=()=>{let e=E.value;if(!e){x.value=0,S.value=0,w.value=0;return}x.value=e.scrollLeft,S.value=Math.max(e.scrollWidth-e.clientWidth,0),w.value=e.clientWidth},A=()=>{let{items:e,parent:t}=O();if(e.length===0){C.value=0,T.value=0;return}let n=e[0],r=n.getBoundingClientRect();if(e.length>1){let t=e[1].getBoundingClientRect();C.value=t.left-r.left}else{let e=t??n.parentElement;if(!e)C.value=r.width;else{let t=window.getComputedStyle(e),n=parseFloat(t.columnGap||t.gap||`0`);C.value=r.width+(Number.isNaN(n)?0:n)}}let i=r.width,a=t??n.parentElement,o=0;if(a){let e=window.getComputedStyle(a);o=parseFloat(e.columnGap||e.gap||`0`),Number.isNaN(o)&&(o=0)}T.value=e.length*i+(e.length+15)*o},j=async()=>{await d(),A(),k()},M=()=>{k()},N=()=>{j()},P=()=>{let e=E.value;if(!e||C.value<=0)return;let t=Math.max(e.scrollLeft-C.value,0);e.scrollTo({left:t,behavior:`smooth`})},F=()=>{let e=E.value;if(!e||C.value<=0)return;let t=Math.min(e.scrollLeft+C.value,S.value);e.scrollTo({left:t,behavior:`smooth`})},I=s(()=>x.value>0),L=s(()=>x.value<S.value-1),R=null,z=null;return o(()=>{let e=E.value;e&&(e.addEventListener(`scroll`,M,{passive:!0}),`ResizeObserver`in window&&(R=new ResizeObserver(()=>{j()}),R.observe(e)),z=new MutationObserver(()=>{j()}),z.observe(e,{childList:!0,subtree:!0})),window.addEventListener(`resize`,N),j()}),c(()=>{let e=E.value;e&&e.removeEventListener(`scroll`,M),window.removeEventListener(`resize`,N),R?.disconnect(),R=null,z?.disconnect(),z=null}),n(()=>h.showArrows,()=>{j()}),l({getScrollableElement:()=>b.value,scrollNext:F,scrollPrevious:P,isPrevActive:I,isNextActive:L}),(n,o)=>(u(),a(`div`,_,[i(`div`,{ref_key:`scroller`,ref:b,class:r([`scrollbar-hide flex overflow-x-auto`,e.scrollerClass])},[p(n.$slots,`default`,{},void 0,!0)],2),D.value?(u(),a(`div`,{key:0,name:`arrows`,"go-to-next":F,"go-to-previous":P,"is-next-active":L.value,"is-prev-active":I.value},[t(g,{class:`top-1/2 bottom-0 left-4 hidden h-fit p-4 md:absolute md:block`,active:I.value,direction:`left`,color:`grey`,"left-aria-label":`scrollLeft`,"right-aria-label":`scrollRight`,onClick:P},null,8,[`active`]),t(g,{class:`top-1/2 right-4 bottom-0 hidden h-fit p-4 md:absolute md:block`,active:L.value,direction:`right`,color:`grey`,"left-aria-label":`scrollLeft`,"right-aria-label":`scrollRight`,onClick:F},null,8,[`active`]),i(`div`,y,[p(n.$slots,`mobile-button`,{},void 0,!0),t(g,{class:`p-4`,active:I.value,direction:`left`,color:`grey`,"left-aria-label":`scrollLeft`,"right-aria-label":`scrollRight`,onClick:P},null,8,[`active`]),t(g,{class:`p-4`,active:L.value,color:`grey`,"left-aria-label":`scrollLeft`,"right-aria-label":`scrollRight`,onClick:F},null,8,[`active`])])],8,v)):m(``,!0)]))}}),x=e({default:()=>S}),S=Object.assign(h(b,[[`__scopeId`,`data-v-80d0dbc0`]]),{__name:`UiCardsScrollerContainer`});export{x as n,S as t};

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.