{"version":3,"names":["tabsIndicatorPrehydrationScript"],"sources":["prehydration-script.ts"],"sourcesContent":["// Ported verbatim from `@base-ui/react`'s\n// `tabs/indicator/prehydrationScript.min.ts`. Inlined inert JS string that runs\n// BEFORE Solid hydration to position the tab indicator from the SSR'd active\n// tab's measured geometry — it sets the `--active-tab-{left,right,top,bottom,\n// width,height}` CSS vars on the indicator and removes the `hidden` attribute\n// once a non-zero box is measured. This minimizes the window where the\n// indicator is invisible after SSR, before the client measurement effects run.\n//\n// Emitted only server-side, gated on `isHydrating && renderBeforeHydration`\n// (see `tabs-indicator.tsx`). The script reads\n// `document.currentScript.previousElementSibling` (the indicator) so it must\n// be rendered as the indicator element's immediately-following sibling.\n//\n// Keep this byte-for-byte in sync with the React source; regenerate there via\n// `pnpm inline-scripts` and re-copy if the React template changes.\n// The `${...}` sequences are real backtick-template interpolations INSIDE the\n// inlined script body (kept verbatim from React's minified output), not stray\n// placeholders in this outer single-quoted string — suppress the false positive.\nexport const tabsIndicatorPrehydrationScript =\n\t// biome-ignore lint/suspicious/noTemplateCurlyInString: verbatim minified script body\n\t'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\\'[role=\"tablist\"]\\');if(!e)return;const i=e.querySelector(\"[data-active]\");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c(\"left\",o),c(\"right\",n),c(\"top\",h),c(\"bottom\",l),c(\"width\",r),c(\"height\",f),r>0&&f>0&&t.removeAttribute(\"hidden\")}();';\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,+BAA+B;AAC3C;AACA,ojCAAojC","ignoreList":[]}