use-scroll-animate 4.0.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"webgl.js","sources":["../../src/components/webgl/gl.ts","../../src/components/webgl/elements.ts","../../src/components/webgl/index.ts"],"sourcesContent":["/** Minimal WebGL runner: one full-canvas quad, one fragment shader, optional image texture. */\n\nexport const VERTEX = 'attribute vec2 p;varying vec2 v_uv;void main(){v_uv=p*.5+.5;gl_Position=vec4(p,0.,1.);}';\nconst HEAD = 'precision mediump float;varying vec2 v_uv;uniform float u_time;uniform vec2 u_resolution;uniform vec2 u_mouse;uniform float u_hover;uniform sampler2D u_tex;uniform vec4 u_ripples[4];\\n';\n\n/** Built-in fragment shaders (bodies; uniforms `u_time`, `u_resolution`, `u_mouse` 0–1, `u_hover` 0–1, `u_tex`, `u_ripples[4]` = x, y, age, strength). */\nexport const SHADERS: Record<string, string> = {\n gradient: 'void main(){vec2 u=v_uv;float t=u_time*.15;vec3 a=vec3(.39,.4,.95),b=vec3(.93,.29,.6),c=vec3(.13,.83,.93);float k=.5+.5*sin(u.x*3.+t*2.)*cos(u.y*2.-t);vec3 col=mix(mix(a,b,u.x+.2*sin(t)),c,k*.6);gl_FragColor=vec4(col,1.);}',\n plasma: 'void main(){vec2 u=v_uv*4.;float t=u_time*.6;float v=sin(u.x+t)+sin(u.y+t*.7)+sin(u.x+u.y+t*.5)+sin(length(u-2.+vec2(sin(t),cos(t)))*2.);vec3 col=.5+.5*cos(v+vec3(0.,2.,4.));gl_FragColor=vec4(col,1.);}',\n waves: 'void main(){vec2 u=v_uv;float t=u_time*.4;float w=0.;for(int i=0;i<4;i++){float f=float(i)+1.;w+=sin(u.x*6.*f+t*f)*.08/f;}float l=smoothstep(.0,.02,abs(u.y-.5-w));vec3 col=mix(vec3(.2,.5,1.),vec3(.04,.06,.15),l)+vec3(.1,.0,.2)*u.y;gl_FragColor=vec4(col,1.);}',\n aurora: 'void main(){vec2 u=v_uv;float t=u_time*.2;float b=0.;for(int i=0;i<3;i++){float f=float(i);b+=.4/abs((u.y-.6+.15*sin(u.x*3.+t+f*1.7))*(8.+f*4.));}vec3 col=vec3(.02,.03,.08)+b*mix(vec3(.1,.9,.6),vec3(.6,.3,1.),u.x)*.35;gl_FragColor=vec4(col,1.);}',\n distort: 'void main(){vec2 u=v_uv;vec2 d=u-u_mouse;float r=length(d);float k=u_hover*.08*exp(-r*r*18.);u-=normalize(d+1e-4)*k;float s=u_hover*.006;vec3 col=vec3(texture2D(u_tex,u+vec2(s,0.)).r,texture2D(u_tex,u).g,texture2D(u_tex,u-vec2(s,0.)).b);gl_FragColor=vec4(col,1.);}',\n liquid: 'void main(){vec2 u=v_uv;vec2 o=vec2(0.);for(int i=0;i<4;i++){vec4 r=u_ripples[i];if(r.w>0.){float d=distance(u,r.xy);float w=sin(d*60.-r.z*12.)*exp(-d*6.)*exp(-r.z*1.6)*r.w*.02;o+=normalize(u-r.xy+1e-4)*w;}}o+=vec2(sin(u.y*10.+u_time),cos(u.x*10.+u_time))*.002*u_hover;gl_FragColor=texture2D(u_tex,u+o);}',\n};\n\n/** Full fragment source for a preset or custom body (adds the shared header). */\nexport function fragmentSource(body: string): string {\n const src = SHADERS[body] || body;\n return /precision\\s+\\w+\\s+float/.test(src) ? src : HEAD + src;\n}\n\n/** `true` when the browser can create a WebGL context (cached). */\nlet support: boolean | undefined;\nexport function supportsWebGL(): boolean {\n if (support !== undefined) return support;\n try {\n const c = typeof document !== 'undefined' ? document.createElement('canvas') : null;\n support = !!(c && (c.getContext('webgl') || c.getContext('experimental-webgl')));\n } catch {\n support = false;\n }\n return support;\n}\n\nexport interface GLQuad {\n /** Draw a frame with these uniform values. */\n render(u: { time?: number; mouse?: [number, number]; hover?: number; ripples?: number[] }): void;\n /** Resize the drawing buffer to the canvas' CSS size × DPR (≤ 2). */\n resize(): void;\n /** Upload an image as `u_tex`. */\n texture(img: TexImageSource): void;\n dispose(): void;\n}\n\n/** Compile `frag` on a full-canvas quad, or `null` when WebGL / compilation is unavailable. */\nexport function glQuad(canvas: HTMLCanvasElement, frag: string): GLQuad | null {\n let gl: WebGLRenderingContext | null = null;\n try {\n gl = (canvas.getContext('webgl', { premultipliedAlpha: false, antialias: false }) || canvas.getContext('experimental-webgl')) as WebGLRenderingContext | null;\n } catch {\n gl = null;\n }\n if (!gl) return null;\n const g = gl;\n const sh = (type: number, src: string) => {\n const s = g.createShader(type)!;\n g.shaderSource(s, src);\n g.compileShader(s);\n return g.getShaderParameter(s, g.COMPILE_STATUS) ? s : null;\n };\n const vs = sh(g.VERTEX_SHADER, VERTEX);\n const fs = sh(g.FRAGMENT_SHADER, fragmentSource(frag));\n if (!vs || !fs) return null;\n const prog = g.createProgram()!;\n g.attachShader(prog, vs);\n g.attachShader(prog, fs);\n g.linkProgram(prog);\n if (!g.getProgramParameter(prog, g.LINK_STATUS)) return null;\n g.useProgram(prog);\n const buf = g.createBuffer();\n g.bindBuffer(g.ARRAY_BUFFER, buf);\n g.bufferData(g.ARRAY_BUFFER, new Float32Array([-1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1]), g.STATIC_DRAW);\n const loc = g.getAttribLocation(prog, 'p');\n g.enableVertexAttribArray(loc);\n g.vertexAttribPointer(loc, 2, g.FLOAT, false, 0, 0);\n const U = (n: string) => g.getUniformLocation(prog, n);\n const uT = U('u_time'), uR = U('u_resolution'), uM = U('u_mouse'), uH = U('u_hover'), uRp = U('u_ripples');\n let tex: WebGLTexture | null = null;\n const quad: GLQuad = {\n resize() {\n const dpr = Math.min(2, (typeof devicePixelRatio === 'number' && devicePixelRatio) || 1);\n const w = Math.max(1, Math.round((canvas.clientWidth || 300) * dpr));\n const h = Math.max(1, Math.round((canvas.clientHeight || 150) * dpr));\n if (canvas.width !== w || canvas.height !== h) ((canvas.width = w), (canvas.height = h));\n g.viewport(0, 0, w, h);\n },\n texture(img) {\n tex = tex || g.createTexture();\n g.bindTexture(g.TEXTURE_2D, tex);\n g.pixelStorei(g.UNPACK_FLIP_Y_WEBGL, true);\n g.texParameteri(g.TEXTURE_2D, g.TEXTURE_WRAP_S, g.CLAMP_TO_EDGE);\n g.texParameteri(g.TEXTURE_2D, g.TEXTURE_WRAP_T, g.CLAMP_TO_EDGE);\n g.texParameteri(g.TEXTURE_2D, g.TEXTURE_MIN_FILTER, g.LINEAR);\n g.texImage2D(g.TEXTURE_2D, 0, g.RGBA, g.RGBA, g.UNSIGNED_BYTE, img);\n },\n render(u) {\n g.uniform1f(uT, u.time ?? 0);\n g.uniform2f(uR, canvas.width, canvas.height);\n g.uniform2f(uM, ...(u.mouse ?? [0.5, 0.5]));\n g.uniform1f(uH, u.hover ?? 0);\n if (uRp) g.uniform4fv(uRp, new Float32Array((u.ripples ?? []).concat(Array(16).fill(0)).slice(0, 16)));\n g.drawArrays(g.TRIANGLES, 0, 6);\n },\n dispose() {\n g.deleteProgram(prog);\n g.deleteBuffer(buf);\n if (tex) g.deleteTexture(tex);\n g.getExtension('WEBGL_lose_context')?.loseContext();\n },\n };\n quad.resize();\n return quad;\n}\n","import { defineElement, raf, caf, now, clamp, type UsaElement, getBase } from '../base';\n\ntype BaseCtor = ReturnType<typeof getBase>;\nimport { glQuad, type GLQuad } from './gl';\nimport css from './webgl.css?raw';\n\n/**\n * Shared shell for the WebGL elements: a canvas over (or behind) the\n * content that renders only while visible and the tab is shown, a DPR cap\n * of 2, and a graceful fallback (`data-fallback`) when WebGL, the shader\n * or the image (CORS) is unavailable — the original content / CSS stays.\n */\nexport interface UsaGLElement extends UsaElement {\n /** `true` once WebGL rendering is active (otherwise the CSS fallback shows). */\n readonly active: boolean;\n}\n\ntype Kind = 'shader' | 'distort' | 'liquid';\n\nfunction make(kind: Kind) {\n return (Base: BaseCtor): CustomElementConstructor =>\n class extends Base {\n static get observedAttributes(): string[] {\n return kind === 'shader' ? ['preset', 'speed'] : ['src'];\n }\n private _q: GLQuad | null = null;\n private _c: HTMLCanvasElement | null = null;\n private _id = 0;\n private _mouse: [number, number] = [0.5, 0.5];\n private _hover = 0;\n private _hoverTo = 0;\n private _ripples: { x: number; y: number; t: number }[] = [];\n\n get active(): boolean {\n return !!this._q;\n }\n\n private fallback(reason: string): void {\n this.setAttribute('data-fallback', reason);\n this._c?.remove();\n this._c = null;\n this._q?.dispose();\n this._q = null;\n }\n\n private frame(): void {\n const q = this._q;\n if (!q) return;\n this._hover += (this._hoverTo - this._hover) * 0.12;\n const t = now();\n this._ripples = this._ripples.filter((r) => t - r.t < 2500);\n q.render({\n time: (t / 1000) * this.num('speed', 1),\n mouse: this._mouse,\n hover: this._hover,\n ripples: this._ripples.flatMap((r) => [r.x, r.y, (t - r.t) / 1000, this.num('strength', 1)]),\n });\n }\n\n mount(): void {\n this.removeAttribute('data-fallback');\n const custom = this.querySelector('script[type=\"x-shader/x-fragment\"]');\n const frag = kind === 'shader' ? custom?.textContent || this.str('preset', 'gradient') : kind;\n const img = kind === 'shader' ? null : (this.querySelector('img') as HTMLImageElement | null);\n if (kind !== 'shader' && !img) return this.fallback('no-image');\n const c = (this._c = document.createElement('canvas'));\n c.setAttribute('aria-hidden', 'true');\n c.className = 'usa-gl';\n this.prepend(c);\n const q = (this._q = glQuad(c, frag));\n if (!q) return this.fallback('webgl');\n this.onCleanup(() => this.fallback('off'));\n const start = () => {\n if (!img) return true;\n try {\n q.texture(img);\n return true;\n } catch {\n this.fallback('image');\n return false;\n }\n };\n const draw = () => {\n q.resize();\n this.frame();\n };\n if (img && !(img.complete && img.naturalWidth)) {\n if (!img.crossOrigin && /^https?:/.test(img.src) && !img.src.startsWith(location.origin)) img.crossOrigin = 'anonymous';\n this.listen(img, 'load', () => start() && draw());\n this.listen(img, 'error', () => this.fallback('image'));\n } else if (!start()) return;\n this.setAttribute('data-active', '');\n this.onCleanup(() => this.removeAttribute('data-active'));\n draw();\n if (kind !== 'shader') {\n const pos = (e: PointerEvent) => {\n const r = this.getBoundingClientRect();\n this._mouse = [clamp((e.clientX - r.left) / (r.width || 1), 0, 1), clamp(1 - (e.clientY - r.top) / (r.height || 1), 0, 1)];\n };\n this.listen(this, 'pointermove', pos);\n this.listen(this, 'pointerenter', (e: PointerEvent) => (pos(e), (this._hoverTo = 1)));\n this.listen(this, 'pointerleave', () => (this._hoverTo = 0));\n if (kind === 'liquid')\n this.listen(this, 'pointerdown', (e: PointerEvent) => {\n pos(e);\n this._ripples = [...this._ripples.slice(-3), { x: this._mouse[0], y: this._mouse[1], t: now() }];\n });\n }\n if (this.reduced) return; // one static frame, no loop\n let visible = false;\n const loop = () => {\n this.frame();\n this._id = raf(loop);\n };\n const sync = () => {\n caf(this._id);\n this._id = 0;\n if (visible && !document.hidden) this._id = raf(loop);\n };\n this.inView((v: boolean) => ((visible = v), sync()));\n this.listen(document, 'visibilitychange', sync);\n this.listen(window, 'resize', () => q.resize(), { passive: true });\n this.onCleanup(() => caf(this._id));\n }\n };\n}\n\n/**\n * `<usa-shader>` — GPU shader background behind its content. `preset`\n * (`gradient` · `plasma` · `waves` · `aurora`) or your own fragment shader in\n * `<script type=\"x-shader/x-fragment\">` (uniforms `u_time`, `u_resolution`,\n * `u_mouse`, `v_uv`); `speed`. Without WebGL: the element's CSS background.\n */\nexport function defineShader(tag = 'usa-shader'): CustomElementConstructor | undefined {\n return defineElement(tag, make('shader'), { id: 'webgl', text: css });\n}\n\n/**\n * `<usa-distort>` — hover distortion + RGB split on the `<img>` inside,\n * following the pointer. Without WebGL / CORS: a gentle CSS zoom.\n */\nexport function defineDistort(tag = 'usa-distort'): CustomElementConstructor | undefined {\n return defineElement(tag, make('distort'), { id: 'webgl', text: css });\n}\n\n/**\n * `<usa-liquid>` — liquid image: clicks / taps send ripples through the\n * `<img>` inside, hover adds a gentle wobble; `strength`. Fallback: plain image.\n */\nexport function defineLiquid(tag = 'usa-liquid'): CustomElementConstructor | undefined {\n return defineElement(tag, make('liquid'), { id: 'webgl', text: css });\n}\n","/**\n * use-scroll-animate/components/webgl — lightweight canvas / WebGL (v3.4).\n * `<usa-shader>` (shader backgrounds), `<usa-distort>` (hover image\n * distortion), `<usa-liquid>` (ripple images) on a tiny single-quad runner\n * (`glQuad()`), with graceful fallbacks when WebGL is unavailable.\n */\nimport { defineShader, defineDistort, defineLiquid, type UsaGLElement } from './elements';\n\nexport { defineShader, defineDistort, defineLiquid };\nexport { glQuad, supportsWebGL, fragmentSource, SHADERS } from './gl';\nexport type { GLQuad } from './gl';\nexport type { UsaGLElement };\nexport { configureComponents, prefersReducedMotion } from '../base';\nexport type { ComponentsConfig, UsaElement } from '../base';\n\n/** Register every component of this category under its default tag. */\nexport function defineWebglComponents(): void {\n defineShader();\n defineDistort();\n defineLiquid();\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'usa-shader': UsaGLElement;\n 'usa-distort': UsaGLElement;\n 'usa-liquid': UsaGLElement;\n }\n}\n"],"names":[],"mappings":";;;AAAA;AAEO,MAAM,MAAM,GAAG,yFAAyF;AAC/G,MAAM,IAAI,GAAG,0LAA0L;AAEvM;AACO,MAAM,OAAO,GAA2B;AAC7C,IAAA,QAAQ,EAAE,gOAAgO;AAC1O,IAAA,MAAM,EAAE,2MAA2M;AACnN,IAAA,KAAK,EAAE,oQAAoQ;AAC3Q,IAAA,MAAM,EAAE,uPAAuP;AAC/P,IAAA,OAAO,EAAE,0QAA0Q;AACnR,IAAA,MAAM,EAAE,kTAAkT;;AAG5T;AACM,SAAU,cAAc,CAAC,IAAY,EAAA;IACzC,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI;AACjC,IAAA,OAAO,yBAAyB,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG;AAC/D;AAEA;AACA,IAAI,OAA4B;SAChB,aAAa,GAAA;IAC3B,IAAI,OAAO,KAAK,SAAS;AAAE,QAAA,OAAO,OAAO;AACzC,IAAA,IAAI;AACF,QAAA,MAAM,CAAC,GAAG,OAAO,QAAQ,KAAK,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M,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAClE,YAAA,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrC;KACD;AACL;AAEA;;;;;AAKG;AACG,SAAU,YAAY,CAAC,GAAG,GAAG,YAAY,EAAA;AAC7C,IAAA,OAAO,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AACvE;AAEA;;;AAGG;AACG,SAAU,aAAa,CAAC,GAAG,GAAG,aAAa,EAAA;AAC/C,IAAA,OAAO,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AACxE;AAEA;;;AAGG;AACG,SAAU,YAAY,CAAC,GAAG,GAAG,YAAY,EAAA;AAC7C,IAAA,OAAO,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AACvE;;ACvJA;;;;;AAKG;AAUH;SACgB,qBAAqB,GAAA;AACnC,IAAA,YAAY,EAAE;AACd,IAAA,aAAa,EAAE;AACf,IAAA,YAAY,EAAE;AAChB;;;;"}
1
+ {"version":3,"file":"webgl.js","sources":["../../src/components/webgl/gl.ts","../../src/components/webgl/elements.ts","../../src/components/webgl/index.ts"],"sourcesContent":["/** Minimal WebGL runner: one full-canvas quad, one fragment shader, optional image texture. */\n\nexport const VERTEX = 'attribute vec2 p;varying vec2 v_uv;void main(){v_uv=p*.5+.5;gl_Position=vec4(p,0.,1.);}';\nconst HEAD = 'precision mediump float;varying vec2 v_uv;uniform float u_time;uniform vec2 u_resolution;uniform vec2 u_mouse;uniform float u_hover;uniform sampler2D u_tex;uniform vec4 u_ripples[4];\\n';\n\n/** Built-in fragment shaders (bodies; uniforms `u_time`, `u_resolution`, `u_mouse` 0–1, `u_hover` 0–1, `u_tex`, `u_ripples[4]` = x, y, age, strength). */\nexport const SHADERS: Record<string, string> = {\n gradient: 'void main(){vec2 u=v_uv;float t=u_time*.15;vec3 a=vec3(.39,.4,.95),b=vec3(.93,.29,.6),c=vec3(.13,.83,.93);float k=.5+.5*sin(u.x*3.+t*2.)*cos(u.y*2.-t);vec3 col=mix(mix(a,b,u.x+.2*sin(t)),c,k*.6);gl_FragColor=vec4(col,1.);}',\n plasma: 'void main(){vec2 u=v_uv*4.;float t=u_time*.6;float v=sin(u.x+t)+sin(u.y+t*.7)+sin(u.x+u.y+t*.5)+sin(length(u-2.+vec2(sin(t),cos(t)))*2.);vec3 col=.5+.5*cos(v+vec3(0.,2.,4.));gl_FragColor=vec4(col,1.);}',\n waves: 'void main(){vec2 u=v_uv;float t=u_time*.4;float w=0.;for(int i=0;i<4;i++){float f=float(i)+1.;w+=sin(u.x*6.*f+t*f)*.08/f;}float l=smoothstep(.0,.02,abs(u.y-.5-w));vec3 col=mix(vec3(.2,.5,1.),vec3(.04,.06,.15),l)+vec3(.1,.0,.2)*u.y;gl_FragColor=vec4(col,1.);}',\n aurora: 'void main(){vec2 u=v_uv;float t=u_time*.2;float b=0.;for(int i=0;i<3;i++){float f=float(i);b+=.4/abs((u.y-.6+.15*sin(u.x*3.+t+f*1.7))*(8.+f*4.));}vec3 col=vec3(.02,.03,.08)+b*mix(vec3(.1,.9,.6),vec3(.6,.3,1.),u.x)*.35;gl_FragColor=vec4(col,1.);}',\n distort: 'void main(){vec2 u=v_uv;vec2 d=u-u_mouse;float r=length(d);float k=u_hover*.08*exp(-r*r*18.);u-=normalize(d+1e-4)*k;float s=u_hover*.006;vec3 col=vec3(texture2D(u_tex,u+vec2(s,0.)).r,texture2D(u_tex,u).g,texture2D(u_tex,u-vec2(s,0.)).b);gl_FragColor=vec4(col,1.);}',\n liquid: 'void main(){vec2 u=v_uv;vec2 o=vec2(0.);for(int i=0;i<4;i++){vec4 r=u_ripples[i];if(r.w>0.){float d=distance(u,r.xy);float w=sin(d*60.-r.z*12.)*exp(-d*6.)*exp(-r.z*1.6)*r.w*.02;o+=normalize(u-r.xy+1e-4)*w;}}o+=vec2(sin(u.y*10.+u_time),cos(u.x*10.+u_time))*.002*u_hover;gl_FragColor=texture2D(u_tex,u+o);}',\n};\n\n/** Full fragment source for a preset or custom body (adds the shared header). */\nexport function fragmentSource(body: string): string {\n const src = SHADERS[body] || body;\n return /precision\\s+\\w+\\s+float/.test(src) ? src : HEAD + src;\n}\n\n/** `true` when the browser can create a WebGL context (cached). */\nlet support: boolean | undefined;\nexport function supportsWebGL(): boolean {\n if (support !== undefined) return support;\n try {\n const c = typeof document !== 'undefined' ? document.createElement('canvas') : null;\n support = !!(c && (c.getContext('webgl') || c.getContext('experimental-webgl')));\n } catch {\n support = false;\n }\n return support;\n}\n\nexport interface GLQuad {\n /** Draw a frame with these uniform values. */\n render(u: { time?: number; mouse?: [number, number]; hover?: number; ripples?: number[] }): void;\n /** Resize the drawing buffer to the canvas' CSS size × DPR (≤ 2). */\n resize(): void;\n /** Upload an image as `u_tex`. */\n texture(img: TexImageSource): void;\n dispose(): void;\n}\n\n/** Compile `frag` on a full-canvas quad, or `null` when WebGL / compilation is unavailable. */\nexport function glQuad(canvas: HTMLCanvasElement, frag: string): GLQuad | null {\n let gl: WebGLRenderingContext | null = null;\n try {\n gl = (canvas.getContext('webgl', { premultipliedAlpha: false, antialias: false }) || canvas.getContext('experimental-webgl')) as WebGLRenderingContext | null;\n } catch {\n gl = null;\n }\n if (!gl) return null;\n const g = gl;\n const sh = (type: number, src: string) => {\n const s = g.createShader(type)!;\n g.shaderSource(s, src);\n g.compileShader(s);\n return g.getShaderParameter(s, g.COMPILE_STATUS) ? s : null;\n };\n const vs = sh(g.VERTEX_SHADER, VERTEX);\n const fs = sh(g.FRAGMENT_SHADER, fragmentSource(frag));\n if (!vs || !fs) return null;\n const prog = g.createProgram()!;\n g.attachShader(prog, vs);\n g.attachShader(prog, fs);\n g.linkProgram(prog);\n if (!g.getProgramParameter(prog, g.LINK_STATUS)) return null;\n g.useProgram(prog);\n const buf = g.createBuffer();\n g.bindBuffer(g.ARRAY_BUFFER, buf);\n g.bufferData(g.ARRAY_BUFFER, new Float32Array([-1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1]), g.STATIC_DRAW);\n const loc = g.getAttribLocation(prog, 'p');\n g.enableVertexAttribArray(loc);\n g.vertexAttribPointer(loc, 2, g.FLOAT, false, 0, 0);\n const U = (n: string) => g.getUniformLocation(prog, n);\n const uT = U('u_time'), uR = U('u_resolution'), uM = U('u_mouse'), uH = U('u_hover'), uRp = U('u_ripples');\n let tex: WebGLTexture | null = null;\n const quad: GLQuad = {\n resize() {\n const dpr = Math.min(2, (typeof devicePixelRatio === 'number' && devicePixelRatio) || 1);\n const w = Math.max(1, Math.round((canvas.clientWidth || 300) * dpr));\n const h = Math.max(1, Math.round((canvas.clientHeight || 150) * dpr));\n if (canvas.width !== w || canvas.height !== h) ((canvas.width = w), (canvas.height = h));\n g.viewport(0, 0, w, h);\n },\n texture(img) {\n tex = tex || g.createTexture();\n g.bindTexture(g.TEXTURE_2D, tex);\n g.pixelStorei(g.UNPACK_FLIP_Y_WEBGL, true);\n g.texParameteri(g.TEXTURE_2D, g.TEXTURE_WRAP_S, g.CLAMP_TO_EDGE);\n g.texParameteri(g.TEXTURE_2D, g.TEXTURE_WRAP_T, g.CLAMP_TO_EDGE);\n g.texParameteri(g.TEXTURE_2D, g.TEXTURE_MIN_FILTER, g.LINEAR);\n g.texImage2D(g.TEXTURE_2D, 0, g.RGBA, g.RGBA, g.UNSIGNED_BYTE, img);\n },\n render(u) {\n g.uniform1f(uT, u.time ?? 0);\n g.uniform2f(uR, canvas.width, canvas.height);\n g.uniform2f(uM, ...(u.mouse ?? [0.5, 0.5]));\n g.uniform1f(uH, u.hover ?? 0);\n if (uRp) g.uniform4fv(uRp, new Float32Array((u.ripples ?? []).concat(Array(16).fill(0)).slice(0, 16)));\n g.drawArrays(g.TRIANGLES, 0, 6);\n },\n dispose() {\n g.deleteProgram(prog);\n g.deleteBuffer(buf);\n if (tex) g.deleteTexture(tex);\n g.getExtension('WEBGL_lose_context')?.loseContext();\n },\n };\n quad.resize();\n return quad;\n}\n","import { defineElement, raf, caf, now, clamp, type UsaElement, getBase } from '../base';\n\ntype BaseCtor = ReturnType<typeof getBase>;\nimport { glQuad, type GLQuad } from './gl';\nimport css from './webgl.css?raw';\n\n/**\n * Shared shell for the WebGL elements: a canvas over (or behind) the\n * content that renders only while visible and the tab is shown, a DPR cap\n * of 2, and a graceful fallback (`data-fallback`) when WebGL, the shader\n * or the image (CORS) is unavailable — the original content / CSS stays.\n */\nexport interface UsaGLElement extends UsaElement {\n /** `true` once WebGL rendering is active (otherwise the CSS fallback shows). */\n readonly active: boolean;\n}\n\ntype Kind = 'shader' | 'distort' | 'liquid';\n\nfunction make(kind: Kind) {\n return (Base: BaseCtor): CustomElementConstructor =>\n class extends Base {\n static get observedAttributes(): string[] {\n return kind === 'shader' ? ['preset', 'speed'] : ['src'];\n }\n private _q: GLQuad | null = null;\n private _c: HTMLCanvasElement | null = null;\n private _id = 0;\n private _mouse: [number, number] = [0.5, 0.5];\n private _hover = 0;\n private _hoverTo = 0;\n private _ripples: { x: number; y: number; t: number }[] = [];\n\n get active(): boolean {\n return !!this._q;\n }\n\n private fallback(reason: string): void {\n this.setAttribute('data-fallback', reason);\n this._c?.remove();\n this._c = null;\n this._q?.dispose();\n this._q = null;\n }\n\n private frame(): void {\n const q = this._q;\n if (!q) return;\n this._hover += (this._hoverTo - this._hover) * 0.12;\n const t = now();\n this._ripples = this._ripples.filter((r) => t - r.t < 2500);\n q.render({\n time: (t / 1000) * this.num('speed', 1),\n mouse: this._mouse,\n hover: this._hover,\n ripples: this._ripples.flatMap((r) => [r.x, r.y, (t - r.t) / 1000, this.num('strength', 1)]),\n });\n }\n\n mount(): void {\n this.removeAttribute('data-fallback');\n const custom = this.querySelector('script[type=\"x-shader/x-fragment\"]');\n const frag = kind === 'shader' ? custom?.textContent || this.str('preset', 'gradient') : kind;\n const img = kind === 'shader' ? null : (this.querySelector('img') as HTMLImageElement | null);\n if (kind !== 'shader' && !img) return this.fallback('no-image');\n const c = (this._c = document.createElement('canvas'));\n c.setAttribute('aria-hidden', 'true');\n c.className = 'usa-gl';\n this.prepend(c);\n const q = (this._q = glQuad(c, frag));\n if (!q) return this.fallback('webgl');\n this.onCleanup(() => this.fallback('off'));\n const start = () => {\n if (!img) return true;\n try {\n q.texture(img);\n return true;\n } catch {\n this.fallback('image');\n return false;\n }\n };\n const draw = () => {\n q.resize();\n this.frame();\n };\n if (img && !(img.complete && img.naturalWidth)) {\n if (!img.crossOrigin && /^https?:/.test(img.src) && !img.src.startsWith(location.origin)) img.crossOrigin = 'anonymous';\n this.listen(img, 'load', () => start() && draw());\n this.listen(img, 'error', () => this.fallback('image'));\n } else if (!start()) return;\n this.setAttribute('data-active', '');\n this.onCleanup(() => this.removeAttribute('data-active'));\n draw();\n if (kind !== 'shader') {\n const pos = (e: PointerEvent) => {\n const r = this.getBoundingClientRect();\n this._mouse = [clamp((e.clientX - r.left) / (r.width || 1), 0, 1), clamp(1 - (e.clientY - r.top) / (r.height || 1), 0, 1)];\n };\n this.listen(this, 'pointermove', pos);\n this.listen(this, 'pointerenter', (e: PointerEvent) => (pos(e), (this._hoverTo = 1)));\n this.listen(this, 'pointerleave', () => (this._hoverTo = 0));\n if (kind === 'liquid')\n this.listen(this, 'pointerdown', (e: PointerEvent) => {\n pos(e);\n this._ripples = [...this._ripples.slice(-3), { x: this._mouse[0], y: this._mouse[1], t: now() }];\n });\n }\n // 4.0.1: also follow the element's own size (grid reflow, card expand…)\n if (typeof ResizeObserver !== 'undefined') {\n const ro = new ResizeObserver(() => {\n q.resize();\n if (!this._id) this.frame();\n });\n ro.observe(this);\n this.onCleanup(() => ro.disconnect());\n }\n if (this.reduced) return; // one static frame, no loop\n let visible = false;\n const loop = () => {\n this.frame();\n this._id = raf(loop);\n };\n const sync = () => {\n caf(this._id);\n this._id = 0;\n if (visible && !document.hidden) this._id = raf(loop);\n };\n this.inView((v: boolean) => ((visible = v), sync()));\n this.listen(document, 'visibilitychange', sync);\n this.listen(window, 'resize', () => q.resize(), { passive: true });\n this.onCleanup(() => caf(this._id));\n }\n };\n}\n\n/**\n * `<usa-shader>` — GPU shader background behind its content. `preset`\n * (`gradient` · `plasma` · `waves` · `aurora`) or your own fragment shader in\n * `<script type=\"x-shader/x-fragment\">` (uniforms `u_time`, `u_resolution`,\n * `u_mouse`, `v_uv`); `speed`. Without WebGL: the element's CSS background.\n */\nexport function defineShader(tag = 'usa-shader'): CustomElementConstructor | undefined {\n return defineElement(tag, make('shader'), { id: 'webgl', text: css });\n}\n\n/**\n * `<usa-distort>` — hover distortion + RGB split on the `<img>` inside,\n * following the pointer. Without WebGL / CORS: a gentle CSS zoom.\n */\nexport function defineDistort(tag = 'usa-distort'): CustomElementConstructor | undefined {\n return defineElement(tag, make('distort'), { id: 'webgl', text: css });\n}\n\n/**\n * `<usa-liquid>` — liquid image: clicks / taps send ripples through the\n * `<img>` inside, hover adds a gentle wobble; `strength`. Fallback: plain image.\n */\nexport function defineLiquid(tag = 'usa-liquid'): CustomElementConstructor | undefined {\n return defineElement(tag, make('liquid'), { id: 'webgl', text: css });\n}\n","/**\n * use-scroll-animate/components/webgl — lightweight canvas / WebGL (v3.4).\n * `<usa-shader>` (shader backgrounds), `<usa-distort>` (hover image\n * distortion), `<usa-liquid>` (ripple images) on a tiny single-quad runner\n * (`glQuad()`), with graceful fallbacks when WebGL is unavailable.\n */\nimport { defineShader, defineDistort, defineLiquid, type UsaGLElement } from './elements';\n\nexport { defineShader, defineDistort, defineLiquid };\nexport { glQuad, supportsWebGL, fragmentSource, SHADERS } from './gl';\nexport type { GLQuad } from './gl';\nexport type { UsaGLElement };\nexport { configureComponents, prefersReducedMotion } from '../base';\nexport type { ComponentsConfig, UsaElement } from '../base';\n\n/** Register every component of this category under its default tag. */\nexport function defineWebglComponents(): void {\n defineShader();\n defineDistort();\n defineLiquid();\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'usa-shader': UsaGLElement;\n 'usa-distort': UsaGLElement;\n 'usa-liquid': UsaGLElement;\n }\n}\n"],"names":[],"mappings":";;;AAAA;AAEO,MAAM,MAAM,GAAG,yFAAyF;AAC/G,MAAM,IAAI,GAAG,0LAA0L;AAEvM;AACO,MAAM,OAAO,GAA2B;AAC7C,IAAA,QAAQ,EAAE,gOAAgO;AAC1O,IAAA,MAAM,EAAE,2MAA2M;AACnN,IAAA,KAAK,EAAE,oQAAoQ;AAC3Q,IAAA,MAAM,EAAE,uPAAuP;AAC/P,IAAA,OAAO,EAAE,0QAA0Q;AACnR,IAAA,MAAM,EAAE,kTAAkT;;AAG5T;AACM,SAAU,cAAc,CAAC,IAAY,EAAA;IACzC,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI;AACjC,IAAA,OAAO,yBAAyB,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG;AAC/D;AAEA;AACA,IAAI,OAA4B;SAChB,aAAa,GAAA;IAC3B,IAAI,OAAO,KAAK,SAAS;AAAE,QAAA,OAAO,OAAO;AACzC,IAAA,IAAI;AACF,QAAA,MAAM,CAAC,GAAG,OAAO,QAAQ,KAAK,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,IAAI;QACnF,OAAO,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAClF;AAAE,IAAA,MAAM;QACN,OAAO,GAAG,KAAK;IACjB;AACA,IAAA,OAAO,OAAO;AAChB;AAYA;AACM,SAAU,MAAM,CAAC,MAAyB,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,QAAQ,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAClE,YAAA,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrC;KACD;AACL;AAEA;;;;;AAKG;AACG,SAAU,YAAY,CAAC,GAAG,GAAG,YAAY,EAAA;AAC7C,IAAA,OAAO,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AACvE;AAEA;;;AAGG;AACG,SAAU,aAAa,CAAC,GAAG,GAAG,aAAa,EAAA;AAC/C,IAAA,OAAO,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AACxE;AAEA;;;AAGG;AACG,SAAU,YAAY,CAAC,GAAG,GAAG,YAAY,EAAA;AAC7C,IAAA,OAAO,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AACvE;;AChKA;;;;;AAKG;AAUH;SACgB,qBAAqB,GAAA;AACnC,IAAA,YAAY,EAAE;AACd,IAAA,aAAa,EAAE;AACf,IAAA,YAAY,EAAE;AAChB;;;;"}
@@ -6,7 +6,7 @@ usa-scrolly{display:block;position:relative}usa-scrolly [data-sticky]{position:s
6
6
  usa-counter{font-variant-numeric:tabular-nums}
7
7
  usa-shimmer-text{--usa-shimmer-color:currentColor;--usa-shimmer-shine:#fff;background:linear-gradient(var(--usa-shimmer-angle,110deg),var(--usa-shimmer-color) 35%,var(--usa-shimmer-shine) 50%,var(--usa-shimmer-color) 65%) 0 0 / 250% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent;animation:usa-shimmer var(--usa-shimmer-duration,2600ms) linear infinite}@keyframes usa-shimmer{from{background-position:100% 0}to{background-position:-150% 0}}
8
8
  usa-split-text .usa-split-word{display:inline-block;white-space:nowrap}usa-split-text .usa-split-unit{display:inline-block;white-space:pre}usa-split-text[data-state="hidden"] .usa-split-unit{opacity:0}usa-split-text[data-state="play"] .usa-split-unit{animation:usa-split-rise var(--usa-split-duration,620ms) cubic-bezier(0.22,1,0.36,1) both;animation-delay:calc(var(--usa-split-delay,0ms) + var(--i,0) * var(--usa-split-stagger,28ms))}usa-split-text[effect="fade"][data-state="play"] .usa-split-unit{animation-name:usa-split-fade}usa-split-text[effect="blur"][data-state="play"] .usa-split-unit{animation-name:usa-split-blur}usa-split-text[effect="flip"][data-state="play"] .usa-split-unit{animation-name:usa-split-flip;transform-origin:50% 100%}usa-split-text[effect="pop"][data-state="play"] .usa-split-unit{animation-name:usa-split-pop;animation-timing-function:cubic-bezier(0.34,1.56,0.64,1)}@keyframes usa-split-rise{from{opacity:0;transform:translate3d(0,0.6em,0)}to{opacity:1;transform:none}}@keyframes usa-split-fade{from{opacity:0}to{opacity:1}}@keyframes usa-split-blur{from{opacity:0;filter:blur(8px)}to{opacity:1;filter:none}}@keyframes usa-split-flip{from{opacity:0;transform:perspective(500px) rotateX(-80deg)}to{opacity:1;transform:none}}@keyframes usa-split-pop{from{opacity:0;transform:scale(0.3)}to{opacity:1;transform:none}}@media (prefers-reduced-motion:reduce){usa-split-text .usa-split-unit{animation:none !important;opacity:1 !important}}
9
- usa-wave-text .usa-word,usa-scroll-highlight .usa-word{display:inline-block;white-space:nowrap}usa-wave-text .usa-char{display:inline-block;animation:usa-wave var(--usa-wave-s,1.6s) ease-in-out infinite;animation-delay:calc(var(--i) * var(--usa-wave-d,0.06s))}@keyframes usa-wave{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(calc(var(--usa-wave-a,0.25em) * -1))}}usa-glitch{position:relative;display:inline-block}usa-glitch::before,usa-glitch::after{content:attr(data-text);position:absolute;inset:0;pointer-events:none}usa-glitch::before{color:#ff2bd6;transform:translate(calc(var(--usa-glitch-i,3px) * -1),0);clip-path:inset(0 0 55% 0);mix-blend-mode:screen;animation:usa-glitch-a 2.4s steps(2,end) infinite}usa-glitch::after{color:#00f0ff;transform:translate(var(--usa-glitch-i,3px),0);clip-path:inset(50% 0 0 0);mix-blend-mode:screen;animation:usa-glitch-b 1.9s steps(2,end) infinite}usa-glitch[trigger="hover"]::before,usa-glitch[trigger="hover"]::after{animation-play-state:paused;opacity:0}usa-glitch[trigger="hover"]:hover::before,usa-glitch[trigger="hover"]:hover::after{animation-play-state:running;opacity:1}@keyframes usa-glitch-a{0%{clip-path:inset(0 0 80% 0)}20%{clip-path:inset(30% 0 40% 0)}40%{clip-path:inset(70% 0 5% 0)}60%{clip-path:inset(10% 0 60% 0)}80%{clip-path:inset(50% 0 30% 0)}100%{clip-path:inset(0 0 80% 0)}}@keyframes usa-glitch-b{0%{clip-path:inset(60% 0 10% 0)}25%{clip-path:inset(15% 0 70% 0)}50%{clip-path:inset(80% 0 2% 0)}75%{clip-path:inset(40% 0 35% 0)}100%{clip-path:inset(60% 0 10% 0)}}usa-gradient-text{background:var(--usa-grad) 0 50% / 300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;animation:usa-grad-flow var(--usa-grad-s,6s) linear infinite}@keyframes usa-grad-flow{to{background-position:150% 50%}}usa-handwriting{--usa-hw-stroke:currentColor;display:inline-block;line-height:0}usa-handwriting svg{max-width:100%;height:auto;overflow:visible}usa-handwriting text{fill:transparent;stroke:var(--usa-hw-stroke);stroke-width:1.2;stroke-dasharray:1600;stroke-dashoffset:1600;font-family:"Segoe Script","Brush Script MT","Snell Roundhand",cursive}usa-handwriting[data-state="drawing"] text{animation:usa-hw-draw var(--usa-hw-d,2400ms) cubic-bezier(0.55,0,0.45,1) forwards,usa-hw-fill 0.6s ease calc(var(--usa-hw-d,2400ms) * 0.8) forwards}usa-handwriting[data-state="done"] text{stroke-dashoffset:0;fill:currentColor}@keyframes usa-hw-draw{to{stroke-dashoffset:0}}@keyframes usa-hw-fill{to{fill:currentColor}}usa-scroll-highlight .usa-hl-word{opacity:var(--usa-hl-dim,0.2);transition:opacity 0.35s ease}usa-scroll-highlight .usa-hl-word[data-on]{opacity:1}usa-scroll-highlight[mode="marker"]{--usa-hl-color:color-mix(in srgb,#facc15 55%,transparent);background:linear-gradient(var(--usa-hl-color),var(--usa-hl-color)) 0 88% / 0% 40% no-repeat;transition:background-size 1s cubic-bezier(0.65,0,0.35,1);-webkit-box-decoration-break:clone;box-decoration-break:clone}usa-scroll-highlight[mode="marker"][data-lit]{background-size:100% 40%}@media (prefers-reduced-motion:reduce){usa-wave-text .usa-char,usa-glitch::before,usa-glitch::after,usa-gradient-text{animation:none !important}usa-glitch::before,usa-glitch::after{display:none}usa-scroll-highlight .usa-hl-word,usa-scroll-highlight[mode="marker"]{transition:none}}
9
+ usa-wave-text .usa-word,usa-scroll-highlight .usa-word{display:inline-block;white-space:nowrap}usa-wave-text .usa-char{display:inline-block;animation:usa-wave var(--usa-wave-s,1.6s) ease-in-out infinite;animation-delay:calc(var(--i) * var(--usa-wave-d,0.06s))}@keyframes usa-wave{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(calc(var(--usa-wave-a,0.25em) * -1))}}usa-glitch{position:relative;display:inline-block}usa-glitch::before,usa-glitch::after{content:attr(data-text);position:absolute;inset:0;pointer-events:none}usa-glitch::before{color:#ff2bd6;transform:translate(calc(var(--usa-glitch-i,3px) * -1),0);clip-path:inset(0 0 55% 0);mix-blend-mode:screen;animation:usa-glitch-a 2.4s steps(2,end) infinite}usa-glitch::after{color:#00f0ff;transform:translate(var(--usa-glitch-i,3px),0);clip-path:inset(50% 0 0 0);mix-blend-mode:screen;animation:usa-glitch-b 1.9s steps(2,end) infinite}usa-glitch[trigger="hover"]::before,usa-glitch[trigger="hover"]::after{animation-play-state:paused;opacity:0}usa-glitch[trigger="hover"]:hover::before,usa-glitch[trigger="hover"]:hover::after{animation-play-state:running;opacity:1}@keyframes usa-glitch-a{0%{clip-path:inset(0 0 80% 0)}20%{clip-path:inset(30% 0 40% 0)}40%{clip-path:inset(70% 0 5% 0)}60%{clip-path:inset(10% 0 60% 0)}80%{clip-path:inset(50% 0 30% 0)}100%{clip-path:inset(0 0 80% 0)}}@keyframes usa-glitch-b{0%{clip-path:inset(60% 0 10% 0)}25%{clip-path:inset(15% 0 70% 0)}50%{clip-path:inset(80% 0 2% 0)}75%{clip-path:inset(40% 0 35% 0)}100%{clip-path:inset(60% 0 10% 0)}}usa-gradient-text{background:var(--usa-grad) 0 50% / 300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;animation:usa-grad-flow var(--usa-grad-s,6s) linear infinite}@keyframes usa-grad-flow{to{background-position:150% 50%}}usa-handwriting{--usa-hw-stroke:currentColor;display:inline-block;line-height:0}usa-handwriting svg{width:auto;max-width:100%;height:auto;overflow:visible}usa-handwriting text{fill:transparent;stroke:var(--usa-hw-stroke);stroke-width:1.2;stroke-dasharray:1600;stroke-dashoffset:1600;font-family:"Segoe Script","Brush Script MT","Snell Roundhand",cursive}usa-handwriting[data-state="drawing"] text{animation:usa-hw-draw var(--usa-hw-d,2400ms) cubic-bezier(0.55,0,0.45,1) forwards,usa-hw-fill 0.6s ease calc(var(--usa-hw-d,2400ms) * 0.8) forwards}usa-handwriting[data-state="done"] text{stroke-dashoffset:0;fill:currentColor}@keyframes usa-hw-draw{to{stroke-dashoffset:0}}@keyframes usa-hw-fill{to{fill:currentColor}}usa-scroll-highlight .usa-hl-word{opacity:var(--usa-hl-dim,0.2);transition:opacity 0.35s ease}usa-scroll-highlight .usa-hl-word[data-on]{opacity:1}usa-scroll-highlight[mode="marker"]{--usa-hl-color:color-mix(in srgb,#facc15 55%,transparent);background:linear-gradient(var(--usa-hl-color),var(--usa-hl-color)) 0 88% / 0% 40% no-repeat;transition:background-size 1s cubic-bezier(0.65,0,0.35,1);-webkit-box-decoration-break:clone;box-decoration-break:clone}usa-scroll-highlight[mode="marker"][data-lit]{background-size:100% 40%}@media (prefers-reduced-motion:reduce){usa-wave-text .usa-char,usa-glitch::before,usa-glitch::after,usa-gradient-text{animation:none !important}usa-glitch::before,usa-glitch::after{display:none}usa-scroll-highlight .usa-hl-word,usa-scroll-highlight[mode="marker"]{transition:none}}
10
10
  usa-text-rotate{display:inline-grid;vertical-align:bottom;overflow:hidden;padding-block:0.08em}usa-text-rotate .usa-rotate-word{grid-area:1 / 1;white-space:nowrap}usa-text-rotate .usa-rotate-word[data-hidden]{opacity:0}
11
11
  usa-typewriter{white-space:pre-wrap}usa-typewriter .usa-tw-caret{display:inline-block;width:var(--usa-caret-width,0.08em);height:1.05em;margin-left:0.06em;vertical-align:-0.12em;background:var(--usa-caret-color,currentColor);animation:usa-caret 1.06s steps(1) infinite}usa-typewriter[data-typing] .usa-tw-caret{animation:none}usa-typewriter[data-no-cursor] .usa-tw-caret{display:none}@keyframes usa-caret{50%{opacity:0}}@media (prefers-reduced-motion:reduce){usa-typewriter .usa-tw-caret,usa-shimmer-text{animation:none}}
12
12
  usa-magnetic{display:inline-block}usa-magnetic>*{transform:translate3d(var(--usa-mx,0px),var(--usa-my,0px),0);transition:transform 0.6s cubic-bezier(0.34,1.56,0.64,1)}usa-magnetic[data-active]>*{transition-duration:0.15s;transition-timing-function:ease-out}@media (prefers-reduced-motion:reduce){usa-magnetic>*,usa-tilt,usa-toggle .usa-toggle-knob{transition:none}}
@@ -67,7 +67,7 @@ usa-splash{position:fixed;inset:0;z-index:2147483400;display:grid;place-items:ce
67
67
  ::view-transition-group(root){animation-duration:var(--usa-pt-duration,600ms)}html[data-usa-pt] ::view-transition-old(root),html[data-usa-pt] ::view-transition-new(root){animation-duration:var(--usa-pt-duration,600ms);animation-timing-function:cubic-bezier(0.22,1,0.36,1);mix-blend-mode:normal}html[data-usa-pt="slide"] ::view-transition-old(root),html[data-usa-pt="slide-left"] ::view-transition-old(root){animation-name:usa-pt-out-left}html[data-usa-pt="slide"] ::view-transition-new(root),html[data-usa-pt="slide-left"] ::view-transition-new(root){animation-name:usa-pt-in-right}html[data-usa-pt="slide-right"] ::view-transition-old(root){animation-name:usa-pt-out-right}html[data-usa-pt="slide-right"] ::view-transition-new(root){animation-name:usa-pt-in-left}html[data-usa-pt="slide-up"] ::view-transition-old(root){animation-name:usa-pt-out-up}html[data-usa-pt="slide-up"] ::view-transition-new(root){animation-name:usa-pt-in-up}html[data-usa-pt="zoom"] ::view-transition-old(root){animation-name:usa-pt-zoom-out}html[data-usa-pt="zoom"] ::view-transition-new(root){animation-name:usa-pt-zoom-in}html[data-usa-pt="circle"] ::view-transition-old(root){animation:none}html[data-usa-pt="circle"] ::view-transition-new(root){animation-name:usa-pt-circle}html[data-usa-pt="blinds"] ::view-transition-old(root){animation:none}html[data-usa-pt="blinds"] ::view-transition-new(root){animation-name:usa-pt-blinds;-webkit-mask-image:repeating-linear-gradient(to bottom,#000 0 var(--usa-blind),transparent var(--usa-blind) 10vh);mask-image:repeating-linear-gradient(to bottom,#000 0 var(--usa-blind),transparent var(--usa-blind) 10vh)}html[data-usa-pt="pixel"] ::view-transition-old(root){animation-name:usa-pt-pixel-out;animation-timing-function:steps(10,end)}html[data-usa-pt="pixel"] ::view-transition-new(root){animation-name:usa-pt-pixel-in;animation-timing-function:steps(10,end)}@property --usa-blind{syntax:"<length-percentage>";inherits:false;initial-value:0vh}@keyframes usa-pt-out-left{to{transform:translateX(-30%);opacity:0}}@keyframes usa-pt-in-right{from{transform:translateX(30%);opacity:0}}@keyframes usa-pt-out-right{to{transform:translateX(30%);opacity:0}}@keyframes usa-pt-in-left{from{transform:translateX(-30%);opacity:0}}@keyframes usa-pt-out-up{to{transform:translateY(-12%);opacity:0}}@keyframes usa-pt-in-up{from{transform:translateY(12%);opacity:0}}@keyframes usa-pt-zoom-out{to{transform:scale(0.92);opacity:0}}@keyframes usa-pt-zoom-in{from{transform:scale(1.08);opacity:0}}@keyframes usa-pt-circle{from{clip-path:circle(0 at var(--usa-pt-x,50%) var(--usa-pt-y,50%))}to{clip-path:circle(var(--usa-pt-r,150vmax) at var(--usa-pt-x,50%) var(--usa-pt-y,50%))}}@keyframes usa-pt-blinds{from{--usa-blind:0vh}to{--usa-blind:10vh}}@keyframes usa-pt-pixel-out{to{opacity:0;filter:blur(6px) contrast(1.4)}}@keyframes usa-pt-pixel-in{from{opacity:0;filter:blur(6px) contrast(1.4)}}@media (prefers-reduced-motion:reduce){::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none !important}}
68
68
  usa-timeline{display:block}usa-timeline[scrub]{position:relative}@media (prefers-reduced-motion:reduce){usa-timeline [data-tl]{opacity:1 !important;transform:none !important;filter:none !important;clip-path:none !important}}
69
69
  usa-swipeable{display:block;touch-action:pan-y;user-select:none;-webkit-user-select:none}usa-swipeable[axis="y"]{touch-action:pan-x}usa-swipeable>*{transform:translate3d(var(--usa-swipe,0px),0,0);opacity:calc(1 - var(--usa-swipe-p,0) * 0.5)}usa-swipeable[axis="y"]>*{transform:translate3d(0,var(--usa-swipe,0px),0)}usa-swipeable:focus-visible{outline:2px solid currentColor;outline-offset:2px}usa-pinch-zoom{display:block;overflow:hidden;touch-action:none;position:relative}usa-pinch-zoom>*{transform:translate3d(var(--usa-zoom-x,0px),var(--usa-zoom-y,0px),0) scale(var(--usa-zoom,1));transform-origin:50% 50%}usa-pinch-zoom[data-zoomed]{cursor:grab}usa-pinch-zoom:focus-visible{outline:2px solid currentColor;outline-offset:2px}
70
- usa-draw{display:inline-block}usa-draw svg :is(path,line,polyline,polygon,circle,ellipse,rect){transition:fill-opacity 0.6s ease}usa-draw[fill]:not([data-drawn]) svg :is(path,polygon,circle,ellipse,rect){fill-opacity:0}usa-morph{display:inline-block;line-height:0}usa-morph svg{width:100%;height:100%;fill:currentColor}usa-morph[role="button"]{cursor:pointer}usa-mask-reveal{display:block}usa-mask-reveal[data-state="visible"]{clip-path:none !important}usa-anim-icon{display:inline-flex;line-height:0;vertical-align:middle}usa-anim-icon svg{overflow:visible}@media (prefers-reduced-motion:reduce){usa-mask-reveal{clip-path:none !important}usa-draw svg *{stroke-dashoffset:0 !important}}
70
+ usa-draw{display:inline-block}usa-draw svg :is(path,line,polyline,polygon,circle,ellipse,rect){transition:fill-opacity 0.6s ease}usa-draw[fill]:not([data-drawn]) svg :is(path,polygon,circle,ellipse,rect){fill-opacity:0}usa-morph{display:inline-block;line-height:0}usa-morph svg{width:100%;height:100%;fill:currentColor}usa-morph[role="button"]{cursor:pointer}usa-mask-reveal{display:block}usa-mask-reveal[data-state="visible"]{clip-path:none !important}usa-mask-reveal[data-state="hidden"]{opacity:0}usa-anim-icon{display:inline-flex;line-height:0;vertical-align:middle}usa-anim-icon svg{overflow:visible}@media (prefers-reduced-motion:reduce){usa-mask-reveal{clip-path:none !important;opacity:1 !important}usa-draw svg *{stroke-dashoffset:0 !important}}
71
71
  usa-shader,usa-distort,usa-liquid{display:block;position:relative;isolation:isolate;overflow:hidden}usa-shader{background:linear-gradient(120deg,#6366f1,#ec4899 50%,#22d3ee)}usa-shader>canvas.usa-gl{position:absolute;inset:0;width:100%;height:100%;z-index:-1;display:block}usa-distort>canvas.usa-gl,usa-liquid>canvas.usa-gl{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none}usa-distort>img,usa-liquid>img{display:block;width:100%;height:auto}usa-distort[data-active]>img,usa-liquid[data-active]>img{visibility:hidden}usa-distort[data-fallback]>img{transition:transform 0.6s cubic-bezier(0.22,1,0.36,1),filter 0.6s}usa-distort[data-fallback]:hover>img{transform:scale(1.04);filter:saturate(1.2)}@media (prefers-reduced-motion:reduce){usa-distort[data-fallback]:hover>img{transform:none}}
72
72
  usa-cube{--usa-cube-size:200px;display:block;width:var(--usa-cube-size);height:var(--usa-cube-size);perspective:var(--usa-cube-perspective,900px);touch-action:pan-y;user-select:none;-webkit-user-select:none;position:relative}usa-cube>[data-face]{position:absolute;inset:0;backface-visibility:hidden;transform:translateZ(calc(var(--usa-cube-size) / -2)) rotateX(var(--usa-cube-rx,0deg)) rotateY(var(--usa-cube-ry,0deg)) var(--usa-face) translateZ(calc(var(--usa-cube-size) / 2));transform-origin:50% 50%}usa-cube>[data-face="front"]{--usa-face:rotateY(0deg)}usa-cube>[data-face="right"]{--usa-face:rotateY(90deg)}usa-cube>[data-face="back"]{--usa-face:rotateY(180deg)}usa-cube>[data-face="left"]{--usa-face:rotateY(-90deg)}usa-cube>[data-face="top"]{--usa-face:rotateX(90deg)}usa-cube>[data-face="bottom"]{--usa-face:rotateX(-90deg)}usa-cube:focus-visible{outline:2px solid currentColor;outline-offset:6px}usa-depth{display:block;position:relative;perspective:1000px}usa-depth>*{transform:var(--usa-depth-rot,none);transform-style:preserve-3d}usa-depth [data-depth]{will-change:transform;transition:transform 0.12s linear}@media (prefers-reduced-motion:reduce){usa-depth [data-depth]{transform:none !important}}
73
73
  usa-auto-animate{display:block}usa-masonry{display:block;column-width:220px;column-gap:16px}usa-masonry>*{break-inside:avoid;margin-bottom:16px}usa-masonry[data-js]{position:relative;columns:auto}usa-masonry[data-js]>*{position:absolute;left:0;top:0;margin:0;box-sizing:border-box;transition:transform 0.45s cubic-bezier(0.22,1,0.36,1)}@media (prefers-reduced-motion:reduce){usa-masonry[data-js]>*{transition:none}}