PageSourceSearch

https://www.dentalspecialtyflorida.com/build-next/assets/before-after--Q9KueU1.js

js dentalspecialtyflorida.com collected 2026-10-04 20:12:28 UTC 3,653 bytes, 1 lines download raw bytes

1const F=".ba-handle",A="is-dragging",y="is-animating";const T=(t,o,s)=>Math.min(s,Math.max(o,t)),G=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function H(t,o={}){const{initial:s=50,step:f=1,animateJumps:b=!0,label:z="Drag to compare the before and after images",onChange:N}=o,n=t.querySelector(F);if(!n)throw new Error("[before-after] missing .ba-handle inside the slider root");let i=T(s,0,100),w=!1,c=null,p=null,v=0,D=0,u=!1,h=0;const _=()=>{const e=t.clientWidth;return e?n.offsetWidth/2/e*100:0},O=e=>{const r=_();return T(e,r,100-r)},L=e=>{const r=t.getBoundingClientRect();return r.width?(e-r.left)/r.width*100:i},X=()=>{const e=Math.round(i);t.style.setProperty("--ba-pos",`${i}%`),n.setAttribute("aria-valuenow",String(e)),n.setAttribute("aria-valuetext",`${e}% — left shows the before image, right shows the after image`),N?.(i)},a=(e,r)=>{i=O(e),r&&b&&!G()&&(t.classList.add(y),window.clearTimeout(h),h=window.setTimeout(()=>t.classList.remove(y),240)),X()},M=()=>{v=0,a(L(D),!1)},k=e=>{!w||e.pointerId!==p||(D=e.clientX,v||(v=window.requestAnimationFrame(M)))},d=()=>{if(w){if(w=!1,v&&(window.cancelAnimationFrame(v),M()),window.removeEventListener("pointermove",k),window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",d),c&&(c.removeEventListener("lostpointercapture",d),p!==null))try{c.releasePointerCapture(p)}catch{}c=null,p=null,t.classList.remove(A)}},S=(e,r)=>{if(!w){w=!0,p=e.pointerId,c=e.currentTarget,t.classList.add(A);try{c.setPointerCapture(e.pointerId)}catch{}c.addEventListener("lostpointercapture",d),window.addEventListener("pointermove",k),window.addEventListener("pointerup",d),window.addEventListener("pointercancel",d),r&&a(L(e.clientX),!1)}},C=e=>{u=!1,e.preventDefault(),n.focus(),u=!0,S(e,!1)},P=e=>{u=!1,e.pointerType!=="touch"&&(n.contains(e.target)||(e.preventDefault(),n.focus(),u=!0,S(e,!0)))},I=e=>{if(u){u=!1;return}n.contains(e.target)||(a(L(e.clientX),!0),n.focus())},R=e=>{const r=f*10;let l;switch(e.key){case"ArrowLeft":case"ArrowDown":l=i-f;break;case"ArrowRight":case"ArrowUp":l=i+f;break;case"PageDown":l=i-r;break;case"PageUp":l=i+r;break;case"Home":l=0;break;case"End":l=100;break;case" ":case"Enter":e.preventDefault();return;default:return}e.preventDefault(),a(l,!0)},g=()=>{a(i,!1)};let E=null;return typeof ResizeObserver<"u"?(E=new ResizeObserver(g),E.observe(t)):typeof window<"u"&&window.addEventListener("resize",g),n.setAttribute("role","slider"),n.setAttribute("aria-label",z),n.setAttribute("aria-orientation","horizontal"),n.setAttribute("aria-valuemin","0"),n.setAttribute("aria-valuemax","100"),n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"),n.addEventListener("pointerdown",C),t.addEventListener("pointerdown",P),t.addEventListener("click",I),n.addEventListener("keydown",R),a(i,!1),{el:t,get position(){return i},setPosition:(e,r=!0)=>a(e,r),update:()=>a(i,!1),destroy:()=>{d(),window.clearTimeout(h),n.removeEventListener("pointerdown",C),t.removeEventListener("pointerdown",P),t.removeEventListener("click",I),n.removeEventListener("keydown",R),E?.disconnect(),typeof window<"u"&&window.removeEventListener("resize",g),t.classList.remove(A,y)}}}const x=".ba-slider",m=new Map;function q(t,o){const s=t.matches(x)?t:t.querySelector(x);if(!s){console.error("[next:before-after] no .ba-slider root found inside",t);return}if(m.has(s))return;const f=o&&typeof o=="object"?o:{};try{m.set(s,H(s,f))}catch(b){console.error("[next:before-after] engine boot failed:",b)}}function B(){for(const[t,o]of m)o.destroy(),m.delete(t)}export{B as destroy,q as initialize};

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.