use-scroll-animate 6.3.0 → 6.5.0
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.
- package/CHANGELOG.md +33 -2
- package/README.md +2 -2
- package/README_ja.md +2 -2
- package/README_zh.md +2 -2
- package/dist/chunks/{generative-BRUZaIsX.js → generative-2LhxG5BJ.js} +2 -2
- package/dist/chunks/{generative-BRUZaIsX.js.map → generative-2LhxG5BJ.js.map} +1 -1
- package/dist/chunks/{gpu-XHWzeNb5.js → gpu-EjV49FQk.js} +3 -3
- package/dist/chunks/{gpu-XHWzeNb5.js.map → gpu-EjV49FQk.js.map} +1 -1
- package/dist/chunks/{shared-eweTlzxv.js → shared-CkKHWrtJ.js} +2 -2
- package/dist/chunks/{shared-eweTlzxv.js.map → shared-CkKHWrtJ.js.map} +1 -1
- package/dist/components/effects.js +3 -3
- package/dist/components/fx-3d.cjs +236 -0
- package/dist/components/fx-3d.cjs.map +1 -0
- package/dist/components/fx-3d.d.cts +67 -0
- package/dist/components/fx-3d.d.ts +67 -0
- package/dist/components/fx-3d.js +233 -0
- package/dist/components/fx-3d.js.map +1 -0
- package/dist/components/fx-gpu.js +3 -3
- package/dist/components/fx-light.cjs +221 -0
- package/dist/components/fx-light.cjs.map +1 -0
- package/dist/components/fx-light.d.cts +72 -0
- package/dist/components/fx-light.d.ts +72 -0
- package/dist/components/fx-light.js +217 -0
- package/dist/components/fx-light.js.map +1 -0
- package/dist/components/fx-text.js +1 -1
- package/dist/components/fx2.cjs +11 -0
- package/dist/components/fx2.cjs.map +1 -1
- package/dist/components/fx2.d.cts +52 -1
- package/dist/components/fx2.d.ts +52 -1
- package/dist/components/fx2.js +12 -5
- package/dist/components/fx2.js.map +1 -1
- package/dist/components/widgets.cjs +1002 -14
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +132 -2
- package/dist/components/widgets.d.ts +132 -2
- package/dist/components/widgets.js +993 -15
- package/dist/components/widgets.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/docs/ROADMAP.md +2 -2
- package/docs/components.md +55 -1
- package/package.json +24 -4
package/dist/widgets.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).UsaWidgets={})}(this,function(t){"use strict";const e="full",s=/rotate|scale|skew|perspective|matrix3d/;const i=new Set;function a(t,e){if(!e||i.has(t)||"undefined"==typeof document)return;i.add(t);try{if("function"==typeof CSSStyleSheet&&"adoptedStyleSheets"in document){const t=new CSSStyleSheet;return t.replaceSync(e),void(document.adoptedStyleSheets=[...document.adoptedStyleSheets,t])}}catch{}const s=document.createElement("style");s.setAttribute("data-usa",t),s.textContent=e,(document.head||document.documentElement).appendChild(s)}let n=null;function o(){if(n)return n;class t extends HTMLElement{constructor(){super(...arguments),this._cleanups=[],this._connected=!1}get reduced(){return"function"==typeof matchMedia&&!!matchMedia("(prefers-reduced-motion: reduce)").matches}connectedCallback(){if(!this._connected){if(this._connected=!0,"undefined"!=typeof document&&"loading"===document.readyState&&!this.nextSibling&&!this.childNodes.length){const t=()=>{this._connected&&this.isConnected&&this.mount()};return document.addEventListener("DOMContentLoaded",t,{once:!0}),void this._cleanups.push(()=>document.removeEventListener("DOMContentLoaded",t))}this.mount()}}disconnectedCallback(){this._connected=!1,this.teardown()}attributeChangedCallback(t,e,s){this._connected&&e!==s&&this.changed(t)}changed(t){this.teardown(),this.mount()}teardown(){this._cleanups.splice(0).reverse().forEach(t=>t()),this.unmount()}mount(){}unmount(){}str(t,e=""){const s=this.getAttribute(t);return null===s?e:s}num(t,e){const s=this.getAttribute(t),i=null===s||""===s.trim()?NaN:Number(s);return Number.isFinite(i)?i:e}flag(t){const e=this.getAttribute(t);return null!==e&&"false"!==e}setFlag(t,e){e?this.setAttribute(t,""):this.removeAttribute(t)}onCleanup(t){this._cleanups.push(t)}listen(t,e,s,i){t.addEventListener(e,s,i),this.onCleanup(()=>t.removeEventListener(e,s,i))}inView(t,e,s=this){if("undefined"==typeof IntersectionObserver)return void t(!0);const i=new IntersectionObserver(e=>{for(const s of e)t(s.isIntersecting,s)},e);i.observe(s),this.onCleanup(()=>i.disconnect())}motion(t,i,a){return function(t,i,a){if("function"!=typeof t.animate||"static"===e)return r(t,i[i.length-1]),null;if(i=function(t,i=e){return"full"!==i&&t.length?"static"===i?[t[t.length-1]]:t.map(t=>{const e={};for(const[a,n]of Object.entries(t))if("offset"===a||"easing"===a||"composite"===a)e[a]=n;else if("minimal"===i)"opacity"===a&&(e[a]=n);else{if("rotate"===a||"scale"===a||"transform"===a&&s.test(String(n)))continue;e[a]=n}return e}):t}(i),u>=d)return r(t,i[i.length-1]),null;const n=t.animate(i,a);if(a.iterations!==1/0){u++;let t=!1;const e=()=>{t||(t=!0,u--)};n?.finished?.then(e,e)}return n}(t,i,a)}emit(t,e){return this.dispatchEvent(new CustomEvent(`usa:${t}`,{detail:e,bubbles:!0,cancelable:!0}))}}return n=t,n}function r(t,e){if(e)for(const[s,i]of Object.entries(e))"offset"!==s&&"easing"!==s&&"composite"!==s&&null!=i&&(t.style[s]=String(i))}function l(t,e,s){if("undefined"==typeof customElements||"undefined"==typeof HTMLElement)return;a("base",c),s&&a(s.id,s.text);const i=customElements.get(t);if(i)return i;const n=e(o());return customElements.define(t,n),n}const c=".usa-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}";let u=0,d=1/0;const h=(t,e,s)=>Math.min(s,Math.max(e,t)),p=(t,e="[data-usa-part]")=>Array.from(t.children).filter(t=>t instanceof HTMLElement&&!t.matches(e));function f(t,e,s={},i=""){const a=document.createElement(t);a.className=e,a.setAttribute("data-usa-part","");for(const[t,e]of Object.entries(s))a.setAttribute(t,e);return i&&(a.innerHTML=i),a}const m=t=>t.querySelectorAll(":scope > [data-usa-part]").forEach(t=>t.remove());let b=0;const g=t=>`${t}-${++b}`;const x=["slide","fade","scale","cards"];function y(t="usa-carousel"){return l(t,t=>class extends t{constructor(){super(...arguments),this._i=0,this._slides=[],this._track=null,this._timer=0,this._hold=!1,this._dots=[]}static get observedAttributes(){return["effect","autoplay","loop","no-controls","no-dots"]}get length(){return this._slides.length}get index(){return this._i}set index(t){this.goTo(t)}get effect(){const t=this.str("effect","slide");return x.includes(t)?t:"slide"}mount(){this.dataset.effect=this.effect,this.toggleAttribute("data-reduced",this.reduced);const t=this.querySelector(":scope > .usa-carousel-viewport");this._slides=p(t?t.firstElementChild:this),m(this);const e=f("div","usa-carousel-viewport",{"aria-live":this.num("autoplay",0)?"off":"polite"}),s=f("div","usa-carousel-track");this._track=s,e.append(s);const i=this._slides.length;if(this._slides.forEach((t,e)=>{t.setAttribute("role","group"),t.setAttribute("aria-roledescription","slide"),t.setAttribute("aria-label",`${e+1} of ${i}`),s.append(t)}),this.prepend(e),this.setAttribute("role","region"),this.setAttribute("aria-roledescription","carousel"),this.setAttribute("aria-label",this.str("label","Carousel")),this.hasAttribute("tabindex")||(this.tabIndex=0),i>1&&!this.flag("no-controls")){const t=f("button","usa-carousel-nav usa-carousel-prev",{type:"button","aria-label":"Previous slide"},"‹"),e=f("button","usa-carousel-nav usa-carousel-next",{type:"button","aria-label":"Next slide"},"›");this.listen(t,"click",()=>this.prev()),this.listen(e,"click",()=>this.next()),this.append(t,e)}if(this._dots=[],i>1&&!this.flag("no-dots")){const t=f("div","usa-carousel-dots",{role:"group","aria-label":"Choose slide"});for(let e=0;e<i;e++){const s=f("button","usa-carousel-dot",{type:"button","aria-label":`Slide ${e+1}`});this.listen(s,"click",()=>this.goTo(e)),this._dots.push(s),t.append(s)}this.append(t)}this._i=h(Math.round(this.num("index",0)),0,Math.max(0,i-1)),this.layout(0),this.listen(this,"keydown",t=>{"ArrowRight"===t.key?(t.preventDefault(),this.next()):"ArrowLeft"===t.key&&(t.preventDefault(),this.prev())}),this.drag(e);const a=this.num("autoplay",0);if(a>0&&i>1&&!this.reduced){let t=!0;this.inView(e=>t=e);const e=t=>()=>this._hold=t;this.listen(this,"pointerenter",e(!0)),this.listen(this,"pointerleave",e(!1)),this.listen(this,"focusin",e(!0)),this.listen(this,"focusout",e(!1)),this._timer=window.setInterval(()=>{!t||this._hold||document.hidden||this.next()},Math.max(1200,a)),this.onCleanup(()=>clearInterval(this._timer))}}drag(t){let e=0,s=0,i=-1;this.listen(t,"pointerdown",t=>{this.length<2||t.target.closest("button,a,input")||(i=t.pointerId,e=t.clientX,s=0,this.setAttribute("data-dragging",""))}),this.listen(window,"pointermove",a=>{a.pointerId===i&&(s=a.clientX-e,this.layout(s/Math.max(1,t.clientWidth)))});const a=e=>{if(e.pointerId!==i)return;i=-1,this.removeAttribute("data-dragging");const a=Math.max(1,t.clientWidth);Math.abs(s)>.18*a?s<0?this.next():this.prev():this.layout(0)};this.listen(window,"pointerup",a),this.listen(window,"pointercancel",a)}layout(t){const e=this.length,s=this._i,i=this.effect;this._track&&(this._track.style.transform="slide"===i?`translateX(${100*(-s+t)}%)`:""),this._slides.forEach((a,n)=>{let o=n-s+t;this.flag("loop")&&e>2&&(o>e/2&&(o-=e),o<-e/2&&(o+=e));const r=n===s;if(a.toggleAttribute("data-active",r),a.setAttribute("aria-hidden",String(!r)),a.inert=!r,"slide"===i)return void(a.style.transform=a.style.opacity=a.style.zIndex=a.style.filter="");const l=Math.abs(o);"fade"===i?(a.style.opacity=String(h(1-l,0,1)),a.style.transform=""):"scale"===i?(a.style.opacity=String(h(1-l,0,1)),a.style.transform=`scale(${1+Math.min(1,l)*(o<0?.12:-.12)})`):(a.style.opacity=l>2.2?"0":String(1-.28*Math.min(l,2)),a.style.transform=`translateX(${58*o}%) translateZ(${140*-l}px) rotateY(${h(38*-o,-60,60)}deg)`,a.style.filter=l>.5?`brightness(${1-.18*Math.min(l,2)})`:""),a.style.zIndex=String(100-Math.round(10*l))}),this._dots.forEach((t,e)=>t.setAttribute("aria-current",String(e===s)))}goTo(t){const e=this.length;if(!e)return;const s=this.flag("loop")?(Math.round(t)%e+e)%e:h(Math.round(t),0,e-1),i=this._i;this._i=s,this.layout(0),s!==i&&this.emit("change",{index:s,from:i})}next(){this.goTo(this._i+1>=this.length&&!this.flag("loop")?0:this._i+1)}prev(){this.goTo(this._i-1<0&&!this.flag("loop")?this.length-1:this._i-1)}},{id:"carousel",text:'usa-carousel{display:block;position:relative;--usa-carousel-dur:520ms;--usa-carousel-ease:cubic-bezier(.22,1,.36,1);overflow:hidden;border-radius:var(--usa-radius,14px);touch-action:pan-y}.usa-carousel-viewport{position:relative;overflow:hidden;height:100%;min-height:inherit}.usa-carousel-track{display:flex;height:100%;transition:transform var(--usa-carousel-dur) var(--usa-carousel-ease);will-change:transform}.usa-carousel-track>*{flex:0 0 100%;min-width:0;box-sizing:border-box}usa-carousel:not([data-effect="slide"]) .usa-carousel-track{display:grid}usa-carousel:not([data-effect="slide"]) .usa-carousel-track>*{grid-area:1/1;transition:opacity var(--usa-carousel-dur) ease,transform var(--usa-carousel-dur) var(--usa-carousel-ease),filter var(--usa-carousel-dur) ease}usa-carousel[data-effect="cards"] .usa-carousel-viewport{perspective:900px}usa-carousel[data-dragging] .usa-carousel-track,usa-carousel[data-dragging] .usa-carousel-track>*{transition:none}.usa-carousel-nav{position:absolute;top:50%;translate:0 -50%;z-index:2;width:36px;height:36px;border-radius:50%;border:0;background:rgba(255,255,255,.85);color:#111;font:600 18px/1 system-ui;cursor:pointer;display:grid;place-items:center;box-shadow:0 4px 14px rgba(0,0,0,.18);transition:transform .2s}.usa-carousel-nav:hover{transform:scale(1.08)}.usa-carousel-nav:focus-visible{outline:2px solid #7c5cff;outline-offset:2px}.usa-carousel-prev{left:10px}.usa-carousel-next{right:10px}.usa-carousel-dots{position:absolute;left:0;right:0;bottom:10px;display:flex;justify-content:center;gap:6px;z-index:2}.usa-carousel-dot{width:8px;height:8px;padding:0;border:0;border-radius:99px;background:rgba(255,255,255,.55);cursor:pointer;transition:width .35s var(--usa-carousel-ease),background .35s}.usa-carousel-dot[aria-current="true"]{width:22px;background:#fff}@media (prefers-reduced-motion:reduce){usa-carousel .usa-carousel-track,usa-carousel .usa-carousel-track>*,.usa-carousel-dot{transition:none!important}}usa-carousel[data-reduced] .usa-carousel-track,usa-carousel[data-reduced] .usa-carousel-track>*{transition:none!important}'})}const v=["pill","underline","glow","gooey"];function w(t="usa-tab-bar"){return l(t,t=>class extends t{constructor(){super(...arguments),this._tabs=[],this._panels=[],this._ink=null,this._i=0}static get observedAttributes(){return["indicator"]}get selected(){return this._i}set selected(t){this.select(t)}mount(){const t=this.str("indicator","pill");this.dataset.indicator=v.includes(t)?t:"pill";let e=this.querySelector(":scope > .usa-tab-bar-list");e||(e=f("div","usa-tab-bar-list"),this.prepend(e)),e.setAttribute("role","tablist"),e.setAttribute("aria-label",this.str("label","Tabs"));const s=p(this);this._panels=s.filter(t=>t.hasAttribute("data-panel"));for(const t of s)!t.hasAttribute("data-panel")&&t.matches("button,[data-tab]")&&e.append(t);if(this._tabs=Array.from(e.children).filter(t=>t instanceof HTMLElement&&!t.classList.contains("usa-tab-bar-ink")),this._ink=e.querySelector(".usa-tab-bar-ink")||f("span","usa-tab-bar-ink",{"aria-hidden":"true"}),e.prepend(this._ink),this._tabs.forEach((t,e)=>{t.setAttribute("role","tab"),"button"!==t.localName||t.hasAttribute("type")||t.setAttribute("type","button"),t.id||(t.id=g("usa-tab"));const s=this._panels[e];s&&(s.id||(s.id=g("usa-tabpanel")),s.classList.add("usa-tab-bar-panel"),s.setAttribute("role","tabpanel"),s.setAttribute("aria-labelledby",t.id),s.tabIndex=0,t.setAttribute("aria-controls",s.id)),this.listen(t,"click",()=>this.select(e))}),this.listen(e,"keydown",t=>{const e=function(t,e,s,i=!1){const a=i?"ArrowUp":"ArrowLeft",n=i?"ArrowDown":"ArrowRight";return t.key===a?(e-1+s)%s:t.key===n?(e+1)%s:"Home"===t.key?0:"End"===t.key?s-1:-1}(t,this._i,this._tabs.length);e<0||(t.preventDefault(),this.select(e),this._tabs[e].focus())}),this._i=Math.min(Math.max(0,Math.round(this.num("selected",0))),Math.max(0,this._tabs.length-1)),this.sync(-1),"function"==typeof ResizeObserver){const t=new ResizeObserver(()=>this.place());t.observe(e),this.onCleanup(()=>t.disconnect())}}rect(t){const e=this._tabs[t];return e?[e.offsetLeft,e.offsetWidth]:[0,0]}place(){if(!this._ink)return;const[t,e]=this.rect(this._i);this._ink.style.transform=`translateX(${t}px)`,this._ink.style.width=`${e}px`}sync(t){if(this._tabs.forEach((t,e)=>{t.setAttribute("aria-selected",String(e===this._i)),t.tabIndex=e===this._i?0:-1}),this._panels.forEach((t,e)=>t.hidden=e!==this._i),this.place(),t<0||t===this._i||!this._ink||this.reduced)return;const[e,s]=this.rect(t),[i,a]=this.rect(this._i),n=i>e,o=n?{transform:`translateX(${e}px)`,width:i+a-e+"px"}:{transform:`translateX(${i}px)`,width:e+s-i+"px"};this.motion(this._ink,[{transform:`translateX(${e}px)`,width:`${s}px`},{...o,offset:.45},{transform:`translateX(${i}px)`,width:`${a}px`}],{duration:480,easing:"cubic-bezier(.22,1,.36,1)"});const r=this._panels[this._i];r&&this.motion(r,[{opacity:0,transform:`translateX(${n?24:-24}px)`},{opacity:1,transform:"none"}],{duration:320,easing:"cubic-bezier(.22,1,.36,1)"})}select(t){const e=Math.min(Math.max(0,Math.round(t)),this._tabs.length-1);if(e===this._i||e<0)return;const s=this._i;this._i=e,this.sync(s),this.emit("change",{index:e,from:s})}},{id:"tab-bar",text:'usa-tab-bar{display:block;--usa-tab-accent:#7c5cff;--usa-tab-ease:cubic-bezier(.22,1,.36,1)}.usa-tab-bar-list{position:relative;display:flex;gap:4px;padding:4px;border-radius:12px;background:rgba(127,127,127,.12);isolation:isolate;overflow-x:auto;scrollbar-width:none}.usa-tab-bar-list::-webkit-scrollbar{display:none}.usa-tab-bar-list>[role="tab"]{position:relative;z-index:1;flex:1 0 auto;border:0;background:none;color:inherit;font:inherit;font-weight:600;padding:8px 14px;border-radius:9px;cursor:pointer;opacity:.7;transition:opacity .25s,color .25s;white-space:nowrap}.usa-tab-bar-list>[role="tab"][aria-selected="true"]{opacity:1}.usa-tab-bar-list>[role="tab"]:focus-visible{outline:2px solid var(--usa-tab-accent);outline-offset:1px}.usa-tab-bar-ink{position:absolute;z-index:0;left:0;top:4px;bottom:4px;width:0;border-radius:9px;background:var(--usa-tab-accent);pointer-events:none}usa-tab-bar[data-indicator="pill"] [aria-selected="true"]{color:#fff}usa-tab-bar[data-indicator="underline"] .usa-tab-bar-list{background:none;border-bottom:1px solid rgba(127,127,127,.25);border-radius:0}usa-tab-bar[data-indicator="underline"] .usa-tab-bar-ink{top:auto;bottom:0;height:3px;border-radius:3px}usa-tab-bar[data-indicator="glow"] .usa-tab-bar-ink{background:transparent;box-shadow:0 0 0 2px var(--usa-tab-accent),0 0 18px var(--usa-tab-accent)}usa-tab-bar[data-indicator="gooey"] .usa-tab-bar-ink{filter:blur(.5px);border-radius:999px}usa-tab-bar[data-indicator="gooey"] [aria-selected="true"]{color:#fff}.usa-tab-bar-panel{padding:14px 2px}.usa-tab-bar-panel[hidden]{display:none}'})}const _={default:{stiffness:170,damping:26,mass:1},gentle:{stiffness:120,damping:14,mass:1},wobbly:{stiffness:180,damping:12,mass:1},stiff:{stiffness:210,damping:20,mass:1},bouncy:{stiffness:300,damping:10,mass:1},slow:{stiffness:280,damping:60,mass:1},molasses:{stiffness:280,damping:120,mass:1}};function k(t,e,s,i,a){const n=s+(-t.stiffness*(e-i)-t.damping*s)/t.mass*a;return[e+n*a,n]}const A=new Map;function M(t,e=60){const s=function(t){const e="string"==typeof t?_[t]||_.default:{..._.default,...t||{}},s=(t,e)=>"number"==typeof t&&Number.isFinite(t)&&t>0?t:e,i="object"==typeof t&&t||{};return{stiffness:s(e.stiffness,170),damping:Math.max(0,Number.isFinite(e.damping)?e.damping:26),mass:s(e.mass,1),velocity:Number.isFinite(i.velocity)?i.velocity:0,precision:s(i.precision,.001)}}(t),i=`${s.stiffness}|${s.damping}|${s.mass}|${s.velocity}|${s.precision}|${e}`,a=A.get(i);if(a)return a;const n=[0];let o=0,r=s.velocity;const l=1e3/e;let c=0,u=l;for(;c<1e4&&([o,r]=k(s,o,r,1,.001),c+=1,!(c>=u&&(n.push(o),u+=l,Math.abs(1-o)<s.precision&&Math.abs(r)<10*s.precision))););n[n.length-1]=1;const d={values:n,duration:Math.round(c)};return A.size>64&&A.clear(),A.set(i,d),d}function S(t,e=48){const{values:s,duration:i}=M(t);return"undefined"!=typeof CSS&&"function"==typeof CSS.supports&&CSS.supports("animation-timing-function","linear(0, 1)")?{easing:E(s,e),duration:i}:{easing:"cubic-bezier(0.34, 1.56, 0.64, 1)",duration:Math.min(i,1200)}}function E(t,e=48){const s=t.length,i=Math.max(1,Math.ceil((s-1)/Math.max(2,e-1))),a=[];for(let e=0;e<s-1;e+=i)a.push(String(Math.round(1e3*t[e])/1e3));return a.push("1"),`linear(${a.join(", ")})`}function $(t="usa-disclosure"){return l(t,t=>class extends t{constructor(){super(...arguments),this._anims=new WeakMap}get items(){return Array.from(this.children).filter(t=>"details"===t.localName)}mount(){this.listen(this,"click",t=>{const e=t.target.closest("summary"),s=e?.parentElement;e&&s&&s.parentElement===this&&(t.preventDefault(),this.set(s,!s.open))})}set(t,e){if(e&&!this.flag("multiple"))for(const e of this.items)e!==t&&e.open&&this.set(e,!1);if(t.open===e&&!this._anims.get(t))return;const s=t.querySelector("summary"),i=s?s.offsetHeight:0,a=t.offsetHeight;this._anims.get(t)?.cancel(),e&&(t.open=!0);const n=e?t.scrollHeight:i,o=S(this.str("spring","gentle")),r=this.reduced?null:this.motion(t,[{height:`${a}px`},{height:`${n}px`}],{duration:Math.min(o.duration,700),easing:o.easing,fill:"forwards"}),l=Array.from(t.children).filter(t=>"summary"!==t.localName);e&&!this.reduced&&l.forEach(t=>this.motion(t,[{opacity:0,transform:"translateY(-6px)"},{opacity:1,transform:"none"}],{duration:300,delay:60,easing:"ease-out"}));const c=()=>{this._anims.delete(t),e||(t.open=!1),r?.cancel()};r?(this._anims.set(t,r),r.finished.then(()=>this._anims.get(t)===r&&c(),()=>{})):c(),this.emit("toggle",{index:this.items.indexOf(t),open:e})}toggle(t,e){const s=this.items[t];s&&this.set(s,e??!s.open)}openAll(){this.items.forEach(t=>t.open=!0)}closeAll(){this.items.forEach(t=>this.set(t,!1))}},{id:"disclosure",text:'usa-disclosure{display:block;--usa-disclosure-accent:#7c5cff}usa-disclosure>details{border-bottom:1px solid rgba(127,127,127,.25);overflow:hidden}usa-disclosure>details>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 4px;font-weight:600}usa-disclosure>details>summary::-webkit-details-marker{display:none}usa-disclosure>details>summary::after{content:"";flex:none;width:9px;height:9px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;rotate:45deg;translate:0 -3px;transition:rotate .35s cubic-bezier(.34,1.56,.64,1),translate .35s}usa-disclosure>details[open]>summary::after{rotate:225deg;translate:0 2px}usa-disclosure>details>summary:focus-visible{outline:2px solid var(--usa-disclosure-accent);outline-offset:2px;border-radius:6px}usa-disclosure>details>:not(summary){padding:0 4px 12px}usa-disclosure[variant="cards"]>details{border:1px solid rgba(127,127,127,.25);border-radius:12px;margin-bottom:8px;padding:0 10px;transition:box-shadow .3s,border-color .3s}usa-disclosure[variant="cards"]>details[open]{border-color:var(--usa-disclosure-accent);box-shadow:0 8px 24px rgba(124,92,255,.16)}@media (prefers-reduced-motion:reduce){usa-disclosure>details>summary::after{transition:none}}'})}function C(t="usa-stories"){return l(t,t=>class extends t{constructor(){super(...arguments),this._i=0,this._items=[],this._bars=[],this._fill=null,this._btn=null}static get observedAttributes(){return["duration","loop"]}get index(){return this._i}mount(){m(this),this._items=p(this);const t=f("div","usa-stories-bars",{"aria-hidden":"true"});this._bars=this._items.map(()=>{const e=f("div","usa-stories-bar",{},"<i></i>");return t.append(e),e}),this._btn=f("button","usa-stories-toggle",{type:"button"}),this.listen(this._btn,"click",t=>{t.stopPropagation(),this.hasAttribute("paused")?this.play():this.pause()}),this.append(t,this._btn),this.setAttribute("role","region"),this.setAttribute("aria-roledescription","stories"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Stories"),this.hasAttribute("tabindex")||(this.tabIndex=0),this.reduced&&this.setAttribute("paused","");let e=!1,s=0;this.listen(this,"pointerdown",t=>{t.target.closest("button,a")||(s=performance.now(),e=!this.hasAttribute("paused"),e&&this._fill?.pause())}),this.listen(this,"pointerup",t=>{if(t.target.closest("button,a")||!s)return;const i=performance.now()-s>350;if(s=0,e&&!this.hasAttribute("paused")&&this._fill?.play(),i)return;const a=this.getBoundingClientRect();t.clientX-a.left<a.width/3?this.prev():this.next()}),this.listen(this,"keydown",t=>{"ArrowRight"===t.key?this.next():"ArrowLeft"===t.key?this.prev():" "===t.key&&(t.preventDefault(),this.hasAttribute("paused")?this.play():this.pause())}),this.onCleanup(()=>this._fill?.cancel()),this.goTo(Math.min(this._i,Math.max(0,this._items.length-1)),!0)}label(){if(this._btn){const t=this.hasAttribute("paused");this._btn.textContent=t?"▶":"❚❚",this._btn.setAttribute("aria-label",t?"Play stories":"Pause stories")}}goTo(t,e=!1){const s=this._items.length;if(!s)return;if(t>=s&&!this.flag("loop"))return this.emit("end"),void this.pause();const i=(t%s+s)%s,a=i!==this._i||e;this._i=i,this._items.forEach((t,e)=>{t.toggleAttribute("data-active",e===i),t.setAttribute("aria-hidden",String(e!==i))}),this._bars.forEach((t,e)=>t.toggleAttribute("data-done",e<i)),this._fill?.cancel();const n=this._bars[i]?.firstElementChild;if(this._fill=n?n.animate?.([{transform:"scaleX(0)"},{transform:"scaleX(1)"}],{duration:Math.max(800,this.num("duration",5e3)),fill:"forwards"})??null:null,this._fill){const t=this._fill;t.onfinish=()=>this._fill===t&&this.goTo(this._i+1),this.hasAttribute("paused")&&t.pause()}this.label(),a&&!e&&this.emit("change",{index:i})}next(){this.goTo(this._i+1)}prev(){this.goTo(Math.max(0,this._i-1))}pause(){this.setAttribute("paused",""),this._fill?.pause(),this.label()}play(){this.removeAttribute("paused"),"finished"===this._fill?.playState?this.goTo(this._i+1>=this._items.length?0:this._i+1):this._fill?.play(),this.label()}},{id:"stories",text:"usa-stories{display:block;position:relative;overflow:hidden;border-radius:var(--usa-radius,16px);background:#111;color:#fff;aspect-ratio:9/14;max-height:520px;user-select:none;-webkit-user-select:none;touch-action:manipulation}usa-stories>:not([data-usa-part]){position:absolute;inset:0;opacity:0;transition:opacity .35s ease,transform .5s cubic-bezier(.22,1,.36,1);transform:scale(1.04);pointer-events:none;box-sizing:border-box}usa-stories>[data-active]:not([data-usa-part]){opacity:1;transform:none;pointer-events:auto}usa-stories>img:not([data-usa-part]){width:100%;height:100%;object-fit:cover}.usa-stories-bars{position:absolute;z-index:3;top:8px;left:8px;right:48px;display:flex;gap:4px}.usa-stories-bar{flex:1;height:3px;border-radius:3px;background:rgba(255,255,255,.35);overflow:hidden}.usa-stories-bar>i{display:block;height:100%;width:100%;background:#fff;transform-origin:left;transform:scaleX(0)}.usa-stories-bar[data-done]>i{transform:scaleX(1)}.usa-stories-toggle{position:absolute;z-index:3;top:2px;right:6px;width:36px;height:30px;border:0;background:none;color:#fff;font:700 14px/1 system-ui;cursor:pointer;border-radius:8px}.usa-stories-toggle:focus-visible{outline:2px solid #fff}@media (prefers-reduced-motion:reduce){usa-stories>*{transition:none!important;transform:none!important}}"})}const T=["scale","slide-up","flip","origin"],z=["right","left","bottom","top"],q="cubic-bezier(.22,1,.36,1)";let L=!1;function I(){L||"undefined"==typeof document||(L=!0,document.addEventListener("click",t=>{const e=t.target?.closest?.("[data-usa-open]");if(!e)return;const s=document.getElementById(e.getAttribute("data-usa-open")||"");s&&"function"==typeof s.show&&(t.preventDefault(),s.opened?s.close?.():s.show(e))}))}function R(t,e){return I(),l(t,t=>class extends t{constructor(){super(...arguments),this._dlg=null,this._panel=null,this._open=!1,this._ret=null,this._origin=null,this._value="",this._closing=null}static get observedAttributes(){return"modal"===e?["effect"]:["side"]}get opened(){return this._open}get returnValue(){return this._value}mount(){let t=this.querySelector(":scope > dialog.usa-ov");if(!t){t=f("dialog",`usa-ov usa-${e}-panel`);const s=f("div","usa-ov-body");s.append(...p(this)),t.append(s),this.append(t)}if(this._dlg=t,this._panel=t.querySelector(".usa-ov-body"),"modal"===e){const t=this.str("effect","scale");this.dataset.effect=T.includes(t)?t:"scale"}else{const t=this.str("side","right");this.dataset.side=z.includes(t)?t:"right","bottom"===this.dataset.side&&this._panel&&!this._panel.querySelector("[data-handle]")&&this._panel.prepend(f("div","usa-ov-grab",{"data-handle":"","aria-hidden":"true"})),this.drag()}t.hasAttribute("aria-labelledby")||t.setAttribute("aria-label",this.str("label","modal"===e?"Dialog":"Panel")),this.listen(t,"cancel",t=>{t.preventDefault(),this.flag("persistent")||this.close()}),this.listen(t,"click",e=>{const s=e.target,i=s.closest?.("[data-usa-close]");i?this.close(i.getAttribute("data-usa-close")||""):s!==t||this.flag("persistent")||this.close()}),this.flag("open")&&!this._open&&this.show()}unmount(){this._open&&this._dlg?.open&&this._dlg.close?.(),this._open=!1}frames(t){const s=[{opacity:0},{opacity:1}];if(this.reduced)return t?s:[...s].reverse();let i;if("sheet"===e){const t=this.dataset.side;i=[{transform:"left"===t?"translateX(-100%)":"bottom"===t?"translateY(100%)":"top"===t?"translateY(-100%)":"translateX(100%)"},{transform:"none"}]}else{const t=this.dataset.effect,e=this._origin,s=this._dlg?.getBoundingClientRect();if("origin"===t&&e&&s&&s.width){i=[{transform:`translate(${e.left+e.width/2-(s.left+s.width/2)}px,${e.top+e.height/2-(s.top+s.height/2)}px) scale(${Math.max(.05,e.width/s.width).toFixed(3)},${Math.max(.05,e.height/s.height).toFixed(3)})`,opacity:0,borderRadius:"40px"},{transform:"none",opacity:1}]}else i="slide-up"===t?[{transform:"translateY(48px)",opacity:0},{transform:"none",opacity:1}]:"flip"===t?[{transform:"perspective(900px) rotateX(-28deg) translateY(30px)",opacity:0},{transform:"none",opacity:1}]:[{transform:"scale(.88)",opacity:0},{transform:"scale(1.015)",opacity:1,offset:.7},{transform:"none",opacity:1}]}return t?i:[i[0],i[i.length-1]].reverse()}backdrop(t){if(!this._dlg)return;const e=[{opacity:0},{opacity:1}];try{this._dlg.animate?.(t?e:e.reverse(),{duration:t?280:200,pseudoElement:"::backdrop",fill:"forwards"})}catch{}}show(t){const s=this._dlg;if(!s||this._open)return;if(this._open=!0,this._ret=t||document.activeElement,this._origin=t?t.getBoundingClientRect():null,"function"==typeof s.showModal)try{s.showModal()}catch{s.setAttribute("open","")}else s.setAttribute("open","");this.setAttribute("data-open",""),this.backdrop(!0),this.motion(s,this.frames(!0),{duration:this.reduced?150:"sheet"===e?420:460,easing:q});const i=s.querySelector("[autofocus]")||s.querySelector('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])');i?.focus?.(),this.emit("open",{trigger:t||null})}close(t=""){const e=this._dlg;if(!e||!this._open)return Promise.resolve();if(this._closing)return this._closing;this._value=t,this.backdrop(!1);const s=this.motion(e,this.frames(!1),{duration:this.reduced?120:260,easing:"cubic-bezier(.4,0,1,1)",fill:"forwards"}),i=()=>{this._closing=null,this._open=!1,this.removeAttribute("data-open"),e.open&&"function"==typeof e.close?e.close(t):e.removeAttribute("open"),s?.cancel?.(),e.style.transform="",this._ret?.focus?.(),this.emit("close",{value:t})};return this._closing=s?s.finished.then(i,i):Promise.resolve().then(i),this._closing}toggle(){this._open?this.close():this.show()}drag(){const t=this._panel,e=this._dlg;if(!t||!e||"bottom"!==this.dataset.side)return;let s=-1,i=0,a=0;this.listen(t,"pointerdown",t=>{t.target.closest("[data-handle]")&&(s=t.clientY,i=0,a=performance.now(),t.target.setPointerCapture?.(t.pointerId))}),this.listen(t,"pointermove",t=>{s<0||(i=Math.max(0,t.clientY-s),e.style.transform=`translateY(${i}px)`)});const n=()=>{if(s<0)return;s=-1;const t=i/Math.max(1,performance.now()-a);i>.3*e.offsetHeight||t>.6?this.close():(this.motion(e,[{transform:`translateY(${i}px)`},{transform:"translateY(-6px)",offset:.6},{transform:"none"}],{duration:380,easing:q}),e.style.transform="")};this.listen(t,"pointerup",n),this.listen(t,"pointercancel",n)}},{id:"overlay",text:'usa-modal,usa-sheet{display:contents}.usa-ov{border:0;padding:0;margin:auto;color:inherit;background:transparent;max-width:min(92vw,520px);max-height:88vh;overflow:visible}.usa-ov::backdrop{background:rgba(10,12,20,.45);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.usa-ov-body{box-sizing:border-box;background:var(--usa-ov-bg,#fff);color:var(--usa-ov-fg,#111827);border-radius:var(--usa-ov-radius,18px);padding:var(--usa-ov-pad,22px);box-shadow:0 30px 80px -20px rgba(0,0,0,.45);max-height:88vh;overflow:auto}.usa-sheet-panel{margin:0;max-width:none;max-height:none}usa-sheet[data-side="right"] .usa-sheet-panel{inset:0 0 0 auto;height:100%;width:min(88vw,var(--usa-sheet-size,380px))}usa-sheet[data-side="left"] .usa-sheet-panel{inset:0 auto 0 0;height:100%;width:min(88vw,var(--usa-sheet-size,380px))}usa-sheet[data-side="bottom"] .usa-sheet-panel{inset:auto 0 0 0;width:100%;max-height:85vh}usa-sheet[data-side="top"] .usa-sheet-panel{inset:0 0 auto 0;width:100%;max-height:85vh}usa-sheet .usa-ov-body{height:100%;max-height:inherit;border-radius:0}usa-sheet[data-side="bottom"] .usa-ov-body{border-radius:var(--usa-ov-radius,18px) var(--usa-ov-radius,18px) 0 0;height:auto;max-height:85vh;touch-action:none}usa-sheet[data-side="top"] .usa-ov-body{border-radius:0 0 var(--usa-ov-radius,18px) var(--usa-ov-radius,18px);height:auto}.usa-ov-grab{width:44px;height:5px;border-radius:3px;background:rgba(127,127,127,.45);margin:-8px auto 14px;cursor:grab}@media (prefers-color-scheme:dark){.usa-ov-body{background:var(--usa-ov-bg,#171a23);color:var(--usa-ov-fg,#e5e7eb)}}'})}const D=(t="usa-modal")=>R(t,"modal"),N=(t="usa-sheet")=>R(t,"sheet");const F=["bottom-right","bottom-left","bottom-center","top-right","top-left","top-center"],X={info:"ℹ",success:"✓",warning:"!",error:"✕"};let P=0;function O(t="usa-toast-stack"){return function(){if(I(),Y||"undefined"==typeof document)return;Y=!0,document.addEventListener("click",t=>{const e=t.target?.closest?.("[data-usa-toast]");if(!e)return;const s=e.getAttribute("data-usa-target"),i=s?document.getElementById(s):null;B({message:e.getAttribute("data-usa-toast")||"",title:e.getAttribute("data-usa-toast-title")||void 0,type:e.getAttribute("data-usa-toast-type")||"info"},i)})}(),l(t,t=>class extends t{constructor(){super(...arguments),this._list=null,this._timers=new Map,this._hover=!1}static get observedAttributes(){return["position"]}get count(){return this._list?this._list.querySelectorAll(":scope > .usa-tstack:not([data-leaving])").length:0}mount(){const t=this.str("position","bottom-right");this.dataset.position=F.includes(t)?t:"bottom-right",this.setAttribute("role","region"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Notifications"),this._list=this.querySelector(":scope > .usa-tstack-list")||f("ol","usa-tstack-list",{"aria-live":"polite","aria-relevant":"additions"}),this._list.isConnected||this.append(this._list);const e=t=>{this._hover=t,this.toggleAttribute("data-expanded",t),this.layout();for(const[e,s]of this._timers)t?this.pause(e,s):this.resume(e)};this.listen(this,"pointerenter",()=>e(!0)),this.listen(this,"pointerleave",()=>e(!1)),this.listen(this,"focusin",()=>e(!0)),this.listen(this,"focusout",t=>!this.contains(t.relatedTarget)&&e(!1)),this.onCleanup(()=>this._timers.forEach(t=>t.h&&clearTimeout(t.h)))}pause(t,e){e.h&&(clearTimeout(e.h),e.h=0,e.left-=Date.now()-e.start)}resume(t){const e=this._timers.get(t);e&&!e.h&&(e.start=Date.now(),e.h=setTimeout(()=>this.dismiss(t,"timeout"),Math.max(400,e.left)))}show(t){const e="string"==typeof t?{message:t}:t||{},s="usa-tstack-"+ ++P,i=e.type&&X[e.type]?e.type:"info",a=f("li",`usa-tstack usa-tstack-${i}`,{id:s,role:"error"===i?"alert":"status"});a.append(f("span","usa-tstack-icon",{"aria-hidden":"true"},X[i]));const n=f("div","usa-tstack-text");if(e.title&&n.append(Object.assign(document.createElement("strong"),{textContent:e.title})),e.message&&n.append(Object.assign(document.createElement("span"),{textContent:e.message})),a.append(n),e.action){const t=f("button","usa-tstack-action",{type:"button"});t.textContent=e.action.label,t.addEventListener("click",()=>{e.action?.onClick?.(),this.dismiss(s,"action")}),a.append(t)}const o=f("button","usa-tstack-close",{type:"button","aria-label":"Dismiss"},"×");o.addEventListener("click",()=>this.dismiss(s,"close")),a.append(o),this.swipe(a,s),this._list?.prepend(a);const r=this.dataset.position?.startsWith("top");this.motion(a,this.reduced?[{opacity:0},{opacity:1}]:[{opacity:0,translate:`0 ${r?-110:110}%`,scale:"0.9"},{opacity:1,translate:"0 0",scale:"1"}],{duration:this.reduced?150:420,easing:"cubic-bezier(.22,1,.36,1)"}),this.layout();const l=e.duration??this.num("duration",4e3);return l>0&&(this._timers.set(s,{left:l,start:Date.now(),h:0}),this._hover||this.resume(s)),this.emit("show",{id:s,...e}),s}dismiss(t,e="api"){const s=this._list?.querySelector(`#${t}`),i=this._timers.get(t);if(i?.h&&clearTimeout(i.h),this._timers.delete(t),!s||s.hasAttribute("data-leaving"))return;s.setAttribute("data-leaving","");const a=Number(s.dataset.dx||0),n=this.motion(s,this.reduced?[{opacity:1},{opacity:0}]:[{opacity:1,transform:`translateX(${a}px)`},{opacity:0,transform:`translateX(${a>=0?120:-120}%)`}],{duration:this.reduced?120:260,easing:"cubic-bezier(.4,0,1,1)",fill:"forwards"}),o=()=>{s.remove(),this.layout()};n?n.finished.then(o,o):o(),this.emit("dismiss",{id:t,reason:e})}clear(){this._list?.querySelectorAll(":scope > .usa-tstack").forEach(t=>this.dismiss(t.id,"clear"))}layout(){if(!this._list)return;const t=Array.from(this._list.querySelectorAll(":scope > .usa-tstack:not([data-leaving])")),e=Math.max(1,this.num("max",3)),s=this.dataset.position?.startsWith("top")?1:-1;let i=0;t.forEach((t,a)=>{const n=t.offsetHeight||56,o=this._hover?`translateY(${s*i}px)`:`translateY(${s*a*10}px) scale(${(1-.05*a).toFixed(3)})`;t.style.transform=o,t.style.zIndex=String(100-a),t.style.opacity=!this._hover&&a>=e?"0":"",t.toggleAttribute("inert",!this._hover&&a>0),i+=n+10}),this._list.style.height=this._hover&&t.length?`${i}px`:""}swipe(t,e){let s=NaN;t.addEventListener("pointerdown",e=>{e.target.closest("button")||(s=e.clientX,t.setPointerCapture?.(e.pointerId))}),t.addEventListener("pointermove",e=>{if(Number.isNaN(s))return;const i=e.clientX-s;t.dataset.dx=String(i),t.style.translate=`${i}px 0`,t.style.opacity=String(Math.max(.2,1-Math.abs(i)/240))});const i=()=>{if(Number.isNaN(s))return;s=NaN;const i=Number(t.dataset.dx||0);t.style.translate="",t.style.opacity="",Math.abs(i)>80?this.dismiss(e,"swipe"):t.dataset.dx="0"};t.addEventListener("pointerup",i),t.addEventListener("pointercancel",i)}},{id:"toast",text:'usa-toast-stack{position:fixed;z-index:2147482000;width:min(360px,calc(100vw - 24px));pointer-events:none;--usa-tstack-bg:#111827;--usa-tstack-fg:#f9fafb}usa-toast-stack[contained]{position:absolute;width:min(360px,calc(100% - 24px))}usa-toast-stack[data-position^="bottom"]{bottom:12px}usa-toast-stack[data-position^="top"]{top:12px}usa-toast-stack[data-position$="right"]{right:12px}usa-toast-stack[data-position$="left"]{left:12px}usa-toast-stack[data-position$="center"]{left:50%;transform:translateX(-50%)}.usa-tstack-list{position:relative;list-style:none;margin:0;padding:0;min-height:1px;transition:height .3s}.usa-tstack{position:absolute;left:0;right:0;display:flex;align-items:center;gap:10px;box-sizing:border-box;padding:12px 12px 12px 14px;border-radius:14px;background:var(--usa-tstack-bg);color:var(--usa-tstack-fg);box-shadow:0 12px 32px -10px rgba(0,0,0,.45);font:500 14px/1.35 system-ui,sans-serif;pointer-events:auto;touch-action:pan-y;transition:transform .38s cubic-bezier(.22,1,.36,1),opacity .3s;user-select:none}usa-toast-stack[data-position^="bottom"] .usa-tstack{bottom:0;transform-origin:50% 100%}usa-toast-stack[data-position^="top"] .usa-tstack{top:0;transform-origin:50% 0}.usa-tstack-icon{flex:none;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;font-size:13px;font-weight:800;background:#3b82f6;color:#fff}.usa-tstack-success .usa-tstack-icon{background:#22c55e}.usa-tstack-warning .usa-tstack-icon{background:#f59e0b}.usa-tstack-error .usa-tstack-icon{background:#ef4444}.usa-tstack-text{flex:1;min-width:0;display:flex;flex-direction:column}.usa-tstack-text strong{font-weight:700}.usa-tstack-action{border:0;border-radius:8px;padding:6px 10px;background:rgba(255,255,255,.14);color:inherit;font:600 13px system-ui,sans-serif;cursor:pointer}.usa-tstack-close{border:0;background:none;color:inherit;opacity:.6;font-size:18px;line-height:1;cursor:pointer;padding:2px 4px}.usa-tstack-close:hover{opacity:1}@media (prefers-reduced-motion:reduce){.usa-tstack,.usa-tstack-list{transition:none}}'})}function B(t,e){O();let s=e||document.querySelector("usa-toast-stack");return s||(s=document.createElement("usa-toast-stack"),document.body.append(s)),s.show(t)}let Y=!1;const G=["scale","fold","slide"];function W(t="usa-menu"){return l(t,t=>class extends t{constructor(){super(...arguments),this._btn=null,this._list=null,this._items=[],this._open=!1}static get observedAttributes(){return["placement","effect"]}get opened(){return this._open}mount(){const t=p(this);this._btn=t.find(t=>t.hasAttribute("data-trigger"))||t[0]||null;let e=this.querySelector(":scope > .usa-menu-list");if(!e){e=f("div","usa-menu-list",{role:"menu"});for(const s of t)s!==this._btn&&e.append(s);this.append(e)}this._list=e,e.id||(e.id=g("usa-menu")),e.hidden=!this._open;const s=this.str("placement","bottom-start");this.dataset.placement=/^(bottom|top)-(start|end)$/.test(s)?s:"bottom-start";const i=this.str("effect","scale");this.dataset.effect=G.includes(i)?i:"scale",this._items=Array.from(e.children).filter(t=>t instanceof HTMLElement&&!t.matches('hr,[role="separator"]')),e.querySelectorAll("hr").forEach(t=>t.setAttribute("role","separator")),this._items.forEach((t,e)=>{t.setAttribute("role","menuitem"),t.tabIndex=-1,"button"!==t.localName||t.hasAttribute("type")||t.setAttribute("type","button"),this.listen(t,"click",()=>{this.emit("select",{index:e,value:t.dataset.value||(t.textContent||"").trim(),item:t}),this.close(!0)})});const a=this._btn;a&&(a.setAttribute("aria-haspopup","menu"),a.setAttribute("aria-expanded",String(this._open)),a.setAttribute("aria-controls",e.id),"button"!==a.localName||a.hasAttribute("type")||a.setAttribute("type","button"),this.listen(a,"click",()=>this.toggle()),this.listen(a,"keydown",t=>{"ArrowDown"!==t.key&&"ArrowUp"!==t.key||(t.preventDefault(),this.open("ArrowUp"===t.key?"last":"first"))})),this.listen(e,"keydown",t=>{const e=this._items.length,s=this._items.indexOf(document.activeElement);let i=-1;if("ArrowDown"===t.key)i=(s+1)%e;else if("ArrowUp"===t.key)i=(s-1+e)%e;else if("Home"===t.key)i=0;else if("End"===t.key)i=e-1;else{if("Escape"===t.key)return t.preventDefault(),this.close(!0);if("Tab"===t.key)return this.close(!1)}i>=0&&(t.preventDefault(),this._items[i]?.focus())}),this.listen(document,"pointerdown",t=>{this._open&&!this.contains(t.target)&&this.close(!1)})}open(t="first"){const e=this._list;if(!e||this._open)return;this._open=!0,e.hidden=!1,this._btn?.setAttribute("aria-expanded","true"),this.setAttribute("data-open","");const s=this.dataset.effect;if(this.reduced)this.motion(e,[{opacity:0},{opacity:1}],{duration:120});else{const t="fold"===s?[{transform:"perspective(600px) rotateX(-70deg)",opacity:0},{transform:"none",opacity:1}]:"slide"===s?[{transform:"translateY(-10px)",opacity:0,clipPath:"inset(0 0 100% 0 round 12px)"},{transform:"none",opacity:1,clipPath:"inset(0 0 0 0 round 12px)"}]:[{transform:"scale(.6)",opacity:0},{transform:"scale(1.03)",opacity:1,offset:.7},{transform:"none",opacity:1}];this.motion(e,t,{duration:300,easing:"cubic-bezier(.22,1,.36,1)"}),this._items.forEach((t,e)=>this.motion(t,[{opacity:0,transform:"translateY(-6px)"},{opacity:1,transform:"none"}],{duration:260,delay:40+35*e,easing:"cubic-bezier(.22,1,.36,1)",fill:"backwards"}))}("last"===t?this._items[this._items.length-1]:this._items[0])?.focus(),this.emit("open")}close(t=!1){const e=this._list;if(!e||!this._open)return;this._open=!1,this._btn?.setAttribute("aria-expanded","false"),this.removeAttribute("data-open");const s=this.motion(e,[{opacity:1,transform:"none"},{opacity:0,transform:this.reduced?"none":"scale(.96)"}],{duration:this.reduced?80:150,easing:"ease-in"}),i=()=>{this._open||(e.hidden=!0)};s?s.finished.then(i,i):i(),t&&this._btn?.focus(),this.emit("close")}toggle(){this._open?this.close(!0):this.open()}},{id:"menu",text:'usa-menu{position:relative;display:inline-block}.usa-menu-list{position:absolute;z-index:50;min-width:180px;max-width:min(280px,90vw);box-sizing:border-box;padding:6px;border-radius:12px;background:var(--usa-menu-bg,#fff);color:var(--usa-menu-fg,#111827);box-shadow:0 18px 44px -12px rgba(0,0,0,.35),0 0 0 1px rgba(127,127,127,.15);display:flex;flex-direction:column;gap:2px;text-align:left}.usa-menu-list[hidden]{display:none}usa-menu[data-placement^="bottom"] .usa-menu-list{top:calc(100% + 6px)}usa-menu[data-placement^="top"] .usa-menu-list{bottom:calc(100% + 6px)}usa-menu[data-placement$="start"] .usa-menu-list{left:0;transform-origin:0 0}usa-menu[data-placement$="end"] .usa-menu-list{right:0;transform-origin:100% 0}usa-menu[data-placement="top-start"] .usa-menu-list{transform-origin:0 100%}usa-menu[data-placement="top-end"] .usa-menu-list{transform-origin:100% 100%}.usa-menu-list>[role="menuitem"]{display:flex;align-items:center;gap:8px;width:100%;box-sizing:border-box;border:0;background:none;color:inherit;font:500 14px/1.3 system-ui,sans-serif;text-align:left;text-decoration:none;padding:8px 10px;border-radius:8px;cursor:pointer}.usa-menu-list>[role="menuitem"]:hover,.usa-menu-list>[role="menuitem"]:focus-visible{background:var(--usa-menu-hover,rgba(124,92,255,.14));outline:none}.usa-menu-list>hr{border:0;border-top:1px solid rgba(127,127,127,.2);margin:4px 2px}@media (prefers-color-scheme:dark){.usa-menu-list{background:var(--usa-menu-bg,#1d2130);color:var(--usa-menu-fg,#e5e7eb)}}'})}const H={6.2:{"usa-carousel":y,"usa-tab-bar":w,"usa-disclosure":$,"usa-stories":C},6.3:{"usa-toast-stack":O,"usa-modal":D,"usa-sheet":N,"usa-menu":W}},j=Object.values(H).flatMap(t=>Object.keys(t));function U(t){for(const[e,s]of Object.entries(H))if(!t||t===e)for(const[t,e]of Object.entries(s))e(t)}var V;const K=["enter","exit","attention","click","hover","card","loop","page","background","text","cursor","scroll"],Z=Symbol.for("use-scroll-animate.effects"),J=(V=globalThis)[Z]||(V[Z]=new Map);function Q(t,e={}){if(!/^[a-z][a-z0-9-]*$/.test(t.name))throw new Error(`[motionary] invalid effect name "${t.name}"`);if(!K.includes(t.kind))throw new Error(`[motionary] unknown effect kind "${t.kind}"`);if(J.has(t.name)&&!e.override)throw new Error(`[motionary] effect "${t.name}" is already registered`);return J.set(t.name,t),()=>{J.get(t.name)===t&&J.delete(t.name)}}function tt(t){for(const e of t)J.has(e.name)||Q(e)}let et=null;function st(){return et?.isConnected||(et=document.createElement("div"),et.setAttribute("aria-hidden","true"),et.setAttribute("data-usa-fx-layer",""),et.style.cssText="position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:2147483000;contain:strict",document.body.appendChild(et)),et}function it(t,e,s,i,a,n,o=""){const r=document.createElement("span");r.style.cssText=`position:absolute;left:${t}px;top:${e}px;${s}`,o&&(r.textContent=o),st().appendChild(r);const l=i.animate(r,a,{fill:"forwards",...n}),c=()=>r.remove();return l?l.finished.then(c,c):c(),l}const at=["#7c5cff","#ff5c8a","#22d3ee","#facc15","#34d399"],nt=(t,e)=>t+Math.random()*(e-t),ot=t=>Promise.all(t.filter(Boolean).map(t=>t.finished.catch(()=>{})));function rt(t,e,s=0){return(Math.sin(1.7*t+s)*Math.cos(1.3*e-.7*s)+.5*Math.sin(.9*(t+e)+.5*s)+.5*Math.cos(.6*t-1.1*e-.3*s))/2}function lt(t){const e=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(t.trim());return e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:[124,92,255]}function ct(t,e,s,i){const a=document.createElement("canvas");a.setAttribute("aria-hidden","true"),a.setAttribute("data-usa-fx-canvas",""),a.style.cssText="position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:-1;border-radius:inherit";const n=[],o=(e,s)=>{n.push([e,t.style[e]]),t.style[e]=s};"static"===getComputedStyle(t).position&&o("position","relative"),o("isolation","isolate"),t.prepend(a);const r=a.getContext("2d");let l=0,c=!0,u=Math.min(1,Math.max(.35,Number(i.quality)||1)),d=0,h=0,p=null;const f=performance.now();let m=f,b=0,g=0;const x=()=>{const e=t.getBoundingClientRect();d=Math.max(1,Math.round(e.width)),h=Math.max(1,Math.round(e.height));const n=Math.min(2,("number"==typeof devicePixelRatio?devicePixelRatio:1)||1)*u;a.width=Math.max(1,Math.round(d*n)),a.height=Math.max(1,Math.round(h*n)),r&&r.setTransform(n,0,0,n,0,0),p=s.init?s.init(d,h,i):{}},y=t=>{if(l=0,!r)return;const e=t-m;m=t,e>28?b++:e<18&&g++,b>20&&u>.35?(u=Math.max(.35,u-.15),b=g=0,x()):g>240&&u<1&&(u=Math.min(1,u+.15),b=g=0,x()),s.draw({ctx:r,w:d,h:h,t:(t-f)/1e3,quality:u,state:p,o:i}),c&&!document.hidden&&(l=requestAnimationFrame(y))},v=()=>{l||!r||e.reduced||(m=performance.now(),l=requestAnimationFrame(y))};x(),r&&s.draw({ctx:r,w:d,h:h,t:0,quality:u,state:p,o:i});const w="function"==typeof IntersectionObserver?new IntersectionObserver(t=>{c=t.some(t=>t.isIntersecting),c&&v()}):null;w?.observe(t);const _="function"==typeof ResizeObserver?new ResizeObserver(()=>{x(),r&&e.reduced&&s.draw({ctx:r,w:d,h:h,t:0,quality:u,state:p,o:i})}):null;_?.observe(t);const k=()=>!document.hidden&&c&&v();return document.addEventListener("visibilitychange",k),v(),()=>{cancelAnimationFrame(l),l=0,w?.disconnect(),_?.disconnect(),document.removeEventListener("visibilitychange",k),a.remove();for(const[e,s]of n)t.style[e]=s}}const ut=(t,e,s,i)=>({name:t,kind:"background",description:e,reduced:"run",defaults:{colors:at,background:"#0b0d12",speed:1,quality:1,...s},run:(t,e,s)=>ct(t,s,i,e)});function dt(t,e,s){const i=Math.max(2,Math.round(e/t.quality)),a=Math.max(1,Math.ceil(t.w/i)),n=Math.max(1,Math.ceil(t.h/i)),o=t.state;if(o.buf&&o.buf.width===a&&o.buf.height===n||(o.buf=document.createElement("canvas"),o.buf.width=a,o.buf.height=n,o.bctx=o.buf.getContext("2d"),o.img=o.bctx?.createImageData(a,n)),!o.bctx||!o.img)return;const r=o.img.data;for(let t=0;t<n;t++)for(let e=0;e<a;e++)s(e*i,t*i,r,4*(t*a+e));o.bctx.putImageData(o.img,0,0),t.ctx.imageSmoothingEnabled=!0,t.ctx.drawImage(o.buf,0,0,t.w,t.h)}ut("flow-field","Particles drift along a slowly changing flow field, leaving silky trails.",{count:600,fade:.06},{init:(t,e,s)=>({p:Array.from({length:s.count},()=>[Math.random()*t,Math.random()*e])}),draw:({ctx:t,w:e,h:s,t:i,state:a,o:n,quality:o})=>{t.fillStyle=n.background,t.globalAlpha=0===i?1:n.fade,t.fillRect(0,0,e,s),t.globalAlpha=.8;const r=Math.round(a.p.length*o),l=0===i?40:1;for(let o=0;o<r;o++){const r=a.p[o];t.fillStyle=n.colors[o%n.colors.length];for(let a=0;a<l;a++){const a=rt(.004*r[0],.004*r[1],.15*i*n.speed)*Math.PI*2;r[0]+=1.2*Math.cos(a)*n.speed,r[1]+=1.2*Math.sin(a)*n.speed,(r[0]<0||r[0]>e||r[1]<0||r[1]>s)&&(r[0]=Math.random()*e,r[1]=Math.random()*s),t.fillRect(r[0],r[1],1.4,1.4)}}t.globalAlpha=1}}),ut("voronoi","Drifting Voronoi cells in the palette, with darker borders.",{seeds:14,cell:6},{init:(t,e,s)=>({s:Array.from({length:s.seeds},(i,a)=>({x:Math.random()*t,y:Math.random()*e,vx:Math.random()-.5,vy:Math.random()-.5,c:lt(s.colors[a%s.colors.length])}))}),draw:t=>{const{w:e,h:s,state:i,o:a}=t;for(const t of i.s)t.x+=t.vx*a.speed,t.y+=t.vy*a.speed,(t.x<0||t.x>e)&&(t.vx*=-1),(t.y<0||t.y>s)&&(t.vy*=-1);dt(t,a.cell,(t,e,s,a)=>{let n=1/0,o=1/0,r=i.s[0].c;for(const s of i.s){const i=(s.x-t)**2+(s.y-e)**2;i<n?(o=n,n=i,r=s.c):i<o&&(o=i)}const l=Math.sqrt(o)-Math.sqrt(n)<6?.55:1;s[a]=r[0]*l,s[a+1]=r[1]*l,s[a+2]=r[2]*l,s[a+3]=255})}}),ut("mesh-gradient","Soft blobs of colour orbit and blend into a living mesh gradient.",{blobs:4,blur:.65},{draw:({ctx:t,w:e,h:s,t:i,o:a})=>{t.fillStyle=a.background,t.fillRect(0,0,e,s);const n=Math.max(e,s)*a.blur;for(let o=0;o<a.blobs;o++){const r=.25*i*a.speed+o*Math.PI*2/a.blobs,l=e/2+Math.cos(r*(1+.13*o))*e*.32,c=s/2+Math.sin(r*(.8+.11*o))*s*.32,[u,d,h]=lt(a.colors[o%a.colors.length]),p=t.createRadialGradient(l,c,0,l,c,n);p.addColorStop(0,`rgba(${u},${d},${h},0.7)`),p.addColorStop(1,`rgba(${u},${d},${h},0)`),t.fillStyle=p,t.fillRect(0,0,e,s)}}}),ut("starfield","Stars stream toward the viewer (warp speed with `speed: 4`).",{stars:400,color:"#ffffff"},{init:(t,e,s)=>({s:Array.from({length:s.stars},()=>[2*Math.random()-1,2*Math.random()-1,Math.random()])}),draw:({ctx:t,w:e,h:s,t:i,state:a,o:n,quality:o})=>{t.fillStyle=n.background,t.fillRect(0,0,e,s),t.fillStyle=n.color;const r=Math.round(a.s.length*o);for(let o=0;o<r;o++){const r=a.s[o];i>0&&(r[2]-=.004*n.speed),r[2]<=.01&&(r[0]=2*Math.random()-1,r[1]=2*Math.random()-1,r[2]=1);const l=e/2+r[0]/r[2]*e*.5,c=s/2+r[1]/r[2]*s*.5;if(l<0||l>e||c<0||c>s)continue;const u=2.6*(1-r[2]);t.globalAlpha=Math.min(1,1.6*(1-r[2])),t.fillRect(l,c,u,u)}t.globalAlpha=1}}),ut("metaballs","Gooey blobs that merge and split (low-resolution field, scaled up).",{balls:6,cell:5,threshold:1},{init:(t,e,s)=>({b:Array.from({length:s.balls},()=>({x:Math.random()*t,y:Math.random()*e,vx:1.6*(Math.random()-.5),vy:1.6*(Math.random()-.5),r:Math.min(t,e)*(.08+.08*Math.random())}))}),draw:t=>{const{w:e,h:s,state:i,o:a}=t;for(const t of i.b)t.x+=t.vx*a.speed,t.y+=t.vy*a.speed,(t.x<0||t.x>e)&&(t.vx*=-1),(t.y<0||t.y>s)&&(t.vy*=-1);const[n,o,r]=lt(a.colors[0]),[l,c,u]=lt(a.colors[1]||a.colors[0]),[d,h,p]=lt(a.background);dt(t,a.cell,(t,e,s,f)=>{let m=0;for(const s of i.b)m+=s.r*s.r/((s.x-t)**2+(s.y-e)**2+1);const b=m>=a.threshold,g=Math.min(1,.8*(m-a.threshold));s[f]=b?n+(l-n)*g:d,s[f+1]=b?o+(c-o)*g:h,s[f+2]=b?r+(u-r)*g:p,s[f+3]=255})}}),ut("contours","Topographic contour lines over a slowly shifting height field.",{levels:9,cell:4,color:"#7c5cff"},{draw:t=>{const{t:e,o:s}=t,[i,a,n]=lt(s.color),[o,r,l]=lt(s.background),c=(t,i)=>(rt(.006*t,.006*i,.2*e*s.speed)+1)/2,u=Math.max(2,Math.round(s.cell/t.quality));dt(t,s.cell,(t,e,d,h)=>{const p=Math.floor(c(t,e)*s.levels),f=p!==Math.floor(c(t+u,e)*s.levels)||p!==Math.floor(c(t,e+u)*s.levels),m=.12+p/s.levels*.18;d[h]=f?i:o+(i-o)*m,d[h+1]=f?a:r+(a-r)*m,d[h+2]=f?n:l+(n-l)*m,d[h+3]=255})}});const ht="#version 300 es\nprecision highp float;\nuniform vec2 u_res;uniform float u_t;uniform vec3 u_c0,u_c1,u_c2;uniform vec2 u_ptr;uniform float u_speed,u_scale;\nout vec4 o;\nfloat h(vec2 p){return fract(sin(dot(p,vec2(127.1,311.7)))*43758.5453);}\nfloat n(vec2 p){vec2 i=floor(p),f=fract(p);f=f*f*(3.-2.*f);return mix(mix(h(i),h(i+vec2(1,0)),f.x),mix(h(i+vec2(0,1)),h(i+1.),f.x),f.y);}\nfloat fbm(vec2 p){float v=0.,a=.5;for(int k=0;k<5;k++){v+=a*n(p);p=p*2.03+vec2(1.7,9.2);a*=.5;}return v;}\n";let pt=null;function ft(){if(null!==pt)return pt;try{pt="undefined"!=typeof document&&!!document.createElement("canvas").getContext("webgl2")}catch{pt=!1}return pt}function mt(t,e,s,i){const a=()=>{t.dataset.usaBackend="canvas";const a=ct(t,e,s.fallback,i);return()=>{a(),delete t.dataset.usaBackend}};if("canvas"===i.backend||!ft())return a();const n=document.createElement("canvas"),o=n.getContext("webgl2",{alpha:!1,antialias:!1,preserveDrawingBuffer:!1}),r=o&&function(t,e){const s=(e,s)=>{const i=t.createShader(e);return t.shaderSource(i,s),t.compileShader(i),t.getShaderParameter(i,t.COMPILE_STATUS)?i:null},i=s(t.VERTEX_SHADER,"#version 300 es\nin vec2 a;void main(){gl_Position=vec4(a,0.,1.);}"),a=s(t.FRAGMENT_SHADER,e);if(!i||!a)return null;const n=t.createProgram();return t.attachShader(n,i),t.attachShader(n,a),t.bindAttribLocation(n,0,"a"),t.linkProgram(n),t.getProgramParameter(n,t.LINK_STATUS)?n:null}(o,`${ht}void main(){vec2 uv=gl_FragCoord.xy/u_res;vec2 p=uv*vec2(u_res.x/u_res.y,1.)*u_scale;float t=u_t*u_speed;${s.body}}`);if(!o||!r)return a();t.dataset.usaBackend="webgl2",n.setAttribute("aria-hidden","true"),n.setAttribute("data-usa-fx-canvas",""),n.style.cssText="position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:-1;border-radius:inherit";const l=[],c=(e,s)=>{l.push([e,t.style[e]]),t.style[e]=s};"static"===getComputedStyle(t).position&&c("position","relative"),c("isolation","isolate"),t.prepend(n),o.useProgram(r);const u=o.createBuffer();o.bindBuffer(o.ARRAY_BUFFER,u),o.bufferData(o.ARRAY_BUFFER,new Float32Array([-1,-1,3,-1,-1,3]),o.STATIC_DRAW),o.enableVertexAttribArray(0),o.vertexAttribPointer(0,2,o.FLOAT,!1,0,0);const d=t=>o.getUniformLocation(r,t),h=i.colors||[];["u_c0","u_c1","u_c2"].forEach((t,e)=>o.uniform3fv(d(t),lt(h[e]||h[0]||"#7c5cff").map(t=>t/255))),o.uniform1f(d("u_speed"),Number(i.speed)||1),o.uniform1f(d("u_scale"),Number(i.scale)||3);const p=d("u_res"),f=d("u_t"),m=d("u_ptr");let b=[.5,.5],g=Math.min(1,Math.max(.3,Number(i.quality)||.75)),x=0,y=!0,v=0,w=0;const _=performance.now(),k=()=>{const e=t.getBoundingClientRect(),s=Math.min(2,devicePixelRatio||1)*g;n.width=Math.max(1,Math.round(e.width*s)),n.height=Math.max(1,Math.round(e.height*s)),o.viewport(0,0,n.width,n.height),o.uniform2f(p,n.width,n.height)},A=t=>{o.uniform1f(f,t),o.uniform2f(m,b[0],b[1]),o.drawArrays(o.TRIANGLES,0,3)},M=t=>{x=0,w&&t-w>34&&++v>24&&g>.3&&(g=Math.max(.3,g-.15),v=0,k()),w=t,A((t-_)/1e3),y&&!document.hidden&&(x=requestAnimationFrame(M))},S=()=>{x||e.reduced||(x=requestAnimationFrame(M))};k(),A(e.reduced?7:0);const E=e=>{const s=t.getBoundingClientRect();b=[(e.clientX-s.left)/Math.max(1,s.width),1-(e.clientY-s.top)/Math.max(1,s.height)]};t.addEventListener("pointermove",E);const $="function"==typeof IntersectionObserver?new IntersectionObserver(t=>(y=t.some(t=>t.isIntersecting))&&S()):null;$?.observe(t);const C="function"==typeof ResizeObserver?new ResizeObserver(()=>(k(),e.reduced&&A(7))):null;C?.observe(t);const T=()=>!document.hidden&&y&&S();document.addEventListener("visibilitychange",T);let z=null;const q=t=>{t.preventDefault(),L(),z=a()};n.addEventListener("webglcontextlost",q);const L=()=>{cancelAnimationFrame(x),x=0,$?.disconnect(),C?.disconnect(),t.removeEventListener("pointermove",E),document.removeEventListener("visibilitychange",T),n.removeEventListener("webglcontextlost",q),n.remove();for(const[e,s]of l)t.style[e]=s};return S(),()=>{if(z)return z();L(),o.getExtension("WEBGL_lose_context")?.loseContext(),delete t.dataset.usaBackend}}function bt(t,e=8){return{init:(t,s)=>{const i=document.createElement("canvas");i.width=Math.max(2,Math.ceil(t/e)),i.height=Math.max(2,Math.ceil(s/e));const a=i.getContext("2d");return{c:i,x:a,img:a?.createImageData(i.width,i.height)}},draw:({ctx:e,w:s,h:i,t:a,state:n,o:o})=>{const{c:r,x:l,img:c}=n;if(!l||!c)return;const u=c.data;for(let e=0;e<r.height;e++)for(let s=0;s<r.width;s++){const[i,n,l]=t(s/r.width,1-e/r.height,a*(Number(o.speed)||1),o),c=4*(e*r.width+s);u[c]=i,u[c+1]=n,u[c+2]=l,u[c+3]=255}l.putImageData(c,0,0),e.imageSmoothingEnabled=!0,e.drawImage(r,0,0,s,i)}}}const gt=(t,e,s)=>{const i=Math.min(1,Math.max(0,s));return[t[0]+(e[0]-t[0])*i,t[1]+(e[1]-t[1])*i,t[2]+(e[2]-t[2])*i]},xt=(t,e,s)=>{const i=Math.min(1,Math.max(0,(s-t)/(e-t)));return i*i*(3-2*i)},yt=(t,e,s=0)=>.5+.35*rt(t,e,s)+.15*rt(2.1*t+3,2.1*e-1,1.3*s),vt=(t,e,s,i,a={})=>({name:t,kind:"background",description:e,reduced:"run",defaults:{colors:s,speed:1,scale:3,quality:.75,backend:"auto",...a},run:(t,e,s)=>{const a=mt(t,s,i,e);return s.onCleanup(a),a}}),wt=t=>t.colors.map(lt),_t=[vt("fluid","Domain-warped fluid colors that swirl around the pointer (WebGL2, Canvas 2D fallback).",["#1b1446","#7c5cff","#22d3ee"],{body:"vec2 q=vec2(fbm(p+t*.1),fbm(p+vec2(5.2,1.3)-t*.08));vec2 d=uv-u_ptr;q+=.5*exp(-dot(d,d)*14.)*vec2(sin(t*1.3),cos(t*1.1));float f=fbm(p+3.*q+t*.05);vec3 c=mix(u_c0,u_c1,clamp(f*1.7-.2,0.,1.));c=mix(c,u_c2,clamp(length(q)*1.1-.45,0.,1.));o=vec4(c,1.);",fallback:bt((t,e,s,i)=>{const[a,n,o]=wt(i),r=yt(3*t+.1*s,3*e),l=yt(3*t+2*r,3*e+2*r,.3*s);return gt(gt(a,n,1.7*l-.2),o,1.1*r-.45)})}),vt("smoke","Soft smoke rising and curling (WebGL2, Canvas 2D fallback).",["#0f172a","#cbd5e1","#64748b"],{body:"vec2 s=p;s.y-=t*.25;float f=fbm(s+fbm(s*1.5+t*.1));float a=smoothstep(.38,.92,f)*(1.05-uv.y*.55);o=vec4(mix(u_c0,mix(u_c2,u_c1,f),a),1.);",fallback:bt((t,e,s,i)=>{const[a,n,o]=wt(i),r=yt(3*t,3*e-.25*s,.2*s);return gt(a,gt(o,n,r),xt(.38,.92,r)*(1.05-.55*e))})}),vt("fire","Licking flames from the bottom edge (WebGL2, Canvas 2D fallback).",["#140404","#e2401b","#fbbf24"],{body:"vec2 s=p*vec2(1.,1.4);s.y-=t*.9;float f=fbm(s*1.6+fbm(s*2.+t*.3));float g=f*(1.3-uv.y)*1.7-.3;vec3 c=mix(u_c0,u_c1,smoothstep(0.,.4,g));c=mix(c,u_c2,smoothstep(.35,.72,g));c=mix(c,vec3(1.,.96,.82),smoothstep(.72,1.05,g));o=vec4(c,1.);",fallback:bt((t,e,s,i)=>{const[a,n,o]=wt(i),r=yt(4*t,5*e-.9*s,s)*(1.3-e)*1.7-.3;return gt(gt(gt(a,n,xt(0,.4,r)),o,xt(.35,.72,r)),[255,245,210],xt(.72,1.05,r))},6)}),vt("ink","Ink blooming and drifting in water on a paper background (WebGL2, Canvas 2D fallback).",["#f6f1e7","#1e1b4b","#be185d"],{body:"vec2 q=vec2(fbm(p*.8+t*.04),fbm(p*.8+vec2(3.1,7.7)+t*.05));float f=fbm(p*1.2+2.5*q);float b=smoothstep(.48,.74,f+.12*sin(t*.4));o=vec4(mix(u_c0,mix(u_c1,u_c2,clamp(q.x*1.4-.2,0.,1.)),b),1.);",fallback:bt((t,e,s,i)=>{const[a,n,o]=wt(i),r=yt(2*t+.04*s,2*e),l=yt(3*t+2.5*r,3*e+2.5*r,.1*s);return gt(a,gt(n,o,1.4*r-.2),xt(.48,.74,l))})},{scale:2.4}),vt("fireflies","Glowing fireflies wandering and blinking at dusk (WebGL2, Canvas 2D fallback).",["#06121f","#facc15","#a3e635"],{body:"vec3 c=u_c0*(.55+.45*uv.y);float ar=u_res.x/u_res.y;for(int i=0;i<28;i++){float fi=float(i);vec2 b=vec2(h(vec2(fi,1.)),h(vec2(fi,2.)));vec2 pos=fract(b+.07*vec2(sin(t*.3+fi),cos(t*.23+fi*1.7)));vec2 d=(uv-pos)*vec2(ar,1.);float k=.5+.5*sin(t*(1.+h(vec2(fi,3.))*2.)+fi*2.1);c+=mix(u_c1,u_c2,h(vec2(fi,4.)))*k*.00055/(dot(d,d)+.0003);}o=vec4(min(c,vec3(1.)),1.);",fallback:{init:(t,e)=>({f:Array.from({length:28},()=>[Math.random(),Math.random(),6*Math.random(),Math.random()])}),draw:({ctx:t,w:e,h:s,t:i,state:a,o:n})=>{t.fillStyle=n.colors[0],t.fillRect(0,0,e,s);for(const[o,r,l,c]of a.f){const a=(o+.07*Math.sin(.3*i+l))%1*e,u=(r+.07*Math.cos(.23*i+l))%1*s,d=.5+.5*Math.sin(2*i+3*l),h=t.createRadialGradient(a,u,0,a,u,14);h.addColorStop(0,c>.5?n.colors[1]:n.colors[2]),h.addColorStop(1,"transparent"),t.globalAlpha=.25+.75*d,t.fillStyle=h,t.fillRect(a-14,u-14,28,28)}t.globalAlpha=1}}})],kt=t=>({init:(t,e,s)=>({f:Array.from({length:s.count},()=>({x:Math.random()*t,y:Math.random()*e,r:nt(5,11)*(s.size||1),a:nt(0,6.3),va:nt(-1.5,1.5),vy:nt(18,46),ph:nt(0,6.3),c:s.colors[Math.floor(Math.random()*s.colors.length)]})),last:0}),draw:({ctx:e,w:s,h:i,t:a,state:n,o:o,quality:r})=>{const l=n.last?Math.min(.05,a-n.last):0;n.last=a,e.clearRect(0,0,s,i);const c=Math.max(4,Math.round(n.f.length*r));for(let r=0;r<c;r++){const c=n.f[r];c.y+=c.vy*l*o.speed,c.x+=(22*Math.sin(1.2*a+c.ph)+(o.wind||0))*l*o.speed,c.a+=c.va*l*o.speed,c.y>i+16&&(c.y=-16,c.x=Math.random()*s),c.x>s+16&&(c.x=-16),c.x<-16&&(c.x=s+16),e.save(),e.translate(c.x,c.y),e.rotate(c.a),e.scale(1,.55+.45*Math.abs(Math.cos(1.7*a+c.ph))),e.fillStyle=c.c,t(e,c),e.restore()}}}),At=(t,e,s,i)=>({name:t,kind:"background",description:e,reduced:"run",defaults:{speed:1,quality:1,...s},run:(t,e,s)=>{const a=ct(t,s,i,e);return s.onCleanup(a),a}});function Mt(){tt(_t)}function St(t){if(t.dataset.usaChars)return Array.from(t.querySelectorAll(":scope > .usa-ch"));const e=t.textContent||"";t.textContent="";for(const s of Array.from(e)){const e=document.createElement("span");e.className="usa-ch",e.setAttribute("aria-hidden","true"),e.style.cssText="display:inline-block;white-space:pre",e.textContent=s,t.appendChild(e)}return t.appendChild(function(t){const e=document.createElement("span");return e.className="usa-sr",e.textContent=t,e}(e.trim())),t.dataset.usaChars="1",Array.from(t.querySelectorAll(":scope > .usa-ch"))}_t.push(At("sakura","Cherry-blossom petals drifting down, swaying and flipping (Canvas 2D).",{count:46,colors:["#ffc8dd","#ffafcc","#fde2e4","#f9a8d4"],wind:14},kt((t,e)=>{t.beginPath(),t.moveTo(0,-e.r),t.bezierCurveTo(e.r,-e.r,.9*e.r,.6*e.r,0,e.r),t.bezierCurveTo(.9*-e.r,.6*e.r,-e.r,-e.r,0,.55*-e.r),t.fill()})),At("leaves","Autumn leaves tumbling down in the wind (Canvas 2D).",{count:30,size:1.4,colors:["#ea580c","#d97706","#b45309","#dc2626","#ca8a04"],wind:26},kt((t,e)=>{t.beginPath(),t.moveTo(0,-e.r),t.quadraticCurveTo(.9*e.r,.2*-e.r,0,e.r),t.quadraticCurveTo(.9*-e.r,.2*-e.r,0,-e.r),t.fill(),t.strokeStyle="rgba(0,0,0,.25)",t.lineWidth=1,t.beginPath(),t.moveTo(0,.8*-e.r),t.lineTo(0,1.25*e.r),t.stroke()}))),_t.push({name:"splash",kind:"click",description:"A water splash from the pointer: a ring plus droplets that arc out and fall with gravity.",defaults:{color:"#38bdf8",count:14},run:(t,e,s)=>{const{x:i,y:a}=function(t,e){const s=e.event,i=t.getBoundingClientRect();return s&&"number"==typeof s.clientX&&(s.clientX||s.clientY)?{x:s.clientX,y:s.clientY}:{x:i.left+i.width/2,y:i.top+i.height/2}}(t,s);if(s.reduced)return it(i-12,a-12,`width:24px;height:24px;border-radius:50%;background:${e.color};opacity:.5`,s,[{opacity:.5},{opacity:0}],{duration:300});const n=[it(i-30,a-30,`width:60px;height:60px;border-radius:50%;border:3px solid ${e.color}`,s,[{transform:"scale(.2)",opacity:1},{transform:"scale(1.6)",opacity:0}],{duration:520,easing:"cubic-bezier(.2,.8,.3,1)"})];for(let t=0;t<e.count;t++){const t=-Math.PI/2+nt(-1.15,1.15),o=nt(50,110),r=Math.cos(t)*o,l=nt(4,9),c=Math.sin(t)*o;n.push(it(i-l/2,a-l/2,`width:${l}px;height:${1.25*l}px;border-radius:50% 50% 50% 50%/60% 60% 40% 40%;background:${e.color}`,s,[{transform:"translate(0,0) scale(1)",opacity:1},{transform:`translate(${.6*r}px,${c}px) scale(1)`,opacity:1,offset:.45,easing:"cubic-bezier(.3,0,.7,1)"},{transform:`translate(${r}px,${c+90}px) scale(.6)`,opacity:0}],{duration:nt(650,900),easing:"cubic-bezier(.15,.6,.4,1)"}))}return ot(n)}});const Et=t=>"function"==typeof requestAnimationFrame?requestAnimationFrame(t):0;let $t=0;const Ct=[{name:"liquid-text",kind:"loop",description:"The text ripples like liquid: an animated SVG turbulence + displacement filter (`strength`, `speed`).",defaults:{strength:7,speed:1},run:(t,e)=>{const s="usa-liquid-"+ ++$t,i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("aria-hidden","true"),i.setAttribute("width","0"),i.setAttribute("height","0"),i.style.cssText="position:absolute;width:0;height:0;overflow:hidden",i.innerHTML=`<filter id="${s}" x="-10%" y="-20%" width="120%" height="140%"><feTurbulence type="fractalNoise" baseFrequency="0.012 0.06" numOctaves="2" seed="3" result="n"/><feDisplacementMap in="SourceGraphic" in2="n" scale="${Number(e.strength)||7}" xChannelSelector="R" yChannelSelector="G"/></filter>`,document.body.appendChild(i);const a=i.querySelector("feTurbulence"),n=t.style.filter;t.style.filter=`url(#${s})`;let o=0;const r=performance.now(),l=t=>{const s=(t-r)/1e3*(Number(e.speed)||1);a?.setAttribute("baseFrequency",`${(.012+.004*Math.sin(1.3*s)).toFixed(4)} ${(.06+.02*Math.cos(s)).toFixed(4)}`),o=Et(l)};return o=Et(l),()=>{(t=>{t&&"function"==typeof cancelAnimationFrame&&cancelAnimationFrame(t)})(o),t.style.filter=n,i.remove()}}},{name:"neon-write",kind:"text",description:"Letters flicker on one by one like a neon sign being switched on, then keep a soft glow (`color`, `stagger`).",defaults:{color:"#ff4fd8",stagger:70,duration:520},run:(t,e,s)=>{var i;const a=`0 0 4px #fff,0 0 10px ${e.color},0 0 22px ${e.color},0 0 42px ${e.color}`;if(t.style.textShadow=a,(i=t.style).color||(i.color="#fff"),s.reduced)return;const n=St(t);return ot(n.map((t,i)=>s.animate(t,[{opacity:.08,textShadow:"none"},{opacity:1,textShadow:a,offset:.2},{opacity:.2,textShadow:"none",offset:.32},{opacity:1,textShadow:a,offset:.46},{opacity:.55,offset:.6},{opacity:1,textShadow:a}],{duration:e.duration,delay:i*e.stagger+nt(0,60),easing:"steps(6, end)",fill:"backwards"})))}},{name:"particle-text",kind:"text",description:"Particles fly in from around the element and assemble into the glyphs, then hand over to the real text (`gap` px between samples, `duration`, `colors`).",defaults:{gap:3,duration:1300,colors:["#7c5cff","#22d3ee","#ff5c8a"],spread:120},reduced:"skip",run:(t,e)=>{const s=St(t),i=t.getBoundingClientRect();if(!i.width||!i.height)return;const a=Number(e.spread)||120,n=Math.ceil(i.width+2*a),o=Math.ceil(i.height+2*a),r=document.createElement("canvas");r.setAttribute("aria-hidden","true"),r.width=n,r.height=o,r.style.cssText=`position:absolute;left:${i.left-a}px;top:${i.top-a}px;width:${n}px;height:${o}px`;const l=r.getContext("2d");if(!l)return;const c=getComputedStyle(t);l.font=`${c.fontStyle} ${c.fontWeight} ${c.fontSize} ${c.fontFamily}`,l.textBaseline="middle",l.fillStyle="#000";for(const t of s){const e=t.getBoundingClientRect();l.fillText(t.textContent||"",e.left-i.left+a,e.top-i.top+a+e.height/2)}const u=l.getImageData(0,0,n,o),d=Math.max(2,Math.round(Number(e.gap)||3)),h=[];for(let t=0;t<o;t+=d)for(let s=0;s<n;s+=d)if(u.data[4*(t*n+s)+3]>128){const i=nt(0,2*Math.PI),r=nt(.6*a,1.4*a);h.push({x:s,y:t,sx:n/2+Math.cos(i)*(n/2+.3*r),sy:o/2+Math.sin(i)*(o/2+.3*r),c:e.colors[h.length%e.colors.length],d:nt(0,.35)})}st().appendChild(r),s.forEach(t=>t.style.opacity="0");const p=performance.now(),f=Number(e.duration)||1300;return new Promise(t=>{const e=()=>{r.remove(),s.forEach(t=>t.style.opacity=""),t()},i=t=>{const a=(t-p)/f;l.clearRect(0,0,n,o);for(const t of h){const e=Math.min(1,Math.max(0,(a-t.d)/(1-t.d))),s=1-Math.pow(1-e,3);l.globalAlpha=a>1?Math.max(0,1-4*(a-1)):.25+.75*s,l.fillStyle=t.c,l.fillRect(t.sx+(t.x-t.sx)*s,t.sy+(t.y-t.sy)*s,d-.5,d-.5)}a>1&&s.forEach(t=>t.style.opacity=String(Math.min(1,4*(a-1)))),a<1.25?Et(i):e()};Et(i)||e()})}},{name:"glitch-text",kind:"text",description:"RGB-split slices of the text jump sideways for a moment (`duration`, `colors` of the two channels).",defaults:{duration:650,colors:["#22d3ee","#ff3d81"]},run:(t,e,s)=>{if(s.reduced)return s.animate(t,[{opacity:1},{opacity:.6},{opacity:1}],{duration:200});"static"===getComputedStyle(t).position&&(t.style.position="relative");const i=t.textContent||"",a=(a,n)=>{const o=document.createElement("span");o.setAttribute("aria-hidden","true"),o.textContent=i,o.style.cssText=`position:absolute;inset:0;color:${a};mix-blend-mode:screen;pointer-events:none;white-space:inherit`,t.appendChild(o);const r=[];for(let t=0;t<=8;t++){const t=Math.round(nt(0,80));r.push({clipPath:`inset(${t}% 0 ${Math.max(0,100-t-nt(8,30)).toFixed(0)}% 0)`,transform:`translateX(${(n*nt(2,9)).toFixed(1)}px)`})}r.push({clipPath:"inset(50% 0 50% 0)",transform:"none"});const l=s.animate(o,r,{duration:e.duration,easing:"steps(8, end)"}),c=()=>o.remove();return l?l.finished.then(c,c):c(),l};return ot([a(e.colors[0],-1),a(e.colors[1],1),s.animate(t,[{transform:"none"},{transform:"translate(-2px,1px) skewX(-4deg)"},{transform:"translate(2px,-1px)"},{transform:"skewX(3deg)"},{transform:"none"}],{duration:e.duration,easing:"steps(5, end)"})])}},{name:"text-trail",kind:"cursor",description:"The letters of a word fall off the pointer as it moves over the element (persistent; `text`, `color`, `spacing` px).",defaults:{text:"MOTIONARY",color:"#7c5cff",spacing:22,size:18},run:(t,e,s)=>{const i=Array.from(String(e.text||"✦"));let a=0,n=-1e4,o=-1e4;const r=t=>{if(Math.hypot(t.clientX-n,t.clientY-o)<e.spacing)return;n=t.clientX,o=t.clientY;const r=i[a++%i.length];it(t.clientX-e.size/2,t.clientY-e.size/2,`font:800 ${e.size}px/1 system-ui,sans-serif;color:${e.color};text-shadow:0 2px 8px rgba(0,0,0,.25)`,s,[{transform:"translateY(0) rotate(0) scale(1)",opacity:1},{transform:`translateY(${nt(30,60).toFixed(0)}px) rotate(${nt(-60,60).toFixed(0)}deg) scale(.6)`,opacity:0}],{duration:nt(700,1e3),easing:"cubic-bezier(.3,.1,.7,1)"},r)};return t.addEventListener("pointermove",r),()=>t.removeEventListener("pointermove",r)}},{name:"font-breathe",kind:"loop",description:"A variable-font weight wave breathes through the text (`min` / `max` weight, `period` ms, `stagger`). Best with a variable font.",defaults:{min:200,max:900,period:2400,stagger:90},run:(t,e,s)=>{const i=St(t).map((t,i)=>s.animate(t,[{fontWeight:e.min,fontVariationSettings:`'wght' ${e.min}`},{fontWeight:e.max,fontVariationSettings:`'wght' ${e.max}`}],{duration:e.period/2,delay:i*e.stagger,iterations:1/0,direction:"alternate",easing:"ease-in-out"}));return()=>i.forEach(t=>t?.cancel())}},{name:"flip-chars",kind:"text",description:"Every character flips up in 3D around its baseline, staggered (`stagger`, `duration`, `axis` x | y).",defaults:{stagger:45,duration:700,axis:"x"},run:(t,e,s)=>{var i;const a=St(t);(i=t.style).perspective||(i.perspective="600px");const n="y"===e.axis?"rotateY":"rotateX";return ot(a.map((t,i)=>(t.style.transformOrigin="50% 70% -0.4em",t.style.backfaceVisibility="hidden",s.reduced?s.animate(t,[{opacity:0},{opacity:1}],{duration:200,delay:10*i,fill:"backwards"}):s.animate(t,[{transform:`${n}(-100deg)`,opacity:0},{transform:`${n}(12deg)`,opacity:1,offset:.7},{transform:`${n}(0)`,opacity:1}],{duration:e.duration,delay:i*e.stagger,easing:"cubic-bezier(.2,.8,.3,1)",fill:"backwards"}))))}}];function Tt(){tt(Ct)}const zt={gpu:_t,text:Ct};function qt(){Mt(),Tt()}U(),qt(),t.CAROUSEL_EFFECTS=x,t.FX2_PACKS=zt,t.GLSL_HEAD=ht,t.GPU_FX=_t,t.MENU_EFFECTS=G,t.MODAL_EFFECTS=T,t.SHEET_SIDES=z,t.TAB_INDICATORS=v,t.TEXT3_FX=Ct,t.TOAST_POSITIONS=F,t.WIDGETS=H,t.WIDGET_TAGS=j,t.defineCarousel=y,t.defineDisclosure=$,t.defineMenu=W,t.defineModal=D,t.defineSheet=N,t.defineStories=C,t.defineTabBar=w,t.defineToastStack=O,t.defineWidgets=U,t.fieldFallback=bt,t.registerFx2=qt,t.registerGpuEffects=Mt,t.registerTextEffects3=Tt,t.shaderBackground=mt,t.splitChars=St,t.stackToast=B,t.supportsWebGL2=ft});
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).UsaWidgets={})}(this,function(t){"use strict";const e="full",s=/rotate|scale|skew|perspective|matrix3d/;const i=new Set;function a(t,e){if(!e||i.has(t)||"undefined"==typeof document)return;i.add(t);try{if("function"==typeof CSSStyleSheet&&"adoptedStyleSheets"in document){const t=new CSSStyleSheet;return t.replaceSync(e),void(document.adoptedStyleSheets=[...document.adoptedStyleSheets,t])}}catch{}const s=document.createElement("style");s.setAttribute("data-usa",t),s.textContent=e,(document.head||document.documentElement).appendChild(s)}let r=null;function n(){if(r)return r;class t extends HTMLElement{constructor(){super(...arguments),this._cleanups=[],this._connected=!1}get reduced(){return"function"==typeof matchMedia&&!!matchMedia("(prefers-reduced-motion: reduce)").matches}connectedCallback(){if(!this._connected){if(this._connected=!0,"undefined"!=typeof document&&"loading"===document.readyState&&!this.nextSibling&&!this.childNodes.length){const t=()=>{this._connected&&this.isConnected&&this.mount()};return document.addEventListener("DOMContentLoaded",t,{once:!0}),void this._cleanups.push(()=>document.removeEventListener("DOMContentLoaded",t))}this.mount()}}disconnectedCallback(){this._connected=!1,this.teardown()}attributeChangedCallback(t,e,s){this._connected&&e!==s&&this.changed(t)}changed(t){this.teardown(),this.mount()}teardown(){this._cleanups.splice(0).reverse().forEach(t=>t()),this.unmount()}mount(){}unmount(){}str(t,e=""){const s=this.getAttribute(t);return null===s?e:s}num(t,e){const s=this.getAttribute(t),i=null===s||""===s.trim()?NaN:Number(s);return Number.isFinite(i)?i:e}flag(t){const e=this.getAttribute(t);return null!==e&&"false"!==e}setFlag(t,e){e?this.setAttribute(t,""):this.removeAttribute(t)}onCleanup(t){this._cleanups.push(t)}listen(t,e,s,i){t.addEventListener(e,s,i),this.onCleanup(()=>t.removeEventListener(e,s,i))}inView(t,e,s=this){if("undefined"==typeof IntersectionObserver)return void t(!0);const i=new IntersectionObserver(e=>{for(const s of e)t(s.isIntersecting,s)},e);i.observe(s),this.onCleanup(()=>i.disconnect())}motion(t,i,a){return function(t,i,a){if("function"!=typeof t.animate||"static"===e)return o(t,i[i.length-1]),null;if(i=function(t,i=e){return"full"!==i&&t.length?"static"===i?[t[t.length-1]]:t.map(t=>{const e={};for(const[a,r]of Object.entries(t))if("offset"===a||"easing"===a||"composite"===a)e[a]=r;else if("minimal"===i)"opacity"===a&&(e[a]=r);else{if("rotate"===a||"scale"===a||"transform"===a&&s.test(String(r)))continue;e[a]=r}return e}):t}(i),u>=d)return o(t,i[i.length-1]),null;const r=t.animate(i,a);if(a.iterations!==1/0){u++;let t=!1;const e=()=>{t||(t=!0,u--)};r?.finished?.then(e,e)}return r}(t,i,a)}emit(t,e){return this.dispatchEvent(new CustomEvent(`usa:${t}`,{detail:e,bubbles:!0,cancelable:!0}))}}return r=t,r}function o(t,e){if(e)for(const[s,i]of Object.entries(e))"offset"!==s&&"easing"!==s&&"composite"!==s&&null!=i&&(t.style[s]=String(i))}function l(t,e,s){if("undefined"==typeof customElements||"undefined"==typeof HTMLElement)return;a("base",c),s&&a(s.id,s.text);const i=customElements.get(t);if(i)return i;const r=e(n());return customElements.define(t,r),r}const c=".usa-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}";let u=0,d=1/0;const h=(t,e,s)=>Math.min(s,Math.max(e,t)),p=(t,e="[data-usa-part]")=>Array.from(t.children).filter(t=>t instanceof HTMLElement&&!t.matches(e));function f(t,e,s={},i=""){const a=document.createElement(t);a.className=e,a.setAttribute("data-usa-part","");for(const[t,e]of Object.entries(s))a.setAttribute(t,e);return i&&(a.innerHTML=i),a}const m=t=>t.querySelectorAll(":scope > [data-usa-part]").forEach(t=>t.remove());let b=0;const g=t=>`${t}-${++b}`;const x=["slide","fade","scale","cards"];function y(t="usa-carousel"){return l(t,t=>class extends t{constructor(){super(...arguments),this._i=0,this._slides=[],this._track=null,this._timer=0,this._hold=!1,this._dots=[]}static get observedAttributes(){return["effect","autoplay","loop","no-controls","no-dots"]}get length(){return this._slides.length}get index(){return this._i}set index(t){this.goTo(t)}get effect(){const t=this.str("effect","slide");return x.includes(t)?t:"slide"}mount(){this.dataset.effect=this.effect,this.toggleAttribute("data-reduced",this.reduced);const t=this.querySelector(":scope > .usa-carousel-viewport");this._slides=p(t?t.firstElementChild:this),m(this);const e=f("div","usa-carousel-viewport",{"aria-live":this.num("autoplay",0)?"off":"polite"}),s=f("div","usa-carousel-track");this._track=s,e.append(s);const i=this._slides.length;if(this._slides.forEach((t,e)=>{t.setAttribute("role","group"),t.setAttribute("aria-roledescription","slide"),t.setAttribute("aria-label",`${e+1} of ${i}`),s.append(t)}),this.prepend(e),this.setAttribute("role","region"),this.setAttribute("aria-roledescription","carousel"),this.setAttribute("aria-label",this.str("label","Carousel")),this.hasAttribute("tabindex")||(this.tabIndex=0),i>1&&!this.flag("no-controls")){const t=f("button","usa-carousel-nav usa-carousel-prev",{type:"button","aria-label":"Previous slide"},"‹"),e=f("button","usa-carousel-nav usa-carousel-next",{type:"button","aria-label":"Next slide"},"›");this.listen(t,"click",()=>this.prev()),this.listen(e,"click",()=>this.next()),this.append(t,e)}if(this._dots=[],i>1&&!this.flag("no-dots")){const t=f("div","usa-carousel-dots",{role:"group","aria-label":"Choose slide"});for(let e=0;e<i;e++){const s=f("button","usa-carousel-dot",{type:"button","aria-label":`Slide ${e+1}`});this.listen(s,"click",()=>this.goTo(e)),this._dots.push(s),t.append(s)}this.append(t)}this._i=h(Math.round(this.num("index",0)),0,Math.max(0,i-1)),this.layout(0),this.listen(this,"keydown",t=>{"ArrowRight"===t.key?(t.preventDefault(),this.next()):"ArrowLeft"===t.key&&(t.preventDefault(),this.prev())}),this.drag(e);const a=this.num("autoplay",0);if(a>0&&i>1&&!this.reduced){let t=!0;this.inView(e=>t=e);const e=t=>()=>this._hold=t;this.listen(this,"pointerenter",e(!0)),this.listen(this,"pointerleave",e(!1)),this.listen(this,"focusin",e(!0)),this.listen(this,"focusout",e(!1)),this._timer=window.setInterval(()=>{!t||this._hold||document.hidden||this.next()},Math.max(1200,a)),this.onCleanup(()=>clearInterval(this._timer))}}drag(t){let e=0,s=0,i=-1;this.listen(t,"pointerdown",t=>{this.length<2||t.target.closest("button,a,input")||(i=t.pointerId,e=t.clientX,s=0,this.setAttribute("data-dragging",""))}),this.listen(window,"pointermove",a=>{a.pointerId===i&&(s=a.clientX-e,this.layout(s/Math.max(1,t.clientWidth)))});const a=e=>{if(e.pointerId!==i)return;i=-1,this.removeAttribute("data-dragging");const a=Math.max(1,t.clientWidth);Math.abs(s)>.18*a?s<0?this.next():this.prev():this.layout(0)};this.listen(window,"pointerup",a),this.listen(window,"pointercancel",a)}layout(t){const e=this.length,s=this._i,i=this.effect;this._track&&(this._track.style.transform="slide"===i?`translateX(${100*(-s+t)}%)`:""),this._slides.forEach((a,r)=>{let n=r-s+t;this.flag("loop")&&e>2&&(n>e/2&&(n-=e),n<-e/2&&(n+=e));const o=r===s;if(a.toggleAttribute("data-active",o),a.setAttribute("aria-hidden",String(!o)),a.inert=!o,"slide"===i)return void(a.style.transform=a.style.opacity=a.style.zIndex=a.style.filter="");const l=Math.abs(n);"fade"===i?(a.style.opacity=String(h(1-l,0,1)),a.style.transform=""):"scale"===i?(a.style.opacity=String(h(1-l,0,1)),a.style.transform=`scale(${1+Math.min(1,l)*(n<0?.12:-.12)})`):(a.style.opacity=l>2.2?"0":String(1-.28*Math.min(l,2)),a.style.transform=`translateX(${58*n}%) translateZ(${140*-l}px) rotateY(${h(38*-n,-60,60)}deg)`,a.style.filter=l>.5?`brightness(${1-.18*Math.min(l,2)})`:""),a.style.zIndex=String(100-Math.round(10*l))}),this._dots.forEach((t,e)=>t.setAttribute("aria-current",String(e===s)))}goTo(t){const e=this.length;if(!e)return;const s=this.flag("loop")?(Math.round(t)%e+e)%e:h(Math.round(t),0,e-1),i=this._i;this._i=s,this.layout(0),s!==i&&this.emit("change",{index:s,from:i})}next(){this.goTo(this._i+1>=this.length&&!this.flag("loop")?0:this._i+1)}prev(){this.goTo(this._i-1<0&&!this.flag("loop")?this.length-1:this._i-1)}},{id:"carousel",text:'usa-carousel{display:block;position:relative;--usa-carousel-dur:520ms;--usa-carousel-ease:cubic-bezier(.22,1,.36,1);overflow:hidden;border-radius:var(--usa-radius,14px);touch-action:pan-y}.usa-carousel-viewport{position:relative;overflow:hidden;height:100%;min-height:inherit}.usa-carousel-track{display:flex;height:100%;transition:transform var(--usa-carousel-dur) var(--usa-carousel-ease);will-change:transform}.usa-carousel-track>*{flex:0 0 100%;min-width:0;box-sizing:border-box}usa-carousel:not([data-effect="slide"]) .usa-carousel-track{display:grid}usa-carousel:not([data-effect="slide"]) .usa-carousel-track>*{grid-area:1/1;transition:opacity var(--usa-carousel-dur) ease,transform var(--usa-carousel-dur) var(--usa-carousel-ease),filter var(--usa-carousel-dur) ease}usa-carousel[data-effect="cards"] .usa-carousel-viewport{perspective:900px}usa-carousel[data-dragging] .usa-carousel-track,usa-carousel[data-dragging] .usa-carousel-track>*{transition:none}.usa-carousel-nav{position:absolute;top:50%;translate:0 -50%;z-index:2;width:36px;height:36px;border-radius:50%;border:0;background:rgba(255,255,255,.85);color:#111;font:600 18px/1 system-ui;cursor:pointer;display:grid;place-items:center;box-shadow:0 4px 14px rgba(0,0,0,.18);transition:transform .2s}.usa-carousel-nav:hover{transform:scale(1.08)}.usa-carousel-nav:focus-visible{outline:2px solid #7c5cff;outline-offset:2px}.usa-carousel-prev{left:10px}.usa-carousel-next{right:10px}.usa-carousel-dots{position:absolute;left:0;right:0;bottom:10px;display:flex;justify-content:center;gap:6px;z-index:2}.usa-carousel-dot{width:8px;height:8px;padding:0;border:0;border-radius:99px;background:rgba(255,255,255,.55);cursor:pointer;transition:width .35s var(--usa-carousel-ease),background .35s}.usa-carousel-dot[aria-current="true"]{width:22px;background:#fff}@media (prefers-reduced-motion:reduce){usa-carousel .usa-carousel-track,usa-carousel .usa-carousel-track>*,.usa-carousel-dot{transition:none!important}}usa-carousel[data-reduced] .usa-carousel-track,usa-carousel[data-reduced] .usa-carousel-track>*{transition:none!important}'})}const v=["pill","underline","glow","gooey"];function w(t="usa-tab-bar"){return l(t,t=>class extends t{constructor(){super(...arguments),this._tabs=[],this._panels=[],this._ink=null,this._i=0}static get observedAttributes(){return["indicator"]}get selected(){return this._i}set selected(t){this.select(t)}mount(){const t=this.str("indicator","pill");this.dataset.indicator=v.includes(t)?t:"pill";let e=this.querySelector(":scope > .usa-tab-bar-list");e||(e=f("div","usa-tab-bar-list"),this.prepend(e)),e.setAttribute("role","tablist"),e.setAttribute("aria-label",this.str("label","Tabs"));const s=p(this);this._panels=s.filter(t=>t.hasAttribute("data-panel"));for(const t of s)!t.hasAttribute("data-panel")&&t.matches("button,[data-tab]")&&e.append(t);if(this._tabs=Array.from(e.children).filter(t=>t instanceof HTMLElement&&!t.classList.contains("usa-tab-bar-ink")),this._ink=e.querySelector(".usa-tab-bar-ink")||f("span","usa-tab-bar-ink",{"aria-hidden":"true"}),e.prepend(this._ink),this._tabs.forEach((t,e)=>{t.setAttribute("role","tab"),"button"!==t.localName||t.hasAttribute("type")||t.setAttribute("type","button"),t.id||(t.id=g("usa-tab"));const s=this._panels[e];s&&(s.id||(s.id=g("usa-tabpanel")),s.classList.add("usa-tab-bar-panel"),s.setAttribute("role","tabpanel"),s.setAttribute("aria-labelledby",t.id),s.tabIndex=0,t.setAttribute("aria-controls",s.id)),this.listen(t,"click",()=>this.select(e))}),this.listen(e,"keydown",t=>{const e=function(t,e,s,i=!1){const a=i?"ArrowUp":"ArrowLeft",r=i?"ArrowDown":"ArrowRight";return t.key===a?(e-1+s)%s:t.key===r?(e+1)%s:"Home"===t.key?0:"End"===t.key?s-1:-1}(t,this._i,this._tabs.length);e<0||(t.preventDefault(),this.select(e),this._tabs[e].focus())}),this._i=Math.min(Math.max(0,Math.round(this.num("selected",0))),Math.max(0,this._tabs.length-1)),this.sync(-1),"function"==typeof ResizeObserver){const t=new ResizeObserver(()=>this.place());t.observe(e),this.onCleanup(()=>t.disconnect())}}rect(t){const e=this._tabs[t];return e?[e.offsetLeft,e.offsetWidth]:[0,0]}place(){if(!this._ink)return;const[t,e]=this.rect(this._i);this._ink.style.transform=`translateX(${t}px)`,this._ink.style.width=`${e}px`}sync(t){if(this._tabs.forEach((t,e)=>{t.setAttribute("aria-selected",String(e===this._i)),t.tabIndex=e===this._i?0:-1}),this._panels.forEach((t,e)=>t.hidden=e!==this._i),this.place(),t<0||t===this._i||!this._ink||this.reduced)return;const[e,s]=this.rect(t),[i,a]=this.rect(this._i),r=i>e,n=r?{transform:`translateX(${e}px)`,width:i+a-e+"px"}:{transform:`translateX(${i}px)`,width:e+s-i+"px"};this.motion(this._ink,[{transform:`translateX(${e}px)`,width:`${s}px`},{...n,offset:.45},{transform:`translateX(${i}px)`,width:`${a}px`}],{duration:480,easing:"cubic-bezier(.22,1,.36,1)"});const o=this._panels[this._i];o&&this.motion(o,[{opacity:0,transform:`translateX(${r?24:-24}px)`},{opacity:1,transform:"none"}],{duration:320,easing:"cubic-bezier(.22,1,.36,1)"})}select(t){const e=Math.min(Math.max(0,Math.round(t)),this._tabs.length-1);if(e===this._i||e<0)return;const s=this._i;this._i=e,this.sync(s),this.emit("change",{index:e,from:s})}},{id:"tab-bar",text:'usa-tab-bar{display:block;--usa-tab-accent:#7c5cff;--usa-tab-ease:cubic-bezier(.22,1,.36,1)}.usa-tab-bar-list{position:relative;display:flex;gap:4px;padding:4px;border-radius:12px;background:rgba(127,127,127,.12);isolation:isolate;overflow-x:auto;scrollbar-width:none}.usa-tab-bar-list::-webkit-scrollbar{display:none}.usa-tab-bar-list>[role="tab"]{position:relative;z-index:1;flex:1 0 auto;border:0;background:none;color:inherit;font:inherit;font-weight:600;padding:8px 14px;border-radius:9px;cursor:pointer;opacity:.7;transition:opacity .25s,color .25s;white-space:nowrap}.usa-tab-bar-list>[role="tab"][aria-selected="true"]{opacity:1}.usa-tab-bar-list>[role="tab"]:focus-visible{outline:2px solid var(--usa-tab-accent);outline-offset:1px}.usa-tab-bar-ink{position:absolute;z-index:0;left:0;top:4px;bottom:4px;width:0;border-radius:9px;background:var(--usa-tab-accent);pointer-events:none}usa-tab-bar[data-indicator="pill"] [aria-selected="true"]{color:#fff}usa-tab-bar[data-indicator="underline"] .usa-tab-bar-list{background:none;border-bottom:1px solid rgba(127,127,127,.25);border-radius:0}usa-tab-bar[data-indicator="underline"] .usa-tab-bar-ink{top:auto;bottom:0;height:3px;border-radius:3px}usa-tab-bar[data-indicator="glow"] .usa-tab-bar-ink{background:transparent;box-shadow:0 0 0 2px var(--usa-tab-accent),0 0 18px var(--usa-tab-accent)}usa-tab-bar[data-indicator="gooey"] .usa-tab-bar-ink{filter:blur(.5px);border-radius:999px}usa-tab-bar[data-indicator="gooey"] [aria-selected="true"]{color:#fff}.usa-tab-bar-panel{padding:14px 2px}.usa-tab-bar-panel[hidden]{display:none}'})}const _={default:{stiffness:170,damping:26,mass:1},gentle:{stiffness:120,damping:14,mass:1},wobbly:{stiffness:180,damping:12,mass:1},stiff:{stiffness:210,damping:20,mass:1},bouncy:{stiffness:300,damping:10,mass:1},slow:{stiffness:280,damping:60,mass:1},molasses:{stiffness:280,damping:120,mass:1}};function k(t,e,s,i,a){const r=s+(-t.stiffness*(e-i)-t.damping*s)/t.mass*a;return[e+r*a,r]}const A=new Map;function M(t,e=60){const s=function(t){const e="string"==typeof t?_[t]||_.default:{..._.default,...t||{}},s=(t,e)=>"number"==typeof t&&Number.isFinite(t)&&t>0?t:e,i="object"==typeof t&&t||{};return{stiffness:s(e.stiffness,170),damping:Math.max(0,Number.isFinite(e.damping)?e.damping:26),mass:s(e.mass,1),velocity:Number.isFinite(i.velocity)?i.velocity:0,precision:s(i.precision,.001)}}(t),i=`${s.stiffness}|${s.damping}|${s.mass}|${s.velocity}|${s.precision}|${e}`,a=A.get(i);if(a)return a;const r=[0];let n=0,o=s.velocity;const l=1e3/e;let c=0,u=l;for(;c<1e4&&([n,o]=k(s,n,o,1,.001),c+=1,!(c>=u&&(r.push(n),u+=l,Math.abs(1-n)<s.precision&&Math.abs(o)<10*s.precision))););r[r.length-1]=1;const d={values:r,duration:Math.round(c)};return A.size>64&&A.clear(),A.set(i,d),d}function $(t,e=48){const{values:s,duration:i}=M(t);return"undefined"!=typeof CSS&&"function"==typeof CSS.supports&&CSS.supports("animation-timing-function","linear(0, 1)")?{easing:S(s,e),duration:i}:{easing:"cubic-bezier(0.34, 1.56, 0.64, 1)",duration:Math.min(i,1200)}}function S(t,e=48){const s=t.length,i=Math.max(1,Math.ceil((s-1)/Math.max(2,e-1))),a=[];for(let e=0;e<s-1;e+=i)a.push(String(Math.round(1e3*t[e])/1e3));return a.push("1"),`linear(${a.join(", ")})`}function E(t="usa-disclosure"){return l(t,t=>class extends t{constructor(){super(...arguments),this._anims=new WeakMap}get items(){return Array.from(this.children).filter(t=>"details"===t.localName)}mount(){this.listen(this,"click",t=>{const e=t.target.closest("summary"),s=e?.parentElement;e&&s&&s.parentElement===this&&(t.preventDefault(),this.set(s,!s.open))})}set(t,e){if(e&&!this.flag("multiple"))for(const e of this.items)e!==t&&e.open&&this.set(e,!1);if(t.open===e&&!this._anims.get(t))return;const s=t.querySelector("summary"),i=s?s.offsetHeight:0,a=t.offsetHeight;this._anims.get(t)?.cancel(),e&&(t.open=!0);const r=e?t.scrollHeight:i,n=$(this.str("spring","gentle")),o=this.reduced?null:this.motion(t,[{height:`${a}px`},{height:`${r}px`}],{duration:Math.min(n.duration,700),easing:n.easing,fill:"forwards"}),l=Array.from(t.children).filter(t=>"summary"!==t.localName);e&&!this.reduced&&l.forEach(t=>this.motion(t,[{opacity:0,transform:"translateY(-6px)"},{opacity:1,transform:"none"}],{duration:300,delay:60,easing:"ease-out"}));const c=()=>{this._anims.delete(t),e||(t.open=!1),o?.cancel()};o?(this._anims.set(t,o),o.finished.then(()=>this._anims.get(t)===o&&c(),()=>{})):c(),this.emit("toggle",{index:this.items.indexOf(t),open:e})}toggle(t,e){const s=this.items[t];s&&this.set(s,e??!s.open)}openAll(){this.items.forEach(t=>t.open=!0)}closeAll(){this.items.forEach(t=>this.set(t,!1))}},{id:"disclosure",text:'usa-disclosure{display:block;--usa-disclosure-accent:#7c5cff}usa-disclosure>details{border-bottom:1px solid rgba(127,127,127,.25);overflow:hidden}usa-disclosure>details>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 4px;font-weight:600}usa-disclosure>details>summary::-webkit-details-marker{display:none}usa-disclosure>details>summary::after{content:"";flex:none;width:9px;height:9px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;rotate:45deg;translate:0 -3px;transition:rotate .35s cubic-bezier(.34,1.56,.64,1),translate .35s}usa-disclosure>details[open]>summary::after{rotate:225deg;translate:0 2px}usa-disclosure>details>summary:focus-visible{outline:2px solid var(--usa-disclosure-accent);outline-offset:2px;border-radius:6px}usa-disclosure>details>:not(summary){padding:0 4px 12px}usa-disclosure[variant="cards"]>details{border:1px solid rgba(127,127,127,.25);border-radius:12px;margin-bottom:8px;padding:0 10px;transition:box-shadow .3s,border-color .3s}usa-disclosure[variant="cards"]>details[open]{border-color:var(--usa-disclosure-accent);box-shadow:0 8px 24px rgba(124,92,255,.16)}@media (prefers-reduced-motion:reduce){usa-disclosure>details>summary::after{transition:none}}'})}function C(t="usa-stories"){return l(t,t=>class extends t{constructor(){super(...arguments),this._i=0,this._items=[],this._bars=[],this._fill=null,this._btn=null}static get observedAttributes(){return["duration","loop"]}get index(){return this._i}mount(){m(this),this._items=p(this);const t=f("div","usa-stories-bars",{"aria-hidden":"true"});this._bars=this._items.map(()=>{const e=f("div","usa-stories-bar",{},"<i></i>");return t.append(e),e}),this._btn=f("button","usa-stories-toggle",{type:"button"}),this.listen(this._btn,"click",t=>{t.stopPropagation(),this.hasAttribute("paused")?this.play():this.pause()}),this.append(t,this._btn),this.setAttribute("role","region"),this.setAttribute("aria-roledescription","stories"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Stories"),this.hasAttribute("tabindex")||(this.tabIndex=0),this.reduced&&this.setAttribute("paused","");let e=!1,s=0;this.listen(this,"pointerdown",t=>{t.target.closest("button,a")||(s=performance.now(),e=!this.hasAttribute("paused"),e&&this._fill?.pause())}),this.listen(this,"pointerup",t=>{if(t.target.closest("button,a")||!s)return;const i=performance.now()-s>350;if(s=0,e&&!this.hasAttribute("paused")&&this._fill?.play(),i)return;const a=this.getBoundingClientRect();t.clientX-a.left<a.width/3?this.prev():this.next()}),this.listen(this,"keydown",t=>{"ArrowRight"===t.key?this.next():"ArrowLeft"===t.key?this.prev():" "===t.key&&(t.preventDefault(),this.hasAttribute("paused")?this.play():this.pause())}),this.onCleanup(()=>this._fill?.cancel()),this.goTo(Math.min(this._i,Math.max(0,this._items.length-1)),!0)}label(){if(this._btn){const t=this.hasAttribute("paused");this._btn.textContent=t?"▶":"❚❚",this._btn.setAttribute("aria-label",t?"Play stories":"Pause stories")}}goTo(t,e=!1){const s=this._items.length;if(!s)return;if(t>=s&&!this.flag("loop"))return this.emit("end"),void this.pause();const i=(t%s+s)%s,a=i!==this._i||e;this._i=i,this._items.forEach((t,e)=>{t.toggleAttribute("data-active",e===i),t.setAttribute("aria-hidden",String(e!==i))}),this._bars.forEach((t,e)=>t.toggleAttribute("data-done",e<i)),this._fill?.cancel();const r=this._bars[i]?.firstElementChild;if(this._fill=r?r.animate?.([{transform:"scaleX(0)"},{transform:"scaleX(1)"}],{duration:Math.max(800,this.num("duration",5e3)),fill:"forwards"})??null:null,this._fill){const t=this._fill;t.onfinish=()=>this._fill===t&&this.goTo(this._i+1),this.hasAttribute("paused")&&t.pause()}this.label(),a&&!e&&this.emit("change",{index:i})}next(){this.goTo(this._i+1)}prev(){this.goTo(Math.max(0,this._i-1))}pause(){this.setAttribute("paused",""),this._fill?.pause(),this.label()}play(){this.removeAttribute("paused"),"finished"===this._fill?.playState?this.goTo(this._i+1>=this._items.length?0:this._i+1):this._fill?.play(),this.label()}},{id:"stories",text:"usa-stories{display:block;position:relative;overflow:hidden;border-radius:var(--usa-radius,16px);background:#111;color:#fff;aspect-ratio:9/14;max-height:520px;user-select:none;-webkit-user-select:none;touch-action:manipulation}usa-stories>:not([data-usa-part]){position:absolute;inset:0;opacity:0;transition:opacity .35s ease,transform .5s cubic-bezier(.22,1,.36,1);transform:scale(1.04);pointer-events:none;box-sizing:border-box}usa-stories>[data-active]:not([data-usa-part]){opacity:1;transform:none;pointer-events:auto}usa-stories>img:not([data-usa-part]){width:100%;height:100%;object-fit:cover}.usa-stories-bars{position:absolute;z-index:3;top:8px;left:8px;right:48px;display:flex;gap:4px}.usa-stories-bar{flex:1;height:3px;border-radius:3px;background:rgba(255,255,255,.35);overflow:hidden}.usa-stories-bar>i{display:block;height:100%;width:100%;background:#fff;transform-origin:left;transform:scaleX(0)}.usa-stories-bar[data-done]>i{transform:scaleX(1)}.usa-stories-toggle{position:absolute;z-index:3;top:2px;right:6px;width:36px;height:30px;border:0;background:none;color:#fff;font:700 14px/1 system-ui;cursor:pointer;border-radius:8px}.usa-stories-toggle:focus-visible{outline:2px solid #fff}@media (prefers-reduced-motion:reduce){usa-stories>*{transition:none!important;transform:none!important}}"})}const F=["scale","slide-up","flip","origin"],z=["right","left","bottom","top"],T="cubic-bezier(.22,1,.36,1)";let L=!1;function q(){L||"undefined"==typeof document||(L=!0,document.addEventListener("click",t=>{const e=t.target?.closest?.("[data-usa-open]");if(!e)return;const s=document.getElementById(e.getAttribute("data-usa-open")||"");s&&"function"==typeof s.show&&(t.preventDefault(),s.opened?s.close?.():s.show(e))}))}function R(t,e){return q(),l(t,t=>class extends t{constructor(){super(...arguments),this._dlg=null,this._panel=null,this._open=!1,this._ret=null,this._origin=null,this._value="",this._closing=null}static get observedAttributes(){return"modal"===e?["effect"]:["side"]}get opened(){return this._open}get returnValue(){return this._value}mount(){let t=this.querySelector(":scope > dialog.usa-ov");if(!t){t=f("dialog",`usa-ov usa-${e}-panel`);const s=f("div","usa-ov-body");s.append(...p(this)),t.append(s),this.append(t)}if(this._dlg=t,this._panel=t.querySelector(".usa-ov-body"),"modal"===e){const t=this.str("effect","scale");this.dataset.effect=F.includes(t)?t:"scale"}else{const t=this.str("side","right");this.dataset.side=z.includes(t)?t:"right","bottom"===this.dataset.side&&this._panel&&!this._panel.querySelector("[data-handle]")&&this._panel.prepend(f("div","usa-ov-grab",{"data-handle":"","aria-hidden":"true"})),this.drag()}t.hasAttribute("aria-labelledby")||t.setAttribute("aria-label",this.str("label","modal"===e?"Dialog":"Panel")),this.listen(t,"cancel",t=>{t.preventDefault(),this.flag("persistent")||this.close()}),this.listen(t,"click",e=>{const s=e.target,i=s.closest?.("[data-usa-close]");i?this.close(i.getAttribute("data-usa-close")||""):s!==t||this.flag("persistent")||this.close()}),this.flag("open")&&!this._open&&this.show()}unmount(){this._open&&this._dlg?.open&&this._dlg.close?.(),this._open=!1}frames(t){const s=[{opacity:0},{opacity:1}];if(this.reduced)return t?s:[...s].reverse();let i;if("sheet"===e){const t=this.dataset.side;i=[{transform:"left"===t?"translateX(-100%)":"bottom"===t?"translateY(100%)":"top"===t?"translateY(-100%)":"translateX(100%)"},{transform:"none"}]}else{const t=this.dataset.effect,e=this._origin,s=this._dlg?.getBoundingClientRect();if("origin"===t&&e&&s&&s.width){i=[{transform:`translate(${e.left+e.width/2-(s.left+s.width/2)}px,${e.top+e.height/2-(s.top+s.height/2)}px) scale(${Math.max(.05,e.width/s.width).toFixed(3)},${Math.max(.05,e.height/s.height).toFixed(3)})`,opacity:0,borderRadius:"40px"},{transform:"none",opacity:1}]}else i="slide-up"===t?[{transform:"translateY(48px)",opacity:0},{transform:"none",opacity:1}]:"flip"===t?[{transform:"perspective(900px) rotateX(-28deg) translateY(30px)",opacity:0},{transform:"none",opacity:1}]:[{transform:"scale(.88)",opacity:0},{transform:"scale(1.015)",opacity:1,offset:.7},{transform:"none",opacity:1}]}return t?i:[i[0],i[i.length-1]].reverse()}backdrop(t){if(!this._dlg)return;const e=[{opacity:0},{opacity:1}];try{this._dlg.animate?.(t?e:e.reverse(),{duration:t?280:200,pseudoElement:"::backdrop",fill:"forwards"})}catch{}}show(t){const s=this._dlg;if(!s||this._open)return;if(this._open=!0,this._ret=t||document.activeElement,this._origin=t?t.getBoundingClientRect():null,"function"==typeof s.showModal)try{s.showModal()}catch{s.setAttribute("open","")}else s.setAttribute("open","");this.setAttribute("data-open",""),this.backdrop(!0),this.motion(s,this.frames(!0),{duration:this.reduced?150:"sheet"===e?420:460,easing:T});const i=s.querySelector("[autofocus]")||s.querySelector('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])');i?.focus?.(),this.emit("open",{trigger:t||null})}close(t=""){const e=this._dlg;if(!e||!this._open)return Promise.resolve();if(this._closing)return this._closing;this._value=t,this.backdrop(!1);const s=this.motion(e,this.frames(!1),{duration:this.reduced?120:260,easing:"cubic-bezier(.4,0,1,1)",fill:"forwards"}),i=()=>{this._closing=null,this._open=!1,this.removeAttribute("data-open"),e.open&&"function"==typeof e.close?e.close(t):e.removeAttribute("open"),s?.cancel?.(),e.style.transform="",this._ret?.focus?.(),this.emit("close",{value:t})};return this._closing=s?s.finished.then(i,i):Promise.resolve().then(i),this._closing}toggle(){this._open?this.close():this.show()}drag(){const t=this._panel,e=this._dlg;if(!t||!e||"bottom"!==this.dataset.side)return;let s=-1,i=0,a=0;this.listen(t,"pointerdown",t=>{t.target.closest("[data-handle]")&&(s=t.clientY,i=0,a=performance.now(),t.target.setPointerCapture?.(t.pointerId))}),this.listen(t,"pointermove",t=>{s<0||(i=Math.max(0,t.clientY-s),e.style.transform=`translateY(${i}px)`)});const r=()=>{if(s<0)return;s=-1;const t=i/Math.max(1,performance.now()-a);i>.3*e.offsetHeight||t>.6?this.close():(this.motion(e,[{transform:`translateY(${i}px)`},{transform:"translateY(-6px)",offset:.6},{transform:"none"}],{duration:380,easing:T}),e.style.transform="")};this.listen(t,"pointerup",r),this.listen(t,"pointercancel",r)}},{id:"overlay",text:'usa-modal,usa-sheet{display:contents}.usa-ov{border:0;padding:0;margin:auto;color:inherit;background:transparent;max-width:min(92vw,520px);max-height:88vh;overflow:visible}.usa-ov::backdrop{background:rgba(10,12,20,.45);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.usa-ov-body{box-sizing:border-box;background:var(--usa-ov-bg,#fff);color:var(--usa-ov-fg,#111827);border-radius:var(--usa-ov-radius,18px);padding:var(--usa-ov-pad,22px);box-shadow:0 30px 80px -20px rgba(0,0,0,.45);max-height:88vh;overflow:auto}.usa-sheet-panel{margin:0;max-width:none;max-height:none}usa-sheet[data-side="right"] .usa-sheet-panel{inset:0 0 0 auto;height:100%;width:min(88vw,var(--usa-sheet-size,380px))}usa-sheet[data-side="left"] .usa-sheet-panel{inset:0 auto 0 0;height:100%;width:min(88vw,var(--usa-sheet-size,380px))}usa-sheet[data-side="bottom"] .usa-sheet-panel{inset:auto 0 0 0;width:100%;max-height:85vh}usa-sheet[data-side="top"] .usa-sheet-panel{inset:0 0 auto 0;width:100%;max-height:85vh}usa-sheet .usa-ov-body{height:100%;max-height:inherit;border-radius:0}usa-sheet[data-side="bottom"] .usa-ov-body{border-radius:var(--usa-ov-radius,18px) var(--usa-ov-radius,18px) 0 0;height:auto;max-height:85vh;touch-action:none}usa-sheet[data-side="top"] .usa-ov-body{border-radius:0 0 var(--usa-ov-radius,18px) var(--usa-ov-radius,18px);height:auto}.usa-ov-grab{width:44px;height:5px;border-radius:3px;background:rgba(127,127,127,.45);margin:-8px auto 14px;cursor:grab}@media (prefers-color-scheme:dark){.usa-ov-body{background:var(--usa-ov-bg,#171a23);color:var(--usa-ov-fg,#e5e7eb)}}'})}const N=(t="usa-modal")=>R(t,"modal"),I=(t="usa-sheet")=>R(t,"sheet");const P=["bottom-right","bottom-left","bottom-center","top-right","top-left","top-center"],D={info:"ℹ",success:"✓",warning:"!",error:"✕"};let X=0;function O(t="usa-toast-stack"){return function(){if(q(),B||"undefined"==typeof document)return;B=!0,document.addEventListener("click",t=>{const e=t.target?.closest?.("[data-usa-toast]");if(!e)return;const s=e.getAttribute("data-usa-target"),i=s?document.getElementById(s):null;Y({message:e.getAttribute("data-usa-toast")||"",title:e.getAttribute("data-usa-toast-title")||void 0,type:e.getAttribute("data-usa-toast-type")||"info"},i)})}(),l(t,t=>class extends t{constructor(){super(...arguments),this._list=null,this._timers=new Map,this._hover=!1}static get observedAttributes(){return["position"]}get count(){return this._list?this._list.querySelectorAll(":scope > .usa-tstack:not([data-leaving])").length:0}mount(){const t=this.str("position","bottom-right");this.dataset.position=P.includes(t)?t:"bottom-right",this.setAttribute("role","region"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Notifications"),this._list=this.querySelector(":scope > .usa-tstack-list")||f("ol","usa-tstack-list",{"aria-live":"polite","aria-relevant":"additions"}),this._list.isConnected||this.append(this._list);const e=t=>{this._hover=t,this.toggleAttribute("data-expanded",t),this.layout();for(const[e,s]of this._timers)t?this.pause(e,s):this.resume(e)};this.listen(this,"pointerenter",()=>e(!0)),this.listen(this,"pointerleave",()=>e(!1)),this.listen(this,"focusin",()=>e(!0)),this.listen(this,"focusout",t=>!this.contains(t.relatedTarget)&&e(!1)),this.onCleanup(()=>this._timers.forEach(t=>t.h&&clearTimeout(t.h)))}pause(t,e){e.h&&(clearTimeout(e.h),e.h=0,e.left-=Date.now()-e.start)}resume(t){const e=this._timers.get(t);e&&!e.h&&(e.start=Date.now(),e.h=setTimeout(()=>this.dismiss(t,"timeout"),Math.max(400,e.left)))}show(t){const e="string"==typeof t?{message:t}:t||{},s="usa-tstack-"+ ++X,i=e.type&&D[e.type]?e.type:"info",a=f("li",`usa-tstack usa-tstack-${i}`,{id:s,role:"error"===i?"alert":"status"});a.append(f("span","usa-tstack-icon",{"aria-hidden":"true"},D[i]));const r=f("div","usa-tstack-text");if(e.title&&r.append(Object.assign(document.createElement("strong"),{textContent:e.title})),e.message&&r.append(Object.assign(document.createElement("span"),{textContent:e.message})),a.append(r),e.action){const t=f("button","usa-tstack-action",{type:"button"});t.textContent=e.action.label,t.addEventListener("click",()=>{e.action?.onClick?.(),this.dismiss(s,"action")}),a.append(t)}const n=f("button","usa-tstack-close",{type:"button","aria-label":"Dismiss"},"×");n.addEventListener("click",()=>this.dismiss(s,"close")),a.append(n),this.swipe(a,s),this._list?.prepend(a);const o=this.dataset.position?.startsWith("top");this.motion(a,this.reduced?[{opacity:0},{opacity:1}]:[{opacity:0,translate:`0 ${o?-110:110}%`,scale:"0.9"},{opacity:1,translate:"0 0",scale:"1"}],{duration:this.reduced?150:420,easing:"cubic-bezier(.22,1,.36,1)"}),this.layout();const l=e.duration??this.num("duration",4e3);return l>0&&(this._timers.set(s,{left:l,start:Date.now(),h:0}),this._hover||this.resume(s)),this.emit("show",{id:s,...e}),s}dismiss(t,e="api"){const s=this._list?.querySelector(`#${t}`),i=this._timers.get(t);if(i?.h&&clearTimeout(i.h),this._timers.delete(t),!s||s.hasAttribute("data-leaving"))return;s.setAttribute("data-leaving","");const a=Number(s.dataset.dx||0),r=this.motion(s,this.reduced?[{opacity:1},{opacity:0}]:[{opacity:1,transform:`translateX(${a}px)`},{opacity:0,transform:`translateX(${a>=0?120:-120}%)`}],{duration:this.reduced?120:260,easing:"cubic-bezier(.4,0,1,1)",fill:"forwards"}),n=()=>{s.remove(),this.layout()};r?r.finished.then(n,n):n(),this.emit("dismiss",{id:t,reason:e})}clear(){this._list?.querySelectorAll(":scope > .usa-tstack").forEach(t=>this.dismiss(t.id,"clear"))}layout(){if(!this._list)return;const t=Array.from(this._list.querySelectorAll(":scope > .usa-tstack:not([data-leaving])")),e=Math.max(1,this.num("max",3)),s=this.dataset.position?.startsWith("top")?1:-1;let i=0;t.forEach((t,a)=>{const r=t.offsetHeight||56,n=this._hover?`translateY(${s*i}px)`:`translateY(${s*a*10}px) scale(${(1-.05*a).toFixed(3)})`;t.style.transform=n,t.style.zIndex=String(100-a),t.style.opacity=!this._hover&&a>=e?"0":"",t.toggleAttribute("inert",!this._hover&&a>0),i+=r+10}),this._list.style.height=this._hover&&t.length?`${i}px`:""}swipe(t,e){let s=NaN;t.addEventListener("pointerdown",e=>{e.target.closest("button")||(s=e.clientX,t.setPointerCapture?.(e.pointerId))}),t.addEventListener("pointermove",e=>{if(Number.isNaN(s))return;const i=e.clientX-s;t.dataset.dx=String(i),t.style.translate=`${i}px 0`,t.style.opacity=String(Math.max(.2,1-Math.abs(i)/240))});const i=()=>{if(Number.isNaN(s))return;s=NaN;const i=Number(t.dataset.dx||0);t.style.translate="",t.style.opacity="",Math.abs(i)>80?this.dismiss(e,"swipe"):t.dataset.dx="0"};t.addEventListener("pointerup",i),t.addEventListener("pointercancel",i)}},{id:"toast",text:'usa-toast-stack{position:fixed;z-index:2147482000;width:min(360px,calc(100vw - 24px));pointer-events:none;--usa-tstack-bg:#111827;--usa-tstack-fg:#f9fafb}usa-toast-stack[contained]{position:absolute;width:min(360px,calc(100% - 24px))}usa-toast-stack[data-position^="bottom"]{bottom:12px}usa-toast-stack[data-position^="top"]{top:12px}usa-toast-stack[data-position$="right"]{right:12px}usa-toast-stack[data-position$="left"]{left:12px}usa-toast-stack[data-position$="center"]{left:50%;transform:translateX(-50%)}.usa-tstack-list{position:relative;list-style:none;margin:0;padding:0;min-height:1px;transition:height .3s}.usa-tstack{position:absolute;left:0;right:0;display:flex;align-items:center;gap:10px;box-sizing:border-box;padding:12px 12px 12px 14px;border-radius:14px;background:var(--usa-tstack-bg);color:var(--usa-tstack-fg);box-shadow:0 12px 32px -10px rgba(0,0,0,.45);font:500 14px/1.35 system-ui,sans-serif;pointer-events:auto;touch-action:pan-y;transition:transform .38s cubic-bezier(.22,1,.36,1),opacity .3s;user-select:none}usa-toast-stack[data-position^="bottom"] .usa-tstack{bottom:0;transform-origin:50% 100%}usa-toast-stack[data-position^="top"] .usa-tstack{top:0;transform-origin:50% 0}.usa-tstack-icon{flex:none;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;font-size:13px;font-weight:800;background:#3b82f6;color:#fff}.usa-tstack-success .usa-tstack-icon{background:#22c55e}.usa-tstack-warning .usa-tstack-icon{background:#f59e0b}.usa-tstack-error .usa-tstack-icon{background:#ef4444}.usa-tstack-text{flex:1;min-width:0;display:flex;flex-direction:column}.usa-tstack-text strong{font-weight:700}.usa-tstack-action{border:0;border-radius:8px;padding:6px 10px;background:rgba(255,255,255,.14);color:inherit;font:600 13px system-ui,sans-serif;cursor:pointer}.usa-tstack-close{border:0;background:none;color:inherit;opacity:.6;font-size:18px;line-height:1;cursor:pointer;padding:2px 4px}.usa-tstack-close:hover{opacity:1}@media (prefers-reduced-motion:reduce){.usa-tstack,.usa-tstack-list{transition:none}}'})}function Y(t,e){O();let s=e||document.querySelector("usa-toast-stack");return s||(s=document.createElement("usa-toast-stack"),document.body.append(s)),s.show(t)}let B=!1;const G=["scale","fold","slide"];function W(t="usa-menu"){return l(t,t=>class extends t{constructor(){super(...arguments),this._btn=null,this._list=null,this._items=[],this._open=!1}static get observedAttributes(){return["placement","effect"]}get opened(){return this._open}mount(){const t=p(this);this._btn=t.find(t=>t.hasAttribute("data-trigger"))||t[0]||null;let e=this.querySelector(":scope > .usa-menu-list");if(!e){e=f("div","usa-menu-list",{role:"menu"});for(const s of t)s!==this._btn&&e.append(s);this.append(e)}this._list=e,e.id||(e.id=g("usa-menu")),e.hidden=!this._open;const s=this.str("placement","bottom-start");this.dataset.placement=/^(bottom|top)-(start|end)$/.test(s)?s:"bottom-start";const i=this.str("effect","scale");this.dataset.effect=G.includes(i)?i:"scale",this._items=Array.from(e.children).filter(t=>t instanceof HTMLElement&&!t.matches('hr,[role="separator"]')),e.querySelectorAll("hr").forEach(t=>t.setAttribute("role","separator")),this._items.forEach((t,e)=>{t.setAttribute("role","menuitem"),t.tabIndex=-1,"button"!==t.localName||t.hasAttribute("type")||t.setAttribute("type","button"),this.listen(t,"click",()=>{this.emit("select",{index:e,value:t.dataset.value||(t.textContent||"").trim(),item:t}),this.close(!0)})});const a=this._btn;a&&(a.setAttribute("aria-haspopup","menu"),a.setAttribute("aria-expanded",String(this._open)),a.setAttribute("aria-controls",e.id),"button"!==a.localName||a.hasAttribute("type")||a.setAttribute("type","button"),this.listen(a,"click",()=>this.toggle()),this.listen(a,"keydown",t=>{"ArrowDown"!==t.key&&"ArrowUp"!==t.key||(t.preventDefault(),this.open("ArrowUp"===t.key?"last":"first"))})),this.listen(e,"keydown",t=>{const e=this._items.length,s=this._items.indexOf(document.activeElement);let i=-1;if("ArrowDown"===t.key)i=(s+1)%e;else if("ArrowUp"===t.key)i=(s-1+e)%e;else if("Home"===t.key)i=0;else if("End"===t.key)i=e-1;else{if("Escape"===t.key)return t.preventDefault(),this.close(!0);if("Tab"===t.key)return this.close(!1)}i>=0&&(t.preventDefault(),this._items[i]?.focus())}),this.listen(document,"pointerdown",t=>{this._open&&!this.contains(t.target)&&this.close(!1)})}open(t="first"){const e=this._list;if(!e||this._open)return;this._open=!0,e.hidden=!1,this._btn?.setAttribute("aria-expanded","true"),this.setAttribute("data-open","");const s=this.dataset.effect;if(this.reduced)this.motion(e,[{opacity:0},{opacity:1}],{duration:120});else{const t="fold"===s?[{transform:"perspective(600px) rotateX(-70deg)",opacity:0},{transform:"none",opacity:1}]:"slide"===s?[{transform:"translateY(-10px)",opacity:0,clipPath:"inset(0 0 100% 0 round 12px)"},{transform:"none",opacity:1,clipPath:"inset(0 0 0 0 round 12px)"}]:[{transform:"scale(.6)",opacity:0},{transform:"scale(1.03)",opacity:1,offset:.7},{transform:"none",opacity:1}];this.motion(e,t,{duration:300,easing:"cubic-bezier(.22,1,.36,1)"}),this._items.forEach((t,e)=>this.motion(t,[{opacity:0,transform:"translateY(-6px)"},{opacity:1,transform:"none"}],{duration:260,delay:40+35*e,easing:"cubic-bezier(.22,1,.36,1)",fill:"backwards"}))}("last"===t?this._items[this._items.length-1]:this._items[0])?.focus(),this.emit("open")}close(t=!1){const e=this._list;if(!e||!this._open)return;this._open=!1,this._btn?.setAttribute("aria-expanded","false"),this.removeAttribute("data-open");const s=this.motion(e,[{opacity:1,transform:"none"},{opacity:0,transform:this.reduced?"none":"scale(.96)"}],{duration:this.reduced?80:150,easing:"ease-in"}),i=()=>{this._open||(e.hidden=!0)};s?s.finished.then(i,i):i(),t&&this._btn?.focus(),this.emit("close")}toggle(){this._open?this.close(!0):this.open()}},{id:"menu",text:'usa-menu{position:relative;display:inline-block}.usa-menu-list{position:absolute;z-index:50;min-width:180px;max-width:min(280px,90vw);box-sizing:border-box;padding:6px;border-radius:12px;background:var(--usa-menu-bg,#fff);color:var(--usa-menu-fg,#111827);box-shadow:0 18px 44px -12px rgba(0,0,0,.35),0 0 0 1px rgba(127,127,127,.15);display:flex;flex-direction:column;gap:2px;text-align:left}.usa-menu-list[hidden]{display:none}usa-menu[data-placement^="bottom"] .usa-menu-list{top:calc(100% + 6px)}usa-menu[data-placement^="top"] .usa-menu-list{bottom:calc(100% + 6px)}usa-menu[data-placement$="start"] .usa-menu-list{left:0;transform-origin:0 0}usa-menu[data-placement$="end"] .usa-menu-list{right:0;transform-origin:100% 0}usa-menu[data-placement="top-start"] .usa-menu-list{transform-origin:0 100%}usa-menu[data-placement="top-end"] .usa-menu-list{transform-origin:100% 100%}.usa-menu-list>[role="menuitem"]{display:flex;align-items:center;gap:8px;width:100%;box-sizing:border-box;border:0;background:none;color:inherit;font:500 14px/1.3 system-ui,sans-serif;text-align:left;text-decoration:none;padding:8px 10px;border-radius:8px;cursor:pointer}.usa-menu-list>[role="menuitem"]:hover,.usa-menu-list>[role="menuitem"]:focus-visible{background:var(--usa-menu-hover,rgba(124,92,255,.14));outline:none}.usa-menu-list>hr{border:0;border-top:1px solid rgba(127,127,127,.2);margin:4px 2px}@media (prefers-color-scheme:dark){.usa-menu-list{background:var(--usa-menu-bg,#1d2130);color:var(--usa-menu-fg,#e5e7eb)}}'})}var H='usa-progress-ring{position:relative;display:inline-block;vertical-align:middle;width:var(--usa-pr-size,120px);aspect-ratio:1;--usa-pr-color:#7c5cff;--usa-pr-track:rgba(127,127,127,.18);--usa-pr-width:9;font:700 calc(var(--usa-pr-size,120px)*.2)/1 system-ui,sans-serif;font-variant-numeric:tabular-nums}usa-progress-ring[data-variant="semi"]{aspect-ratio:100/56}.usa-pr-label{position:absolute;inset:0;display:grid;place-items:center}usa-progress-ring[data-variant="semi"] .usa-pr-label{place-items:end center}usa-progress-ring[data-variant="bar"]{display:inline-flex;width:var(--usa-pr-size,100%);aspect-ratio:auto;gap:10px;align-items:center;font-size:14px}usa-progress-ring[data-variant="bar"]>.usa-pr-track{flex:1 1 auto;min-width:40px}usa-progress-ring[data-variant="bar"] .usa-pr-label{position:static;display:inline}usa-progress-ring .usa-pr-svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}.usa-pr-svg path{fill:none;stroke-width:var(--usa-pr-width);stroke-linecap:round}.usa-pr-svg .usa-pr-track{stroke:var(--usa-pr-track)}.usa-pr-svg .usa-pr-arc{stroke:var(--usa-pr-color)}usa-progress-ring[data-variant="semi"] .usa-pr-label{padding-bottom:2%}.usa-pr-track:is(div){height:10px;border-radius:999px;background:var(--usa-pr-track);overflow:hidden}.usa-pr-fill{height:100%;border-radius:inherit;background:var(--usa-pr-color);transform-origin:0 50%;transform:scaleX(0)}usa-progress-ring[data-indeterminate] .usa-pr-svg{animation:usa-pr-spin 1.1s linear infinite}usa-progress-ring[data-indeterminate] .usa-pr-fill{width:35%;transform:none!important;animation:usa-pr-slide 1.3s ease-in-out infinite}@keyframes usa-pr-spin{to{transform:rotate(360deg)}}@keyframes usa-pr-slide{from{margin-left:-35%}to{margin-left:100%}}usa-odometer{display:inline-flex;align-items:flex-end;font-variant-numeric:tabular-nums;line-height:1.15}.usa-odo-row{display:inline-flex;align-items:flex-end}.usa-odo-col{display:inline-block;height:1.15em;overflow:hidden;-webkit-mask-image:linear-gradient(transparent,#000 18%,#000 82%,transparent);mask-image:linear-gradient(transparent,#000 18%,#000 82%,transparent)}.usa-odo-strip{display:block;white-space:pre;line-height:1.15em;text-align:center}.usa-odo-sym{display:inline-block;height:1.15em}@media (prefers-reduced-motion:reduce){usa-progress-ring[data-indeterminate] .usa-pr-svg,usa-progress-ring[data-indeterminate] .usa-pr-fill{animation-duration:4s}}';const j=["ring","bar","semi"];function U(t="usa-progress-ring"){return l(t,t=>class extends t{constructor(){super(...arguments),this._shown=0,this._arc=null,this._label=null,this._len=1,this._raf=0}static get observedAttributes(){return["variant","value","max","gradient"]}get value(){return this.hasAttribute("value")?this.num("value",0):null}set value(t){null===t?this.removeAttribute("value"):this.setAttribute("value",String(t))}get max(){return Math.max(1e-9,this.num("max",100))}set max(t){this.setAttribute("max",String(t))}changed(t){if("value"===t&&this._arc)return this.update();super.changed(t)}mount(){const t=this.str("variant","ring"),e=j.includes(t)?t:"ring";this.dataset.variant=e,this.setAttribute("role","progressbar"),this.setAttribute("aria-valuemin","0"),this.querySelectorAll(":scope > [data-usa-part]").forEach(t=>t.remove());const s=this.str("gradient","").split(",").map(t=>t.trim()).filter(Boolean),i=`usa-pr-${Math.random().toString(36).slice(2,8)}`;if("bar"===e){const t=f("div","usa-pr-track"),e=f("div","usa-pr-fill");s.length&&(e.style.background=`linear-gradient(90deg,${s.join(",")})`),t.append(e),this.append(t),this._arc=e}else{const t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("data-usa-part",""),t.setAttribute("aria-hidden","true"),t.setAttribute("class","usa-pr-svg"),t.setAttribute("width","100%"),t.setAttribute("height","100%");const a="semi"===e;t.setAttribute("viewBox",a?"0 0 100 56":"0 0 100 100");const r=a?"M 8 50 A 42 42 0 0 1 92 50":"M 50 8 A 42 42 0 1 1 49.99 8",n=s.length?`<defs><linearGradient id="${i}" x1="0" y1="0" x2="1" y2="1">${s.map((t,e)=>`<stop offset="${s.length>1?e/(s.length-1):0}" stop-color="${t}"/>`).join("")}</linearGradient></defs>`:"";t.innerHTML=`${n}<path class="usa-pr-track" d="${r}"/><path class="usa-pr-arc" d="${r}"${s.length?` stroke="url(#${i})"`:""}/>`,this.append(t),this._arc=t.querySelector(".usa-pr-arc"),this._len=a?42*Math.PI:2*Math.PI*42,this._arc.style.strokeDasharray=`${this._len}`,this._arc.style.strokeDashoffset=`${this._len}`}this._label=f("span","usa-pr-label",{"aria-hidden":"true"}),this.flag("no-label")&&(this._label.hidden=!0),this.append(this._label),this._shown=0,this.onCleanup(()=>{this._raf&&"function"==typeof cancelAnimationFrame&&cancelAnimationFrame(this._raf)}),this.update()}paint(t){const e=h(t,0,1.08);this._arc instanceof HTMLElement?this._arc.style.transform=`scaleX(${Math.min(1,e)})`:this._arc&&(this._arc.style.strokeDashoffset=`${(this._len*(1-Math.min(1,e))).toFixed(2)}`)}update(){const t=this.value,e=this.max;if(this.setAttribute("aria-valuemax",String(e)),this.toggleAttribute("data-indeterminate",null===t),null===t)return this.removeAttribute("aria-valuenow"),this._label&&(this._label.textContent=""),void this.paint(.28);const s=h(t,0,e)/e;this.setAttribute("aria-valuenow",String(h(t,0,e)));const i=this._shown;this._shown=s;const a=t=>{this._label&&(this._label.textContent=`${Math.round(100*t)}%`)};if(this._raf&&"function"==typeof cancelAnimationFrame&&cancelAnimationFrame(this._raf),this.reduced||"function"!=typeof requestAnimationFrame)this.paint(s),a(s);else{const t=performance.now(),e=this.num("duration",900),r=n=>{const o=Math.min(1,(n-t)/e),l=1+2.4*Math.pow(o-1,3)+1.4*Math.pow(o-1,2),c=i+(s-i)*l;this.paint(c),a(i+(s-i)*Math.min(1,1.15*o)),this._raf=o<1?requestAnimationFrame(r):0,o>=1&&this.paint(s)};this._raf=requestAnimationFrame(r)}s>=1&&i<1&&this.emit("complete",{value:t})}},{id:"meters",text:H})}function V(t="usa-odometer"){return l(t,t=>class extends t{constructor(){super(...arguments),this._row=null,this._text=""}static get observedAttributes(){return["value","locale","decimals","prefix","suffix"]}get value(){return this.num("value",0)}set value(t){this.setAttribute("value",String(t))}get text(){return this._text}changed(t){if("value"===t&&this._row)return this.render(!0);super.changed(t)}mount(){this.querySelectorAll(":scope > [data-usa-part]").forEach(t=>t.remove()),this._row=f("span","usa-odo-row",{"aria-hidden":"true"}),this.append(this._row),this.setAttribute("role","img"),this._text="",this.render(!1)}format(){const t=Math.max(0,Math.min(6,Math.round(this.num("decimals",0))));let e;try{e=new Intl.NumberFormat(this.str("locale","")||void 0,{minimumFractionDigits:t,maximumFractionDigits:t}).format(this.value)}catch{e=this.value.toFixed(t)}return`${this.str("prefix","")}${e}${this.str("suffix","")}`}column(t){const e=/\d/.test(t),s=f("span",e?"usa-odo-col":"usa-odo-sym");if(e){const e=document.createElement("span");e.className="usa-odo-strip",e.textContent="01234567890123456789".split("").join("\n"),s.append(e),s.dataset.d=t,e.style.transform=`translateY(${5*-Number(t)}%)`}else s.textContent=t;return s}render(t){const e=this._row;if(!e)return;const s=this.format();this._text=s,this.setAttribute("aria-label",s);const i=t&&!this.reduced,a=this.num("duration",1100),r=s.split(""),n=Array.from(e.children),o=r.length-n.length,l=new Set,c=r.map((t,e)=>{const s=n[e-o],i=/\d/.test(t);if(s&&i&&void 0!==s.dataset.d)return s;if(s&&!i&&void 0===s.dataset.d)return s.textContent=t,s;const a=this.column(t);return l.add(a),a});e.replaceChildren(...c),c.forEach((t,e)=>{if(l.has(t))return void(i&&this.motion(t,[{opacity:0,transform:"translateY(-60%)"},{opacity:1,transform:"none"}],{duration:420,easing:"cubic-bezier(.22,1,.36,1)"}));if(void 0===t.dataset.d)return;const s=Number(r[e]),n=Number(t.dataset.d);t.dataset.d=String(s);const o=t.firstElementChild;if(o.style.transform=`translateY(${5*-s}%)`,!i||n===s)return;const u=s>=n?5*-s:5*-(s+10),d=c.length-e;this.motion(o,[{transform:`translateY(${5*-n}%)`},{transform:`translateY(${u}%)`}],{duration:Math.max(400,a-60*d),easing:"cubic-bezier(.2,.9,.25,1.04)"})})}},{id:"meters",text:H})}const Z=["wave","pulse","glow"];function K(t="usa-skeleton-reveal"){return l(t,t=>class extends t{constructor(){super(...arguments),this._layer=null}static get observedAttributes(){return["loading","variant"]}get loading(){return this.flag("loading")}set loading(t){this.setFlag("loading",t)}changed(t){"loading"!==t?super.changed(t):this.loading?this.build():this.reveal()}mount(){const t=this.str("variant","wave");if(this.dataset.variant=Z.includes(t)?t:"wave",this.loading&&this.build(),"function"==typeof ResizeObserver){const t=new ResizeObserver(()=>this.loading&&this.build());t.observe(this),this.onCleanup(()=>t.disconnect())}this.onCleanup(()=>this._layer?.remove())}build(){this.setAttribute("aria-busy","true"),this.setAttribute("data-loading",""),this._layer?.remove();const t=f("div","usa-sk-layer",{"aria-hidden":"true"}),e=this.getBoundingClientRect(),s=[],i=(t,i=!1)=>{t.width<2||t.height<2||s.push([t.left-e.left,t.top-e.top,t.width,t.height,i])},a=Array.from(this.querySelectorAll("[data-skeleton], img, svg, video, canvas, button, input"));for(const t of a)t.closest(".usa-sk-layer")||i(t.getBoundingClientRect(),"circle"===t.dataset.skeleton||"50%"===getComputedStyle(t).borderRadius);const r=document.createTreeWalker(this,NodeFilter.SHOW_TEXT);for(let t=r.nextNode();t;t=r.nextNode()){if(!t.textContent?.trim()||t.parentElement&&a.some(e=>e.contains(t.parentElement)))continue;const e=document.createRange();e.selectNodeContents(t);const s="function"==typeof e.getClientRects?Array.from(e.getClientRects()):[];for(const t of s)i({left:t.left,top:t.top+.18*t.height,width:t.width,height:.64*t.height})}for(const[e,i,a,r,n]of s){const s=document.createElement("span");s.className="usa-sk-box",s.style.cssText=`left:${e.toFixed(1)}px;top:${i.toFixed(1)}px;width:${a.toFixed(1)}px;height:${r.toFixed(1)}px;${n?"border-radius:50%":""}`,s.style.setProperty("--usa-sk-x",`${(-e).toFixed(1)}px`),t.append(s)}this.append(t),this._layer=t}reveal(){const t=this._layer;if(this.removeAttribute("aria-busy"),this.hasAttribute("loading")&&this.removeAttribute("loading"),this._layer=null,!t)return this.removeAttribute("data-loading"),Promise.resolve();const e=Array.from(t.children),s=Array.from(this.children).filter(e=>e!==t);this.removeAttribute("data-loading");const i=[];if(this.reduced){const e=this.motion(t,[{opacity:1},{opacity:0}],{duration:200,fill:"forwards"});e&&i.push(e.finished)}else{const t=Math.min(...e.map(t=>parseFloat(t.style.top)||0),0);for(const s of e){const e=this.motion(s,[{opacity:1,transform:"none",filter:"blur(0)"},{opacity:0,transform:"scale(1.04)",filter:"blur(6px)"}],{duration:420,delay:Math.min(500,1.2*((parseFloat(s.style.top)||0)-t)),easing:"cubic-bezier(.4,0,.2,1)",fill:"forwards"});e&&i.push(e.finished)}s.forEach((t,e)=>this.motion(t,[{opacity:0,filter:"blur(8px)",transform:"translateY(6px)"},{opacity:1,filter:"blur(0)",transform:"none"}],{duration:520,delay:60+70*e,easing:"cubic-bezier(.22,1,.36,1)",fill:"backwards"}))}const a=()=>{t.remove(),this.emit("reveal")};return Promise.all(i).then(a,a)}},{id:"skeleton-reveal",text:'usa-skeleton-reveal{position:relative;display:block;--usa-sk-base:rgba(127,127,127,.16);--usa-sk-hi:rgba(255,255,255,.55)}usa-skeleton-reveal[data-loading]>:not(.usa-sk-layer){visibility:hidden}.usa-sk-layer{position:absolute;inset:0;pointer-events:none}.usa-sk-box{position:absolute;border-radius:6px;background:var(--usa-sk-base);overflow:hidden}usa-skeleton-reveal[data-variant="wave"] .usa-sk-box{background:linear-gradient(100deg,var(--usa-sk-base) 30%,var(--usa-sk-hi) 50%,var(--usa-sk-base) 70%) var(--usa-sk-x,0) 0/var(--usa-sk-w,600px) 100% no-repeat,var(--usa-sk-base);animation:usa-sk-wave 1.4s linear infinite}usa-skeleton-reveal[data-variant="pulse"] .usa-sk-box{animation:usa-sk-pulse 1.2s ease-in-out infinite alternate}usa-skeleton-reveal[data-variant="glow"] .usa-sk-box{animation:usa-sk-glow 1.6s ease-in-out infinite alternate}@keyframes usa-sk-wave{from{background-position:calc(var(--usa-sk-x,0px) - var(--usa-sk-w,600px)) 0,0 0}to{background-position:calc(var(--usa-sk-x,0px) + var(--usa-sk-w,600px)) 0,0 0}}@keyframes usa-sk-pulse{from{opacity:1}to{opacity:.45}}@keyframes usa-sk-glow{from{box-shadow:0 0 0 rgba(124,92,255,0)}to{box-shadow:0 0 14px rgba(124,92,255,.45);background:rgba(124,92,255,.22)}}@media (prefers-color-scheme:dark){usa-skeleton-reveal{--usa-sk-hi:rgba(255,255,255,.16)}}@media (prefers-reduced-motion:reduce){.usa-sk-box{animation:none!important}}'})}const J={star:"M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6L2.5 9.4l6.6-.8z",heart:"M12 21s-7.5-4.6-9.6-9.2C.9 8.4 2.9 4.5 6.6 4.5c2.1 0 3.6 1.2 5.4 3.1 1.8-1.9 3.3-3.1 5.4-3.1 3.7 0 5.7 3.9 4.2 7.3C19.5 16.4 12 21 12 21z"};function Q(t="usa-star-rating"){return l(t,t=>class extends t{constructor(){super(...arguments),this._v=0,this._stars=[]}static get observedAttributes(){return["max","icon","readonly","step"]}get value(){return this._v}set value(t){this.set(t,!1)}get max(){return Math.max(1,Math.round(this.num("max",5)))}get step(){return.5===this.num("step",1)?.5:1}mount(){this.querySelectorAll(":scope > [data-usa-part]").forEach(t=>t.remove());const t=J[this.str("icon","star")]||J.star;this._stars=[];for(let e=0;e<this.max;e++){const e=f("span","usa-star",{"aria-hidden":"true"},`<svg viewBox="0 0 24 24" width="100%" height="100%"><path class="usa-star-bg" d="${t}"/></svg><span class="usa-star-fg"><svg viewBox="0 0 24 24" width="24" height="24"><path d="${t}"/></svg></span>`);this._stars.push(e),this.append(e)}const e=this.flag("readonly");if(this.setAttribute("role",e?"img":"slider"),e||(this.tabIndex=0,this.setAttribute("aria-valuemin","0"),this.setAttribute("aria-valuemax",String(this.max))),this.hasAttribute("aria-label")||this.setAttribute("aria-label",this.str("label","Rating")),this._v=h(this.num("value",0),0,this.max),this.paint(this._v),this.sync(),e)return;const s=t=>{const e=this._stars[0].getBoundingClientRect(),s=this._stars[this._stars.length-1].getBoundingClientRect().right-e.left||1,i=(t.clientX-e.left)/s*this.max;return h(Math.ceil(i/this.step)*this.step,this.step,this.max)};this.listen(this,"pointermove",t=>{this.setAttribute("data-preview",""),this.paint(s(t))}),this.listen(this,"pointerleave",()=>{this.removeAttribute("data-preview"),this.paint(this._v)}),this.listen(this,"click",t=>this.set(s(t),!0)),this.listen(this,"keydown",t=>{const e=t.key;let s=this._v;if("ArrowRight"===e||"ArrowUp"===e)s+=this.step;else if("ArrowLeft"===e||"ArrowDown"===e)s-=this.step;else if("Home"===e)s=0;else{if("End"!==e)return;s=this.max}t.preventDefault(),this.set(s,!0)})}sync(){this.setAttribute("aria-valuenow",String(this._v)),this.setAttribute("aria-valuetext",`${this._v} of ${this.max}`),this.flag("readonly")&&this.setAttribute("aria-label",`${this.str("label","Rating")}: ${this._v} of ${this.max}`)}paint(t){this._stars.forEach((e,s)=>e.style.setProperty("--usa-star-fill",`${(100*h(t-s,0,1)).toFixed(0)}%`))}set(t,e){const s=h(Math.round(t/this.step)*this.step,0,this.max),i=s!==this._v;if(this._v=s,this.paint(s),this.sync(),!e)return;const a=Math.ceil(s)-1;if(!this.reduced&&a>=0){const t=this._stars[a];this.motion(t,[{transform:"scale(1)"},{transform:"scale(1.45) rotate(-12deg)",offset:.35},{transform:"scale(.92)",offset:.7},{transform:"none"}],{duration:520,easing:"cubic-bezier(.3,1.4,.5,1)"}),this._stars.slice(0,a).forEach((t,e)=>this.motion(t,[{transform:"none"},{transform:"translateY(-5px)"},{transform:"none"}],{duration:320,delay:45*e,easing:"ease-out"}));for(let e=0;e<8;e++){const s=f("span","usa-star-spark",{"aria-hidden":"true"});t.append(s);const i=e/8*Math.PI*2,a=this.motion(s,[{transform:"translate(-50%,-50%) scale(1)",opacity:1},{transform:`translate(calc(-50% + ${(22*Math.cos(i)).toFixed(1)}px), calc(-50% + ${(22*Math.sin(i)).toFixed(1)}px)) scale(.2)`,opacity:0}],{duration:520,easing:"cubic-bezier(.2,.8,.3,1)",fill:"forwards"}),r=()=>s.remove();a?a.finished.then(r,r):r()}}i&&this.emit("change",{value:s})}},{id:"star-rating",text:"usa-star-rating{display:inline-flex;gap:var(--usa-star-gap,4px);--usa-star-size:28px;--usa-star-on:#fbbf24;--usa-star-off:rgba(127,127,127,.28);cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;border-radius:8px}usa-star-rating[readonly]{cursor:default}usa-star-rating:focus-visible{outline:2px solid var(--usa-star-on);outline-offset:4px}.usa-star{position:relative;display:inline-block;width:var(--usa-star-size);height:var(--usa-star-size);--usa-star-fill:0%}.usa-star svg{display:block;width:100%;height:100%;overflow:visible;stroke:none}.usa-star-bg{fill:var(--usa-star-off)}.usa-star-fg{position:absolute;left:0;top:0;bottom:0;width:var(--usa-star-fill);overflow:hidden;transition:width .18s ease-out}.usa-star-fg svg{width:var(--usa-star-size);height:var(--usa-star-size);fill:var(--usa-star-on);filter:drop-shadow(0 1px 3px rgba(251,191,36,.45))}usa-star-rating[data-preview] .usa-star-fg{opacity:.8}.usa-star-spark{position:absolute;left:50%;top:50%;width:6px;height:6px;border-radius:50%;background:var(--usa-star-on);pointer-events:none}@media (prefers-reduced-motion:reduce){.usa-star-fg{transition:none}}"})}function tt(t="usa-milestones"){return l(t,t=>class extends t{constructor(){super(...arguments),this._items=[],this._fill=null,this._reached=-1,this._raf=0}static get observedAttributes(){return["layout"]}get reached(){return this._reached}mount(){this.dataset.layout="left"===this.str("layout","alternate")?"left":"alternate",this.setAttribute("role",this.getAttribute("role")||"list"),this.querySelectorAll(":scope > .usa-ms-rail").forEach(t=>t.remove());const t=f("div","usa-ms-rail",{"aria-hidden":"true"});if(this._fill=f("div","usa-ms-fill"),t.append(this._fill),this.prepend(t),this._items=p(this,"[data-usa-part],.usa-ms-rail"),this._items.forEach((t,e)=>{t.classList.add("usa-ms-item"),t.setAttribute("role","listitem"),t.dataset.side="left"===this.dataset.layout||e%2==0?"right":"left",t.querySelector(":scope > .usa-ms-dot")||t.prepend(f("span","usa-ms-dot",{"aria-hidden":"true"}));const s=t.dataset.date;s&&!t.querySelector(":scope > .usa-ms-date")&&t.querySelector(":scope > .usa-ms-dot").after(f("span","usa-ms-date",{},""));const i=t.querySelector(":scope > .usa-ms-date");i&&s&&(i.textContent=s)}),this._reached=-1,this.reduced)return this._fill.style.transform="scaleY(1)",this._items.forEach(t=>t.setAttribute("data-reached","")),void(this._reached=this._items.length-1);const e=()=>{this._raf||(this._raf="function"==typeof requestAnimationFrame?requestAnimationFrame(()=>this.update()):(this.update(),0))};this.listen(window,"scroll",e,{passive:!0}),this.listen(window,"resize",e),this.onCleanup(()=>{this._raf&&"function"==typeof cancelAnimationFrame&&cancelAnimationFrame(this._raf)}),this.update()}update(){this._raf=0;const t=this.getBoundingClientRect(),e=.6*("undefined"!=typeof window&&window.innerHeight||800),s=t.height?Math.min(1,Math.max(0,(e-t.top)/t.height)):0;this._fill&&(this._fill.style.transform=`scaleY(${s.toFixed(4)})`),this._items.forEach((t,i)=>{if(t.hasAttribute("data-reached"))return;if(t.getBoundingClientRect().top<e||s>=1){t.setAttribute("data-reached","");const e=Array.from(t.children).filter(t=>!t.matches(".usa-ms-dot,.usa-ms-date")),s=t.querySelector(":scope > .usa-ms-dot");s&&this.motion(s,[{transform:"scale(0)"},{transform:"scale(1.5)",offset:.6},{transform:"scale(1)"}],{duration:420,easing:"cubic-bezier(.3,1.4,.5,1)"});const a="left"===t.dataset.side?-28:28;e.forEach((t,e)=>this.motion(t,[{opacity:0,transform:`translateX(${a}px)`},{opacity:1,transform:"none"}],{duration:520,delay:80+60*e,easing:"cubic-bezier(.22,1,.36,1)",fill:"backwards"})),i>this._reached&&(this._reached=i),this.emit("reach",{index:i})}})}},{id:"milestones",text:'usa-milestones{position:relative;display:block;--usa-ms-color:#7c5cff;--usa-ms-rail:rgba(127,127,127,.22);--usa-ms-gap:28px;padding:4px 0}.usa-ms-rail{position:absolute;top:0;bottom:0;left:50%;width:3px;margin-left:-1.5px;border-radius:3px;background:var(--usa-ms-rail);overflow:hidden}.usa-ms-fill{position:absolute;inset:0;background:linear-gradient(var(--usa-ms-color),#22d3ee);transform-origin:50% 0;transform:scaleY(0)}.usa-ms-item{position:relative;box-sizing:border-box;width:50%;padding:0 var(--usa-ms-gap) var(--usa-ms-gap);text-align:left}.usa-ms-item[data-side="right"]{margin-left:50%}.usa-ms-item[data-side="left"]{text-align:right}.usa-ms-dot{position:absolute;top:4px;width:14px;height:14px;border-radius:50%;background:var(--usa-ms-color);box-shadow:0 0 0 4px color-mix(in srgb,var(--usa-ms-color) 22%,transparent);transform:scale(0)}.usa-ms-item[data-reached] .usa-ms-dot{transform:none}.usa-ms-item[data-side="right"] .usa-ms-dot{left:-7px}.usa-ms-item[data-side="left"] .usa-ms-dot{right:-7px}.usa-ms-date{display:block;font-size:.8em;font-weight:700;letter-spacing:.04em;color:var(--usa-ms-color);margin-bottom:2px}.usa-ms-item:not([data-reached])>:not(.usa-ms-dot){opacity:0}usa-milestones[data-layout="left"] .usa-ms-rail{left:7px}usa-milestones[data-layout="left"] .usa-ms-item{width:auto;margin-left:0;padding-left:calc(var(--usa-ms-gap) + 8px);text-align:left}usa-milestones[data-layout="left"] .usa-ms-dot{left:1px;right:auto}@media (max-width:640px){usa-milestones .usa-ms-rail{left:7px}usa-milestones .usa-ms-item{width:auto;margin-left:0;padding-left:calc(var(--usa-ms-gap) + 8px);text-align:left}usa-milestones .usa-ms-item .usa-ms-dot{left:1px;right:auto}}'})}function et(t="usa-masonry-flow"){return l(t,t=>class extends t{constructor(){super(...arguments),this._cols=1,this._pos=new Map,this._busy=!1}static get observedAttributes(){return["min","gap"]}get columns(){return this._cols}items(){return p(this)}mount(){if(this.layout(!1),"function"==typeof ResizeObserver){let t=this.clientWidth;const e=new ResizeObserver(()=>{Math.abs(this.clientWidth-t)<2||(t=this.clientWidth,this.layout(!0))});e.observe(this),this.onCleanup(()=>e.disconnect())}if("function"==typeof MutationObserver){const t=new MutationObserver(()=>!this._busy&&this.layout(!0));t.observe(this,{childList:!0}),this.onCleanup(()=>t.disconnect())}this.listen(this,"load",()=>this.layout(!1),{capture:!0})}layout(t=!0){const e=Math.max(0,this.num("gap",12)),s=Math.max(60,this.num("min",160)),i=this.clientWidth||1,a=Math.max(1,Math.floor((i+e)/(s+e))),r=(i-e*(a-1))/a,n=new Array(a).fill(0),o=this.items();for(const s of o){const i=s.hasAttribute("data-hidden");if(s.style.width=`${r}px`,i)continue;const a=n.indexOf(Math.min(...n)),o=a*(r+e),l=n[a];n[a]+=(s.offsetHeight||0)+e;const c=this._pos.get(s);s.style.transform=`translate(${o.toFixed(1)}px,${l.toFixed(1)}px)`,!t||this.reduced||!c||c[0]===o&&c[1]===l?!t||this.reduced||c||this.motion(s,[{opacity:0,transform:`translate(${o.toFixed(1)}px,${(l+20).toFixed(1)}px) scale(.9)`},{opacity:1,transform:`translate(${o.toFixed(1)}px,${l.toFixed(1)}px)`}],{duration:420,easing:"cubic-bezier(.22,1,.36,1)"}):this.motion(s,[{transform:`translate(${c[0].toFixed(1)}px,${c[1].toFixed(1)}px)`},{transform:`translate(${o.toFixed(1)}px,${l.toFixed(1)}px)`}],{duration:520,easing:"cubic-bezier(.22,1,.36,1)"}),this._pos.set(s,[o,l])}for(const t of Array.from(this._pos.keys()))o.includes(t)&&!t.hasAttribute("data-hidden")||this._pos.delete(t);this.style.height=`${Math.max(0,Math.max(...n)-e)}px`;const l=a!==this._cols;this._cols=a,(l||t)&&this.emit("layout",{columns:a})}filter(t){const e="string"==typeof t?e=>e.matches(t):t||(()=>!0);for(const t of this.items()){const s=e(t);if(s!==!t.hasAttribute("data-hidden"))if(s)t.removeAttribute("data-hidden");else if(this.reduced)t.setAttribute("data-hidden","");else{const e=t.style.transform,s=this.motion(t,[{opacity:1,transform:e},{opacity:0,transform:`${e} scale(.6)`}],{duration:260,easing:"ease-in"});if(t.setAttribute("data-hidden",""),s){t.setAttribute("data-leaving","");const e=()=>t.removeAttribute("data-leaving");s.finished.then(e,e)}}}this.layout(!0)}reorder(t){this._busy=!0;for(const e of t)this.append(e);this._busy=!1,this.layout(!0)}shuffle(){const t=this.items();for(let e=t.length-1;e>0;e--){const s=Math.floor(Math.random()*(e+1));[t[e],t[s]]=[t[s],t[e]]}this.reorder(t)}sort(t){this.reorder(this.items().sort(t))}},{id:"masonry-flow",text:"usa-masonry-flow{position:relative;display:block;width:100%}usa-masonry-flow>*{position:absolute;left:0;top:0;box-sizing:border-box;margin:0;will-change:transform}usa-masonry-flow>[data-hidden]:not([data-leaving]){display:none}usa-masonry-flow>[data-leaving]{pointer-events:none}"})}function st(t="usa-compare"){return l(t,t=>class extends t{constructor(){super(...arguments),this._p=50,this._after=null,this._handle=null}static get observedAttributes(){return["orientation","labels"]}get position(){return this._p}set position(t){this.set(t,!1)}get vertical(){return"vertical"===this.str("orientation","horizontal")}mount(){this.querySelectorAll(":scope > [data-usa-part]").forEach(t=>t.remove());const[t,e]=p(this);this.dataset.orientation=this.vertical?"vertical":"horizontal",t?.classList.add("usa-cmp-before"),e?.classList.add("usa-cmp-after"),this._after=e||null;const[s,i]=this.str("labels","").split(",").map(t=>t.trim());s&&this.append(Object.assign(f("span","usa-cmp-label usa-cmp-label-b",{"aria-hidden":"true"}),{textContent:s})),i&&this.append(Object.assign(f("span","usa-cmp-label usa-cmp-label-a",{"aria-hidden":"true"}),{textContent:i}));const a=f("span","usa-cmp-handle",{"aria-hidden":"true"},'<span class="usa-cmp-knob"><svg viewBox="0 0 24 24" width="18" height="18"><path d="M9 6l-6 6 6 6M15 6l6 6-6 6" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/></svg></span>');this.append(a),this._handle=a,this.setAttribute("role","slider"),this.tabIndex=0,this.setAttribute("aria-valuemin","0"),this.setAttribute("aria-valuemax","100"),this.setAttribute("aria-orientation",this.vertical?"vertical":"horizontal"),this.hasAttribute("aria-label")||this.setAttribute("aria-label",this.str("label","Compare before and after")),this.set(this.num("position",50),!1);let r=!1;const n=t=>{const e=this.getBoundingClientRect();return this.vertical?(t.clientY-e.top)/(e.height||1)*100:(t.clientX-e.left)/(e.width||1)*100};this.listen(this,"pointerdown",t=>{r=!0,this.setPointerCapture?.(t.pointerId),this.set(n(t),!0,!t.target.closest(".usa-cmp-handle"))}),this.listen(this,"pointermove",t=>{(r||this.flag("hover"))&&this.set(n(t),!0)});const o=()=>r=!1;if(this.listen(this,"pointerup",o),this.listen(this,"pointercancel",o),this.listen(this,"keydown",t=>{const e={ArrowLeft:-2,ArrowDown:-2,ArrowRight:2,ArrowUp:2,PageDown:-10,PageUp:10};if(this.vertical&&Object.assign(e,{ArrowDown:2,ArrowUp:-2}),"Home"===t.key)this.set(0,!0);else if("End"===t.key)this.set(100,!0);else{if(!(t.key in e))return;this.set(this._p+e[t.key],!0)}t.preventDefault()}),this.flag("intro")&&!this.reduced){let t=!1;this.inView(e=>{if(!e||t)return;t=!0;const s=this._p,i=performance.now(),a=t=>{const e=Math.min(1,(t-i)/1400);this.paint(s+22*Math.sin(e*Math.PI*2)*(1-e)),e<1&&"function"==typeof requestAnimationFrame?requestAnimationFrame(a):this.paint(s)};"function"==typeof requestAnimationFrame&&requestAnimationFrame(a)},{threshold:.5})}}paint(t){const e=h(t,0,100);this._after&&(this._after.style.clipPath=this.vertical?`inset(${e}% 0 0 0)`:`inset(0 0 0 ${e}%)`),this._handle&&(this._handle.style[this.vertical?"top":"left"]=`${e}%`),this.style.setProperty("--usa-cmp",`${e}%`)}set(t,e,s=!1){const i=Math.round(10*h(t,0,100))/10,a=this._p;if(this._p=i,this.setAttribute("aria-valuenow",String(Math.round(i))),this.setAttribute("aria-valuetext",`${Math.round(i)}%`),s&&!this.reduced&&this._after&&this._handle){const t=this.vertical?"top":"left",e=t=>this.vertical?`inset(${t}% 0 0 0)`:`inset(0 0 0 ${t}%)`;this.motion(this._after,[{clipPath:e(a)},{clipPath:e(i)}],{duration:320,easing:"cubic-bezier(.22,1,.36,1)"}),this.motion(this._handle,[{[t]:`${a}%`},{[t]:`${i}%`}],{duration:320,easing:"cubic-bezier(.22,1,.36,1)"})}this.paint(i),e&&a!==i&&this.emit("change",{position:i})}},{id:"compare",text:'usa-compare{position:relative;display:grid;overflow:hidden;border-radius:var(--usa-cmp-radius,14px);user-select:none;touch-action:pan-y;cursor:ew-resize;--usa-cmp-line:#fff;outline-offset:3px}usa-compare[data-orientation="vertical"]{touch-action:pan-x;cursor:ns-resize}usa-compare>.usa-cmp-before,usa-compare>.usa-cmp-after{grid-area:1/1;display:block;width:100%;height:100%;object-fit:cover;pointer-events:none}.usa-cmp-handle{position:absolute;top:0;bottom:0;left:50%;width:0;z-index:2;pointer-events:none}.usa-cmp-handle::before{content:"";position:absolute;top:0;bottom:0;left:-1.5px;width:3px;background:var(--usa-cmp-line);box-shadow:0 0 8px rgba(0,0,0,.35)}usa-compare[data-orientation="vertical"] .usa-cmp-handle{top:50%;bottom:auto;left:0;right:0;width:auto;height:0}usa-compare[data-orientation="vertical"] .usa-cmp-handle::before{left:0;right:0;top:-1.5px;width:auto;height:3px}.usa-cmp-knob{position:absolute;top:50%;left:0;display:grid;place-items:center;width:40px;height:40px;margin:-20px 0 0 -20px;border-radius:50%;background:var(--usa-cmp-line);color:#111827;box-shadow:0 6px 18px rgba(0,0,0,.35);pointer-events:auto;cursor:grab;transition:transform .2s}usa-compare[data-orientation="vertical"] .usa-cmp-knob{left:50%;top:0;transform:rotate(90deg)}usa-compare:active .usa-cmp-knob{transform:scale(.92)}usa-compare[data-orientation="vertical"]:active .usa-cmp-knob{transform:rotate(90deg) scale(.92)}.usa-cmp-label{position:absolute;top:10px;z-index:1;padding:3px 9px;border-radius:999px;background:rgba(0,0,0,.55);color:#fff;font:600 12px/1.4 system-ui,sans-serif;pointer-events:none}.usa-cmp-label-b{left:10px}.usa-cmp-label-a{right:10px}'})}function it(t="usa-cube-gallery"){return l(t,t=>class extends t{constructor(){super(...arguments),this._slides=[],this._i=0,this._stage=null,this._busy=!1,this._timer=0}static get observedAttributes(){return["axis","autoplay"]}get index(){return this._i}mount(){this.querySelectorAll(":scope > [data-usa-part]").forEach(t=>t.remove()),this._slides=p(this),this.dataset.axis="x"===this.str("axis","y")?"x":"y",this.setAttribute("role","region"),this.setAttribute("aria-roledescription","carousel"),this.hasAttribute("aria-label")||this.setAttribute("aria-label",this.str("label","Gallery")),this.tabIndex=0;const t=f("div","usa-cube-stage");this._slides.forEach((e,s)=>{e.classList.add("usa-cube-face"),e.setAttribute("role","group"),e.setAttribute("aria-roledescription","slide"),e.setAttribute("aria-label",`${s+1} of ${this._slides.length}`),t.append(e)}),this.append(t),this._stage=t;const e=f("button","usa-cube-btn usa-cube-prev",{type:"button","aria-label":"Previous slide"},"‹"),s=f("button","usa-cube-btn usa-cube-next",{type:"button","aria-label":"Next slide"},"›");this.append(e,s),this.listen(e,"click",()=>this.prev()),this.listen(s,"click",()=>this.next()),this.listen(this,"keydown",t=>{if(t.target===this){if("ArrowRight"===t.key||"ArrowDown"===t.key)this.next();else{if("ArrowLeft"!==t.key&&"ArrowUp"!==t.key)return;this.prev()}t.preventDefault()}});let i=NaN;this.listen(t,"pointerdown",t=>i="x"===this.dataset.axis?t.clientY:t.clientX),this.listen(t,"pointerup",t=>{if(Number.isNaN(i))return;const e=("x"===this.dataset.axis?t.clientY:t.clientX)-i;i=NaN,Math.abs(e)>40&&(e<0?this.next():this.prev())}),this._i=Math.min(this._i,Math.max(0,this._slides.length-1)),this.show();const a=this.num("autoplay",0);if(a>0&&!this.reduced){let t=!1,e=!0;const s=e=>t=e;this.listen(this,"pointerenter",()=>s(!0)),this.listen(this,"pointerleave",()=>s(!1)),this.listen(this,"focusin",()=>s(!0)),this.listen(this,"focusout",()=>s(!1)),this.inView(t=>e=t),this._timer=setInterval(()=>!t&&e&&this.next(),Math.max(1200,a)),this.onCleanup(()=>this._timer&&clearInterval(this._timer))}}show(){this._slides.forEach((t,e)=>{const s=e===this._i;t.toggleAttribute("data-active",s),t.inert=!s,t.style.transform=""})}goTo(t){const e=this._slides.length;if(!e||this._busy)return;const s=(t%e+e)%e;if(s===this._i)return;const i=this._i,a=s>i&&(0!==i||s!==e-1)||i===e-1&&0===s?1:-1,r=this._slides[i],n=this._slides[s];if(this._i=s,this.emit("change",{index:s,from:i}),this.reduced||!this._stage)return this.show(),void this.motion(n,[{opacity:0},{opacity:1}],{duration:200});const o="x"===this.dataset.axis?"X":"Y",l=`${((("Y"===o?this.offsetWidth:this.offsetHeight)||280)/2).toFixed(1)}px`,c="Y"===o?`rotateY(${90*a}deg) translateZ(${l})`:`rotateX(${90*-a}deg) translateZ(${l})`;n.setAttribute("data-active",""),n.style.transform=c,r.style.transform=`translateZ(${l})`,this._busy=!0;const u="Y"===o?`rotateY(${90*-a}deg)`:`rotateX(${90*a}deg)`,d=this.motion(this._stage,[{transform:`translateZ(-${l}) rotate${o}(0deg)`},{transform:`translateZ(-${l}) ${u}`}],{duration:780,easing:"cubic-bezier(.65,.05,.3,1)"}),h=()=>{this._busy=!1,this.show()};d?d.finished.then(h,h):h()}next(){this.goTo(this._i+1)}prev(){this.goTo(this._i-1)}},{id:"cube-gallery",text:"usa-cube-gallery{position:relative;display:block;aspect-ratio:4/3;perspective:1100px;outline-offset:4px}.usa-cube-stage{position:absolute;inset:0;transform-style:preserve-3d;touch-action:pan-y}.usa-cube-face{position:absolute;inset:0;box-sizing:border-box;margin:0;backface-visibility:hidden;display:none;overflow:hidden;border-radius:var(--usa-cube-radius,14px)}.usa-cube-face[data-active]{display:block}.usa-cube-face>img{width:100%;height:100%;object-fit:cover;display:block}.usa-cube-btn{position:absolute;top:50%;z-index:2;width:34px;height:34px;margin-top:-17px;border:0;border-radius:50%;background:rgba(255,255,255,.85);color:#111827;font:700 20px/1 system-ui,sans-serif;cursor:pointer;box-shadow:0 4px 12px rgba(0,0,0,.25)}.usa-cube-prev{left:8px}.usa-cube-next{right:8px}.usa-cube-btn:focus-visible{outline:2px solid #7c5cff;outline-offset:2px}"})}const at={6.2:{"usa-carousel":y,"usa-tab-bar":w,"usa-disclosure":E,"usa-stories":C},6.3:{"usa-toast-stack":O,"usa-modal":N,"usa-sheet":I,"usa-menu":W},6.4:{"usa-progress-ring":U,"usa-odometer":V,"usa-skeleton-reveal":K,"usa-star-rating":Q},6.5:{"usa-milestones":tt,"usa-masonry-flow":et,"usa-compare":st,"usa-cube-gallery":it}},rt=Object.values(at).flatMap(t=>Object.keys(t));function nt(t){for(const[e,s]of Object.entries(at))if(!t||t===e)for(const[t,e]of Object.entries(s))e(t)}var ot;const lt=["enter","exit","attention","click","hover","card","loop","page","background","text","cursor","scroll"],ct=Symbol.for("use-scroll-animate.effects"),ut=(ot=globalThis)[ct]||(ot[ct]=new Map);function dt(t,e={}){if(!/^[a-z][a-z0-9-]*$/.test(t.name))throw new Error(`[motionary] invalid effect name "${t.name}"`);if(!lt.includes(t.kind))throw new Error(`[motionary] unknown effect kind "${t.kind}"`);if(ut.has(t.name)&&!e.override)throw new Error(`[motionary] effect "${t.name}" is already registered`);return ut.set(t.name,t),()=>{ut.get(t.name)===t&&ut.delete(t.name)}}function ht(t){for(const e of t)ut.has(e.name)||dt(e)}let pt=null;function ft(){return pt?.isConnected||(pt=document.createElement("div"),pt.setAttribute("aria-hidden","true"),pt.setAttribute("data-usa-fx-layer",""),pt.style.cssText="position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:2147483000;contain:strict",document.body.appendChild(pt)),pt}function mt(t,e,s,i,a,r,n=""){const o=document.createElement("span");o.style.cssText=`position:absolute;left:${t}px;top:${e}px;${s}`,n&&(o.textContent=n),ft().appendChild(o);const l=i.animate(o,a,{fill:"forwards",...r}),c=()=>o.remove();return l?l.finished.then(c,c):c(),l}function bt(t,e){const s=document.createElement("span");return s.setAttribute("aria-hidden","true"),s.style.cssText=`position:absolute;inset:0;pointer-events:none;border-radius:inherit;${e}`,"static"===getComputedStyle(t).position&&(t.style.position="relative"),t.appendChild(s),[s,()=>s.remove()]}const gt=["#7c5cff","#ff5c8a","#22d3ee","#facc15","#34d399"],xt=(t,e)=>t+Math.random()*(e-t),yt=t=>Promise.all(t.filter(Boolean).map(t=>t.finished.catch(()=>{})));function vt(t,e,s=0){return(Math.sin(1.7*t+s)*Math.cos(1.3*e-.7*s)+.5*Math.sin(.9*(t+e)+.5*s)+.5*Math.cos(.6*t-1.1*e-.3*s))/2}function wt(t){const e=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(t.trim());return e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:[124,92,255]}function _t(t,e,s,i){const a=document.createElement("canvas");a.setAttribute("aria-hidden","true"),a.setAttribute("data-usa-fx-canvas",""),a.style.cssText="position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:-1;border-radius:inherit";const r=[],n=(e,s)=>{r.push([e,t.style[e]]),t.style[e]=s};"static"===getComputedStyle(t).position&&n("position","relative"),n("isolation","isolate"),t.prepend(a);const o=a.getContext("2d");let l=0,c=!0,u=Math.min(1,Math.max(.35,Number(i.quality)||1)),d=0,h=0,p=null;const f=performance.now();let m=f,b=0,g=0;const x=()=>{const e=t.getBoundingClientRect();d=Math.max(1,Math.round(e.width)),h=Math.max(1,Math.round(e.height));const r=Math.min(2,("number"==typeof devicePixelRatio?devicePixelRatio:1)||1)*u;a.width=Math.max(1,Math.round(d*r)),a.height=Math.max(1,Math.round(h*r)),o&&o.setTransform(r,0,0,r,0,0),p=s.init?s.init(d,h,i):{}},y=t=>{if(l=0,!o)return;const e=t-m;m=t,e>28?b++:e<18&&g++,b>20&&u>.35?(u=Math.max(.35,u-.15),b=g=0,x()):g>240&&u<1&&(u=Math.min(1,u+.15),b=g=0,x()),s.draw({ctx:o,w:d,h:h,t:(t-f)/1e3,quality:u,state:p,o:i}),c&&!document.hidden&&(l=requestAnimationFrame(y))},v=()=>{l||!o||e.reduced||(m=performance.now(),l=requestAnimationFrame(y))};x(),o&&s.draw({ctx:o,w:d,h:h,t:0,quality:u,state:p,o:i});const w="function"==typeof IntersectionObserver?new IntersectionObserver(t=>{c=t.some(t=>t.isIntersecting),c&&v()}):null;w?.observe(t);const _="function"==typeof ResizeObserver?new ResizeObserver(()=>{x(),o&&e.reduced&&s.draw({ctx:o,w:d,h:h,t:0,quality:u,state:p,o:i})}):null;_?.observe(t);const k=()=>!document.hidden&&c&&v();return document.addEventListener("visibilitychange",k),v(),()=>{cancelAnimationFrame(l),l=0,w?.disconnect(),_?.disconnect(),document.removeEventListener("visibilitychange",k),a.remove();for(const[e,s]of r)t.style[e]=s}}const kt=(t,e,s,i)=>({name:t,kind:"background",description:e,reduced:"run",defaults:{colors:gt,background:"#0b0d12",speed:1,quality:1,...s},run:(t,e,s)=>_t(t,s,i,e)});function At(t,e,s){const i=Math.max(2,Math.round(e/t.quality)),a=Math.max(1,Math.ceil(t.w/i)),r=Math.max(1,Math.ceil(t.h/i)),n=t.state;if(n.buf&&n.buf.width===a&&n.buf.height===r||(n.buf=document.createElement("canvas"),n.buf.width=a,n.buf.height=r,n.bctx=n.buf.getContext("2d"),n.img=n.bctx?.createImageData(a,r)),!n.bctx||!n.img)return;const o=n.img.data;for(let t=0;t<r;t++)for(let e=0;e<a;e++)s(e*i,t*i,o,4*(t*a+e));n.bctx.putImageData(n.img,0,0),t.ctx.imageSmoothingEnabled=!0,t.ctx.drawImage(n.buf,0,0,t.w,t.h)}kt("flow-field","Particles drift along a slowly changing flow field, leaving silky trails.",{count:600,fade:.06},{init:(t,e,s)=>({p:Array.from({length:s.count},()=>[Math.random()*t,Math.random()*e])}),draw:({ctx:t,w:e,h:s,t:i,state:a,o:r,quality:n})=>{t.fillStyle=r.background,t.globalAlpha=0===i?1:r.fade,t.fillRect(0,0,e,s),t.globalAlpha=.8;const o=Math.round(a.p.length*n),l=0===i?40:1;for(let n=0;n<o;n++){const o=a.p[n];t.fillStyle=r.colors[n%r.colors.length];for(let a=0;a<l;a++){const a=vt(.004*o[0],.004*o[1],.15*i*r.speed)*Math.PI*2;o[0]+=1.2*Math.cos(a)*r.speed,o[1]+=1.2*Math.sin(a)*r.speed,(o[0]<0||o[0]>e||o[1]<0||o[1]>s)&&(o[0]=Math.random()*e,o[1]=Math.random()*s),t.fillRect(o[0],o[1],1.4,1.4)}}t.globalAlpha=1}}),kt("voronoi","Drifting Voronoi cells in the palette, with darker borders.",{seeds:14,cell:6},{init:(t,e,s)=>({s:Array.from({length:s.seeds},(i,a)=>({x:Math.random()*t,y:Math.random()*e,vx:Math.random()-.5,vy:Math.random()-.5,c:wt(s.colors[a%s.colors.length])}))}),draw:t=>{const{w:e,h:s,state:i,o:a}=t;for(const t of i.s)t.x+=t.vx*a.speed,t.y+=t.vy*a.speed,(t.x<0||t.x>e)&&(t.vx*=-1),(t.y<0||t.y>s)&&(t.vy*=-1);At(t,a.cell,(t,e,s,a)=>{let r=1/0,n=1/0,o=i.s[0].c;for(const s of i.s){const i=(s.x-t)**2+(s.y-e)**2;i<r?(n=r,r=i,o=s.c):i<n&&(n=i)}const l=Math.sqrt(n)-Math.sqrt(r)<6?.55:1;s[a]=o[0]*l,s[a+1]=o[1]*l,s[a+2]=o[2]*l,s[a+3]=255})}}),kt("mesh-gradient","Soft blobs of colour orbit and blend into a living mesh gradient.",{blobs:4,blur:.65},{draw:({ctx:t,w:e,h:s,t:i,o:a})=>{t.fillStyle=a.background,t.fillRect(0,0,e,s);const r=Math.max(e,s)*a.blur;for(let n=0;n<a.blobs;n++){const o=.25*i*a.speed+n*Math.PI*2/a.blobs,l=e/2+Math.cos(o*(1+.13*n))*e*.32,c=s/2+Math.sin(o*(.8+.11*n))*s*.32,[u,d,h]=wt(a.colors[n%a.colors.length]),p=t.createRadialGradient(l,c,0,l,c,r);p.addColorStop(0,`rgba(${u},${d},${h},0.7)`),p.addColorStop(1,`rgba(${u},${d},${h},0)`),t.fillStyle=p,t.fillRect(0,0,e,s)}}}),kt("starfield","Stars stream toward the viewer (warp speed with `speed: 4`).",{stars:400,color:"#ffffff"},{init:(t,e,s)=>({s:Array.from({length:s.stars},()=>[2*Math.random()-1,2*Math.random()-1,Math.random()])}),draw:({ctx:t,w:e,h:s,t:i,state:a,o:r,quality:n})=>{t.fillStyle=r.background,t.fillRect(0,0,e,s),t.fillStyle=r.color;const o=Math.round(a.s.length*n);for(let n=0;n<o;n++){const o=a.s[n];i>0&&(o[2]-=.004*r.speed),o[2]<=.01&&(o[0]=2*Math.random()-1,o[1]=2*Math.random()-1,o[2]=1);const l=e/2+o[0]/o[2]*e*.5,c=s/2+o[1]/o[2]*s*.5;if(l<0||l>e||c<0||c>s)continue;const u=2.6*(1-o[2]);t.globalAlpha=Math.min(1,1.6*(1-o[2])),t.fillRect(l,c,u,u)}t.globalAlpha=1}}),kt("metaballs","Gooey blobs that merge and split (low-resolution field, scaled up).",{balls:6,cell:5,threshold:1},{init:(t,e,s)=>({b:Array.from({length:s.balls},()=>({x:Math.random()*t,y:Math.random()*e,vx:1.6*(Math.random()-.5),vy:1.6*(Math.random()-.5),r:Math.min(t,e)*(.08+.08*Math.random())}))}),draw:t=>{const{w:e,h:s,state:i,o:a}=t;for(const t of i.b)t.x+=t.vx*a.speed,t.y+=t.vy*a.speed,(t.x<0||t.x>e)&&(t.vx*=-1),(t.y<0||t.y>s)&&(t.vy*=-1);const[r,n,o]=wt(a.colors[0]),[l,c,u]=wt(a.colors[1]||a.colors[0]),[d,h,p]=wt(a.background);At(t,a.cell,(t,e,s,f)=>{let m=0;for(const s of i.b)m+=s.r*s.r/((s.x-t)**2+(s.y-e)**2+1);const b=m>=a.threshold,g=Math.min(1,.8*(m-a.threshold));s[f]=b?r+(l-r)*g:d,s[f+1]=b?n+(c-n)*g:h,s[f+2]=b?o+(u-o)*g:p,s[f+3]=255})}}),kt("contours","Topographic contour lines over a slowly shifting height field.",{levels:9,cell:4,color:"#7c5cff"},{draw:t=>{const{t:e,o:s}=t,[i,a,r]=wt(s.color),[n,o,l]=wt(s.background),c=(t,i)=>(vt(.006*t,.006*i,.2*e*s.speed)+1)/2,u=Math.max(2,Math.round(s.cell/t.quality));At(t,s.cell,(t,e,d,h)=>{const p=Math.floor(c(t,e)*s.levels),f=p!==Math.floor(c(t+u,e)*s.levels)||p!==Math.floor(c(t,e+u)*s.levels),m=.12+p/s.levels*.18;d[h]=f?i:n+(i-n)*m,d[h+1]=f?a:o+(a-o)*m,d[h+2]=f?r:l+(r-l)*m,d[h+3]=255})}});const Mt="#version 300 es\nprecision highp float;\nuniform vec2 u_res;uniform float u_t;uniform vec3 u_c0,u_c1,u_c2;uniform vec2 u_ptr;uniform float u_speed,u_scale;\nout vec4 o;\nfloat h(vec2 p){return fract(sin(dot(p,vec2(127.1,311.7)))*43758.5453);}\nfloat n(vec2 p){vec2 i=floor(p),f=fract(p);f=f*f*(3.-2.*f);return mix(mix(h(i),h(i+vec2(1,0)),f.x),mix(h(i+vec2(0,1)),h(i+1.),f.x),f.y);}\nfloat fbm(vec2 p){float v=0.,a=.5;for(int k=0;k<5;k++){v+=a*n(p);p=p*2.03+vec2(1.7,9.2);a*=.5;}return v;}\n";let $t=null;function St(){if(null!==$t)return $t;try{$t="undefined"!=typeof document&&!!document.createElement("canvas").getContext("webgl2")}catch{$t=!1}return $t}function Et(t,e,s,i){const a=()=>{t.dataset.usaBackend="canvas";const a=_t(t,e,s.fallback,i);return()=>{a(),delete t.dataset.usaBackend}};if("canvas"===i.backend||!St())return a();const r=document.createElement("canvas"),n=r.getContext("webgl2",{alpha:!1,antialias:!1,preserveDrawingBuffer:!1}),o=n&&function(t,e){const s=(e,s)=>{const i=t.createShader(e);return t.shaderSource(i,s),t.compileShader(i),t.getShaderParameter(i,t.COMPILE_STATUS)?i:null},i=s(t.VERTEX_SHADER,"#version 300 es\nin vec2 a;void main(){gl_Position=vec4(a,0.,1.);}"),a=s(t.FRAGMENT_SHADER,e);if(!i||!a)return null;const r=t.createProgram();return t.attachShader(r,i),t.attachShader(r,a),t.bindAttribLocation(r,0,"a"),t.linkProgram(r),t.getProgramParameter(r,t.LINK_STATUS)?r:null}(n,`${Mt}void main(){vec2 uv=gl_FragCoord.xy/u_res;vec2 p=uv*vec2(u_res.x/u_res.y,1.)*u_scale;float t=u_t*u_speed;${s.body}}`);if(!n||!o)return a();t.dataset.usaBackend="webgl2",r.setAttribute("aria-hidden","true"),r.setAttribute("data-usa-fx-canvas",""),r.style.cssText="position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:-1;border-radius:inherit";const l=[],c=(e,s)=>{l.push([e,t.style[e]]),t.style[e]=s};"static"===getComputedStyle(t).position&&c("position","relative"),c("isolation","isolate"),t.prepend(r),n.useProgram(o);const u=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,u),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,3,-1,-1,3]),n.STATIC_DRAW),n.enableVertexAttribArray(0),n.vertexAttribPointer(0,2,n.FLOAT,!1,0,0);const d=t=>n.getUniformLocation(o,t),h=i.colors||[];["u_c0","u_c1","u_c2"].forEach((t,e)=>n.uniform3fv(d(t),wt(h[e]||h[0]||"#7c5cff").map(t=>t/255))),n.uniform1f(d("u_speed"),Number(i.speed)||1),n.uniform1f(d("u_scale"),Number(i.scale)||3);const p=d("u_res"),f=d("u_t"),m=d("u_ptr");let b=[.5,.5],g=Math.min(1,Math.max(.3,Number(i.quality)||.75)),x=0,y=!0,v=0,w=0;const _=performance.now(),k=()=>{const e=t.getBoundingClientRect(),s=Math.min(2,devicePixelRatio||1)*g;r.width=Math.max(1,Math.round(e.width*s)),r.height=Math.max(1,Math.round(e.height*s)),n.viewport(0,0,r.width,r.height),n.uniform2f(p,r.width,r.height)},A=t=>{n.uniform1f(f,t),n.uniform2f(m,b[0],b[1]),n.drawArrays(n.TRIANGLES,0,3)},M=t=>{x=0,w&&t-w>34&&++v>24&&g>.3&&(g=Math.max(.3,g-.15),v=0,k()),w=t,A((t-_)/1e3),y&&!document.hidden&&(x=requestAnimationFrame(M))},$=()=>{x||e.reduced||(x=requestAnimationFrame(M))};k(),A(e.reduced?7:0);const S=e=>{const s=t.getBoundingClientRect();b=[(e.clientX-s.left)/Math.max(1,s.width),1-(e.clientY-s.top)/Math.max(1,s.height)]};t.addEventListener("pointermove",S);const E="function"==typeof IntersectionObserver?new IntersectionObserver(t=>(y=t.some(t=>t.isIntersecting))&&$()):null;E?.observe(t);const C="function"==typeof ResizeObserver?new ResizeObserver(()=>(k(),e.reduced&&A(7))):null;C?.observe(t);const F=()=>!document.hidden&&y&&$();document.addEventListener("visibilitychange",F);let z=null;const T=t=>{t.preventDefault(),L(),z=a()};r.addEventListener("webglcontextlost",T);const L=()=>{cancelAnimationFrame(x),x=0,E?.disconnect(),C?.disconnect(),t.removeEventListener("pointermove",S),document.removeEventListener("visibilitychange",F),r.removeEventListener("webglcontextlost",T),r.remove();for(const[e,s]of l)t.style[e]=s};return $(),()=>{if(z)return z();L(),n.getExtension("WEBGL_lose_context")?.loseContext(),delete t.dataset.usaBackend}}function Ct(t,e=8){return{init:(t,s)=>{const i=document.createElement("canvas");i.width=Math.max(2,Math.ceil(t/e)),i.height=Math.max(2,Math.ceil(s/e));const a=i.getContext("2d");return{c:i,x:a,img:a?.createImageData(i.width,i.height)}},draw:({ctx:e,w:s,h:i,t:a,state:r,o:n})=>{const{c:o,x:l,img:c}=r;if(!l||!c)return;const u=c.data;for(let e=0;e<o.height;e++)for(let s=0;s<o.width;s++){const[i,r,l]=t(s/o.width,1-e/o.height,a*(Number(n.speed)||1),n),c=4*(e*o.width+s);u[c]=i,u[c+1]=r,u[c+2]=l,u[c+3]=255}l.putImageData(c,0,0),e.imageSmoothingEnabled=!0,e.drawImage(o,0,0,s,i)}}}const Ft=(t,e,s)=>{const i=Math.min(1,Math.max(0,s));return[t[0]+(e[0]-t[0])*i,t[1]+(e[1]-t[1])*i,t[2]+(e[2]-t[2])*i]},zt=(t,e,s)=>{const i=Math.min(1,Math.max(0,(s-t)/(e-t)));return i*i*(3-2*i)},Tt=(t,e,s=0)=>.5+.35*vt(t,e,s)+.15*vt(2.1*t+3,2.1*e-1,1.3*s),Lt=(t,e,s,i,a={})=>({name:t,kind:"background",description:e,reduced:"run",defaults:{colors:s,speed:1,scale:3,quality:.75,backend:"auto",...a},run:(t,e,s)=>{const a=Et(t,s,i,e);return s.onCleanup(a),a}}),qt=t=>t.colors.map(wt),Rt=[Lt("fluid","Domain-warped fluid colors that swirl around the pointer (WebGL2, Canvas 2D fallback).",["#1b1446","#7c5cff","#22d3ee"],{body:"vec2 q=vec2(fbm(p+t*.1),fbm(p+vec2(5.2,1.3)-t*.08));vec2 d=uv-u_ptr;q+=.5*exp(-dot(d,d)*14.)*vec2(sin(t*1.3),cos(t*1.1));float f=fbm(p+3.*q+t*.05);vec3 c=mix(u_c0,u_c1,clamp(f*1.7-.2,0.,1.));c=mix(c,u_c2,clamp(length(q)*1.1-.45,0.,1.));o=vec4(c,1.);",fallback:Ct((t,e,s,i)=>{const[a,r,n]=qt(i),o=Tt(3*t+.1*s,3*e),l=Tt(3*t+2*o,3*e+2*o,.3*s);return Ft(Ft(a,r,1.7*l-.2),n,1.1*o-.45)})}),Lt("smoke","Soft smoke rising and curling (WebGL2, Canvas 2D fallback).",["#0f172a","#cbd5e1","#64748b"],{body:"vec2 s=p;s.y-=t*.25;float f=fbm(s+fbm(s*1.5+t*.1));float a=smoothstep(.38,.92,f)*(1.05-uv.y*.55);o=vec4(mix(u_c0,mix(u_c2,u_c1,f),a),1.);",fallback:Ct((t,e,s,i)=>{const[a,r,n]=qt(i),o=Tt(3*t,3*e-.25*s,.2*s);return Ft(a,Ft(n,r,o),zt(.38,.92,o)*(1.05-.55*e))})}),Lt("fire","Licking flames from the bottom edge (WebGL2, Canvas 2D fallback).",["#140404","#e2401b","#fbbf24"],{body:"vec2 s=p*vec2(1.,1.4);s.y-=t*.9;float f=fbm(s*1.6+fbm(s*2.+t*.3));float g=f*(1.3-uv.y)*1.7-.3;vec3 c=mix(u_c0,u_c1,smoothstep(0.,.4,g));c=mix(c,u_c2,smoothstep(.35,.72,g));c=mix(c,vec3(1.,.96,.82),smoothstep(.72,1.05,g));o=vec4(c,1.);",fallback:Ct((t,e,s,i)=>{const[a,r,n]=qt(i),o=Tt(4*t,5*e-.9*s,s)*(1.3-e)*1.7-.3;return Ft(Ft(Ft(a,r,zt(0,.4,o)),n,zt(.35,.72,o)),[255,245,210],zt(.72,1.05,o))},6)}),Lt("ink","Ink blooming and drifting in water on a paper background (WebGL2, Canvas 2D fallback).",["#f6f1e7","#1e1b4b","#be185d"],{body:"vec2 q=vec2(fbm(p*.8+t*.04),fbm(p*.8+vec2(3.1,7.7)+t*.05));float f=fbm(p*1.2+2.5*q);float b=smoothstep(.48,.74,f+.12*sin(t*.4));o=vec4(mix(u_c0,mix(u_c1,u_c2,clamp(q.x*1.4-.2,0.,1.)),b),1.);",fallback:Ct((t,e,s,i)=>{const[a,r,n]=qt(i),o=Tt(2*t+.04*s,2*e),l=Tt(3*t+2.5*o,3*e+2.5*o,.1*s);return Ft(a,Ft(r,n,1.4*o-.2),zt(.48,.74,l))})},{scale:2.4}),Lt("fireflies","Glowing fireflies wandering and blinking at dusk (WebGL2, Canvas 2D fallback).",["#06121f","#facc15","#a3e635"],{body:"vec3 c=u_c0*(.55+.45*uv.y);float ar=u_res.x/u_res.y;for(int i=0;i<28;i++){float fi=float(i);vec2 b=vec2(h(vec2(fi,1.)),h(vec2(fi,2.)));vec2 pos=fract(b+.07*vec2(sin(t*.3+fi),cos(t*.23+fi*1.7)));vec2 d=(uv-pos)*vec2(ar,1.);float k=.5+.5*sin(t*(1.+h(vec2(fi,3.))*2.)+fi*2.1);c+=mix(u_c1,u_c2,h(vec2(fi,4.)))*k*.00055/(dot(d,d)+.0003);}o=vec4(min(c,vec3(1.)),1.);",fallback:{init:(t,e)=>({f:Array.from({length:28},()=>[Math.random(),Math.random(),6*Math.random(),Math.random()])}),draw:({ctx:t,w:e,h:s,t:i,state:a,o:r})=>{t.fillStyle=r.colors[0],t.fillRect(0,0,e,s);for(const[n,o,l,c]of a.f){const a=(n+.07*Math.sin(.3*i+l))%1*e,u=(o+.07*Math.cos(.23*i+l))%1*s,d=.5+.5*Math.sin(2*i+3*l),h=t.createRadialGradient(a,u,0,a,u,14);h.addColorStop(0,c>.5?r.colors[1]:r.colors[2]),h.addColorStop(1,"transparent"),t.globalAlpha=.25+.75*d,t.fillStyle=h,t.fillRect(a-14,u-14,28,28)}t.globalAlpha=1}}})],Nt=t=>({init:(t,e,s)=>({f:Array.from({length:s.count},()=>({x:Math.random()*t,y:Math.random()*e,r:xt(5,11)*(s.size||1),a:xt(0,6.3),va:xt(-1.5,1.5),vy:xt(18,46),ph:xt(0,6.3),c:s.colors[Math.floor(Math.random()*s.colors.length)]})),last:0}),draw:({ctx:e,w:s,h:i,t:a,state:r,o:n,quality:o})=>{const l=r.last?Math.min(.05,a-r.last):0;r.last=a,e.clearRect(0,0,s,i);const c=Math.max(4,Math.round(r.f.length*o));for(let o=0;o<c;o++){const c=r.f[o];c.y+=c.vy*l*n.speed,c.x+=(22*Math.sin(1.2*a+c.ph)+(n.wind||0))*l*n.speed,c.a+=c.va*l*n.speed,c.y>i+16&&(c.y=-16,c.x=Math.random()*s),c.x>s+16&&(c.x=-16),c.x<-16&&(c.x=s+16),e.save(),e.translate(c.x,c.y),e.rotate(c.a),e.scale(1,.55+.45*Math.abs(Math.cos(1.7*a+c.ph))),e.fillStyle=c.c,t(e,c),e.restore()}}}),It=(t,e,s,i)=>({name:t,kind:"background",description:e,reduced:"run",defaults:{speed:1,quality:1,...s},run:(t,e,s)=>{const a=_t(t,s,i,e);return s.onCleanup(a),a}});function Pt(){ht(Rt)}function Dt(t){if(t.dataset.usaChars)return Array.from(t.querySelectorAll(":scope > .usa-ch"));const e=t.textContent||"";t.textContent="";for(const s of Array.from(e)){const e=document.createElement("span");e.className="usa-ch",e.setAttribute("aria-hidden","true"),e.style.cssText="display:inline-block;white-space:pre",e.textContent=s,t.appendChild(e)}return t.appendChild(function(t){const e=document.createElement("span");return e.className="usa-sr",e.textContent=t,e}(e.trim())),t.dataset.usaChars="1",Array.from(t.querySelectorAll(":scope > .usa-ch"))}Rt.push(It("sakura","Cherry-blossom petals drifting down, swaying and flipping (Canvas 2D).",{count:46,colors:["#ffc8dd","#ffafcc","#fde2e4","#f9a8d4"],wind:14},Nt((t,e)=>{t.beginPath(),t.moveTo(0,-e.r),t.bezierCurveTo(e.r,-e.r,.9*e.r,.6*e.r,0,e.r),t.bezierCurveTo(.9*-e.r,.6*e.r,-e.r,-e.r,0,.55*-e.r),t.fill()})),It("leaves","Autumn leaves tumbling down in the wind (Canvas 2D).",{count:30,size:1.4,colors:["#ea580c","#d97706","#b45309","#dc2626","#ca8a04"],wind:26},Nt((t,e)=>{t.beginPath(),t.moveTo(0,-e.r),t.quadraticCurveTo(.9*e.r,.2*-e.r,0,e.r),t.quadraticCurveTo(.9*-e.r,.2*-e.r,0,-e.r),t.fill(),t.strokeStyle="rgba(0,0,0,.25)",t.lineWidth=1,t.beginPath(),t.moveTo(0,.8*-e.r),t.lineTo(0,1.25*e.r),t.stroke()}))),Rt.push({name:"splash",kind:"click",description:"A water splash from the pointer: a ring plus droplets that arc out and fall with gravity.",defaults:{color:"#38bdf8",count:14},run:(t,e,s)=>{const{x:i,y:a}=function(t,e){const s=e.event,i=t.getBoundingClientRect();return s&&"number"==typeof s.clientX&&(s.clientX||s.clientY)?{x:s.clientX,y:s.clientY}:{x:i.left+i.width/2,y:i.top+i.height/2}}(t,s);if(s.reduced)return mt(i-12,a-12,`width:24px;height:24px;border-radius:50%;background:${e.color};opacity:.5`,s,[{opacity:.5},{opacity:0}],{duration:300});const r=[mt(i-30,a-30,`width:60px;height:60px;border-radius:50%;border:3px solid ${e.color}`,s,[{transform:"scale(.2)",opacity:1},{transform:"scale(1.6)",opacity:0}],{duration:520,easing:"cubic-bezier(.2,.8,.3,1)"})];for(let t=0;t<e.count;t++){const t=-Math.PI/2+xt(-1.15,1.15),n=xt(50,110),o=Math.cos(t)*n,l=xt(4,9),c=Math.sin(t)*n;r.push(mt(i-l/2,a-l/2,`width:${l}px;height:${1.25*l}px;border-radius:50% 50% 50% 50%/60% 60% 40% 40%;background:${e.color}`,s,[{transform:"translate(0,0) scale(1)",opacity:1},{transform:`translate(${.6*o}px,${c}px) scale(1)`,opacity:1,offset:.45,easing:"cubic-bezier(.3,0,.7,1)"},{transform:`translate(${o}px,${c+90}px) scale(.6)`,opacity:0}],{duration:xt(650,900),easing:"cubic-bezier(.15,.6,.4,1)"}))}return yt(r)}});const Xt=t=>"function"==typeof requestAnimationFrame?requestAnimationFrame(t):0;let Ot=0;const Yt=[{name:"liquid-text",kind:"loop",description:"The text ripples like liquid: an animated SVG turbulence + displacement filter (`strength`, `speed`).",defaults:{strength:7,speed:1},run:(t,e)=>{const s="usa-liquid-"+ ++Ot,i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("aria-hidden","true"),i.setAttribute("width","0"),i.setAttribute("height","0"),i.style.cssText="position:absolute;width:0;height:0;overflow:hidden",i.innerHTML=`<filter id="${s}" x="-10%" y="-20%" width="120%" height="140%"><feTurbulence type="fractalNoise" baseFrequency="0.012 0.06" numOctaves="2" seed="3" result="n"/><feDisplacementMap in="SourceGraphic" in2="n" scale="${Number(e.strength)||7}" xChannelSelector="R" yChannelSelector="G"/></filter>`,document.body.appendChild(i);const a=i.querySelector("feTurbulence"),r=t.style.filter;t.style.filter=`url(#${s})`;let n=0;const o=performance.now(),l=t=>{const s=(t-o)/1e3*(Number(e.speed)||1);a?.setAttribute("baseFrequency",`${(.012+.004*Math.sin(1.3*s)).toFixed(4)} ${(.06+.02*Math.cos(s)).toFixed(4)}`),n=Xt(l)};return n=Xt(l),()=>{(t=>{t&&"function"==typeof cancelAnimationFrame&&cancelAnimationFrame(t)})(n),t.style.filter=r,i.remove()}}},{name:"neon-write",kind:"text",description:"Letters flicker on one by one like a neon sign being switched on, then keep a soft glow (`color`, `stagger`).",defaults:{color:"#ff4fd8",stagger:70,duration:520},run:(t,e,s)=>{var i;const a=`0 0 4px #fff,0 0 10px ${e.color},0 0 22px ${e.color},0 0 42px ${e.color}`;if(t.style.textShadow=a,(i=t.style).color||(i.color="#fff"),s.reduced)return;const r=Dt(t);return yt(r.map((t,i)=>s.animate(t,[{opacity:.08,textShadow:"none"},{opacity:1,textShadow:a,offset:.2},{opacity:.2,textShadow:"none",offset:.32},{opacity:1,textShadow:a,offset:.46},{opacity:.55,offset:.6},{opacity:1,textShadow:a}],{duration:e.duration,delay:i*e.stagger+xt(0,60),easing:"steps(6, end)",fill:"backwards"})))}},{name:"particle-text",kind:"text",description:"Particles fly in from around the element and assemble into the glyphs, then hand over to the real text (`gap` px between samples, `duration`, `colors`).",defaults:{gap:3,duration:1300,colors:["#7c5cff","#22d3ee","#ff5c8a"],spread:120},reduced:"skip",run:(t,e)=>{const s=Dt(t),i=t.getBoundingClientRect();if(!i.width||!i.height)return;const a=Number(e.spread)||120,r=Math.ceil(i.width+2*a),n=Math.ceil(i.height+2*a),o=document.createElement("canvas");o.setAttribute("aria-hidden","true"),o.width=r,o.height=n,o.style.cssText=`position:absolute;left:${i.left-a}px;top:${i.top-a}px;width:${r}px;height:${n}px`;const l=o.getContext("2d");if(!l)return;const c=getComputedStyle(t);l.font=`${c.fontStyle} ${c.fontWeight} ${c.fontSize} ${c.fontFamily}`,l.textBaseline="middle",l.fillStyle="#000";for(const t of s){const e=t.getBoundingClientRect();l.fillText(t.textContent||"",e.left-i.left+a,e.top-i.top+a+e.height/2)}const u=l.getImageData(0,0,r,n),d=Math.max(2,Math.round(Number(e.gap)||3)),h=[];for(let t=0;t<n;t+=d)for(let s=0;s<r;s+=d)if(u.data[4*(t*r+s)+3]>128){const i=xt(0,2*Math.PI),o=xt(.6*a,1.4*a);h.push({x:s,y:t,sx:r/2+Math.cos(i)*(r/2+.3*o),sy:n/2+Math.sin(i)*(n/2+.3*o),c:e.colors[h.length%e.colors.length],d:xt(0,.35)})}ft().appendChild(o),s.forEach(t=>t.style.opacity="0");const p=performance.now(),f=Number(e.duration)||1300;return new Promise(t=>{const e=()=>{o.remove(),s.forEach(t=>t.style.opacity=""),t()},i=t=>{const a=(t-p)/f;l.clearRect(0,0,r,n);for(const t of h){const e=Math.min(1,Math.max(0,(a-t.d)/(1-t.d))),s=1-Math.pow(1-e,3);l.globalAlpha=a>1?Math.max(0,1-4*(a-1)):.25+.75*s,l.fillStyle=t.c,l.fillRect(t.sx+(t.x-t.sx)*s,t.sy+(t.y-t.sy)*s,d-.5,d-.5)}a>1&&s.forEach(t=>t.style.opacity=String(Math.min(1,4*(a-1)))),a<1.25?Xt(i):e()};Xt(i)||e()})}},{name:"glitch-text",kind:"text",description:"RGB-split slices of the text jump sideways for a moment (`duration`, `colors` of the two channels).",defaults:{duration:650,colors:["#22d3ee","#ff3d81"]},run:(t,e,s)=>{if(s.reduced)return s.animate(t,[{opacity:1},{opacity:.6},{opacity:1}],{duration:200});"static"===getComputedStyle(t).position&&(t.style.position="relative");const i=t.textContent||"",a=(a,r)=>{const n=document.createElement("span");n.setAttribute("aria-hidden","true"),n.textContent=i,n.style.cssText=`position:absolute;inset:0;color:${a};mix-blend-mode:screen;pointer-events:none;white-space:inherit`,t.appendChild(n);const o=[];for(let t=0;t<=8;t++){const t=Math.round(xt(0,80));o.push({clipPath:`inset(${t}% 0 ${Math.max(0,100-t-xt(8,30)).toFixed(0)}% 0)`,transform:`translateX(${(r*xt(2,9)).toFixed(1)}px)`})}o.push({clipPath:"inset(50% 0 50% 0)",transform:"none"});const l=s.animate(n,o,{duration:e.duration,easing:"steps(8, end)"}),c=()=>n.remove();return l?l.finished.then(c,c):c(),l};return yt([a(e.colors[0],-1),a(e.colors[1],1),s.animate(t,[{transform:"none"},{transform:"translate(-2px,1px) skewX(-4deg)"},{transform:"translate(2px,-1px)"},{transform:"skewX(3deg)"},{transform:"none"}],{duration:e.duration,easing:"steps(5, end)"})])}},{name:"text-trail",kind:"cursor",description:"The letters of a word fall off the pointer as it moves over the element (persistent; `text`, `color`, `spacing` px).",defaults:{text:"MOTIONARY",color:"#7c5cff",spacing:22,size:18},run:(t,e,s)=>{const i=Array.from(String(e.text||"✦"));let a=0,r=-1e4,n=-1e4;const o=t=>{if(Math.hypot(t.clientX-r,t.clientY-n)<e.spacing)return;r=t.clientX,n=t.clientY;const o=i[a++%i.length];mt(t.clientX-e.size/2,t.clientY-e.size/2,`font:800 ${e.size}px/1 system-ui,sans-serif;color:${e.color};text-shadow:0 2px 8px rgba(0,0,0,.25)`,s,[{transform:"translateY(0) rotate(0) scale(1)",opacity:1},{transform:`translateY(${xt(30,60).toFixed(0)}px) rotate(${xt(-60,60).toFixed(0)}deg) scale(.6)`,opacity:0}],{duration:xt(700,1e3),easing:"cubic-bezier(.3,.1,.7,1)"},o)};return t.addEventListener("pointermove",o),()=>t.removeEventListener("pointermove",o)}},{name:"font-breathe",kind:"loop",description:"A variable-font weight wave breathes through the text (`min` / `max` weight, `period` ms, `stagger`). Best with a variable font.",defaults:{min:200,max:900,period:2400,stagger:90},run:(t,e,s)=>{const i=Dt(t).map((t,i)=>s.animate(t,[{fontWeight:e.min,fontVariationSettings:`'wght' ${e.min}`},{fontWeight:e.max,fontVariationSettings:`'wght' ${e.max}`}],{duration:e.period/2,delay:i*e.stagger,iterations:1/0,direction:"alternate",easing:"ease-in-out"}));return()=>i.forEach(t=>t?.cancel())}},{name:"flip-chars",kind:"text",description:"Every character flips up in 3D around its baseline, staggered (`stagger`, `duration`, `axis` x | y).",defaults:{stagger:45,duration:700,axis:"x"},run:(t,e,s)=>{var i;const a=Dt(t);(i=t.style).perspective||(i.perspective="600px");const r="y"===e.axis?"rotateY":"rotateX";return yt(a.map((t,i)=>(t.style.transformOrigin="50% 70% -0.4em",t.style.backfaceVisibility="hidden",s.reduced?s.animate(t,[{opacity:0},{opacity:1}],{duration:200,delay:10*i,fill:"backwards"}):s.animate(t,[{transform:`${r}(-100deg)`,opacity:0},{transform:`${r}(12deg)`,opacity:1,offset:.7},{transform:`${r}(0)`,opacity:1}],{duration:e.duration,delay:i*e.stagger,easing:"cubic-bezier(.2,.8,.3,1)",fill:"backwards"}))))}}];function Bt(){ht(Yt)}function Gt(t,e,s,i=.3,a=.25){if(s(i,a,!1),e.reduced)return()=>{};let r=0,n=i,o=a,l=!1;const c=()=>{r=0,s(n,o,l)},u=()=>{r||(r="function"==typeof requestAnimationFrame?requestAnimationFrame(c):(c(),0))},d=e=>{const s=t.getBoundingClientRect();n=s.width?Math.min(1,Math.max(0,(e.clientX-s.left)/s.width)):.5,o=s.height?Math.min(1,Math.max(0,(e.clientY-s.top)/s.height)):.5,l=!0,u()},h=()=>{l=!1,n=i,o=a,u()};return t.addEventListener("pointermove",d),t.addEventListener("pointerleave",h),()=>{r&&"function"==typeof cancelAnimationFrame&&cancelAnimationFrame(r),t.removeEventListener("pointermove",d),t.removeEventListener("pointerleave",h)}}const Wt=(t,e)=>{const[s,i,a]=wt(t);return`rgba(${s},${i},${a},${e})`},Ht=[{name:"light-follow",kind:"hover",reduced:"run",description:"A soft point light with a specular hot spot follows the pointer over the surface (persistent; `color`, `size` px, `intensity` 0–1).",defaults:{color:"#ffffff",size:260,intensity:.55},run:(t,e,s)=>{const[i,a]=bt(t,"mix-blend-mode:soft-light;transition:opacity .3s;z-index:1"),[r,n]=bt(t,"mix-blend-mode:screen;z-index:1"),o=Gt(t,s,(s,a,n)=>{const o=`${(100*s).toFixed(1)}% ${(100*a).toFixed(1)}%`;i.style.background=`radial-gradient(${e.size}px circle at ${o}, ${Wt(e.color,e.intensity)}, transparent 70%), radial-gradient(${2.4*e.size}px circle at ${o}, transparent 30%, rgba(0,0,0,${(.45*e.intensity).toFixed(2)}))`,r.style.background=`radial-gradient(${Math.round(e.size/5)}px circle at ${o}, ${Wt(e.color,n?.7*e.intensity:.35*e.intensity)}, transparent 70%)`,t.style.setProperty("--usa-lx",s.toFixed(3)),t.style.setProperty("--usa-ly",a.toFixed(3))});return()=>{o(),a(),n()}}},{name:"refraction",kind:"hover",reduced:"run",description:"A glass lens bends and magnifies what is behind it while following the pointer (persistent; `size` px, `blur`, `rim` color). Uses backdrop-filter.",defaults:{size:120,blur:1.5,zoom:1.12,rim:"#9be7ff"},run:(t,e,s)=>{"static"===getComputedStyle(t).position&&(t.style.position="relative");const i=document.createElement("span");i.setAttribute("aria-hidden","true");const a=Number(e.size)||120;i.style.cssText=`position:absolute;left:0;top:0;width:${a}px;height:${a}px;border-radius:50%;pointer-events:none;z-index:2;-webkit-backdrop-filter:blur(${e.blur}px) saturate(1.6) contrast(1.08) brightness(1.08);backdrop-filter:blur(${e.blur}px) saturate(1.6) contrast(1.08) brightness(1.08);box-shadow:inset 0 0 0 1px rgba(255,255,255,.55),inset 6px 8px 14px rgba(255,255,255,.45),inset -8px -10px 18px ${Wt(e.rim,.45)},0 10px 30px -8px rgba(0,0,0,.35);background:radial-gradient(circle at 32% 28%,rgba(255,255,255,.55),rgba(255,255,255,0) 32%),radial-gradient(circle at 70% 78%,${Wt(e.rim,.25)},transparent 45%);transform-origin:50% 50%;will-change:transform;transition:opacity .25s`,t.appendChild(i);const r=Gt(t,s,(r,n,o)=>{const l=t.clientWidth,c=t.clientHeight;i.style.transform=`translate(${(r*l-a/2).toFixed(1)}px,${(n*c-a/2).toFixed(1)}px) scale(${o?e.zoom:1})`,i.style.opacity=o||s.reduced?"1":".85"},.5,.5);return()=>{r(),i.remove()}}},{name:"brushed-metal",kind:"card",reduced:"run",description:"Fine brushed-metal lines with an anisotropic sheen that turns with the pointer angle (persistent; `tint`, `lines` px).",defaults:{tint:"#cbd5e1",lines:2},run:(t,e,s)=>{const i=Math.max(1,Number(e.lines)||2),[a,r]=bt(t,`z-index:0;opacity:.55;mix-blend-mode:overlay;background:repeating-linear-gradient(90deg,rgba(255,255,255,.18) 0 1px,rgba(0,0,0,.12) 1px ${i}px,rgba(255,255,255,.06) ${i}px ${2*i+1}px),linear-gradient(180deg,${Wt(e.tint,.9)},${Wt(e.tint,.55)})`),[n,o]=bt(t,"z-index:1;mix-blend-mode:soft-light"),l=Gt(t,s,(t,e)=>{const s=Math.atan2(e-.5,t-.5)*(180/Math.PI)+90;n.style.background=`conic-gradient(from ${s.toFixed(1)}deg at ${(100*t).toFixed(1)}% ${(100*e).toFixed(1)}%, rgba(255,255,255,.75), rgba(0,0,0,.35) 25%, rgba(255,255,255,.6) 50%, rgba(0,0,0,.35) 75%, rgba(255,255,255,.75))`});return()=>{l(),r(),o()}}},{name:"pearlescent",kind:"card",reduced:"run",description:"A nacre / holographic film whose hues shift with the pointer position (persistent; `strength` 0–1).",defaults:{strength:.6},run:(t,e,s)=>{const[i,a]=bt(t,`z-index:1;mix-blend-mode:color-dodge;opacity:${e.strength}`),[r,n]=bt(t,"z-index:1;mix-blend-mode:soft-light"),o=Gt(t,s,(t,e)=>{const s=Math.round(360*(.7*t+.3*e));i.style.background=`linear-gradient(${Math.round(115+50*t)}deg, hsla(${s},90%,70%,.55), hsla(${s+60},90%,75%,.35) 25%, hsla(${s+140},85%,70%,.5) 50%, hsla(${s+220},90%,75%,.35) 75%, hsla(${s+300},90%,70%,.55))`,i.style.backgroundSize="220% 220%",i.style.backgroundPosition=`${(100*t).toFixed(1)}% ${(100*e).toFixed(1)}%`,r.style.background=`radial-gradient(80% 60% at ${(100*t).toFixed(1)}% ${(100*e).toFixed(1)}%, rgba(255,255,255,.65), transparent 60%)`});return()=>{o(),a(),n()}}},{name:"god-rays",kind:"background",reduced:"run",description:"Volumetric light shafts fan out from a source point and slowly sweep (Canvas 2D, additive; `color`, `rays`, `x` / `y` source 0–1).",defaults:{color:"#ffe7a3",background:"#0b1020",rays:14,x:.5,y:-.1,speed:1,quality:1},run:(t,e,s)=>{const i=_t(t,s,{init:()=>({seeds:Array.from({length:Math.max(3,0|e.rays)},(t,s)=>({a:s/e.rays*1.6-.8+.08*Math.random(),w:.03+.06*Math.random(),p:6.28*Math.random()}))}),draw:({ctx:t,w:s,h:i,t:a,state:r})=>{t.globalCompositeOperation="source-over",t.fillStyle=e.background,t.fillRect(0,0,s,i);const n=e.x*s,o=e.y*i,l=1.2*Math.hypot(s,i),[c,u,d]=wt(e.color);t.globalCompositeOperation="lighter";for(const s of r.seeds){const i=Math.PI/2+s.a+.08*Math.sin(.25*a*e.speed+s.p),r=.1+.08*Math.sin(.8*a*e.speed+2*s.p),h=t.createLinearGradient(n,o,n+Math.cos(i)*l,o+Math.sin(i)*l);h.addColorStop(0,`rgba(${c},${u},${d},${(2*r).toFixed(3)})`),h.addColorStop(1,`rgba(${c},${u},${d},0)`),t.fillStyle=h,t.beginPath(),t.moveTo(n,o),t.lineTo(n+Math.cos(i-s.w)*l,o+Math.sin(i-s.w)*l),t.lineTo(n+Math.cos(i+s.w)*l,o+Math.sin(i+s.w)*l),t.closePath(),t.fill()}const h=t.createRadialGradient(n,o,0,n,o,.45*Math.max(s,i));h.addColorStop(0,`rgba(${c},${u},${d},.45)`),h.addColorStop(1,`rgba(${c},${u},${d},0)`),t.fillStyle=h,t.fillRect(0,0,s,i),t.globalCompositeOperation="source-over"}},e);return s.onCleanup(i),i}},{name:"pointer-shadow",kind:"hover",reduced:"run",description:"The pointer is the light: the element casts a soft real-time shadow away from it (persistent; `depth` px, `blur`, `color`).",defaults:{depth:22,blur:18,color:"rgba(15,23,42,.38)"},run:(t,e,s)=>{const i=t.style.filter,a=Gt(t,s,(s,i,a)=>{const r=2*(.5-s)*e.depth,n=2*(.5-i)*e.depth,o=a?1:.6;t.style.filter=`drop-shadow(${(r*o).toFixed(1)}px ${(n*o+4).toFixed(1)}px ${e.blur}px ${e.color})`},.35,.2);return()=>{a(),t.style.filter=i}}}];function jt(){ht(Ht)}const Ut=t=>{const e=Array.from(t.querySelectorAll("[data-depth]"));return e.length?e:Array.from(t.children)},Vt=t=>"function"==typeof requestAnimationFrame?requestAnimationFrame(t):0,Zt=t=>{t&&"function"==typeof cancelAnimationFrame&&cancelAnimationFrame(t)},Kt=[{name:"depth-stack",kind:"card",reduced:"run",description:"The children (or `[data-depth]` layers) separate in Z and parallax as the card tilts toward the pointer (persistent; `tilt` deg, `depth` px between layers).",defaults:{tilt:14,depth:28},run:(t,e,s)=>{const i=[t.style.transform,t.style.transformStyle,t.style.transition];t.style.transformStyle="preserve-3d",t.style.transition="transform .25s ease-out";const a=Ut(t),r=a.map(t=>[t.style.transform,t.style.transition]);a.forEach(t=>t.style.transition="transform .3s ease-out");const n=Gt(t,s,(i,r,n)=>{const o=2*(.5-r)*e.tilt,l=2*(i-.5)*e.tilt;t.style.transform=s.reduced?"":n?`perspective(800px) rotateX(${o.toFixed(2)}deg) rotateY(${l.toFixed(2)}deg)`:"perspective(800px) rotateX(6deg) rotateY(-8deg)",a.forEach((t,i)=>{const a=s.reduced?0:Number(t.dataset.depth||i+1)*e.depth*(n?1:.5);t.style.transform=`translateZ(${a.toFixed(1)}px)`})},.5,.5);return()=>{n(),[t.style.transform,t.style.transformStyle,t.style.transition]=i,a.forEach((t,e)=>[t.style.transform,t.style.transition]=r[e])}}},{name:"product-spin",kind:"card",description:"A 360° product viewer: drag to turn the element in 3D with inertia; idles with a slow turntable spin (persistent; `idle` deg/s, `friction`, `tilt`).",defaults:{idle:18,friction:.94,tilt:-8},run:(t,e,s)=>{const i=[t.style.transform,t.style.touchAction,t.style.cursor];t.style.touchAction="pan-y",t.style.cursor="grab";let a=0,r=0,n=!1,o=0,l=0,c=performance.now();const u=()=>t.style.transform=`perspective(900px) rotateX(${e.tilt}deg) rotateY(${a.toFixed(2)}deg)`;u();const d=t=>{const s=Math.min(64,t-c)/1e3;c=t,n||(r*=e.friction,a+=r*s+(Math.abs(r)<4?e.idle*s:0)),u(),l=Vt(d)};l=Vt(d);const h=e=>{n=!0,o=e.clientX,r=0,t.style.cursor="grabbing",t.setPointerCapture?.(e.pointerId)},p=t=>{if(!n)return;const e=t.clientX-o;o=t.clientX,a+=.6*e,r=36*e},f=()=>{n=!1,t.style.cursor="grab"};return t.addEventListener("pointerdown",h),t.addEventListener("pointermove",p),t.addEventListener("pointerup",f),t.addEventListener("pointercancel",f),()=>{Zt(l),t.removeEventListener("pointerdown",h),t.removeEventListener("pointermove",p),t.removeEventListener("pointerup",f),t.removeEventListener("pointercancel",f),[t.style.transform,t.style.touchAction,t.style.cursor]=i}}},{name:"card-flip-3d",kind:"click",description:"A thick card flips to its back face (second child) and back, showing its edge (`duration`, `axis` y | x). The faces swap `aria-hidden`.",defaults:{duration:800,axis:"y",thickness:6},run:(t,e,s)=>{const[i,a]=Array.from(t.children);if(!i||!a)return null;const r="x"===e.axis?"rotateX":"rotateY";if(!t.dataset.usaFlip){t.dataset.usaFlip="front",t.style.display="grid",t.style.transformStyle="preserve-3d";for(const t of[i,a])t.style.gridArea="1 / 1",t.style.backfaceVisibility="hidden";a.setAttribute("aria-hidden","true"),a.style.transform=`${r}(180deg)`}const n="front"===t.dataset.usaFlip;t.dataset.usaFlip=n?"back":"front",i.setAttribute("aria-hidden",String(n)),a.setAttribute("aria-hidden",String(!n));const o=n?0:180,l=n?180:0;return t.style.transform=`perspective(1000px) ${r}(${l}deg)`,s.reduced?s.animate(n?a:i,[{opacity:0},{opacity:1}],{duration:200}):s.animate(t,[{transform:`perspective(1000px) ${r}(${o}deg) scale(1)`},{transform:`perspective(1000px) ${r}(${(o+l)/2}deg) scale(1.08) translateZ(${4*e.thickness}px)`,offset:.5},{transform:`perspective(1000px) ${r}(${l}deg) scale(1)`}],{duration:e.duration,easing:"cubic-bezier(.45,.05,.25,1)"})}},{name:"origami",kind:"enter",description:"The element unfolds panel by panel like folded paper (`panels`, `duration` per fold). Uses clipped copies during the fold.",defaults:{panels:4,duration:420},reduced:"skip",run:(t,e,s)=>{if(t.dataset.usaOrigami)return null;t.dataset.usaOrigami="1";const i=Math.max(2,Math.min(8,Math.round(e.panels)));"static"===getComputedStyle(t).position&&(t.style.position="relative");const a=t.style.visibility,r=document.createElement("div");r.setAttribute("aria-hidden","true"),r.style.cssText="position:absolute;inset:0;pointer-events:none;perspective:900px;visibility:visible";const n=[];for(let a=0;a<i;a++){const o=t.cloneNode(!0);o.removeAttribute("id"),o.querySelectorAll("[id]").forEach(t=>t.removeAttribute("id"));const l=a/i*100,c=100-(a+1)/i*100;o.style.cssText+=`;position:absolute;inset:0;margin:0;width:100%;height:100%;box-sizing:border-box;clip-path:inset(${l}% 0 ${c}% 0);transform-origin:50% ${l}%;visibility:visible`,r.appendChild(o);const u=a%2?1:-1;n.push(s.animate(o,[{transform:`rotateX(${92*u}deg)`,filter:"brightness(.55)",opacity:0},{opacity:1,offset:.15},{transform:"rotateX(0)",filter:"brightness(1)",opacity:1}],{duration:e.duration,delay:a*e.duration*.55,easing:"cubic-bezier(.3,.7,.3,1)",fill:"backwards"}))}t.style.visibility="hidden",t.appendChild(r);const o=()=>{r.remove(),t.style.visibility=a,delete t.dataset.usaOrigami};return yt(n).then(o,o)}},{name:"orbit-camera",kind:"scroll",description:"While the element scrolls through the viewport the camera orbits its 3D children (persistent; `range` deg of orbit, `tilt`, `depth` px between layers).",defaults:{range:70,tilt:10,depth:60},run:(t,e,s)=>{const i=[t.style.transform,t.style.transformStyle],a=Ut(t);t.style.transformStyle="preserve-3d",s.reduced||a.forEach((t,s)=>t.style.transform=`translateZ(${((s-(a.length-1)/2)*e.depth).toFixed(0)}px)`);let r=0;const n=()=>{r=0;const i=t.getBoundingClientRect(),a=window.innerHeight||800,n=Math.min(1,Math.max(0,(a-i.top)/(a+i.height)));t.style.setProperty("--usa-orbit",n.toFixed(3)),s.reduced||(t.style.transform=`perspective(1000px) rotateX(${e.tilt}deg) rotateY(${((n-.5)*e.range).toFixed(2)}deg)`)};n();const o=()=>{r||(r=Vt(n))};return s.reduced||(window.addEventListener("scroll",o,{passive:!0}),window.addEventListener("resize",o)),()=>{Zt(r),window.removeEventListener("scroll",o),window.removeEventListener("resize",o),[t.style.transform,t.style.transformStyle]=i,a.forEach(t=>t.style.transform="")}}}];function Jt(){ht(Kt)}const Qt={gpu:Rt,text:Yt,light:Ht,depth:Kt};function te(){Pt(),Bt(),jt(),Jt()}nt(),te(),t.CAROUSEL_EFFECTS=x,t.DEPTH3_FX=Kt,t.FX2_PACKS=Qt,t.GLSL_HEAD=Mt,t.GPU_FX=Rt,t.LIGHT_FX=Ht,t.MENU_EFFECTS=G,t.MODAL_EFFECTS=F,t.PROGRESS_VARIANTS=j,t.SHEET_SIDES=z,t.SKELETON_VARIANTS=Z,t.TAB_INDICATORS=v,t.TEXT3_FX=Yt,t.TOAST_POSITIONS=P,t.WIDGETS=at,t.WIDGET_TAGS=rt,t.defineCarousel=y,t.defineCompare=st,t.defineCubeGallery=it,t.defineDisclosure=E,t.defineMasonryFlow=et,t.defineMenu=W,t.defineMilestones=tt,t.defineModal=N,t.defineOdometer=V,t.defineProgressRing=U,t.defineSheet=I,t.defineSkeletonReveal=K,t.defineStarRating=Q,t.defineStories=C,t.defineTabBar=w,t.defineToastStack=O,t.defineWidgets=nt,t.fieldFallback=Ct,t.register3dEffects=Jt,t.registerFx2=te,t.registerGpuEffects=Pt,t.registerLightEffects=jt,t.registerTextEffects3=Bt,t.shaderBackground=Et,t.splitChars=Dt,t.stackToast=Y,t.supportsWebGL2=St,t.trackPointer=Gt});
|
|
2
2
|
//# sourceMappingURL=widgets.umd.js.map
|