@noctuatech/uswds 0.0.20 → 0.0.21
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/assets/uswds.min.js +1 -1
- package/package.json +5 -5
- package/src/lib/card/card.stories.ts +5 -5
- package/src/lib/config/config.element.ts +20 -7
- package/src/lib/icon/icon.element.ts +14 -28
- package/src/lib/services/http.service.ts +8 -0
- package/src/lib/services/icon.service.test.ts +55 -0
- package/src/lib/services/icon.service.ts +47 -0
- package/target/lib/card/card.stories.js +5 -5
- package/target/lib/config/config.element.d.ts +2 -2
- package/target/lib/config/config.element.js +21 -6
- package/target/lib/config/config.element.js.map +1 -1
- package/target/lib/icon/icon.element.d.ts +1 -3
- package/target/lib/icon/icon.element.js +17 -21
- package/target/lib/icon/icon.element.js.map +1 -1
- package/target/lib/services/http.service.d.ts +3 -0
- package/target/lib/services/http.service.js +24 -0
- package/target/lib/services/http.service.js.map +1 -0
- package/target/lib/services/icon.service.d.ts +4 -0
- package/target/lib/services/icon.service.js +54 -0
- package/target/lib/services/icon.service.js.map +1 -0
- package/target/lib/services/icon.service.test.js +44 -0
- package/target/lib/services/icon.service.test.js.map +1 -0
- package/src/lib/icon/icon-element.test.ts +0 -0
- package/target/lib/icon/icon-element.test.js +0 -2
- package/target/lib/icon/icon-element.test.js.map +0 -1
- /package/target/lib/{icon/icon-element.test.d.ts → services/icon.service.test.d.ts} +0 -0
package/assets/uswds.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";function e(e,t,a,s,o,n){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=s.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?s.static?e:e.prototype:null,m=t||(d?Object.getOwnPropertyDescriptor(d,s.name):{}),u=!1,h=a.length-1;h>=0;h--){var b={};for(var g in s)b[g]="access"===g?{}:s[g];for(var g in s.access)b.access[g]=s.access[g];b.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");n.push(i(e||null))};var p=(0,a[h])("accessor"===l?{get:m.get,set:m.set}:m[c],b);if("accessor"===l){if(void 0===p)continue;if(null===p||"object"!=typeof p)throw new TypeError("Object expected");(r=i(p.get))&&(m.get=r),(r=i(p.set))&&(m.set=r),(r=i(p.init))&&o.unshift(r)}else(r=i(p))&&("field"===l?o.unshift(r):m[c]=r)}d&&Object.defineProperty(d,s.name,m),u=!0}function t(e,t,a){for(var s=arguments.length>2,o=0;o<t.length;o++)a=s?t[o].call(e,a):t[o].call(e);return s?a:void 0}function a(e){return e[Symbol.metadata]}"function"==typeof SuppressedError&&SuppressedError;class s{#e;#t;get name(){return this.#e}get factory(){return this.#t}constructor(e,t){this.#e=e,this.#t=t}}const o=new WeakMap;class n{#a=new WeakMap;parent;providers;constructor(e=[],t){this.parent=t,this.providers=e}inject(e){if(this.#a.has(e)){const t=this.#a.get(e),s=a(e);return s&&i(t,s.onInjected),t}const t=this.#s(e);if(t){if(t.use){const a=t.use;return this.#o(e,(()=>new a))}if(t.factory){const a=t.factory;return this.#o(e,a)}throw new Error(`Provider for ${e.name} found but is missing either 'use' or 'factory'`)}if(this.parent)return this.parent.inject(e);if(e instanceof s){if(!e.factory)throw new Error(`Provider not found for "${e.name}"`);return this.#o(e,e.factory)}return this.#o(e,(()=>new e))}setParent(e){this.parent=e}clear(){this.#a=new WeakMap}#o(e,t){const s=t(this);if(this.#a.set(e,s),"object"==typeof s&&null!==s){const t=o.get(s);t&&t.setParent(this);const n=a(e);n&&(i(s,n.onCreated),i(s,n.onInjected))}return s}#s(e){if(this.providers)for(let t=0;t<this.providers.length;t++)if(this.providers[t].provide===e)return this.providers[t]}}function i(e,t){if(Array.isArray(t))for(let a of t)"function"==typeof a&&a.call(e)}function r(e,t){return{[e.name]:class extends e{constructor(...e){super(),this.addEventListener("finddiroot",(e=>{e.stopPropagation();const t=function(e){const t=e.composedPath();for(let e=1;e<t.length;e++){const a=t[e],s=o.get(a);if(s)return s;if(a===document.body)return null}return null}(e);t&&o.get(this)?.setParent(t)}))}connectedCallback(){this.isConnected&&(this.dispatchEvent(new Event("finddiroot",{bubbles:!0,composed:!0})),super.connectedCallback&&super.connectedCallback())}disconnectedCallback(){o.get(this)?.setParent(void 0),super.disconnectedCallback&&super.disconnectedCallback()}}}[e.name]}function l(e){return function(t,a){const s={[t.name]:class extends t{constructor(...t){super(...t);const a=new n(e?.providers);a.providers.push({provide:n,factory:()=>a}),o.set(this,a)}}};return"HTMLElement"in globalThis&&HTMLElement.prototype.isPrototypeOf(t.prototype)?r(s[t.name]):s[t.name]}}function c(e){return function(){const t=o.get(this);if(void 0===t){const e=this.constructor.name;throw new Error(`${e} is either not injectable or a service is being called in the constructor. \n Either add the @injectable() to your class or use the @injected callback method.`)}return t.inject(e)}}Symbol.metadata??=Symbol("Symbol.metadata");class d{#n;constructor(e,...t){this.#n=document.createElement("template"),this.#n.innerHTML=b(e)}apply(e){e.shadowRoot&&e.shadowRoot.append(this.#n.content.cloneNode(!0))}}function m(e,...t){return new d(e,...t)}class u{#i;constructor(e,...t){this.#i=new CSSStyleSheet,this.#i.replaceSync(b(e))}apply(e){e.shadowRoot&&(e.shadowRoot.adoptedStyleSheets=[...e.shadowRoot.adoptedStyleSheets,this.#i])}}function h(e){return new u(e)}function b(e){let t="";for(let a=0;a<e.length;a++)t+=e[a];return t}Symbol.metadata??=Symbol("Symbol.metadata");class g extends Map{}class p extends Map{}class f{attrs=new g;attrChanges=new p;listeners=[];onReady=new Set}class v extends WeakMap{read(e){return this.has(e)||this.set(e,new f),this.get(e)}}const y=new v;function k(e){return function({get:t,set:a},s){const o=e?.name??function(e){let t;if("symbol"==typeof e){if(!e.description)throw new Error("Cannot handle Symbol property without description");t=e.description}else t=e;return t.toLowerCase().replaceAll(" ","-")}(s.name),n=y.read(s.metadata),i=e?.reflect??!0;return n.attrs.set(o,{propName:s.name,observe:e?.observed??!0,reflect:i,getPropValue:t,setPropValue:a}),{set(e){if(i)if(!0===e)this.hasAttribute(o)||this.setAttribute(o,"");else if(!1===e)this.hasAttribute(o)&&this.removeAttribute(o);else{const t=String(e);this.getAttribute(o)!==t&&this.setAttribute(o,t)}a.call(this,e)}}}}function _(e,t){return function(a,s){const o=y.read(s.metadata);let n=e=>e.shadowRoot??e;t&&(n="string"==typeof t?e=>e.shadowRoot?e.shadowRoot.querySelector(t):e.querySelector(t):t),o.listeners.push({event:e,cb:a,selector:n})}}function w(e){return function(t,a){const s=y.read(a.metadata);a.addInitializer((function(){e?.tagName&&(customElements.get(e.tagName)||customElements.define(e.tagName,this))}));const o={[t.name]:class extends t{static observedAttributes=Array.from(s.attrs.keys());#r=new Set;constructor(...t){if(super(...t),e?.shadowDom){this.shadowRoot||this.attachShadow(e.shadowDomOpts??{mode:"open"});for(let t of e.shadowDom)t.apply(this)}for(let e of s.onReady)e.call(this)}attributeChangedCallback(e,t,a){const o=s.attrs.get(e),n=s.attrChanges.get(e);if(o){if(t!==a){const e=o.getPropValue.call(this);""===a?o.setPropValue.call(this,!0):"number"==typeof e?o.setPropValue.call(this,Number(a)):o.setPropValue.call(this,a)}if(n)for(let e of n)e.call(this,t,a);super.attributeChangedCallback&&super.attributeChangedCallback(e,t,a)}}connectedCallback(){if(this.isConnected){for(let{event:e,cb:t,selector:a}of s.listeners){const s=a(this);if(!s)throw new Error(`could not add listener to ${s}`);{const a=t.bind(this);s.addEventListener(e,a),this.#r.add((()=>{s.removeEventListener(e,a)}))}}!function(e,t){for(let[a,{getPropValue:s,reflect:o}]of t)if(o){const t=s.call(e);if(null!=t&&""!==t)if("boolean"==typeof t)!0===t&&(e.hasAttribute(a)||e.setAttribute(a,""));else{const s=String(t);e.getAttribute(a)!==s&&e.setAttribute(a,s)}}}(this,s.attrs),super.connectedCallback&&super.connectedCallback()}}disconnectedCallback(){for(let e of this.#r)e();super.disconnectedCallback&&super.disconnectedCallback()}}};return o[t.name]}}function S(e){let t=null;return function(){if(t)return t;if(t=this.shadowRoot?this.shadowRoot.querySelector(e):this.querySelector(e),!t)throw new Error("could not find element");return t}}function x(){return function(e,t){y.read(t.metadata).onReady.add(e)}}class C{iconPath=""}(()=>{let a,s,o,i=[w({tagName:"usa-config",shadowDom:[h`:host{display:contents}`,m`<slot></slot>`]}),l()],r=[],d=HTMLElement,u=[],b=[];(class extends d{static{s=this}static{const n="function"==typeof Symbol&&Symbol.metadata?Object.create(d[Symbol.metadata]??null):void 0;o=[k({name:"icon-path"})],e(this,null,o,{kind:"accessor",name:"iconPath",static:!1,private:!1,access:{has:e=>"iconPath"in e,get:e=>e.iconPath,set:(e,t)=>{e.iconPath=t}},metadata:n},u,b),e(null,a={value:s},i,{kind:"class",name:s.name,metadata:n},null,r),s=a.value,n&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n}),t(s,r)}#l=t(this,u,"/assets/usa-icons/");get iconPath(){return this.#l}set iconPath(e){this.#l=e}#c=(t(this,b),c(n));connectedCallback(){const{providers:e}=this.#c();e.push({provide:C,factory:()=>this})}})})();const j={info:{icon:"info"},warning:{icon:"warning"},success:{icon:"check_circle"},error:{icon:"error"},emergency:{icon:"error"}};(()=>{let a,s,o,n=[w({tagName:"usa-alert",shadowDom:[h`:host{display:block;border-left:.5rem solid #adadad;padding:1rem 1.2rem;color:#1b1b1b;margin-bottom:1rem}:host([type=info]){border-left-color:#00bde3;background-color:#e7f6f8}:host([type=warning]){background-color:#faf3d1;border-left-color:#ffbe2e}:host([type=success]){background-color:#ecf3ec;border-left-color:#00a91c}:host([type=error]){background-color:#f4e3db;border-left-color:#d54309}:host([type=emergency]){background-color:#9c3d10;border-left-color:#9c3d10;color:#fff}:host([type=emergency]) ::slotted(*){color:#fff}.alert-heading{display:grid;grid-template-columns:auto 1fr;align-items:center}usa-icon{margin:-.28rem .75rem 0 0}#heading::slotted(*){font-family:Source Sans Pro Web,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;font-size:1.33rem;line-height:.9;margin-top:0;margin-bottom:.5rem}`,m`<div class="alert-heading"><usa-icon icon="check_circle"></usa-icon><div><slot id="heading" name="heading"></slot></div><div class="spacer"></div><div><slot></slot></div></div>`]})],i=[],r=HTMLElement,l=[],c=[];(class extends r{static{s=this}static{const d="function"==typeof Symbol&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;o=[k()],e(this,null,o,{kind:"accessor",name:"type",static:!1,private:!1,access:{has:e=>"type"in e,get:e=>e.type,set:(e,t)=>{e.type=t}},metadata:d},l,c),e(null,a={value:s},n,{kind:"class",name:s.name,metadata:d},null,i),s=a.value,d&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d}),t(s,i)}#d=t(this,l,"info");get type(){return this.#d}set type(e){this.#d=e}#m=(t(this,c),S("usa-icon"));attributeChangedCallback(){this.#m().icon=j[this.type].icon}})})(),(()=>{let a,s,o,n,i,r,l,c,d,u=[w({tagName:"usa-button",shadowDomOpts:{mode:"open",delegatesFocus:!0},shadowDom:[h`:host{display:contents}.usa-button{box-sizing:border-box;font-family:Source Sans Pro Web,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;font-size:1.06rem;line-height:.9;color:#fff;background-color:#005ea2;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-items:center;border:0;border-radius:.25rem;cursor:pointer;-moz-column-gap:.5rem;column-gap:.5rem;display:inline-flex;font-weight:700;justify-content:center;padding:.75rem 1.25rem;text-align:center;text-decoration:none;width:100%;cursor:pointer}@media all and (min-width:30em){.usa-button{width:auto}}.usa-button:visited{color:#fff}.usa-button:hover{color:#fff;background-color:#1a4480;border-bottom:0;text-decoration:none}.usa-button:active{color:#fff;background-color:#162e51}.usa-button:not([disabled]):focus{outline-offset:.25rem}.usa-button:disabled{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1}.usa-button:disabled:active,.usa-button:disabled:focus,.usa-button:disabled:hover{color:#454545;background-color:#c9c9c9}.usa-button:focus{outline:.25rem solid #2491ff;outline-offset:0}:host([variant=secondary]) .usa-button{color:#fff;background-color:#d83933}:host([variant=secondary]) .usa-button:hover{background-color:#b50909}:host([variant=secondary]) .usa-button:active{background-color:#8b0a03}:host([variant=cool]) .usa-button{color:#1b1b1b;background-color:#00bde3}:host([variant=cool]) .usa-button:hover{background-color:#28a0cb}:host([variant=cool]) .usa-button:active{color:#fff;background-color:#07648d}:host([variant=warm]) .usa-button{color:#1b1b1b;background-color:#fa9441}:host([variant=warm]) .usa-button:hover{color:#fff;background-color:#c05600}:host([variant=warm]) .usa-button:active{color:#fff;background-color:#775540}:host([variant=outline]) .usa-button{background-color:transparent;box-shadow:inset 0 0 0 2px #005ea2;color:#005ea2}:host([variant=outline]) .usa-button:hover{box-shadow:inset 0 0 0 2px #1a4480;color:#1a4480}:host([variant=outline]) .usa-button:active{box-shadow:inset 0 0 0 2px #162e51;color:#162e51}`,m`<button class="usa-button"><slot></slot></button>`]})],b=[],g=HTMLElement,p=[],f=[],v=[],y=[],C=[],j=[],O=[],E=[],A=[];(class extends g{static{s=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(g[Symbol.metadata]??null):void 0;o=[k()],n=[k()],i=[k()],r=[k()],l=[x()],c=[_("keydown",(()=>document.body))],d=[_("click")],e(this,null,o,{kind:"accessor",name:"type",static:!1,private:!1,access:{has:e=>"type"in e,get:e=>e.type,set:(e,t)=>{e.type=t}},metadata:t},f,v),e(this,null,n,{kind:"accessor",name:"disabled",static:!1,private:!1,access:{has:e=>"disabled"in e,get:e=>e.disabled,set:(e,t)=>{e.disabled=t}},metadata:t},y,C),e(this,null,i,{kind:"accessor",name:"variant",static:!1,private:!1,access:{has:e=>"variant"in e,get:e=>e.variant,set:(e,t)=>{e.variant=t}},metadata:t},j,O),e(this,null,r,{kind:"accessor",name:"value",static:!1,private:!1,access:{has:e=>"value"in e,get:e=>e.value,set:(e,t)=>{e.value=t}},metadata:t},E,A),e(this,null,l,{kind:"method",name:"onReady",static:!1,private:!1,access:{has:e=>"onReady"in e,get:e=>e.onReady},metadata:t},null,p),e(this,null,c,{kind:"method",name:"onKeyDown",static:!1,private:!1,access:{has:e=>"onKeyDown"in e,get:e=>e.onKeyDown},metadata:t},null,p),e(this,null,d,{kind:"method",name:"onInternalClick",static:!1,private:!1,access:{has:e=>"onInternalClick"in e,get:e=>e.onInternalClick},metadata:t},null,p),e(null,a={value:s},u,{kind:"class",name:s.name,metadata:t},null,b),s=a.value,t&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static formAssociated=!0;#d=(t(this,p),t(this,f,"button"));get type(){return this.#d}set type(e){this.#d=e}#u=(t(this,v),t(this,y,!1));get disabled(){return this.#u}set disabled(e){this.#u=e}#h=(t(this,C),t(this,j,"primary"));get variant(){return this.#h}set variant(e){this.#h=e}#b=(t(this,O),t(this,E,""));get value(){return this.#b}set value(e){this.#b=e}#g=(t(this,A),0);get tabIndex(){return this.#g}set tabIndex(e){this.#g=e}#p=this.attachInternals();#f=S("button");onReady(){this.#f().autofocus=this.autofocus}onKeyDown(e){"submit"===this.type&&"ENTER"===e.key.toUpperCase()&&this.#v()}onInternalClick(){this.#v()}attributeChangedCallback(){const e=this.#f();e.type=this.type,e.disabled=this.disabled}#v(){const{form:e}=this.#p;if(e)if("submit"===this.type){const t=document.createElement("button");t.type="submit",e.append(t),t.click(),t.remove()}else"reset"===this.type&&e.reset()}static{t(s,b)}})})(),(()=>{let a,s,o,n,i,r,l,c=[w({tagName:"usa-checkbox",shadowDom:[h`*{box-sizing:border-box}:host{display:inline-block;font-family:Source Sans Pro Web,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;max-width:30rem}:host([tiled]) label{background-color:#fff;border:2px solid #c9c9c9;border-radius:.25rem;color:#1b1b1b;padding:.75rem 1rem .75rem .75rem}label{display:inline-flex;cursor:pointer;font-size:1.06rem;line-height:1.3;flex-wrap:wrap}.checkbox{background:#fff;box-shadow:0 0 0 2px #1b1b1b;display:flex;align-items:center;justify-content:center;height:1.25rem;width:1.25rem;border-radius:2px;position:relative;margin-right:.75rem}input:checked+.checkbox{background-color:#005ea2;box-shadow:0 0 0 2px #005ea2}input:checked+.checkbox::after{content:" ";display:block;height:1rem;width:.5rem;border-right:4px solid #fff;border-bottom:4px solid #fff;transform:rotate(45deg) scale(.65)}input{height:0;width:0;position:absolute;left:-999em;right:auto}input:focus+.checkbox{outline:.25rem solid #2491ff;outline-offset:.25rem}.description{display:block;font-size:.93rem;margin-top:.5rem}.break{flex-basis:100%;height:0}.spacer{height:1.25rem;width:1.25rem;margin-right:.75rem}:host([tiled]) label:has(input:checked){background-color:rgba(0,94,162,.1);border-color:#005ea2}`,m`<label><input type="checkbox"><div class="checkbox"></div><div class="title"><slot></slot></div></label>`]})],d=[],u=HTMLElement,b=[],g=[],p=[],f=[],v=[],y=[],x=[],C=[],j=[];(class extends u{static{s=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(u[Symbol.metadata]??null):void 0;o=[k()],n=[k()],i=[k()],r=[k({observed:!1})],l=[_("change","input[type=checkbox]")],e(this,null,o,{kind:"accessor",name:"checked",static:!1,private:!1,access:{has:e=>"checked"in e,get:e=>e.checked,set:(e,t)=>{e.checked=t}},metadata:t},g,p),e(this,null,n,{kind:"accessor",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:t},f,v),e(this,null,i,{kind:"accessor",name:"value",static:!1,private:!1,access:{has:e=>"value"in e,get:e=>e.value,set:(e,t)=>{e.value=t}},metadata:t},y,x),e(this,null,r,{kind:"accessor",name:"tiled",static:!1,private:!1,access:{has:e=>"tiled"in e,get:e=>e.tiled,set:(e,t)=>{e.tiled=t}},metadata:t},C,j),e(this,null,l,{kind:"method",name:"onCheckboxChange",static:!1,private:!1,access:{has:e=>"onCheckboxChange"in e,get:e=>e.onCheckboxChange},metadata:t},null,b),e(null,a={value:s},c,{kind:"class",name:s.name,metadata:t},null,d),s=a.value,t&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static formAssociated=!0;#y=(t(this,b),t(this,g,!1));get checked(){return this.#y}set checked(e){this.#y=e}#k=(t(this,p),t(this,f,""));get name(){return this.#k}set name(e){this.#k=e}#b=(t(this,v),t(this,y,""));get value(){return this.#b}set value(e){this.#b=e}#_=(t(this,x),t(this,C,!1));get tiled(){return this.#_}set tiled(e){this.#_=e}#w=(t(this,j),S("input"));#p=this.attachInternals();connectedCallback(){const e=this.#w();this.checked&&this.#p.setFormValue(this.value),e.checked=this.checked,e.name=this.name}attributeChangedCallback(){const e=this.#w();e.checked=this.checked,e.name=this.name}onCheckboxChange(){this.#w().checked?this.#p.setFormValue(this.value):this.#p.setFormValue(null)}static{t(s,d)}})})(),(()=>{let a,s,o=[w({tagName:"usa-description",shadowDom:[h`:host{display:block;font-size:.93rem;margin-top:.5rem}`,m`<slot></slot>`]})],n=[],i=HTMLElement;(class extends i{static{s=this}static{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(i[Symbol.metadata]??null):void 0;e(null,a={value:s},o,{kind:"class",name:s.name,metadata:r},null,n),s=a.value,r&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),t(s,n)}})})(),Symbol.metadata??=Symbol("Symbol.metadata");class O extends Map{}class E{scheduler=null;changes=new O}class A extends WeakMap{read(e){let t=this.get(e);return t||(t=new E,this.set(e,t)),t}}class P{effects=new Set}class M extends WeakMap{read(e){let t=this.get(e);return t||(t=new P,this.set(e,t)),t}}const N=new A,D=new M;function L(){return function(e,t){const a=D.read(t.metadata);return{init(e){let a=null;try{a=t.access.get(this)}catch{}return a?(Reflect.deleteProperty(this,t.name),a):e},set(s){const o=N.read(this);null===o.scheduler&&(o.scheduler=Promise.resolve().then((()=>{for(let e of a.effects)e.call(this,o.changes);o.scheduler=null,o.changes.clear()}))),o.changes.set(t.name,{oldValue:e.get.call(this),newValue:s}),e.set.call(this,s)}}}}function T(){return function(e,t){D.read(t.metadata).effects.add(e)}}(()=>{let a,s,o,n,i,r,l,c,d=[w({tagName:"usa-file-input",shadowDom:[h`*{box-sizing:border-box}:host{display:block;max-width:30rem;position:relative;margin-bottom:1.5rem}label{display:block}input{cursor:pointer;left:0;margin:0;max-width:none;position:absolute;text-indent:-999em;width:100%;z-index:1;bottom:0;top:0}input:focus{outline:.25rem solid #2491ff;outline-offset:0}label slot.label{font-size:1.06rem;line-height:1.3;display:block;font-weight:400;margin-bottom:.5rem}.box{border:1px dashed #adadad;display:flex;font-size:.93rem;position:relative;text-align:center;width:100%;max-width:30rem;height:5.2rem;align-items:center;justify-content:center}.container{position:relative}`,m`<label><slot class="label"></slot><div class="container"><input type="file"><div class="box"><slot name="description">Drag file here or<usa-link>choose from folder</usa-link></slot></div><usa-file-input-preview>Selected file<usa-link>Change file</usa-link></usa-file-input-preview></div></label>`]})],u=[],b=HTMLElement,g=[],p=[],f=[],v=[],y=[],x=[],C=[],j=[],O=[];(class extends b{static{s=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(b[Symbol.metadata]??null):void 0;o=[k()],n=[k()],i=[k()],r=[L()],l=[T()],c=[_("change")],e(this,null,o,{kind:"accessor",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:t},p,f),e(this,null,n,{kind:"accessor",name:"multiple",static:!1,private:!1,access:{has:e=>"multiple"in e,get:e=>e.multiple,set:(e,t)=>{e.multiple=t}},metadata:t},v,y),e(this,null,i,{kind:"accessor",name:"accept",static:!1,private:!1,access:{has:e=>"accept"in e,get:e=>e.accept,set:(e,t)=>{e.accept=t}},metadata:t},x,C),e(this,null,r,{kind:"accessor",name:"files",static:!1,private:!1,access:{has:e=>"files"in e,get:e=>e.files,set:(e,t)=>{e.files=t}},metadata:t},j,O),e(this,null,l,{kind:"method",name:"onChange",static:!1,private:!1,access:{has:e=>"onChange"in e,get:e=>e.onChange},metadata:t},null,g),e(this,null,c,{kind:"method",name:"onInputChange",static:!1,private:!1,access:{has:e=>"onInputChange"in e,get:e=>e.onInputChange},metadata:t},null,g),e(null,a={value:s},d,{kind:"class",name:s.name,metadata:t},null,u),s=a.value,t&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static formAssociated=!0;#k=(t(this,g),t(this,p,""));get name(){return this.#k}set name(e){this.#k=e}#S=(t(this,f),t(this,v,!0));get multiple(){return this.#S}set multiple(e){this.#S=e}#x=(t(this,y),t(this,x,""));get accept(){return this.#x}set accept(e){this.#x=e}#C=(t(this,C),t(this,j,null));get files(){return this.#C}set files(e){this.#C=e}#p=(t(this,O),this.attachInternals());#j=S("input");#O=S(".box");#E=S("usa-file-input-preview");onChange(){const e=this.#j();this.files&&(e.files=this.files,this.onInputChange())}attributeChangedCallback(){const e=this.#j();e.name=this.name,e.multiple=this.multiple,e.accept=this.accept}onInputChange(){const e=this.#j(),t=this.#O();this.#E().files=e.files;const a=new FormData;if(e.files&&e.files.length){t.style.display="none";for(let t of e.files)a.append(this.name,t)}else t.style.display="flex";this.#p.setFormValue(a)}static{t(s,u)}})})(),(()=>{let a,s,o,n,i=[w({tagName:"usa-file-input-preview",shadowDom:[h`*{box-sizing:border-box}:host{display:block;font-size:.87rem;pointer-events:none;position:relative;text-align:left;word-wrap:anywhere;z-index:3}:host([hidden]){display:none}img{border:0;display:block;height:2.5rem;margin-right:.5rem;-o-object-fit:contain;object-fit:contain;width:2.5rem}.preview-heading{align-items:center;background:#d9e8f6;display:flex;pointer-events:none;position:relative;z-index:3;font-weight:700;justify-content:space-between;padding:.5rem;text-align:left}.preview-item{align-items:center;background:#d9e8f6;display:flex;padding:.5rem;width:100%;margin-top:1px}`,m`<template><div class="preview-item"><img height="40" width="40" aria-hidden="true"></div></template><slot class="preview-heading"></slot>`]})],r=[],l=HTMLElement,c=[],d=[],u=[];(class extends l{static{s=this}static{const m="function"==typeof Symbol&&Symbol.metadata?Object.create(l[Symbol.metadata]??null):void 0;o=[L()],n=[T()],e(this,null,o,{kind:"accessor",name:"files",static:!1,private:!1,access:{has:e=>"files"in e,get:e=>e.files,set:(e,t)=>{e.files=t}},metadata:m},d,u),e(this,null,n,{kind:"method",name:"onChange",static:!1,private:!1,access:{has:e=>"onChange"in e,get:e=>e.onChange},metadata:m},null,c),e(null,a={value:s},i,{kind:"class",name:s.name,metadata:m},null,r),s=a.value,m&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:m}),t(s,r)}#C=(t(this,c),t(this,d,null));get files(){return this.#C}set files(e){this.#C=e}#A=(t(this,u),new Map);#n=S("template");connectedCallback(){this.onChange()}onChange(){const e=this.#n();if(this.files&&this.files.length){this.hidden=!1;let t=new Set;for(let a of this.files)if(t.add(a.name),!this.#A.has(a.name)){const t=e.content.cloneNode(!0).childNodes[1];t.id=a.name,t.append(document.createTextNode(a.name));t.querySelector("img").src=URL.createObjectURL(a),this.shadowRoot.append(t),this.#A.set(a.name,t)}for(let[e,a]of this.#A)t.has(e)||(a.remove(),this.#A.delete(e))}else this.hidden=!0}})})();const H=new Map;var z;(()=>{let a,s,o,n=[w({tagName:"usa-icon",shadowDom:[h`:host{display:inline-block;height:2rem;position:relative;width:2rem}svg{fill:currentColor;height:100%;width:100%}`]}),l()],i=[],r=HTMLElement,d=[],m=[];(class extends r{static{s=this}static{const l="function"==typeof Symbol&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;o=[k()],e(this,null,o,{kind:"accessor",name:"icon",static:!1,private:!1,access:{has:e=>"icon"in e,get:e=>e.icon,set:(e,t)=>{e.icon=t}},metadata:l},d,m),e(null,a={value:s},n,{kind:"class",name:s.name,metadata:l},null,i),s=a.value,l&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:l}),t(s,i)}#P=t(this,d,"accessibility_new");get icon(){return this.#P}set icon(e){this.#P=e}ariaHidden=(t(this,m),"true");#M=this.attachShadow({mode:"open"});#N=c(C);#D=!1;connectedCallback(){this.#D=!0,this.#L()}attributeChangedCallback(){this.#D&&this.#L()}async#L(){this.#M.innerHTML=await this.fetchIcon()}async fetchIcon(){const e=H.get(this.icon);if(e)return e;const t=this.#N(),a=fetch(`${t.iconPath}/${this.icon}.svg`).then((e=>e.text()));return H.set(this.icon,a),a}})})(),(()=>{let a,s,o,n,i,r,l,c,d,u=[w({tagName:"usa-input",shadowDomOpts:{mode:"open",delegatesFocus:!0},shadowDom:[h`*{box-sizing:border-box}:host{font-size:1.06rem;line-height:1.3;display:block;font-weight:400;max-width:30rem;margin-bottom:1.5rem}input{border-width:1px;border-color:#5c5c5c;border-style:solid;border-radius:0;color:#1b1b1b;display:block;height:2.5rem;line-height:1.3;font-size:1.06rem;margin-top:.5rem;padding:.5rem;width:100%}input:not(:disabled):focus{outline:.25rem solid #2491ff;outline-offset:0}`,m`<label><slot></slot><input></label>`]})],b=[],g=HTMLElement,p=[],f=[],v=[],y=[],C=[],j=[],O=[],E=[],A=[];(class extends g{static{s=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(g[Symbol.metadata]??null):void 0;o=[k()],n=[k()],i=[k()],r=[k({reflect:!1}),L()],l=[x()],c=[T()],d=[_("input")],e(this,null,o,{kind:"accessor",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:t},f,v),e(this,null,n,{kind:"accessor",name:"autocomplete",static:!1,private:!1,access:{has:e=>"autocomplete"in e,get:e=>e.autocomplete,set:(e,t)=>{e.autocomplete=t}},metadata:t},y,C),e(this,null,i,{kind:"accessor",name:"placeholder",static:!1,private:!1,access:{has:e=>"placeholder"in e,get:e=>e.placeholder,set:(e,t)=>{e.placeholder=t}},metadata:t},j,O),e(this,null,r,{kind:"accessor",name:"value",static:!1,private:!1,access:{has:e=>"value"in e,get:e=>e.value,set:(e,t)=>{e.value=t}},metadata:t},E,A),e(this,null,l,{kind:"method",name:"onReady",static:!1,private:!1,access:{has:e=>"onReady"in e,get:e=>e.onReady},metadata:t},null,p),e(this,null,c,{kind:"method",name:"onChange",static:!1,private:!1,access:{has:e=>"onChange"in e,get:e=>e.onChange},metadata:t},null,p),e(this,null,d,{kind:"method",name:"onInputChange",static:!1,private:!1,access:{has:e=>"onInputChange"in e,get:e=>e.onInputChange},metadata:t},null,p),e(null,a={value:s},u,{kind:"class",name:s.name,metadata:t},null,b),s=a.value,t&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static formAssociated=!0;#k=(t(this,p),t(this,f,""));get name(){return this.#k}set name(e){this.#k=e}#T=(t(this,v),t(this,y,"on"));get autocomplete(){return this.#T}set autocomplete(e){this.#T=e}#H=(t(this,C),t(this,j,""));get placeholder(){return this.#H}set placeholder(e){this.#H=e}#b=(t(this,O),t(this,E,""));get value(){return this.#b}set value(e){this.#b=e}get selectionStart(){const{selectionStart:e}=this.#j();return e}#p=(t(this,A),this.attachInternals());#j=S("input");setSelectionRange(e,t){this.#j().setSelectionRange(e,t)}onReady(){this.#j().autofocus=this.autofocus}onChange(){this.#j().value=this.value}onInputChange(){const e=this.#j();this.#p.setFormValue(e.value),this.value=e.value}attributeChangedCallback(e){const t=this.#j();switch(e){case"autocomplete":t.autocomplete=this.autocomplete;break;case"placeholder":t.placeholder=this.placeholder;break;case"name":t.name=this.name;break;case"value":t.value=this.value,this.#p.setFormValue(this.value)}}static{t(s,b)}})})(),function(e){e.Any="*",e.Number="9",e.Letter="A"}(z||(z={}));const R=Object.values(z),I={Letters:/^[a-z]/i,Numbers:/^[0-9]/i};function F(e,t){const a=e.replace(/[^a-z0-9]/gi,""),s=a.split("");let o=0,n="";for(var i=0;i<t.length;i++){const e=t[i],a=s[o];a&&e&&(e===z.Any?(n+=a,o++):e===z.Number?(/^[0-9]/i.test(a)&&(n+=a),o++):e===z.Letter?(/^[a-z]/i.test(a)&&(n+=a),o++):n+=e)}return{raw:a,formatted:n}}(()=>{let a,s,o,n,i,r=[w({tagName:"usa-input-mask",shadowDom:[h`:host{display:contents}`,m`<slot></slot>`]})],l=[],c=HTMLElement,d=[],u=[],b=[];(class extends c{static{s=this}static{const m="function"==typeof Symbol&&Symbol.metadata?Object.create(c[Symbol.metadata]??null):void 0;o=[k()],n=[_("input")],i=[_("keydown")],e(this,null,o,{kind:"accessor",name:"mask",static:!1,private:!1,access:{has:e=>"mask"in e,get:e=>e.mask,set:(e,t)=>{e.mask=t}},metadata:m},u,b),e(this,null,n,{kind:"method",name:"onInput",static:!1,private:!1,access:{has:e=>"onInput"in e,get:e=>e.onInput},metadata:m},null,d),e(this,null,i,{kind:"method",name:"onKeyDown",static:!1,private:!1,access:{has:e=>"onKeyDown"in e,get:e=>e.onKeyDown},metadata:m},null,d),e(null,a={value:s},r,{kind:"class",name:s.name,metadata:m},null,l),s=a.value,m&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:m}),t(s,l)}#z=(t(this,d),t(this,u,""));get mask(){return this.#z}set mask(e){this.#z=e}connectedCallback(){for(let e of this.querySelectorAll("[mask]")){const{formatted:t}=F(e.value,this.#R(e));e.value=t}}async onInput(e){const t=e.target,a=t.selectionStart||0,s=t.value,o=this.#R(t),{formatted:n}=F(t.value,o);t.value=n;const i=t.value.length-s.length,r=o[a-1];await Promise.resolve(),r&&!R.includes(r)&&i>0?t.setSelectionRange(a+i,a+i):t.setSelectionRange(a,a),s!==t.value&&t.dispatchEvent(new Event("input",{bubbles:!0}))}onKeyDown(e){const t=e.target,a=this.#R(t),s=a[t.selectionStart||0];1===e.key.length&&/^[a-z0-9]/i.test(e.key)&&(t.value.length>=a.length?e.preventDefault():s===z.Number?I.Numbers.test(e.key)||e.preventDefault():s===z.Letter&&(I.Letters.test(e.key)||e.preventDefault()))}#R(e){return this.mask||e.getAttribute("mask")||""}constructor(){super(...arguments),t(this,b)}})})(),(()=>{let a,s,o,n,i,r,l=[w({tagName:"usa-link",shadowDom:[h`:host{display:inline-flex;color:#005ea2;text-decoration:underline}a{color:inherit;text-decoration:inherit;display:inherit}`,m`<a><slot></slot></a>`]})],c=[],d=HTMLElement,u=[],b=[],g=[],p=[],f=[],v=[],y=[],_=[];(class extends d{static{s=this}static{const m="function"==typeof Symbol&&Symbol.metadata?Object.create(d[Symbol.metadata]??null):void 0;o=[k()],n=[k()],i=[k()],r=[k({observed:!1})],e(this,null,o,{kind:"accessor",name:"href",static:!1,private:!1,access:{has:e=>"href"in e,get:e=>e.href,set:(e,t)=>{e.href=t}},metadata:m},u,b),e(this,null,n,{kind:"accessor",name:"target",static:!1,private:!1,access:{has:e=>"target"in e,get:e=>e.target,set:(e,t)=>{e.target=t}},metadata:m},g,p),e(this,null,i,{kind:"accessor",name:"title",static:!1,private:!1,access:{has:e=>"title"in e,get:e=>e.title,set:(e,t)=>{e.title=t}},metadata:m},f,v),e(this,null,r,{kind:"accessor",name:"disabled",static:!1,private:!1,access:{has:e=>"disabled"in e,get:e=>e.disabled,set:(e,t)=>{e.disabled=t}},metadata:m},y,_),e(null,a={value:s},l,{kind:"class",name:s.name,metadata:m},null,c),s=a.value,m&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:m}),t(s,c)}#I=t(this,u,"");get href(){return this.#I}set href(e){this.#I=e}#F=(t(this,b),t(this,g,""));get target(){return this.#F}set target(e){this.#F=e}#V=(t(this,p),t(this,f,""));get title(){return this.#V}set title(e){this.#V=e}#u=(t(this,v),t(this,y,!1));get disabled(){return this.#u}set disabled(e){this.#u=e}#W=(t(this,_),S("a"));attributeChangedCallback(e){const t=this.#W();switch(e){case"href":t.href=this.href;break;case"target":t.target=this.target;break;case"title":t.target=this.title}}})})(),(()=>{let a,s,o,n,i,r,l,c=[w({tagName:"usa-radio",shadowDom:[h`:host{display:flex;flex-direction:column;gap:1rem;max-width:30rem;margin-bottom:1.5rem}label{display:flex;cursor:pointer;gap:.5rem}input{position:absolute;left:-999em;right:auto}label::before{content:" ";display:block;left:0;height:1.25rem;border-radius:99rem;width:1.25rem;background:#fff;box-shadow:0 0 0 2px #1b1b1b;flex:0 0 1.25rem}label:has(input:checked)::before{background-color:#005ea2;box-shadow:0 0 0 2px #005ea2,inset 0 0 0 2px #fff}label:has(input:focus)::before{outline:.25rem solid #2491ff;outline-offset:.25rem}:host([tiled]){gap:.5rem}:host([tiled]) label{background-color:#fff;border:2px solid #c9c9c9;color:#1b1b1b;border-radius:.25rem;padding:.75rem 1rem .75rem .75rem}:host([tiled]) label:has(input:checked){background-color:rgba(0,94,162,.1);border-color:#005ea2}slot{display:flex}`,m`<slot id="main"></slot>`]})],d=[],u=HTMLElement,b=[],g=[],p=[],f=[],v=[],y=[],S=[];(class extends u{static{s=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(u[Symbol.metadata]??null):void 0;o=[k()],n=[k()],i=[k({observed:!1})],r=[_("change")],l=[_("usa::radio::option::added",(e=>e))],e(this,null,o,{kind:"accessor",name:"value",static:!1,private:!1,access:{has:e=>"value"in e,get:e=>e.value,set:(e,t)=>{e.value=t}},metadata:t},g,p),e(this,null,n,{kind:"accessor",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:t},f,v),e(this,null,i,{kind:"accessor",name:"tiled",static:!1,private:!1,access:{has:e=>"tiled"in e,get:e=>e.tiled,set:(e,t)=>{e.tiled=t}},metadata:t},y,S),e(this,null,r,{kind:"method",name:"onChange",static:!1,private:!1,access:{has:e=>"onChange"in e,get:e=>e.onChange},metadata:t},null,b),e(this,null,l,{kind:"method",name:"onOptionAdded",static:!1,private:!1,access:{has:e=>"onOptionAdded"in e,get:e=>e.onOptionAdded},metadata:t},null,b),e(null,a={value:s},c,{kind:"class",name:s.name,metadata:t},null,d),s=a.value,t&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static formAssociated=!0;#b=(t(this,b),t(this,g,""));get value(){return this.#b}set value(e){this.#b=e}#k=(t(this,p),t(this,f,""));get name(){return this.#k}set name(e){this.#k=e}#_=(t(this,v),t(this,y,!1));get tiled(){return this.#_}set tiled(e){this.#_=e}get shadow(){return this.shadowRoot}#p=(t(this,S),this.attachInternals());onChange(e){e.target instanceof HTMLInputElement&&e.target.checked&&(this.value=e.target.value,this.#p.setFormValue(e.target.value))}connectedCallback(){this.value&&this.#p.setFormValue(this.value)}attributeChangedCallback(){for(let e of this.shadow.querySelectorAll("usa-radio-option"))e.checked=e.value===this.value,e.name=this.name}onOptionAdded(e){e.stopPropagation();const t=e.target;t.checked=t.value===this.value,t.name=this.name,this.shadow.append(t.radio)}static{t(s,d)}})})(),(()=>{let a,s,o,n,i,r=[w({tagName:"usa-radio-option",shadowDom:[h`:host{display:flex;flex-direction:column;margin-top:.05rem}`,m`<slot></slot>`]})],l=[],c=HTMLElement,d=[],u=[],b=[],g=[],p=[],f=[];(class extends c{static{s=this}static{const m="function"==typeof Symbol&&Symbol.metadata?Object.create(c[Symbol.metadata]??null):void 0;o=[k()],n=[k()],i=[k()],e(this,null,o,{kind:"accessor",name:"value",static:!1,private:!1,access:{has:e=>"value"in e,get:e=>e.value,set:(e,t)=>{e.value=t}},metadata:m},d,u),e(this,null,n,{kind:"accessor",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:m},b,g),e(this,null,i,{kind:"accessor",name:"checked",static:!1,private:!1,access:{has:e=>"checked"in e,get:e=>e.checked,set:(e,t)=>{e.checked=t}},metadata:m},p,f),e(null,a={value:s},r,{kind:"class",name:s.name,metadata:m},null,l),s=a.value,m&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:m}),t(s,l)}#b=t(this,d,"");get value(){return this.#b}set value(e){this.#b=e}#k=(t(this,u),t(this,b,""));get name(){return this.#k}set name(e){this.#k=e}#y=(t(this,g),t(this,p,!1));get checked(){return this.#y}set checked(e){this.#y=e}radio=(t(this,f),document.createElement("label"));#j=document.createElement("input");#K=document.createElement("slot");constructor(){super(),this.#j.type="radio",this.radio.append(this.#j,this.#K)}attributeChangedCallback(){this.slot=this.value,this.#j.name=this.name,this.#j.value=this.value,this.#j.checked=this.checked,this.#K.name=this.value}connectedCallback(){this.dispatchEvent(new Event("usa::radio::option::added",{bubbles:!0}))}disconnectedCallback(){this.radio.remove()}})})(),(()=>{let a,s,o,n,i,r,l=[w({tagName:"usa-select",shadowDom:[h`:host{display:block;font-family:Source Sans Pro Web,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;line-height:1.3;position:relative;width:100%;max-width:30rem;margin-bottom:1.5rem}select{font-size:1.06rem;appearance:none;border-width:1px;border-color:#5c5c5c;border-style:solid;border-radius:0;color:#1b1b1b;display:block;height:2.5rem;margin-top:.5rem;padding:.5rem;width:100%}select:not(:disabled):focus{outline:.25rem solid #2491ff;outline-offset:0}usa-icon{position:absolute;right:.5rem;bottom:12%;height:1.5rem;width:1.5rem}`,m`<usa-icon icon="unfold_more"></usa-icon><label><div class="label"><slot></slot></div><select></select></label>`]})],c=[],d=HTMLElement,u=[],b=[],g=[],p=[],f=[];(class extends d{static{s=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(d[Symbol.metadata]??null):void 0;o=[k()],n=[k()],i=[_("change")],r=[_("usa::select::option::added")],e(this,null,o,{kind:"accessor",name:"value",static:!1,private:!1,access:{has:e=>"value"in e,get:e=>e.value,set:(e,t)=>{e.value=t}},metadata:t},b,g),e(this,null,n,{kind:"accessor",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:t},p,f),e(this,null,i,{kind:"method",name:"onSelectChange",static:!1,private:!1,access:{has:e=>"onSelectChange"in e,get:e=>e.onSelectChange},metadata:t},null,u),e(this,null,r,{kind:"method",name:"onOptionAdded",static:!1,private:!1,access:{has:e=>"onOptionAdded"in e,get:e=>e.onOptionAdded},metadata:t},null,u),e(null,a={value:s},l,{kind:"class",name:s.name,metadata:t},null,c),s=a.value,t&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static formAssociated=!0;#b=(t(this,u),t(this,b,""));get value(){return this.#b}set value(e){this.#b=e}#k=(t(this,g),t(this,p,""));get name(){return this.#k}set name(e){this.#k=e}#q=(t(this,f),S("select"));#p=this.attachInternals();connectedCallback(){const e=this.#q();e.value=this.value,e.name=this.name,this.#p.setFormValue(this.value)}onSelectChange(){const e=this.#q();this.#p.setFormValue(e.value)}onOptionAdded(e){const t=e.target;e.stopPropagation();this.#q().append(t.option)}static{t(s,c)}})})(),(()=>{let a,s,o,n,i=[w({tagName:"usa-select-option",shadowDom:[h`:host{display:none}`,m`<slot></slot>`]})],r=[],l=HTMLElement,c=[],d=[],u=[];(class extends l{static{s=this}static{const m="function"==typeof Symbol&&Symbol.metadata?Object.create(l[Symbol.metadata]??null):void 0;o=[k()],n=[_("slotchange")],e(this,null,o,{kind:"accessor",name:"value",static:!1,private:!1,access:{has:e=>"value"in e,get:e=>e.value,set:(e,t)=>{e.value=t}},metadata:m},d,u),e(this,null,n,{kind:"method",name:"onSlotChange",static:!1,private:!1,access:{has:e=>"onSlotChange"in e,get:e=>e.onSlotChange},metadata:m},null,c),e(null,a={value:s},i,{kind:"class",name:s.name,metadata:m},null,r),s=a.value,m&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:m}),t(s,r)}#b=(t(this,c),t(this,d,""));get value(){return this.#b}set value(e){this.#b=e}option=(t(this,u),document.createElement("option"));attributeChangedCallback(){this.option.value=this.value}connectedCallback(){this.dispatchEvent(new Event("usa::select::option::added",{bubbles:!0}))}onSlotChange(){this.option.textContent=this.textContent}disconnectedCallback(){this.option.remove()}})})(),(()=>{let a,s,o,n=[w({tagName:"usa-tag",shadowDom:[h`:host{font-family:Source Sans Pro Web,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;font-size:.93rem;color:#fff;text-transform:uppercase;background-color:#5c5c5c;border-radius:2px;margin-right:.25rem;padding:1px .5rem}:host([variant=big]){padding-left:.5rem;padding-right:.5rem;font-size:1.06rem}`,m`<slot></slot>`]})],i=[],r=HTMLElement,l=[],c=[];(class extends r{static{s=this}static{const d="function"==typeof Symbol&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;o=[k()],e(this,null,o,{kind:"accessor",name:"variant",static:!1,private:!1,access:{has:e=>"variant"in e,get:e=>e.variant,set:(e,t)=>{e.variant=t}},metadata:d},l,c),e(null,a={value:s},n,{kind:"class",name:s.name,metadata:d},null,i),s=a.value,d&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d}),t(s,i)}#h=t(this,l,"default");get variant(){return this.#h}set variant(e){this.#h=e}constructor(){super(...arguments),t(this,c)}})})(),(()=>{let a,s,o,n,i,r,l=[w({tagName:"usa-accordion",shadowDomOpts:{mode:"open",delegatesFocus:!0},shadowDom:[h`*{box-sizing:border-box}:host{display:block}:host(:not(:first-child)) summary{margin-top:.5rem}summary{align-items:center;border:0;border-radius:0;box-shadow:none;justify-content:normal;text-align:left;padding:0;color:#1b1b1b;background-color:#f0f0f0;cursor:pointer;display:flex;font-weight:700;margin:0;padding:1rem 1.25rem 1rem 1.25rem;text-decoration:none;width:100%}summary::-webkit-details-marker{display:none}slot[name=heading]{display:block;flex:1 1 auto}slot[name=heading]::slotted(*){margin:0}.content{padding-bottom:1.5rem;padding-left:1rem;padding-top:1.5rem}usa-icon[icon=remove]{display:none}details[open] usa-icon[icon=add]{display:none}details[open] usa-icon[icon=remove]{display:block}summary:hover{background-color:#e6e6e6}summary:focus{outline:.25rem solid #2491ff;outline-offset:0}`,m`<details><summary><slot name="heading"></slot><usa-icon icon="add"></usa-icon><usa-icon icon="remove"></usa-icon></summary><div class="content"><slot></slot></div></details>`]})],c=[],d=HTMLElement,u=[],b=[],g=[],p=[],f=[];(class extends d{static{s=this}static{const m="function"==typeof Symbol&&Symbol.metadata?Object.create(d[Symbol.metadata]??null):void 0;o=[k()],n=[k()],i=[_("click","summary")],r=[_("usa::accordion::toggle",(()=>document.body))],e(this,null,o,{kind:"accessor",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:m},b,g),e(this,null,n,{kind:"accessor",name:"open",static:!1,private:!1,access:{has:e=>"open"in e,get:e=>e.open,set:(e,t)=>{e.open=t}},metadata:m},p,f),e(this,null,i,{kind:"method",name:"onClick",static:!1,private:!1,access:{has:e=>"onClick"in e,get:e=>e.onClick},metadata:m},null,u),e(this,null,r,{kind:"method",name:"onAccordionToggle",static:!1,private:!1,access:{has:e=>"onAccordionToggle"in e,get:e=>e.onAccordionToggle},metadata:m},null,u),e(null,a={value:s},l,{kind:"class",name:s.name,metadata:m},null,c),s=a.value,m&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:m}),t(s,c)}#k=(t(this,u),t(this,b,""));get name(){return this.#k}set name(e){this.#k=e}#G=(t(this,g),t(this,p,!1));get open(){return this.#G}set open(e){this.#G=e}#$=(t(this,f),S("details"));attributeChangedCallback(){this.#$().open=this.open}onClick(e){e.preventDefault(),this.dispatchEvent(new V(!this.open))}onAccordionToggle(e){e.target.name===this.name?this.open=e.target===this&&e.open:e.target===this&&(this.open=e.open)}})})();class V extends Event{open;get target(){return super.target}constructor(e){super("usa::accordion::toggle",{bubbles:!0}),this.open=e}}(()=>{let a,s,o,n=[w({tagName:"usa-side-nav",shadowDom:[h`:host{display:block;font-size:1.06rem;line-height:1.3;border-bottom:1px solid #e6e6e6}`,m`<slot></slot>`]})],i=[],r=HTMLElement,l=[],c=[];(class extends r{static{s=this}static{const d="function"==typeof Symbol&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;o=[k()],e(this,null,o,{kind:"accessor",name:"role",static:!1,private:!1,access:{has:e=>"role"in e,get:e=>e.role,set:(e,t)=>{e.role=t}},metadata:d},l,c),e(null,a={value:s},n,{kind:"class",name:s.name,metadata:d},null,i),s=a.value,d&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d}),t(s,i)}#U=t(this,l,"navigation");get role(){return this.#U}set role(e){this.#U=e}constructor(){super(...arguments),t(this,c)}})})(),(()=>{let a,s,o,n=[w({tagName:"usa-side-nav-item",shadowDom:[h`:host{--usa-nav-item-padding-left:2rem;display:block;border-top:1px solid #e6e6e6}.side-nav-item{display:flex;padding:.5rem 1rem;text-decoration:none;position:relative}.side-nav-item:hover{background-color:#f0f0f0;color:#005ea2}::slotted(*){color:#5c5c5c;text-decoration:none;display:block;width:100%}:host(:hover) ::slotted(*){color:#005ea2}:host([current]) ::slotted(:not(usa-side-nav-item)){color:#005ea2;font-weight:700}:host([current]) .side-nav-item::after{background-color:#005ea2;border-radius:99rem;content:"";display:block;position:absolute;bottom:.25rem;top:.25rem;width:.25rem;left:0}:host([slot=children]) .side-nav-item{padding-left:var(--usa-nav-item-padding-left)}:host([slot=children]) ::slotted(usa-side-nav-item){--usa-nav-item-padding-left:3rem}:host([slot=children]) .side-nav-item::after{display:none}`,m`<div class="side-nav-item"><slot></slot></div><slot name="children"></slot>`]})],i=[],r=HTMLElement,l=[],c=[];(class extends r{static{s=this}static{const d="function"==typeof Symbol&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;o=[k({observed:!1})],e(this,null,o,{kind:"accessor",name:"current",static:!1,private:!1,access:{has:e=>"current"in e,get:e=>e.current,set:(e,t)=>{e.current=t}},metadata:d},l,c),e(null,a={value:s},n,{kind:"class",name:s.name,metadata:d},null,i),s=a.value,d&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d}),t(s,i)}#Y=t(this,l,!1);get current(){return this.#Y}set current(e){this.#Y=e}constructor(){super(...arguments),t(this,c)}})})(),(()=>{let a,s,o=[w({tagName:"usa-summary-box",shadowDom:[h`:host{font-family:Source Sans Pro Web,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;font-size:1.06rem;line-height:1.5;color:#1b1b1b;background-color:#e7f6f8;border-radius:.25rem;border:1px #99deea solid;padding:1.5rem;position:relative;display:block}`,m`<slot></slot>`]})],n=[],i=HTMLElement;(class extends i{static{s=this}static{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(i[Symbol.metadata]??null):void 0;e(null,a={value:s},o,{kind:"class",name:s.name,metadata:r},null,n),s=a.value,r&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),t(s,n)}})})(),(()=>{let a,s,o,n=[w({tagName:"usa-step-indicator",shadowDom:[h`:host{display:flex;gap:2px;counter-reset:usa-step-indicator;padding-top:1rem;margin-bottom:1rem}`,m`<slot></slot>`]})],i=[],r=HTMLElement,l=[],c=[];(class extends r{static{s=this}static{const d="function"==typeof Symbol&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;o=[k()],e(this,null,o,{kind:"accessor",name:"role",static:!1,private:!1,access:{has:e=>"role"in e,get:e=>e.role,set:(e,t)=>{e.role=t}},metadata:d},l,c),e(null,a={value:s},n,{kind:"class",name:s.name,metadata:d},null,i),s=a.value,d&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d}),t(s,i)}#U=t(this,l,"list");get role(){return this.#U}set role(e){this.#U=e}constructor(){super(...arguments),t(this,c)}})})(),(()=>{let a,s,o,n,i,r=[w({tagName:"usa-step",shadowDom:[h`:host{color:#5c5c5c;display:block;flex:1 1 0%;position:relative;counter-increment:usa-step-indicator}:host([state=complete]){color:#162e51}:host([state=complete])::before{background-color:#162e51}:host([state=current]){color:#005ea2;font-weight:700}:host([state=current])::before{background-color:#005ea2}:host:before{background-color:#919191;content:"";display:block;height:.5rem}.label{display:block;font-size:1.06rem;margin-top:.5rem;padding-right:2rem;text-align:left}:host([counter]) .label{margin-top:1.5rem}:host([counter]) .counter:after{content:counter(usa-step-indicator);height:2.5rem;border-radius:99rem;width:2.5rem;background-color:#fff;box-shadow:inset 0 0 0 .25rem #919191,0 0 0 .25rem #fff;color:#5c5c5c;display:flex;align-items:center;justify-content:center;font-weight:700;left:0;line-height:.9;padding:calc((2.5rem - 2ex * .9) * .5);position:absolute;z-index:100;top:0;transform:translateY(-40%);box-sizing:border-box}:host([counter][state=complete]) .counter::after{background-color:#162e51;box-shadow:0 0 0 .25rem #fff;color:#fff}:host([counter][state=current]) .counter::after{background-color:#005ea2;box-shadow:0 0 0 .25rem #fff;color:#fff}:host([counter=small]) .counter:after{height:1.5rem;width:1.5rem;font-size:.93rem}:host([counter]:last-child):before{width:0}`,m`<div class="counter" aria-hidden="true"></div><div class="label"><slot></slot></div>`]})],l=[],c=HTMLElement,d=[],u=[],b=[],g=[],p=[];(class extends c{static{s=this}static{const m="function"==typeof Symbol&&Symbol.metadata?Object.create(c[Symbol.metadata]??null):void 0;var h;o=[k()],n=[k()],i=[(h="state",function(e,t){const a=y.read(t.metadata),s=a.attrChanges.get(h)??new Set;s.add(e),a.attrChanges.set(h,s)})],e(this,null,o,{kind:"accessor",name:"state",static:!1,private:!1,access:{has:e=>"state"in e,get:e=>e.state,set:(e,t)=>{e.state=t}},metadata:m},u,b),e(this,null,n,{kind:"accessor",name:"role",static:!1,private:!1,access:{has:e=>"role"in e,get:e=>e.role,set:(e,t)=>{e.role=t}},metadata:m},g,p),e(this,null,i,{kind:"method",name:"onStateAttrChanged",static:!1,private:!1,access:{has:e=>"onStateAttrChanged"in e,get:e=>e.onStateAttrChanged},metadata:m},null,d),e(null,a={value:s},r,{kind:"class",name:s.name,metadata:m},null,l),s=a.value,m&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:m}),t(s,l)}#B=(t(this,d),t(this,u,""));get state(){return this.#B}set state(e){this.#B=e}#U=(t(this,b),t(this,g,"listitem"));get role(){return this.#U}set role(e){this.#U=e}onStateAttrChanged(){"current"===this.state&&(this.ariaCurrent="step")}constructor(){super(...arguments),t(this,p)}})})(),(()=>{let a,s,o,n,i=[w({tagName:"usa-modal",shadowDom:[h`*{box-sizing:border-box}:host{display:contents}dialog{border:none;font-size:1.06rem;line-height:1.5;border-radius:.5rem;background:#fff;color:#1b1b1b;max-width:30rem;padding-top:4rem;padding-left:4rem;padding-right:4rem;padding-bottom:2rem;width:100%}::backdrop{background:rgba(0,0,0,.7)}`,m`<dialog><slot></slot></dialog>`]})],r=[],l=HTMLElement,c=[];(class extends l{static{s=this}static{const d="function"==typeof Symbol&&Symbol.metadata?Object.create(l[Symbol.metadata]??null):void 0;o=[_("click",(()=>document.body))],n=[_("click",(e=>e))],e(this,null,o,{kind:"method",name:"onGlobalModalAction",static:!1,private:!1,access:{has:e=>"onGlobalModalAction"in e,get:e=>e.onGlobalModalAction},metadata:d},null,c),e(this,null,n,{kind:"method",name:"onModalAction",static:!1,private:!1,access:{has:e=>"onModalAction"in e,get:e=>e.onModalAction},metadata:d},null,c),e(null,a={value:s},i,{kind:"class",name:s.name,metadata:d},null,r),s=a.value,d&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d}),t(s,r)}modalAction=(t(this,c),null);#J=S("dialog");openModal(){this.#J().showModal()}closeModal(){this.#J().close()}onGlobalModalAction(e){if(e.target instanceof Element){e.target.getAttribute("modal-target")===this.id&&this.openModal()}}onModalAction(e){e.target instanceof Element&&(this.modalAction=e.target.getAttribute("modal-action"),this.closeModal(),this.dispatchEvent(new Event("usa::modal::close")))}})})(),(()=>{let a,s,o,n=[w({tagName:"usa-modal-close",shadowDom:[h`*{box-sizing:border-box}:host{display:block;position:absolute;top:1rem;right:1rem}button{display:flex;align-items:center;justify-content:center;background:0 0;border:none;cursor:pointer;height:100%;width:100%;border-radius:100%;padding:0;margin:0}button:focus{outline:.25rem solid #2491ff;outline-offset:0}`,m`<button aria-label="close modal"><usa-icon icon="close"></usa-icon></button>`]})],i=[],r=HTMLElement,l=[],c=[];(class extends r{static{s=this}static{const d="function"==typeof Symbol&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;o=[k({name:"modal-action"})],e(this,null,o,{kind:"accessor",name:"modalAction",static:!1,private:!1,access:{has:e=>"modalAction"in e,get:e=>e.modalAction,set:(e,t)=>{e.modalAction=t}},metadata:d},l,c),e(null,a={value:s},n,{kind:"class",name:s.name,metadata:d},null,i),s=a.value,d&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d}),t(s,i)}#Q=t(this,l,"close");get modalAction(){return this.#Q}set modalAction(e){this.#Q=e}constructor(){super(...arguments),t(this,c)}})})(),(()=>{let a,s,o=[w({tagName:"usa-modal-heading",shadowDom:[h`:host{font-family:Merriweather Web,Georgia,Cambria,Times New Roman,Times,serif!important;font-size:1.22rem}h2{margin-top:0;line-height:1.4;font-size:1.45rem}`,m`<h2><slot></slot></h2>`]})],n=[],i=HTMLElement;(class extends i{static{s=this}static{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(i[Symbol.metadata]??null):void 0;e(null,a={value:s},o,{kind:"class",name:s.name,metadata:r},null,n),s=a.value,r&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),t(s,n)}})})(),(()=>{let a,s,o,n,i=[w({tagName:"usa-card",shadowDom:[h`:host{color:#1b1b1b;background-color:#fff;font-size:1.06rem;line-height:1.5;border-width:2px;border-color:#e6e6e6;border-style:solid;display:flex;flex-direction:column;position:relative;border-radius:.25rem}:host([variant=flag]){padding-left:15rem}:host([variant=flag]) ::slotted(usa-card-media){position:absolute;bottom:0;top:0;left:0;width:15rem}:host([variant=flag]) ::slotted(usa-card-media[variant=inset]){padding-bottom:1.5rem;padding-right:0}`,m`<slot></slot>`]})],r=[],l=HTMLElement,c=[],d=[],u=[],b=[];(class extends l{static{s=this}static{const m="function"==typeof Symbol&&Symbol.metadata?Object.create(l[Symbol.metadata]??null):void 0;o=[k()],n=[k()],e(this,null,o,{kind:"accessor",name:"role",static:!1,private:!1,access:{has:e=>"role"in e,get:e=>e.role,set:(e,t)=>{e.role=t}},metadata:m},c,d),e(this,null,n,{kind:"accessor",name:"variant",static:!1,private:!1,access:{has:e=>"variant"in e,get:e=>e.variant,set:(e,t)=>{e.variant=t}},metadata:m},u,b),e(null,a={value:s},i,{kind:"class",name:s.name,metadata:m},null,r),s=a.value,m&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:m}),t(s,r)}#U=t(this,c,"listitem");get role(){return this.#U}set role(e){this.#U=e}#h=(t(this,d),t(this,u,"default"));get variant(){return this.#h}set variant(e){this.#h=e}constructor(){super(...arguments),t(this,b)}})})(),(()=>{let a,s,o=[w({tagName:"usa-card-header",shadowDom:[h`:host{font-family:Merriweather Web,Georgia,Cambria,Times New Roman,Times,serif!important;display:flex;padding:1.5rem 1.5rem .5rem;font-size:1.22rem;font-weight:700;line-height:1.2}`,m`<slot></slot>`]})],n=[],i=HTMLElement;(class extends i{static{s=this}static{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(i[Symbol.metadata]??null):void 0;e(null,a={value:s},o,{kind:"class",name:s.name,metadata:r},null,n),s=a.value,r&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),t(s,n)}})})(),(()=>{let a,s,o=[w({tagName:"usa-card-body",shadowDom:[h`:host{display:flex;flex:1 1 0%;padding:.5rem 1.5rem;flex-basis:auto}`,m`<slot></slot>`]})],n=[],i=HTMLElement;(class extends i{static{s=this}static{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(i[Symbol.metadata]??null):void 0;e(null,a={value:s},o,{kind:"class",name:s.name,metadata:r},null,n),s=a.value,r&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),t(s,n)}})})(),(()=>{let a,s,o=[w({tagName:"usa-card-footer",shadowDom:[h`:host{display:flex;padding:.5rem 1.5rem 1.5rem}`,m`<slot></slot>`]})],n=[],i=HTMLElement;(class extends i{static{s=this}static{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(i[Symbol.metadata]??null):void 0;e(null,a={value:s},o,{kind:"class",name:s.name,metadata:r},null,n),s=a.value,r&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),t(s,n)}})})(),(()=>{let a,s,o,n=[w({tagName:"usa-card-media",shadowDom:[h`:host{display:block;border-top-left-radius:calc(.25rem - 2px);border-top-right-radius:calc(.25rem - 2px);background-color:#f0f0f0;position:relative;overflow:hidden;box-sizing:border-box}:host([variant=inset]){background-color:#fff;padding-top:1.5rem;padding-left:1.5rem;padding-right:1.5rem}::slotted(img){display:block;height:100%;width:100%;-o-object-fit:cover;object-fit:cover}:host(:not(:first-child)){margin-top:.5rem;border-top-left-radius:0;border-top-right-radius:0}`,m`<slot></slot>`]})],i=[],r=HTMLElement,l=[],c=[];(class extends r{static{s=this}static{const d="function"==typeof Symbol&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;o=[k()],e(this,null,o,{kind:"accessor",name:"varint",static:!1,private:!1,access:{has:e=>"varint"in e,get:e=>e.varint,set:(e,t)=>{e.varint=t}},metadata:d},l,c),e(null,a={value:s},n,{kind:"class",name:s.name,metadata:d},null,i),s=a.value,d&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d}),t(s,i)}#X=t(this,l,"standard");get varint(){return this.#X}set varint(e){this.#X=e}constructor(){super(...arguments),t(this,c)}})})(),(()=>{let a,s,o,n=[w({tagName:"usa-card-group",shadowDom:[h`:host{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1rem;margin-bottom:1rem}:host([variant=flag]){grid-template-columns:repeat(auto-fit,minmax(450px,1fr))}`,m`<slot></slot>`]})],i=[],r=HTMLElement,l=[],c=[];(class extends r{static{s=this}static{const d="function"==typeof Symbol&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;o=[k()],e(this,null,o,{kind:"accessor",name:"role",static:!1,private:!1,access:{has:e=>"role"in e,get:e=>e.role,set:(e,t)=>{e.role=t}},metadata:d},l,c),e(null,a={value:s},n,{kind:"class",name:s.name,metadata:d},null,i),s=a.value,d&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d}),t(s,i)}#U=t(this,l,"list");get role(){return this.#U}set role(e){this.#U=e}constructor(){super(...arguments),t(this,c)}})})()}();
|
|
1
|
+
!function(){"use strict";function e(e,t,a,s,o,n){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var r,l=s.kind,c="getter"===l?"get":"setter"===l?"set":"value",d=!t&&e?s.static?e:e.prototype:null,m=t||(d?Object.getOwnPropertyDescriptor(d,s.name):{}),u=!1,h=a.length-1;h>=0;h--){var b={};for(var g in s)b[g]="access"===g?{}:s[g];for(var g in s.access)b.access[g]=s.access[g];b.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");n.push(i(e||null))};var p=(0,a[h])("accessor"===l?{get:m.get,set:m.set}:m[c],b);if("accessor"===l){if(void 0===p)continue;if(null===p||"object"!=typeof p)throw new TypeError("Object expected");(r=i(p.get))&&(m.get=r),(r=i(p.set))&&(m.set=r),(r=i(p.init))&&o.unshift(r)}else(r=i(p))&&("field"===l?o.unshift(r):m[c]=r)}d&&Object.defineProperty(d,s.name,m),u=!0}function t(e,t,a){for(var s=arguments.length>2,o=0;o<t.length;o++)a=s?t[o].call(e,a):t[o].call(e);return s?a:void 0}function a(e){return e[Symbol.metadata]}"function"==typeof SuppressedError&&SuppressedError;class s{#e;#t;get name(){return this.#e}get factory(){return this.#t}constructor(e,t){this.#e=e,this.#t=t}}const o=new WeakMap;class n{#a=new WeakMap;parent;providers;constructor(e=[],t){this.parent=t,this.providers=e}inject(e){if(this.#a.has(e)){const t=this.#a.get(e),s=a(e);return s&&i(t,s.onInjected),t}const t=this.#s(e);if(t){if(t.use){const a=t.use;return this.#o(e,(()=>new a))}if(t.factory){const a=t.factory;return this.#o(e,a)}throw new Error(`Provider for ${e.name} found but is missing either 'use' or 'factory'`)}if(this.parent)return this.parent.inject(e);if(e instanceof s){if(!e.factory)throw new Error(`Provider not found for "${e.name}"`);return this.#o(e,e.factory)}return this.#o(e,(()=>new e))}setParent(e){this.parent=e}clear(){this.#a=new WeakMap}#o(e,t){const s=t(this);if(this.#a.set(e,s),"object"==typeof s&&null!==s){const t=o.get(s);t&&t.setParent(this);const n=a(e);n&&(i(s,n.onCreated),i(s,n.onInjected))}return s}#s(e){if(this.providers)for(let t=0;t<this.providers.length;t++)if(this.providers[t].provide===e)return this.providers[t]}}function i(e,t){if(Array.isArray(t))for(let a of t)"function"==typeof a&&a.call(e)}function r(e,t){return{[e.name]:class extends e{constructor(...e){super(),this.addEventListener("finddiroot",(e=>{e.stopPropagation();const t=function(e){const t=e.composedPath();for(let e=1;e<t.length;e++){const a=t[e],s=o.get(a);if(s)return s;if(a===document.body)return null}return null}(e);t&&o.get(this)?.setParent(t)}))}connectedCallback(){this.isConnected&&(this.dispatchEvent(new Event("finddiroot",{bubbles:!0,composed:!0})),super.connectedCallback&&super.connectedCallback())}disconnectedCallback(){o.get(this)?.setParent(void 0),super.disconnectedCallback&&super.disconnectedCallback()}}}[e.name]}function l(e){return function(t,a){const s={[t.name]:class extends t{constructor(...t){super(...t);const a=new n(e?.providers);a.providers.push({provide:n,factory:()=>a}),o.set(this,a)}}};return"HTMLElement"in globalThis&&HTMLElement.prototype.isPrototypeOf(t.prototype)?r(s[t.name]):s[t.name]}}function c(e){return function(){const t=o.get(this);if(void 0===t){const e=this.constructor.name;throw new Error(`${e} is either not injectable or a service is being called in the constructor. \n Either add the @injectable() to your class or use the @injected callback method.`)}return t.inject(e)}}Symbol.metadata??=Symbol("Symbol.metadata");class d{#n;constructor(e,...t){this.#n=document.createElement("template"),this.#n.innerHTML=b(e)}apply(e){e.shadowRoot&&e.shadowRoot.append(this.#n.content.cloneNode(!0))}}function m(e,...t){return new d(e,...t)}class u{#i;constructor(e,...t){this.#i=new CSSStyleSheet,this.#i.replaceSync(b(e))}apply(e){e.shadowRoot&&(e.shadowRoot.adoptedStyleSheets=[...e.shadowRoot.adoptedStyleSheets,this.#i])}}function h(e){return new u(e)}function b(e){let t="";for(let a=0;a<e.length;a++)t+=e[a];return t}Symbol.metadata??=Symbol("Symbol.metadata");class g extends Map{}class p extends Map{}class f{attrs=new g;attrChanges=new p;listeners=[];onReady=new Set}class v extends WeakMap{read(e){return this.has(e)||this.set(e,new f),this.get(e)}}const y=new v;function k(e){return function({get:t,set:a},s){const o=e?.name??function(e){let t;if("symbol"==typeof e){if(!e.description)throw new Error("Cannot handle Symbol property without description");t=e.description}else t=e;return t.toLowerCase().replaceAll(" ","-")}(s.name),n=y.read(s.metadata),i=e?.reflect??!0;return n.attrs.set(o,{propName:s.name,observe:e?.observed??!0,reflect:i,getPropValue:t,setPropValue:a}),{set(e){if(i)if(!0===e)this.hasAttribute(o)||this.setAttribute(o,"");else if(!1===e)this.hasAttribute(o)&&this.removeAttribute(o);else{const t=String(e);this.getAttribute(o)!==t&&this.setAttribute(o,t)}a.call(this,e)}}}}function _(e,t){return function(a,s){const o=y.read(s.metadata);let n=e=>e.shadowRoot??e;t&&(n="string"==typeof t?e=>e.shadowRoot?e.shadowRoot.querySelector(t):e.querySelector(t):t),o.listeners.push({event:e,cb:a,selector:n})}}function w(e){return function(t,a){const s=y.read(a.metadata);a.addInitializer((function(){e?.tagName&&(customElements.get(e.tagName)||customElements.define(e.tagName,this))}));const o={[t.name]:class extends t{static observedAttributes=Array.from(s.attrs.keys());#r=new Set;constructor(...t){if(super(...t),e?.shadowDom){this.shadowRoot||this.attachShadow(e.shadowDomOpts??{mode:"open"});for(let t of e.shadowDom)t.apply(this)}for(let e of s.onReady)e.call(this)}attributeChangedCallback(e,t,a){const o=s.attrs.get(e),n=s.attrChanges.get(e);if(o){if(t!==a){const e=o.getPropValue.call(this);""===a?o.setPropValue.call(this,!0):"number"==typeof e?o.setPropValue.call(this,Number(a)):o.setPropValue.call(this,a)}if(n)for(let e of n)e.call(this,t,a);super.attributeChangedCallback&&super.attributeChangedCallback(e,t,a)}}connectedCallback(){if(this.isConnected){for(let{event:e,cb:t,selector:a}of s.listeners){const s=a(this);if(!s)throw new Error(`could not add listener to ${s}`);{const a=t.bind(this);s.addEventListener(e,a),this.#r.add((()=>{s.removeEventListener(e,a)}))}}!function(e,t){for(let[a,{getPropValue:s,reflect:o}]of t)if(o){const t=s.call(e);if(null!=t&&""!==t)if("boolean"==typeof t)!0===t&&(e.hasAttribute(a)||e.setAttribute(a,""));else{const s=String(t);e.getAttribute(a)!==s&&e.setAttribute(a,s)}}}(this,s.attrs),super.connectedCallback&&super.connectedCallback()}}disconnectedCallback(){for(let e of this.#r)e();super.disconnectedCallback&&super.disconnectedCallback()}}};return o[t.name]}}function S(e){let t=null;return function(){if(t)return t;if(t=this.shadowRoot?this.shadowRoot.querySelector(e):this.querySelector(e),!t)throw new Error("could not find element");return t}}function x(){return function(e,t){y.read(t.metadata).onReady.add(e)}}class C{iconPath="";iconCache=new Map}(()=>{let a,s,o,i=[w({tagName:"usa-config",shadowDom:[h`:host{display:contents}`,m`<slot></slot>`]}),l()],r=[],d=HTMLElement,u=[],b=[];(class extends d{static{s=this}static{const n="function"==typeof Symbol&&Symbol.metadata?Object.create(d[Symbol.metadata]??null):void 0;o=[k({name:"icon-path"})],e(this,null,o,{kind:"accessor",name:"iconPath",static:!1,private:!1,access:{has:e=>"iconPath"in e,get:e=>e.iconPath,set:(e,t)=>{e.iconPath=t}},metadata:n},u,b),e(null,a={value:s},i,{kind:"class",name:s.name,metadata:n},null,r),s=a.value,n&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n}),t(s,r)}#l=t(this,u,"/assets/usa-icons/");get iconPath(){return this.#l}set iconPath(e){this.#l=e}iconCache=(t(this,b),new Map);#c=c(n);connectedCallback(){const{providers:e}=this.#c();e.push({provide:C,factory:()=>this})}})})();const j={info:{icon:"info"},warning:{icon:"warning"},success:{icon:"check_circle"},error:{icon:"error"},emergency:{icon:"error"}};(()=>{let a,s,o,n=[w({tagName:"usa-alert",shadowDom:[h`:host{display:block;border-left:.5rem solid #adadad;padding:1rem 1.2rem;color:#1b1b1b;margin-bottom:1rem}:host([type=info]){border-left-color:#00bde3;background-color:#e7f6f8}:host([type=warning]){background-color:#faf3d1;border-left-color:#ffbe2e}:host([type=success]){background-color:#ecf3ec;border-left-color:#00a91c}:host([type=error]){background-color:#f4e3db;border-left-color:#d54309}:host([type=emergency]){background-color:#9c3d10;border-left-color:#9c3d10;color:#fff}:host([type=emergency]) ::slotted(*){color:#fff}.alert-heading{display:grid;grid-template-columns:auto 1fr;align-items:center}usa-icon{margin:-.28rem .75rem 0 0}#heading::slotted(*){font-family:Source Sans Pro Web,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;font-size:1.33rem;line-height:.9;margin-top:0;margin-bottom:.5rem}`,m`<div class="alert-heading"><usa-icon icon="check_circle"></usa-icon><div><slot id="heading" name="heading"></slot></div><div class="spacer"></div><div><slot></slot></div></div>`]})],i=[],r=HTMLElement,l=[],c=[];(class extends r{static{s=this}static{const d="function"==typeof Symbol&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;o=[k()],e(this,null,o,{kind:"accessor",name:"type",static:!1,private:!1,access:{has:e=>"type"in e,get:e=>e.type,set:(e,t)=>{e.type=t}},metadata:d},l,c),e(null,a={value:s},n,{kind:"class",name:s.name,metadata:d},null,i),s=a.value,d&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d}),t(s,i)}#d=t(this,l,"info");get type(){return this.#d}set type(e){this.#d=e}#m=(t(this,c),S("usa-icon"));attributeChangedCallback(){this.#m().icon=j[this.type].icon}})})(),(()=>{let a,s,o,n,i,r,l,c,d,u=[w({tagName:"usa-button",shadowDomOpts:{mode:"open",delegatesFocus:!0},shadowDom:[h`:host{display:contents}.usa-button{box-sizing:border-box;font-family:Source Sans Pro Web,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;font-size:1.06rem;line-height:.9;color:#fff;background-color:#005ea2;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-items:center;border:0;border-radius:.25rem;cursor:pointer;-moz-column-gap:.5rem;column-gap:.5rem;display:inline-flex;font-weight:700;justify-content:center;padding:.75rem 1.25rem;text-align:center;text-decoration:none;width:100%;cursor:pointer}@media all and (min-width:30em){.usa-button{width:auto}}.usa-button:visited{color:#fff}.usa-button:hover{color:#fff;background-color:#1a4480;border-bottom:0;text-decoration:none}.usa-button:active{color:#fff;background-color:#162e51}.usa-button:not([disabled]):focus{outline-offset:.25rem}.usa-button:disabled{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1}.usa-button:disabled:active,.usa-button:disabled:focus,.usa-button:disabled:hover{color:#454545;background-color:#c9c9c9}.usa-button:focus{outline:.25rem solid #2491ff;outline-offset:0}:host([variant=secondary]) .usa-button{color:#fff;background-color:#d83933}:host([variant=secondary]) .usa-button:hover{background-color:#b50909}:host([variant=secondary]) .usa-button:active{background-color:#8b0a03}:host([variant=cool]) .usa-button{color:#1b1b1b;background-color:#00bde3}:host([variant=cool]) .usa-button:hover{background-color:#28a0cb}:host([variant=cool]) .usa-button:active{color:#fff;background-color:#07648d}:host([variant=warm]) .usa-button{color:#1b1b1b;background-color:#fa9441}:host([variant=warm]) .usa-button:hover{color:#fff;background-color:#c05600}:host([variant=warm]) .usa-button:active{color:#fff;background-color:#775540}:host([variant=outline]) .usa-button{background-color:transparent;box-shadow:inset 0 0 0 2px #005ea2;color:#005ea2}:host([variant=outline]) .usa-button:hover{box-shadow:inset 0 0 0 2px #1a4480;color:#1a4480}:host([variant=outline]) .usa-button:active{box-shadow:inset 0 0 0 2px #162e51;color:#162e51}`,m`<button class="usa-button"><slot></slot></button>`]})],b=[],g=HTMLElement,p=[],f=[],v=[],y=[],C=[],j=[],O=[],E=[],P=[];(class extends g{static{s=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(g[Symbol.metadata]??null):void 0;o=[k()],n=[k()],i=[k()],r=[k()],l=[x()],c=[_("keydown",(()=>document.body))],d=[_("click")],e(this,null,o,{kind:"accessor",name:"type",static:!1,private:!1,access:{has:e=>"type"in e,get:e=>e.type,set:(e,t)=>{e.type=t}},metadata:t},f,v),e(this,null,n,{kind:"accessor",name:"disabled",static:!1,private:!1,access:{has:e=>"disabled"in e,get:e=>e.disabled,set:(e,t)=>{e.disabled=t}},metadata:t},y,C),e(this,null,i,{kind:"accessor",name:"variant",static:!1,private:!1,access:{has:e=>"variant"in e,get:e=>e.variant,set:(e,t)=>{e.variant=t}},metadata:t},j,O),e(this,null,r,{kind:"accessor",name:"value",static:!1,private:!1,access:{has:e=>"value"in e,get:e=>e.value,set:(e,t)=>{e.value=t}},metadata:t},E,P),e(this,null,l,{kind:"method",name:"onReady",static:!1,private:!1,access:{has:e=>"onReady"in e,get:e=>e.onReady},metadata:t},null,p),e(this,null,c,{kind:"method",name:"onKeyDown",static:!1,private:!1,access:{has:e=>"onKeyDown"in e,get:e=>e.onKeyDown},metadata:t},null,p),e(this,null,d,{kind:"method",name:"onInternalClick",static:!1,private:!1,access:{has:e=>"onInternalClick"in e,get:e=>e.onInternalClick},metadata:t},null,p),e(null,a={value:s},u,{kind:"class",name:s.name,metadata:t},null,b),s=a.value,t&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static formAssociated=!0;#d=(t(this,p),t(this,f,"button"));get type(){return this.#d}set type(e){this.#d=e}#u=(t(this,v),t(this,y,!1));get disabled(){return this.#u}set disabled(e){this.#u=e}#h=(t(this,C),t(this,j,"primary"));get variant(){return this.#h}set variant(e){this.#h=e}#b=(t(this,O),t(this,E,""));get value(){return this.#b}set value(e){this.#b=e}#g=(t(this,P),0);get tabIndex(){return this.#g}set tabIndex(e){this.#g=e}#p=this.attachInternals();#f=S("button");onReady(){this.#f().autofocus=this.autofocus}onKeyDown(e){"submit"===this.type&&"ENTER"===e.key.toUpperCase()&&this.#v()}onInternalClick(){this.#v()}attributeChangedCallback(){const e=this.#f();e.type=this.type,e.disabled=this.disabled}#v(){const{form:e}=this.#p;if(e)if("submit"===this.type){const t=document.createElement("button");t.type="submit",e.append(t),t.click(),t.remove()}else"reset"===this.type&&e.reset()}static{t(s,b)}})})(),(()=>{let a,s,o,n,i,r,l,c=[w({tagName:"usa-checkbox",shadowDom:[h`*{box-sizing:border-box}:host{display:inline-block;font-family:Source Sans Pro Web,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;max-width:30rem}:host([tiled]) label{background-color:#fff;border:2px solid #c9c9c9;border-radius:.25rem;color:#1b1b1b;padding:.75rem 1rem .75rem .75rem}label{display:inline-flex;cursor:pointer;font-size:1.06rem;line-height:1.3;flex-wrap:wrap}.checkbox{background:#fff;box-shadow:0 0 0 2px #1b1b1b;display:flex;align-items:center;justify-content:center;height:1.25rem;width:1.25rem;border-radius:2px;position:relative;margin-right:.75rem}input:checked+.checkbox{background-color:#005ea2;box-shadow:0 0 0 2px #005ea2}input:checked+.checkbox::after{content:" ";display:block;height:1rem;width:.5rem;border-right:4px solid #fff;border-bottom:4px solid #fff;transform:rotate(45deg) scale(.65)}input{height:0;width:0;position:absolute;left:-999em;right:auto}input:focus+.checkbox{outline:.25rem solid #2491ff;outline-offset:.25rem}.description{display:block;font-size:.93rem;margin-top:.5rem}.break{flex-basis:100%;height:0}.spacer{height:1.25rem;width:1.25rem;margin-right:.75rem}:host([tiled]) label:has(input:checked){background-color:rgba(0,94,162,.1);border-color:#005ea2}`,m`<label><input type="checkbox"><div class="checkbox"></div><div class="title"><slot></slot></div></label>`]})],d=[],u=HTMLElement,b=[],g=[],p=[],f=[],v=[],y=[],x=[],C=[],j=[];(class extends u{static{s=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(u[Symbol.metadata]??null):void 0;o=[k()],n=[k()],i=[k()],r=[k({observed:!1})],l=[_("change","input[type=checkbox]")],e(this,null,o,{kind:"accessor",name:"checked",static:!1,private:!1,access:{has:e=>"checked"in e,get:e=>e.checked,set:(e,t)=>{e.checked=t}},metadata:t},g,p),e(this,null,n,{kind:"accessor",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:t},f,v),e(this,null,i,{kind:"accessor",name:"value",static:!1,private:!1,access:{has:e=>"value"in e,get:e=>e.value,set:(e,t)=>{e.value=t}},metadata:t},y,x),e(this,null,r,{kind:"accessor",name:"tiled",static:!1,private:!1,access:{has:e=>"tiled"in e,get:e=>e.tiled,set:(e,t)=>{e.tiled=t}},metadata:t},C,j),e(this,null,l,{kind:"method",name:"onCheckboxChange",static:!1,private:!1,access:{has:e=>"onCheckboxChange"in e,get:e=>e.onCheckboxChange},metadata:t},null,b),e(null,a={value:s},c,{kind:"class",name:s.name,metadata:t},null,d),s=a.value,t&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static formAssociated=!0;#y=(t(this,b),t(this,g,!1));get checked(){return this.#y}set checked(e){this.#y=e}#k=(t(this,p),t(this,f,""));get name(){return this.#k}set name(e){this.#k=e}#b=(t(this,v),t(this,y,""));get value(){return this.#b}set value(e){this.#b=e}#_=(t(this,x),t(this,C,!1));get tiled(){return this.#_}set tiled(e){this.#_=e}#w=(t(this,j),S("input"));#p=this.attachInternals();connectedCallback(){const e=this.#w();this.checked&&this.#p.setFormValue(this.value),e.checked=this.checked,e.name=this.name}attributeChangedCallback(){const e=this.#w();e.checked=this.checked,e.name=this.name}onCheckboxChange(){this.#w().checked?this.#p.setFormValue(this.value):this.#p.setFormValue(null)}static{t(s,d)}})})(),(()=>{let a,s,o=[w({tagName:"usa-description",shadowDom:[h`:host{display:block;font-size:.93rem;margin-top:.5rem}`,m`<slot></slot>`]})],n=[],i=HTMLElement;(class extends i{static{s=this}static{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(i[Symbol.metadata]??null):void 0;e(null,a={value:s},o,{kind:"class",name:s.name,metadata:r},null,n),s=a.value,r&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),t(s,n)}})})(),Symbol.metadata??=Symbol("Symbol.metadata");class O extends Map{}class E{scheduler=null;changes=new O}class P extends WeakMap{read(e){let t=this.get(e);return t||(t=new E,this.set(e,t)),t}}class A{effects=new Set}class M extends WeakMap{read(e){let t=this.get(e);return t||(t=new A,this.set(e,t)),t}}const N=new P,D=new M;function L(){return function(e,t){const a=D.read(t.metadata);return{init(e){let a=null;try{a=t.access.get(this)}catch{}return a?(Reflect.deleteProperty(this,t.name),a):e},set(s){const o=N.read(this);null===o.scheduler&&(o.scheduler=Promise.resolve().then((()=>{for(let e of a.effects)e.call(this,o.changes);o.scheduler=null,o.changes.clear()}))),o.changes.set(t.name,{oldValue:e.get.call(this),newValue:s}),e.set.call(this,s)}}}}function T(){return function(e,t){D.read(t.metadata).effects.add(e)}}(()=>{let a,s,o,n,i,r,l,c,d=[w({tagName:"usa-file-input",shadowDom:[h`*{box-sizing:border-box}:host{display:block;max-width:30rem;position:relative;margin-bottom:1.5rem}label{display:block}input{cursor:pointer;left:0;margin:0;max-width:none;position:absolute;text-indent:-999em;width:100%;z-index:1;bottom:0;top:0}input:focus{outline:.25rem solid #2491ff;outline-offset:0}label slot.label{font-size:1.06rem;line-height:1.3;display:block;font-weight:400;margin-bottom:.5rem}.box{border:1px dashed #adadad;display:flex;font-size:.93rem;position:relative;text-align:center;width:100%;max-width:30rem;height:5.2rem;align-items:center;justify-content:center}.container{position:relative}`,m`<label><slot class="label"></slot><div class="container"><input type="file"><div class="box"><slot name="description">Drag file here or<usa-link>choose from folder</usa-link></slot></div><usa-file-input-preview>Selected file<usa-link>Change file</usa-link></usa-file-input-preview></div></label>`]})],u=[],b=HTMLElement,g=[],p=[],f=[],v=[],y=[],x=[],C=[],j=[],O=[];(class extends b{static{s=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(b[Symbol.metadata]??null):void 0;o=[k()],n=[k()],i=[k()],r=[L()],l=[T()],c=[_("change")],e(this,null,o,{kind:"accessor",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:t},p,f),e(this,null,n,{kind:"accessor",name:"multiple",static:!1,private:!1,access:{has:e=>"multiple"in e,get:e=>e.multiple,set:(e,t)=>{e.multiple=t}},metadata:t},v,y),e(this,null,i,{kind:"accessor",name:"accept",static:!1,private:!1,access:{has:e=>"accept"in e,get:e=>e.accept,set:(e,t)=>{e.accept=t}},metadata:t},x,C),e(this,null,r,{kind:"accessor",name:"files",static:!1,private:!1,access:{has:e=>"files"in e,get:e=>e.files,set:(e,t)=>{e.files=t}},metadata:t},j,O),e(this,null,l,{kind:"method",name:"onChange",static:!1,private:!1,access:{has:e=>"onChange"in e,get:e=>e.onChange},metadata:t},null,g),e(this,null,c,{kind:"method",name:"onInputChange",static:!1,private:!1,access:{has:e=>"onInputChange"in e,get:e=>e.onInputChange},metadata:t},null,g),e(null,a={value:s},d,{kind:"class",name:s.name,metadata:t},null,u),s=a.value,t&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static formAssociated=!0;#k=(t(this,g),t(this,p,""));get name(){return this.#k}set name(e){this.#k=e}#S=(t(this,f),t(this,v,!0));get multiple(){return this.#S}set multiple(e){this.#S=e}#x=(t(this,y),t(this,x,""));get accept(){return this.#x}set accept(e){this.#x=e}#C=(t(this,C),t(this,j,null));get files(){return this.#C}set files(e){this.#C=e}#p=(t(this,O),this.attachInternals());#j=S("input");#O=S(".box");#E=S("usa-file-input-preview");onChange(){const e=this.#j();this.files&&(e.files=this.files,this.onInputChange())}attributeChangedCallback(){const e=this.#j();e.name=this.name,e.multiple=this.multiple,e.accept=this.accept}onInputChange(){const e=this.#j(),t=this.#O();this.#E().files=e.files;const a=new FormData;if(e.files&&e.files.length){t.style.display="none";for(let t of e.files)a.append(this.name,t)}else t.style.display="flex";this.#p.setFormValue(a)}static{t(s,u)}})})(),(()=>{let a,s,o,n,i=[w({tagName:"usa-file-input-preview",shadowDom:[h`*{box-sizing:border-box}:host{display:block;font-size:.87rem;pointer-events:none;position:relative;text-align:left;word-wrap:anywhere;z-index:3}:host([hidden]){display:none}img{border:0;display:block;height:2.5rem;margin-right:.5rem;-o-object-fit:contain;object-fit:contain;width:2.5rem}.preview-heading{align-items:center;background:#d9e8f6;display:flex;pointer-events:none;position:relative;z-index:3;font-weight:700;justify-content:space-between;padding:.5rem;text-align:left}.preview-item{align-items:center;background:#d9e8f6;display:flex;padding:.5rem;width:100%;margin-top:1px}`,m`<template><div class="preview-item"><img height="40" width="40" aria-hidden="true"></div></template><slot class="preview-heading"></slot>`]})],r=[],l=HTMLElement,c=[],d=[],u=[];(class extends l{static{s=this}static{const m="function"==typeof Symbol&&Symbol.metadata?Object.create(l[Symbol.metadata]??null):void 0;o=[L()],n=[T()],e(this,null,o,{kind:"accessor",name:"files",static:!1,private:!1,access:{has:e=>"files"in e,get:e=>e.files,set:(e,t)=>{e.files=t}},metadata:m},d,u),e(this,null,n,{kind:"method",name:"onChange",static:!1,private:!1,access:{has:e=>"onChange"in e,get:e=>e.onChange},metadata:m},null,c),e(null,a={value:s},i,{kind:"class",name:s.name,metadata:m},null,r),s=a.value,m&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:m}),t(s,r)}#C=(t(this,c),t(this,d,null));get files(){return this.#C}set files(e){this.#C=e}#P=(t(this,u),new Map);#n=S("template");connectedCallback(){this.onChange()}onChange(){const e=this.#n();if(this.files&&this.files.length){this.hidden=!1;let t=new Set;for(let a of this.files)if(t.add(a.name),!this.#P.has(a.name)){const t=e.content.cloneNode(!0).childNodes[1];t.id=a.name,t.append(document.createTextNode(a.name));t.querySelector("img").src=URL.createObjectURL(a),this.shadowRoot.append(t),this.#P.set(a.name,t)}for(let[e,a]of this.#P)t.has(e)||(a.remove(),this.#P.delete(e))}else this.hidden=!0}})})();let H=(()=>{let a,s,o=[l()],n=[];return class{static{s=this}static{const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;e(null,a={value:s},o,{kind:"class",name:s.name,metadata:i},null,n),s=a.value,i&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i}),t(s,n)}fetch(e,t){return fetch(e,t)}},s})(),z=(()=>{let a,s,o=[l()],n=[];return class{static{s=this}static{const i="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0;e(null,a={value:s},o,{kind:"class",name:s.name,metadata:i},null,n),s=a.value,i&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i}),t(s,n)}#A=c(C);#M=c(H);#N=new Map;async getIcon(e){const t=this.#A(),a=this.#M(),s=this.#N.get(e);if(s)return s;const o=a.fetch(`${t.iconPath}${e}.svg`).then((e=>200===e.status?e.text():""));return this.#N.set(e,o),o}},s})();var R;(()=>{let a,s,o,n=[w({tagName:"usa-icon",shadowDom:[h`:host{display:inline-block;height:2rem;position:relative;width:2rem}svg{fill:currentColor;height:100%;width:100%}`]}),l()],i=[],r=HTMLElement,d=[],m=[];(class extends r{static{s=this}static{const l="function"==typeof Symbol&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;o=[k()],e(this,null,o,{kind:"accessor",name:"icon",static:!1,private:!1,access:{has:e=>"icon"in e,get:e=>e.icon,set:(e,t)=>{e.icon=t}},metadata:l},d,m),e(null,a={value:s},n,{kind:"class",name:s.name,metadata:l},null,i),s=a.value,l&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:l}),t(s,i)}#D=t(this,d,"accessibility_new");get icon(){return this.#D}set icon(e){this.#D=e}ariaHidden=(t(this,m),"true");#A=c(C);#M=c(H);#m=c(z);#L=!1;connectedCallback(){this.#L=!0,this.#T()}attributeChangedCallback(){this.#L&&this.#T()}async#T(){this.shadowRoot.innerHTML=await this.fetchIcon()}async fetchIcon(){const e=this.#M(),t=this.#A(),a=t.iconCache.get(this.icon);if(a)return a;const s=e.fetch(`${t.iconPath}${this.icon}.svg`).then((e=>200===e.status?e.text():""));return t.iconCache.set(this.icon,s),s}})})(),(()=>{let a,s,o,n,i,r,l,c,d,u=[w({tagName:"usa-input",shadowDomOpts:{mode:"open",delegatesFocus:!0},shadowDom:[h`*{box-sizing:border-box}:host{font-size:1.06rem;line-height:1.3;display:block;font-weight:400;max-width:30rem;margin-bottom:1.5rem}input{border-width:1px;border-color:#5c5c5c;border-style:solid;border-radius:0;color:#1b1b1b;display:block;height:2.5rem;line-height:1.3;font-size:1.06rem;margin-top:.5rem;padding:.5rem;width:100%}input:not(:disabled):focus{outline:.25rem solid #2491ff;outline-offset:0}`,m`<label><slot></slot><input></label>`]})],b=[],g=HTMLElement,p=[],f=[],v=[],y=[],C=[],j=[],O=[],E=[],P=[];(class extends g{static{s=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(g[Symbol.metadata]??null):void 0;o=[k()],n=[k()],i=[k()],r=[k({reflect:!1}),L()],l=[x()],c=[T()],d=[_("input")],e(this,null,o,{kind:"accessor",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:t},f,v),e(this,null,n,{kind:"accessor",name:"autocomplete",static:!1,private:!1,access:{has:e=>"autocomplete"in e,get:e=>e.autocomplete,set:(e,t)=>{e.autocomplete=t}},metadata:t},y,C),e(this,null,i,{kind:"accessor",name:"placeholder",static:!1,private:!1,access:{has:e=>"placeholder"in e,get:e=>e.placeholder,set:(e,t)=>{e.placeholder=t}},metadata:t},j,O),e(this,null,r,{kind:"accessor",name:"value",static:!1,private:!1,access:{has:e=>"value"in e,get:e=>e.value,set:(e,t)=>{e.value=t}},metadata:t},E,P),e(this,null,l,{kind:"method",name:"onReady",static:!1,private:!1,access:{has:e=>"onReady"in e,get:e=>e.onReady},metadata:t},null,p),e(this,null,c,{kind:"method",name:"onChange",static:!1,private:!1,access:{has:e=>"onChange"in e,get:e=>e.onChange},metadata:t},null,p),e(this,null,d,{kind:"method",name:"onInputChange",static:!1,private:!1,access:{has:e=>"onInputChange"in e,get:e=>e.onInputChange},metadata:t},null,p),e(null,a={value:s},u,{kind:"class",name:s.name,metadata:t},null,b),s=a.value,t&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static formAssociated=!0;#k=(t(this,p),t(this,f,""));get name(){return this.#k}set name(e){this.#k=e}#H=(t(this,v),t(this,y,"on"));get autocomplete(){return this.#H}set autocomplete(e){this.#H=e}#z=(t(this,C),t(this,j,""));get placeholder(){return this.#z}set placeholder(e){this.#z=e}#b=(t(this,O),t(this,E,""));get value(){return this.#b}set value(e){this.#b=e}get selectionStart(){const{selectionStart:e}=this.#j();return e}#p=(t(this,P),this.attachInternals());#j=S("input");setSelectionRange(e,t){this.#j().setSelectionRange(e,t)}onReady(){this.#j().autofocus=this.autofocus}onChange(){this.#j().value=this.value}onInputChange(){const e=this.#j();this.#p.setFormValue(e.value),this.value=e.value}attributeChangedCallback(e){const t=this.#j();switch(e){case"autocomplete":t.autocomplete=this.autocomplete;break;case"placeholder":t.placeholder=this.placeholder;break;case"name":t.name=this.name;break;case"value":t.value=this.value,this.#p.setFormValue(this.value)}}static{t(s,b)}})})(),function(e){e.Any="*",e.Number="9",e.Letter="A"}(R||(R={}));const I=Object.values(R),F={Letters:/^[a-z]/i,Numbers:/^[0-9]/i};function V(e,t){const a=e.replace(/[^a-z0-9]/gi,""),s=a.split("");let o=0,n="";for(var i=0;i<t.length;i++){const e=t[i],a=s[o];a&&e&&(e===R.Any?(n+=a,o++):e===R.Number?(/^[0-9]/i.test(a)&&(n+=a),o++):e===R.Letter?(/^[a-z]/i.test(a)&&(n+=a),o++):n+=e)}return{raw:a,formatted:n}}(()=>{let a,s,o,n,i,r=[w({tagName:"usa-input-mask",shadowDom:[h`:host{display:contents}`,m`<slot></slot>`]})],l=[],c=HTMLElement,d=[],u=[],b=[];(class extends c{static{s=this}static{const m="function"==typeof Symbol&&Symbol.metadata?Object.create(c[Symbol.metadata]??null):void 0;o=[k()],n=[_("input")],i=[_("keydown")],e(this,null,o,{kind:"accessor",name:"mask",static:!1,private:!1,access:{has:e=>"mask"in e,get:e=>e.mask,set:(e,t)=>{e.mask=t}},metadata:m},u,b),e(this,null,n,{kind:"method",name:"onInput",static:!1,private:!1,access:{has:e=>"onInput"in e,get:e=>e.onInput},metadata:m},null,d),e(this,null,i,{kind:"method",name:"onKeyDown",static:!1,private:!1,access:{has:e=>"onKeyDown"in e,get:e=>e.onKeyDown},metadata:m},null,d),e(null,a={value:s},r,{kind:"class",name:s.name,metadata:m},null,l),s=a.value,m&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:m}),t(s,l)}#R=(t(this,d),t(this,u,""));get mask(){return this.#R}set mask(e){this.#R=e}connectedCallback(){for(let e of this.querySelectorAll("[mask]")){const{formatted:t}=V(e.value,this.#I(e));e.value=t}}async onInput(e){const t=e.target,a=t.selectionStart||0,s=t.value,o=this.#I(t),{formatted:n}=V(t.value,o);t.value=n;const i=t.value.length-s.length,r=o[a-1];await Promise.resolve(),r&&!I.includes(r)&&i>0?t.setSelectionRange(a+i,a+i):t.setSelectionRange(a,a),s!==t.value&&t.dispatchEvent(new Event("input",{bubbles:!0}))}onKeyDown(e){const t=e.target,a=this.#I(t),s=a[t.selectionStart||0];1===e.key.length&&/^[a-z0-9]/i.test(e.key)&&(t.value.length>=a.length?e.preventDefault():s===R.Number?F.Numbers.test(e.key)||e.preventDefault():s===R.Letter&&(F.Letters.test(e.key)||e.preventDefault()))}#I(e){return this.mask||e.getAttribute("mask")||""}constructor(){super(...arguments),t(this,b)}})})(),(()=>{let a,s,o,n,i,r,l=[w({tagName:"usa-link",shadowDom:[h`:host{display:inline-flex;color:#005ea2;text-decoration:underline}a{color:inherit;text-decoration:inherit;display:inherit}`,m`<a><slot></slot></a>`]})],c=[],d=HTMLElement,u=[],b=[],g=[],p=[],f=[],v=[],y=[],_=[];(class extends d{static{s=this}static{const m="function"==typeof Symbol&&Symbol.metadata?Object.create(d[Symbol.metadata]??null):void 0;o=[k()],n=[k()],i=[k()],r=[k({observed:!1})],e(this,null,o,{kind:"accessor",name:"href",static:!1,private:!1,access:{has:e=>"href"in e,get:e=>e.href,set:(e,t)=>{e.href=t}},metadata:m},u,b),e(this,null,n,{kind:"accessor",name:"target",static:!1,private:!1,access:{has:e=>"target"in e,get:e=>e.target,set:(e,t)=>{e.target=t}},metadata:m},g,p),e(this,null,i,{kind:"accessor",name:"title",static:!1,private:!1,access:{has:e=>"title"in e,get:e=>e.title,set:(e,t)=>{e.title=t}},metadata:m},f,v),e(this,null,r,{kind:"accessor",name:"disabled",static:!1,private:!1,access:{has:e=>"disabled"in e,get:e=>e.disabled,set:(e,t)=>{e.disabled=t}},metadata:m},y,_),e(null,a={value:s},l,{kind:"class",name:s.name,metadata:m},null,c),s=a.value,m&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:m}),t(s,c)}#F=t(this,u,"");get href(){return this.#F}set href(e){this.#F=e}#V=(t(this,b),t(this,g,""));get target(){return this.#V}set target(e){this.#V=e}#W=(t(this,p),t(this,f,""));get title(){return this.#W}set title(e){this.#W=e}#u=(t(this,v),t(this,y,!1));get disabled(){return this.#u}set disabled(e){this.#u=e}#K=(t(this,_),S("a"));attributeChangedCallback(e){const t=this.#K();switch(e){case"href":t.href=this.href;break;case"target":t.target=this.target;break;case"title":t.target=this.title}}})})(),(()=>{let a,s,o,n,i,r,l,c=[w({tagName:"usa-radio",shadowDom:[h`:host{display:flex;flex-direction:column;gap:1rem;max-width:30rem;margin-bottom:1.5rem}label{display:flex;cursor:pointer;gap:.5rem}input{position:absolute;left:-999em;right:auto}label::before{content:" ";display:block;left:0;height:1.25rem;border-radius:99rem;width:1.25rem;background:#fff;box-shadow:0 0 0 2px #1b1b1b;flex:0 0 1.25rem}label:has(input:checked)::before{background-color:#005ea2;box-shadow:0 0 0 2px #005ea2,inset 0 0 0 2px #fff}label:has(input:focus)::before{outline:.25rem solid #2491ff;outline-offset:.25rem}:host([tiled]){gap:.5rem}:host([tiled]) label{background-color:#fff;border:2px solid #c9c9c9;color:#1b1b1b;border-radius:.25rem;padding:.75rem 1rem .75rem .75rem}:host([tiled]) label:has(input:checked){background-color:rgba(0,94,162,.1);border-color:#005ea2}slot{display:flex}`,m`<slot id="main"></slot>`]})],d=[],u=HTMLElement,b=[],g=[],p=[],f=[],v=[],y=[],S=[];(class extends u{static{s=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(u[Symbol.metadata]??null):void 0;o=[k()],n=[k()],i=[k({observed:!1})],r=[_("change")],l=[_("usa::radio::option::added",(e=>e))],e(this,null,o,{kind:"accessor",name:"value",static:!1,private:!1,access:{has:e=>"value"in e,get:e=>e.value,set:(e,t)=>{e.value=t}},metadata:t},g,p),e(this,null,n,{kind:"accessor",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:t},f,v),e(this,null,i,{kind:"accessor",name:"tiled",static:!1,private:!1,access:{has:e=>"tiled"in e,get:e=>e.tiled,set:(e,t)=>{e.tiled=t}},metadata:t},y,S),e(this,null,r,{kind:"method",name:"onChange",static:!1,private:!1,access:{has:e=>"onChange"in e,get:e=>e.onChange},metadata:t},null,b),e(this,null,l,{kind:"method",name:"onOptionAdded",static:!1,private:!1,access:{has:e=>"onOptionAdded"in e,get:e=>e.onOptionAdded},metadata:t},null,b),e(null,a={value:s},c,{kind:"class",name:s.name,metadata:t},null,d),s=a.value,t&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static formAssociated=!0;#b=(t(this,b),t(this,g,""));get value(){return this.#b}set value(e){this.#b=e}#k=(t(this,p),t(this,f,""));get name(){return this.#k}set name(e){this.#k=e}#_=(t(this,v),t(this,y,!1));get tiled(){return this.#_}set tiled(e){this.#_=e}get shadow(){return this.shadowRoot}#p=(t(this,S),this.attachInternals());onChange(e){e.target instanceof HTMLInputElement&&e.target.checked&&(this.value=e.target.value,this.#p.setFormValue(e.target.value))}connectedCallback(){this.value&&this.#p.setFormValue(this.value)}attributeChangedCallback(){for(let e of this.shadow.querySelectorAll("usa-radio-option"))e.checked=e.value===this.value,e.name=this.name}onOptionAdded(e){e.stopPropagation();const t=e.target;t.checked=t.value===this.value,t.name=this.name,this.shadow.append(t.radio)}static{t(s,d)}})})(),(()=>{let a,s,o,n,i,r=[w({tagName:"usa-radio-option",shadowDom:[h`:host{display:flex;flex-direction:column;margin-top:.05rem}`,m`<slot></slot>`]})],l=[],c=HTMLElement,d=[],u=[],b=[],g=[],p=[],f=[];(class extends c{static{s=this}static{const m="function"==typeof Symbol&&Symbol.metadata?Object.create(c[Symbol.metadata]??null):void 0;o=[k()],n=[k()],i=[k()],e(this,null,o,{kind:"accessor",name:"value",static:!1,private:!1,access:{has:e=>"value"in e,get:e=>e.value,set:(e,t)=>{e.value=t}},metadata:m},d,u),e(this,null,n,{kind:"accessor",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:m},b,g),e(this,null,i,{kind:"accessor",name:"checked",static:!1,private:!1,access:{has:e=>"checked"in e,get:e=>e.checked,set:(e,t)=>{e.checked=t}},metadata:m},p,f),e(null,a={value:s},r,{kind:"class",name:s.name,metadata:m},null,l),s=a.value,m&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:m}),t(s,l)}#b=t(this,d,"");get value(){return this.#b}set value(e){this.#b=e}#k=(t(this,u),t(this,b,""));get name(){return this.#k}set name(e){this.#k=e}#y=(t(this,g),t(this,p,!1));get checked(){return this.#y}set checked(e){this.#y=e}radio=(t(this,f),document.createElement("label"));#j=document.createElement("input");#$=document.createElement("slot");constructor(){super(),this.#j.type="radio",this.radio.append(this.#j,this.#$)}attributeChangedCallback(){this.slot=this.value,this.#j.name=this.name,this.#j.value=this.value,this.#j.checked=this.checked,this.#$.name=this.value}connectedCallback(){this.dispatchEvent(new Event("usa::radio::option::added",{bubbles:!0}))}disconnectedCallback(){this.radio.remove()}})})(),(()=>{let a,s,o,n,i,r,l=[w({tagName:"usa-select",shadowDom:[h`:host{display:block;font-family:Source Sans Pro Web,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;line-height:1.3;position:relative;width:100%;max-width:30rem;margin-bottom:1.5rem}select{font-size:1.06rem;appearance:none;border-width:1px;border-color:#5c5c5c;border-style:solid;border-radius:0;color:#1b1b1b;display:block;height:2.5rem;margin-top:.5rem;padding:.5rem;width:100%}select:not(:disabled):focus{outline:.25rem solid #2491ff;outline-offset:0}usa-icon{position:absolute;right:.5rem;bottom:12%;height:1.5rem;width:1.5rem}`,m`<usa-icon icon="unfold_more"></usa-icon><label><div class="label"><slot></slot></div><select></select></label>`]})],c=[],d=HTMLElement,u=[],b=[],g=[],p=[],f=[];(class extends d{static{s=this}static{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(d[Symbol.metadata]??null):void 0;o=[k()],n=[k()],i=[_("change")],r=[_("usa::select::option::added")],e(this,null,o,{kind:"accessor",name:"value",static:!1,private:!1,access:{has:e=>"value"in e,get:e=>e.value,set:(e,t)=>{e.value=t}},metadata:t},b,g),e(this,null,n,{kind:"accessor",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:t},p,f),e(this,null,i,{kind:"method",name:"onSelectChange",static:!1,private:!1,access:{has:e=>"onSelectChange"in e,get:e=>e.onSelectChange},metadata:t},null,u),e(this,null,r,{kind:"method",name:"onOptionAdded",static:!1,private:!1,access:{has:e=>"onOptionAdded"in e,get:e=>e.onOptionAdded},metadata:t},null,u),e(null,a={value:s},l,{kind:"class",name:s.name,metadata:t},null,c),s=a.value,t&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}static formAssociated=!0;#b=(t(this,u),t(this,b,""));get value(){return this.#b}set value(e){this.#b=e}#k=(t(this,g),t(this,p,""));get name(){return this.#k}set name(e){this.#k=e}#q=(t(this,f),S("select"));#p=this.attachInternals();connectedCallback(){const e=this.#q();e.value=this.value,e.name=this.name,this.#p.setFormValue(this.value)}onSelectChange(){const e=this.#q();this.#p.setFormValue(e.value)}onOptionAdded(e){const t=e.target;e.stopPropagation();this.#q().append(t.option)}static{t(s,c)}})})(),(()=>{let a,s,o,n,i=[w({tagName:"usa-select-option",shadowDom:[h`:host{display:none}`,m`<slot></slot>`]})],r=[],l=HTMLElement,c=[],d=[],u=[];(class extends l{static{s=this}static{const m="function"==typeof Symbol&&Symbol.metadata?Object.create(l[Symbol.metadata]??null):void 0;o=[k()],n=[_("slotchange")],e(this,null,o,{kind:"accessor",name:"value",static:!1,private:!1,access:{has:e=>"value"in e,get:e=>e.value,set:(e,t)=>{e.value=t}},metadata:m},d,u),e(this,null,n,{kind:"method",name:"onSlotChange",static:!1,private:!1,access:{has:e=>"onSlotChange"in e,get:e=>e.onSlotChange},metadata:m},null,c),e(null,a={value:s},i,{kind:"class",name:s.name,metadata:m},null,r),s=a.value,m&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:m}),t(s,r)}#b=(t(this,c),t(this,d,""));get value(){return this.#b}set value(e){this.#b=e}option=(t(this,u),document.createElement("option"));attributeChangedCallback(){this.option.value=this.value}connectedCallback(){this.dispatchEvent(new Event("usa::select::option::added",{bubbles:!0}))}onSlotChange(){this.option.textContent=this.textContent}disconnectedCallback(){this.option.remove()}})})(),(()=>{let a,s,o,n=[w({tagName:"usa-tag",shadowDom:[h`:host{font-family:Source Sans Pro Web,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;font-size:.93rem;color:#fff;text-transform:uppercase;background-color:#5c5c5c;border-radius:2px;margin-right:.25rem;padding:1px .5rem}:host([variant=big]){padding-left:.5rem;padding-right:.5rem;font-size:1.06rem}`,m`<slot></slot>`]})],i=[],r=HTMLElement,l=[],c=[];(class extends r{static{s=this}static{const d="function"==typeof Symbol&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;o=[k()],e(this,null,o,{kind:"accessor",name:"variant",static:!1,private:!1,access:{has:e=>"variant"in e,get:e=>e.variant,set:(e,t)=>{e.variant=t}},metadata:d},l,c),e(null,a={value:s},n,{kind:"class",name:s.name,metadata:d},null,i),s=a.value,d&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d}),t(s,i)}#h=t(this,l,"default");get variant(){return this.#h}set variant(e){this.#h=e}constructor(){super(...arguments),t(this,c)}})})(),(()=>{let a,s,o,n,i,r,l=[w({tagName:"usa-accordion",shadowDomOpts:{mode:"open",delegatesFocus:!0},shadowDom:[h`*{box-sizing:border-box}:host{display:block}:host(:not(:first-child)) summary{margin-top:.5rem}summary{align-items:center;border:0;border-radius:0;box-shadow:none;justify-content:normal;text-align:left;padding:0;color:#1b1b1b;background-color:#f0f0f0;cursor:pointer;display:flex;font-weight:700;margin:0;padding:1rem 1.25rem 1rem 1.25rem;text-decoration:none;width:100%}summary::-webkit-details-marker{display:none}slot[name=heading]{display:block;flex:1 1 auto}slot[name=heading]::slotted(*){margin:0}.content{padding-bottom:1.5rem;padding-left:1rem;padding-top:1.5rem}usa-icon[icon=remove]{display:none}details[open] usa-icon[icon=add]{display:none}details[open] usa-icon[icon=remove]{display:block}summary:hover{background-color:#e6e6e6}summary:focus{outline:.25rem solid #2491ff;outline-offset:0}`,m`<details><summary><slot name="heading"></slot><usa-icon icon="add"></usa-icon><usa-icon icon="remove"></usa-icon></summary><div class="content"><slot></slot></div></details>`]})],c=[],d=HTMLElement,u=[],b=[],g=[],p=[],f=[];(class extends d{static{s=this}static{const m="function"==typeof Symbol&&Symbol.metadata?Object.create(d[Symbol.metadata]??null):void 0;o=[k()],n=[k()],i=[_("click","summary")],r=[_("usa::accordion::toggle",(()=>document.body))],e(this,null,o,{kind:"accessor",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:m},b,g),e(this,null,n,{kind:"accessor",name:"open",static:!1,private:!1,access:{has:e=>"open"in e,get:e=>e.open,set:(e,t)=>{e.open=t}},metadata:m},p,f),e(this,null,i,{kind:"method",name:"onClick",static:!1,private:!1,access:{has:e=>"onClick"in e,get:e=>e.onClick},metadata:m},null,u),e(this,null,r,{kind:"method",name:"onAccordionToggle",static:!1,private:!1,access:{has:e=>"onAccordionToggle"in e,get:e=>e.onAccordionToggle},metadata:m},null,u),e(null,a={value:s},l,{kind:"class",name:s.name,metadata:m},null,c),s=a.value,m&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:m}),t(s,c)}#k=(t(this,u),t(this,b,""));get name(){return this.#k}set name(e){this.#k=e}#G=(t(this,g),t(this,p,!1));get open(){return this.#G}set open(e){this.#G=e}#U=(t(this,f),S("details"));attributeChangedCallback(){this.#U().open=this.open}onClick(e){e.preventDefault(),this.dispatchEvent(new W(!this.open))}onAccordionToggle(e){e.target.name===this.name?this.open=e.target===this&&e.open:e.target===this&&(this.open=e.open)}})})();class W extends Event{open;get target(){return super.target}constructor(e){super("usa::accordion::toggle",{bubbles:!0}),this.open=e}}(()=>{let a,s,o,n=[w({tagName:"usa-side-nav",shadowDom:[h`:host{display:block;font-size:1.06rem;line-height:1.3;border-bottom:1px solid #e6e6e6}`,m`<slot></slot>`]})],i=[],r=HTMLElement,l=[],c=[];(class extends r{static{s=this}static{const d="function"==typeof Symbol&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;o=[k()],e(this,null,o,{kind:"accessor",name:"role",static:!1,private:!1,access:{has:e=>"role"in e,get:e=>e.role,set:(e,t)=>{e.role=t}},metadata:d},l,c),e(null,a={value:s},n,{kind:"class",name:s.name,metadata:d},null,i),s=a.value,d&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d}),t(s,i)}#Y=t(this,l,"navigation");get role(){return this.#Y}set role(e){this.#Y=e}constructor(){super(...arguments),t(this,c)}})})(),(()=>{let a,s,o,n=[w({tagName:"usa-side-nav-item",shadowDom:[h`:host{--usa-nav-item-padding-left:2rem;display:block;border-top:1px solid #e6e6e6}.side-nav-item{display:flex;padding:.5rem 1rem;text-decoration:none;position:relative}.side-nav-item:hover{background-color:#f0f0f0;color:#005ea2}::slotted(*){color:#5c5c5c;text-decoration:none;display:block;width:100%}:host(:hover) ::slotted(*){color:#005ea2}:host([current]) ::slotted(:not(usa-side-nav-item)){color:#005ea2;font-weight:700}:host([current]) .side-nav-item::after{background-color:#005ea2;border-radius:99rem;content:"";display:block;position:absolute;bottom:.25rem;top:.25rem;width:.25rem;left:0}:host([slot=children]) .side-nav-item{padding-left:var(--usa-nav-item-padding-left)}:host([slot=children]) ::slotted(usa-side-nav-item){--usa-nav-item-padding-left:3rem}:host([slot=children]) .side-nav-item::after{display:none}`,m`<div class="side-nav-item"><slot></slot></div><slot name="children"></slot>`]})],i=[],r=HTMLElement,l=[],c=[];(class extends r{static{s=this}static{const d="function"==typeof Symbol&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;o=[k({observed:!1})],e(this,null,o,{kind:"accessor",name:"current",static:!1,private:!1,access:{has:e=>"current"in e,get:e=>e.current,set:(e,t)=>{e.current=t}},metadata:d},l,c),e(null,a={value:s},n,{kind:"class",name:s.name,metadata:d},null,i),s=a.value,d&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d}),t(s,i)}#B=t(this,l,!1);get current(){return this.#B}set current(e){this.#B=e}constructor(){super(...arguments),t(this,c)}})})(),(()=>{let a,s,o=[w({tagName:"usa-summary-box",shadowDom:[h`:host{font-family:Source Sans Pro Web,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;font-size:1.06rem;line-height:1.5;color:#1b1b1b;background-color:#e7f6f8;border-radius:.25rem;border:1px #99deea solid;padding:1.5rem;position:relative;display:block}`,m`<slot></slot>`]})],n=[],i=HTMLElement;(class extends i{static{s=this}static{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(i[Symbol.metadata]??null):void 0;e(null,a={value:s},o,{kind:"class",name:s.name,metadata:r},null,n),s=a.value,r&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),t(s,n)}})})(),(()=>{let a,s,o,n=[w({tagName:"usa-step-indicator",shadowDom:[h`:host{display:flex;gap:2px;counter-reset:usa-step-indicator;padding-top:1rem;margin-bottom:1rem}`,m`<slot></slot>`]})],i=[],r=HTMLElement,l=[],c=[];(class extends r{static{s=this}static{const d="function"==typeof Symbol&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;o=[k()],e(this,null,o,{kind:"accessor",name:"role",static:!1,private:!1,access:{has:e=>"role"in e,get:e=>e.role,set:(e,t)=>{e.role=t}},metadata:d},l,c),e(null,a={value:s},n,{kind:"class",name:s.name,metadata:d},null,i),s=a.value,d&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d}),t(s,i)}#Y=t(this,l,"list");get role(){return this.#Y}set role(e){this.#Y=e}constructor(){super(...arguments),t(this,c)}})})(),(()=>{let a,s,o,n,i,r=[w({tagName:"usa-step",shadowDom:[h`:host{color:#5c5c5c;display:block;flex:1 1 0%;position:relative;counter-increment:usa-step-indicator}:host([state=complete]){color:#162e51}:host([state=complete])::before{background-color:#162e51}:host([state=current]){color:#005ea2;font-weight:700}:host([state=current])::before{background-color:#005ea2}:host:before{background-color:#919191;content:"";display:block;height:.5rem}.label{display:block;font-size:1.06rem;margin-top:.5rem;padding-right:2rem;text-align:left}:host([counter]) .label{margin-top:1.5rem}:host([counter]) .counter:after{content:counter(usa-step-indicator);height:2.5rem;border-radius:99rem;width:2.5rem;background-color:#fff;box-shadow:inset 0 0 0 .25rem #919191,0 0 0 .25rem #fff;color:#5c5c5c;display:flex;align-items:center;justify-content:center;font-weight:700;left:0;line-height:.9;padding:calc((2.5rem - 2ex * .9) * .5);position:absolute;z-index:100;top:0;transform:translateY(-40%);box-sizing:border-box}:host([counter][state=complete]) .counter::after{background-color:#162e51;box-shadow:0 0 0 .25rem #fff;color:#fff}:host([counter][state=current]) .counter::after{background-color:#005ea2;box-shadow:0 0 0 .25rem #fff;color:#fff}:host([counter=small]) .counter:after{height:1.5rem;width:1.5rem;font-size:.93rem}:host([counter]:last-child):before{width:0}`,m`<div class="counter" aria-hidden="true"></div><div class="label"><slot></slot></div>`]})],l=[],c=HTMLElement,d=[],u=[],b=[],g=[],p=[];(class extends c{static{s=this}static{const m="function"==typeof Symbol&&Symbol.metadata?Object.create(c[Symbol.metadata]??null):void 0;var h;o=[k()],n=[k()],i=[(h="state",function(e,t){const a=y.read(t.metadata),s=a.attrChanges.get(h)??new Set;s.add(e),a.attrChanges.set(h,s)})],e(this,null,o,{kind:"accessor",name:"state",static:!1,private:!1,access:{has:e=>"state"in e,get:e=>e.state,set:(e,t)=>{e.state=t}},metadata:m},u,b),e(this,null,n,{kind:"accessor",name:"role",static:!1,private:!1,access:{has:e=>"role"in e,get:e=>e.role,set:(e,t)=>{e.role=t}},metadata:m},g,p),e(this,null,i,{kind:"method",name:"onStateAttrChanged",static:!1,private:!1,access:{has:e=>"onStateAttrChanged"in e,get:e=>e.onStateAttrChanged},metadata:m},null,d),e(null,a={value:s},r,{kind:"class",name:s.name,metadata:m},null,l),s=a.value,m&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:m}),t(s,l)}#J=(t(this,d),t(this,u,""));get state(){return this.#J}set state(e){this.#J=e}#Y=(t(this,b),t(this,g,"listitem"));get role(){return this.#Y}set role(e){this.#Y=e}onStateAttrChanged(){"current"===this.state&&(this.ariaCurrent="step")}constructor(){super(...arguments),t(this,p)}})})(),(()=>{let a,s,o,n,i=[w({tagName:"usa-modal",shadowDom:[h`*{box-sizing:border-box}:host{display:contents}dialog{border:none;font-size:1.06rem;line-height:1.5;border-radius:.5rem;background:#fff;color:#1b1b1b;max-width:30rem;padding-top:4rem;padding-left:4rem;padding-right:4rem;padding-bottom:2rem;width:100%}::backdrop{background:rgba(0,0,0,.7)}`,m`<dialog><slot></slot></dialog>`]})],r=[],l=HTMLElement,c=[];(class extends l{static{s=this}static{const d="function"==typeof Symbol&&Symbol.metadata?Object.create(l[Symbol.metadata]??null):void 0;o=[_("click",(()=>document.body))],n=[_("click",(e=>e))],e(this,null,o,{kind:"method",name:"onGlobalModalAction",static:!1,private:!1,access:{has:e=>"onGlobalModalAction"in e,get:e=>e.onGlobalModalAction},metadata:d},null,c),e(this,null,n,{kind:"method",name:"onModalAction",static:!1,private:!1,access:{has:e=>"onModalAction"in e,get:e=>e.onModalAction},metadata:d},null,c),e(null,a={value:s},i,{kind:"class",name:s.name,metadata:d},null,r),s=a.value,d&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d}),t(s,r)}modalAction=(t(this,c),null);#Q=S("dialog");openModal(){this.#Q().showModal()}closeModal(){this.#Q().close()}onGlobalModalAction(e){if(e.target instanceof Element){e.target.getAttribute("modal-target")===this.id&&this.openModal()}}onModalAction(e){e.target instanceof Element&&(this.modalAction=e.target.getAttribute("modal-action"),this.closeModal(),this.dispatchEvent(new Event("usa::modal::close")))}})})(),(()=>{let a,s,o,n=[w({tagName:"usa-modal-close",shadowDom:[h`*{box-sizing:border-box}:host{display:block;position:absolute;top:1rem;right:1rem}button{display:flex;align-items:center;justify-content:center;background:0 0;border:none;cursor:pointer;height:100%;width:100%;border-radius:100%;padding:0;margin:0}button:focus{outline:.25rem solid #2491ff;outline-offset:0}`,m`<button aria-label="close modal"><usa-icon icon="close"></usa-icon></button>`]})],i=[],r=HTMLElement,l=[],c=[];(class extends r{static{s=this}static{const d="function"==typeof Symbol&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;o=[k({name:"modal-action"})],e(this,null,o,{kind:"accessor",name:"modalAction",static:!1,private:!1,access:{has:e=>"modalAction"in e,get:e=>e.modalAction,set:(e,t)=>{e.modalAction=t}},metadata:d},l,c),e(null,a={value:s},n,{kind:"class",name:s.name,metadata:d},null,i),s=a.value,d&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d}),t(s,i)}#X=t(this,l,"close");get modalAction(){return this.#X}set modalAction(e){this.#X=e}constructor(){super(...arguments),t(this,c)}})})(),(()=>{let a,s,o=[w({tagName:"usa-modal-heading",shadowDom:[h`:host{font-family:Merriweather Web,Georgia,Cambria,Times New Roman,Times,serif!important;font-size:1.22rem}h2{margin-top:0;line-height:1.4;font-size:1.45rem}`,m`<h2><slot></slot></h2>`]})],n=[],i=HTMLElement;(class extends i{static{s=this}static{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(i[Symbol.metadata]??null):void 0;e(null,a={value:s},o,{kind:"class",name:s.name,metadata:r},null,n),s=a.value,r&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),t(s,n)}})})(),(()=>{let a,s,o,n,i=[w({tagName:"usa-card",shadowDom:[h`:host{color:#1b1b1b;background-color:#fff;font-size:1.06rem;line-height:1.5;border-width:2px;border-color:#e6e6e6;border-style:solid;display:flex;flex-direction:column;position:relative;border-radius:.25rem}:host([variant=flag]){padding-left:15rem}:host([variant=flag]) ::slotted(usa-card-media){position:absolute;bottom:0;top:0;left:0;width:15rem}:host([variant=flag]) ::slotted(usa-card-media[variant=inset]){padding-bottom:1.5rem;padding-right:0}`,m`<slot></slot>`]})],r=[],l=HTMLElement,c=[],d=[],u=[],b=[];(class extends l{static{s=this}static{const m="function"==typeof Symbol&&Symbol.metadata?Object.create(l[Symbol.metadata]??null):void 0;o=[k()],n=[k()],e(this,null,o,{kind:"accessor",name:"role",static:!1,private:!1,access:{has:e=>"role"in e,get:e=>e.role,set:(e,t)=>{e.role=t}},metadata:m},c,d),e(this,null,n,{kind:"accessor",name:"variant",static:!1,private:!1,access:{has:e=>"variant"in e,get:e=>e.variant,set:(e,t)=>{e.variant=t}},metadata:m},u,b),e(null,a={value:s},i,{kind:"class",name:s.name,metadata:m},null,r),s=a.value,m&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:m}),t(s,r)}#Y=t(this,c,"listitem");get role(){return this.#Y}set role(e){this.#Y=e}#h=(t(this,d),t(this,u,"default"));get variant(){return this.#h}set variant(e){this.#h=e}constructor(){super(...arguments),t(this,b)}})})(),(()=>{let a,s,o=[w({tagName:"usa-card-header",shadowDom:[h`:host{font-family:Merriweather Web,Georgia,Cambria,Times New Roman,Times,serif!important;display:flex;padding:1.5rem 1.5rem .5rem;font-size:1.22rem;font-weight:700;line-height:1.2}`,m`<slot></slot>`]})],n=[],i=HTMLElement;(class extends i{static{s=this}static{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(i[Symbol.metadata]??null):void 0;e(null,a={value:s},o,{kind:"class",name:s.name,metadata:r},null,n),s=a.value,r&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),t(s,n)}})})(),(()=>{let a,s,o=[w({tagName:"usa-card-body",shadowDom:[h`:host{display:flex;flex:1 1 0%;padding:.5rem 1.5rem;flex-basis:auto}`,m`<slot></slot>`]})],n=[],i=HTMLElement;(class extends i{static{s=this}static{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(i[Symbol.metadata]??null):void 0;e(null,a={value:s},o,{kind:"class",name:s.name,metadata:r},null,n),s=a.value,r&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),t(s,n)}})})(),(()=>{let a,s,o=[w({tagName:"usa-card-footer",shadowDom:[h`:host{display:flex;padding:.5rem 1.5rem 1.5rem}`,m`<slot></slot>`]})],n=[],i=HTMLElement;(class extends i{static{s=this}static{const r="function"==typeof Symbol&&Symbol.metadata?Object.create(i[Symbol.metadata]??null):void 0;e(null,a={value:s},o,{kind:"class",name:s.name,metadata:r},null,n),s=a.value,r&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),t(s,n)}})})(),(()=>{let a,s,o,n=[w({tagName:"usa-card-media",shadowDom:[h`:host{display:block;border-top-left-radius:calc(.25rem - 2px);border-top-right-radius:calc(.25rem - 2px);background-color:#f0f0f0;position:relative;overflow:hidden;box-sizing:border-box}:host([variant=inset]){background-color:#fff;padding-top:1.5rem;padding-left:1.5rem;padding-right:1.5rem}::slotted(img){display:block;height:100%;width:100%;-o-object-fit:cover;object-fit:cover}:host(:not(:first-child)){margin-top:.5rem;border-top-left-radius:0;border-top-right-radius:0}`,m`<slot></slot>`]})],i=[],r=HTMLElement,l=[],c=[];(class extends r{static{s=this}static{const d="function"==typeof Symbol&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;o=[k()],e(this,null,o,{kind:"accessor",name:"varint",static:!1,private:!1,access:{has:e=>"varint"in e,get:e=>e.varint,set:(e,t)=>{e.varint=t}},metadata:d},l,c),e(null,a={value:s},n,{kind:"class",name:s.name,metadata:d},null,i),s=a.value,d&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d}),t(s,i)}#Z=t(this,l,"standard");get varint(){return this.#Z}set varint(e){this.#Z=e}constructor(){super(...arguments),t(this,c)}})})(),(()=>{let a,s,o,n=[w({tagName:"usa-card-group",shadowDom:[h`:host{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1rem;margin-bottom:1rem}:host([variant=flag]){grid-template-columns:repeat(auto-fit,minmax(450px,1fr))}`,m`<slot></slot>`]})],i=[],r=HTMLElement,l=[],c=[];(class extends r{static{s=this}static{const d="function"==typeof Symbol&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0;o=[k()],e(this,null,o,{kind:"accessor",name:"role",static:!1,private:!1,access:{has:e=>"role"in e,get:e=>e.role,set:(e,t)=>{e.role=t}},metadata:d},l,c),e(null,a={value:s},n,{kind:"class",name:s.name,metadata:d},null,i),s=a.value,d&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:d}),t(s,i)}#Y=t(this,l,"list");get role(){return this.#Y}set role(e){this.#Y=e}constructor(){super(...arguments),t(this,c)}})})()}();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noctuatech/uswds",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"workspaces": [
|
|
6
6
|
"packages/**"
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
]
|
|
92
92
|
},
|
|
93
93
|
"copy_icons": {
|
|
94
|
-
"command": "cp -
|
|
94
|
+
"command": "cp -a node_modules/@uswds/uswds/dist/img/usa-icons/. assets/usa-icons/",
|
|
95
95
|
"files": [
|
|
96
96
|
"node_modules/@uswds/uswds/dist/img/usa-icons/**"
|
|
97
97
|
],
|
|
@@ -104,9 +104,9 @@
|
|
|
104
104
|
"license": "ISC",
|
|
105
105
|
"description": "",
|
|
106
106
|
"dependencies": {
|
|
107
|
-
"@joist/di": "^4.0.0-next.
|
|
108
|
-
"@joist/element": "^4.0.0-next.
|
|
109
|
-
"@joist/observable": "^4.0.0-next.
|
|
107
|
+
"@joist/di": "^4.0.0-next.35",
|
|
108
|
+
"@joist/element": "^4.0.0-next.35",
|
|
109
|
+
"@joist/observable": "^4.0.0-next.35",
|
|
110
110
|
"tslib": "2.8.1"
|
|
111
111
|
},
|
|
112
112
|
"devDependencies": {
|
|
@@ -36,7 +36,7 @@ export const Primary: Story = {
|
|
|
36
36
|
|
|
37
37
|
<usa-card>
|
|
38
38
|
<usa-card-media>
|
|
39
|
-
<img src="
|
|
39
|
+
<img src="./img/built-to-grow--alt.jpg" alt="A placeholder image" />
|
|
40
40
|
</usa-card-media>
|
|
41
41
|
|
|
42
42
|
<usa-card-header>Card with media</usa-card-header>
|
|
@@ -55,7 +55,7 @@ export const Primary: Story = {
|
|
|
55
55
|
<usa-card-header>Media with heaer first</usa-card-header>
|
|
56
56
|
|
|
57
57
|
<usa-card-media>
|
|
58
|
-
<img src="
|
|
58
|
+
<img src="./img/built-to-grow--alt.jpg" alt="A placeholder image" />
|
|
59
59
|
</usa-card-media>
|
|
60
60
|
|
|
61
61
|
<usa-card-body>
|
|
@@ -70,7 +70,7 @@ export const Primary: Story = {
|
|
|
70
70
|
|
|
71
71
|
<usa-card>
|
|
72
72
|
<usa-card-media variant="inset">
|
|
73
|
-
<img src="
|
|
73
|
+
<img src="./img/built-to-grow--alt.jpg" alt="A placeholder image" />
|
|
74
74
|
</usa-card-media>
|
|
75
75
|
|
|
76
76
|
<usa-card-header>Inset media</usa-card-header>
|
|
@@ -98,7 +98,7 @@ export const Flag: Story = {
|
|
|
98
98
|
<usa-card-group variant="flag">
|
|
99
99
|
<usa-card variant="flag">
|
|
100
100
|
<usa-card-media>
|
|
101
|
-
<img src="
|
|
101
|
+
<img src="./img/built-to-grow--alt.jpg" alt="A placeholder image" />
|
|
102
102
|
</usa-card-media>
|
|
103
103
|
|
|
104
104
|
<usa-card-header>Card with media</usa-card-header>
|
|
@@ -115,7 +115,7 @@ export const Flag: Story = {
|
|
|
115
115
|
|
|
116
116
|
<usa-card variant="flag">
|
|
117
117
|
<usa-card-media variant="inset">
|
|
118
|
-
<img src="
|
|
118
|
+
<img src="./img/built-to-grow--alt.jpg" alt="A placeholder image" />
|
|
119
119
|
</usa-card-media>
|
|
120
120
|
|
|
121
121
|
<usa-card-header>Card with media</usa-card-header>
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { inject, injectable, Injector } from "@joist/di";
|
|
2
|
-
import { attr, css, element, html } from "@joist/element";
|
|
1
|
+
import { inject, injectable, injected, Injector, Provider } from "@joist/di";
|
|
2
|
+
import { attr, css, element, html, ready } from "@joist/element";
|
|
3
3
|
|
|
4
4
|
export class USAConfig {
|
|
5
|
-
iconPath = "";
|
|
5
|
+
iconPath: string = "";
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
@injectable()
|
|
8
9
|
@element({
|
|
9
10
|
tagName: "usa-config",
|
|
10
11
|
shadowDom: [
|
|
@@ -16,8 +17,7 @@ export class USAConfig {
|
|
|
16
17
|
html`<slot></slot>`,
|
|
17
18
|
],
|
|
18
19
|
})
|
|
19
|
-
|
|
20
|
-
export class USAConfigElement extends HTMLElement implements USAConfig {
|
|
20
|
+
export class USAConfigElement extends HTMLElement {
|
|
21
21
|
@attr({
|
|
22
22
|
name: "icon-path",
|
|
23
23
|
})
|
|
@@ -25,9 +25,22 @@ export class USAConfigElement extends HTMLElement implements USAConfig {
|
|
|
25
25
|
|
|
26
26
|
#injector = inject(Injector);
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
@injected()
|
|
29
|
+
onInjected() {
|
|
29
30
|
const { providers } = this.#injector();
|
|
31
|
+
const config = this;
|
|
32
|
+
|
|
33
|
+
const usaConfig: Provider<USAConfig> = {
|
|
34
|
+
provide: USAConfig,
|
|
35
|
+
factory() {
|
|
36
|
+
return {
|
|
37
|
+
get iconPath() {
|
|
38
|
+
return config.iconPath;
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
};
|
|
30
43
|
|
|
31
|
-
providers.push(
|
|
44
|
+
providers.push(usaConfig);
|
|
32
45
|
}
|
|
33
46
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { attr, css, element } from "@joist/element";
|
|
2
|
-
import { inject, injectable } from "@joist/di";
|
|
2
|
+
import { inject, injectable, injected } from "@joist/di";
|
|
3
3
|
|
|
4
4
|
import { USAIcon } from "./icon-types.js";
|
|
5
|
-
import {
|
|
5
|
+
import { IconService } from "../services/icon.service.js";
|
|
6
6
|
|
|
7
7
|
declare global {
|
|
8
8
|
interface HTMLElementTagNameMap {
|
|
@@ -10,8 +10,6 @@ declare global {
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export const ICON_CACHE: Map<string, Promise<string>> = new Map();
|
|
14
|
-
|
|
15
13
|
@element({
|
|
16
14
|
tagName: "usa-icon",
|
|
17
15
|
shadowDom: [
|
|
@@ -38,40 +36,28 @@ export class USAIconElement extends HTMLElement {
|
|
|
38
36
|
|
|
39
37
|
ariaHidden: string | null = "true";
|
|
40
38
|
|
|
41
|
-
#
|
|
42
|
-
#
|
|
43
|
-
|
|
39
|
+
#icon = inject(IconService);
|
|
40
|
+
#injected = false;
|
|
41
|
+
|
|
42
|
+
get #shadow() {
|
|
43
|
+
return this.shadowRoot!;
|
|
44
|
+
}
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
@injected()
|
|
47
|
+
onInjected() {
|
|
48
|
+
this.#injected = true;
|
|
47
49
|
this.#updateIcon();
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
attributeChangedCallback() {
|
|
51
|
-
if (this.#
|
|
53
|
+
if (this.#injected) {
|
|
52
54
|
this.#updateIcon();
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
async #updateIcon() {
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
async fetchIcon() {
|
|
61
|
-
const cached = ICON_CACHE.get(this.icon);
|
|
62
|
-
|
|
63
|
-
if (cached) {
|
|
64
|
-
return cached;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
const config = this.#config();
|
|
68
|
-
|
|
69
|
-
const svg = fetch(`${config.iconPath}/${this.icon}.svg`).then((res) =>
|
|
70
|
-
res.text()
|
|
71
|
-
);
|
|
72
|
-
|
|
73
|
-
ICON_CACHE.set(this.icon, svg);
|
|
59
|
+
const icon = this.#icon();
|
|
74
60
|
|
|
75
|
-
|
|
61
|
+
this.#shadow.append(await icon.getIcon(this.icon));
|
|
76
62
|
}
|
|
77
63
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Injector } from "@joist/di";
|
|
2
|
+
import { assert } from "@open-wc/testing";
|
|
3
|
+
|
|
4
|
+
import { HttpService } from "./http.service.js";
|
|
5
|
+
import { IconService } from "./icon.service.js";
|
|
6
|
+
|
|
7
|
+
describe("IconService", () => {
|
|
8
|
+
it("should fetch icon if not in cache", async () => {
|
|
9
|
+
let callCount = 0;
|
|
10
|
+
|
|
11
|
+
const app = new Injector([
|
|
12
|
+
{
|
|
13
|
+
provide: HttpService,
|
|
14
|
+
use: class extends HttpService {
|
|
15
|
+
async fetch(): Promise<Response> {
|
|
16
|
+
callCount++;
|
|
17
|
+
return new Response("<svg></svg>");
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
]);
|
|
22
|
+
|
|
23
|
+
const icon = app.inject(IconService);
|
|
24
|
+
|
|
25
|
+
const res = await icon.getIcon("test");
|
|
26
|
+
|
|
27
|
+
assert.equal(res.nodeName, "svg");
|
|
28
|
+
assert.equal(callCount, 1);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it("should not fetch new icon if the icon is found in the cache", async () => {
|
|
32
|
+
let callCount = 0;
|
|
33
|
+
|
|
34
|
+
const app = new Injector([
|
|
35
|
+
{
|
|
36
|
+
provide: HttpService,
|
|
37
|
+
use: class extends HttpService {
|
|
38
|
+
async fetch(): Promise<Response> {
|
|
39
|
+
callCount++;
|
|
40
|
+
return new Response("<svg></svg>");
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
]);
|
|
45
|
+
|
|
46
|
+
const icon = app.inject(IconService);
|
|
47
|
+
|
|
48
|
+
await icon.getIcon("test");
|
|
49
|
+
|
|
50
|
+
const res = await icon.getIcon("test");
|
|
51
|
+
|
|
52
|
+
assert.equal(res.nodeName, "svg");
|
|
53
|
+
assert.equal(callCount, 1);
|
|
54
|
+
});
|
|
55
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { inject, injectable } from "@joist/di";
|
|
2
|
+
|
|
3
|
+
import { HttpService } from "./http.service.js";
|
|
4
|
+
import { USAConfig } from "../config/config.element.js";
|
|
5
|
+
|
|
6
|
+
@injectable()
|
|
7
|
+
export class IconService {
|
|
8
|
+
#config = inject(USAConfig);
|
|
9
|
+
#http = inject(HttpService);
|
|
10
|
+
#iconCache: Map<string, Promise<HTMLTemplateElement>> = new Map();
|
|
11
|
+
|
|
12
|
+
async getIcon(icon: string): Promise<Node> {
|
|
13
|
+
const config = this.#config();
|
|
14
|
+
const http = this.#http();
|
|
15
|
+
|
|
16
|
+
const cached = this.#iconCache.get(icon);
|
|
17
|
+
|
|
18
|
+
if (cached) {
|
|
19
|
+
return cached.then((res) => {
|
|
20
|
+
return res.content.firstElementChild!.cloneNode(true);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const svg = http
|
|
25
|
+
.fetch(`${config.iconPath}${icon}.svg`)
|
|
26
|
+
.then((res) => {
|
|
27
|
+
switch (res.status) {
|
|
28
|
+
case 200:
|
|
29
|
+
return res.text();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return "";
|
|
33
|
+
})
|
|
34
|
+
.then((res) => {
|
|
35
|
+
const template = document.createElement("template");
|
|
36
|
+
template.innerHTML = res;
|
|
37
|
+
|
|
38
|
+
return template;
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
this.#iconCache.set(icon, svg);
|
|
42
|
+
|
|
43
|
+
return svg.then((res) => {
|
|
44
|
+
return res.content.firstElementChild!.cloneNode(true);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -27,7 +27,7 @@ export const Primary = {
|
|
|
27
27
|
|
|
28
28
|
<usa-card>
|
|
29
29
|
<usa-card-media>
|
|
30
|
-
<img src="
|
|
30
|
+
<img src="./img/built-to-grow--alt.jpg" alt="A placeholder image" />
|
|
31
31
|
</usa-card-media>
|
|
32
32
|
|
|
33
33
|
<usa-card-header>Card with media</usa-card-header>
|
|
@@ -46,7 +46,7 @@ export const Primary = {
|
|
|
46
46
|
<usa-card-header>Media with heaer first</usa-card-header>
|
|
47
47
|
|
|
48
48
|
<usa-card-media>
|
|
49
|
-
<img src="
|
|
49
|
+
<img src="./img/built-to-grow--alt.jpg" alt="A placeholder image" />
|
|
50
50
|
</usa-card-media>
|
|
51
51
|
|
|
52
52
|
<usa-card-body>
|
|
@@ -61,7 +61,7 @@ export const Primary = {
|
|
|
61
61
|
|
|
62
62
|
<usa-card>
|
|
63
63
|
<usa-card-media variant="inset">
|
|
64
|
-
<img src="
|
|
64
|
+
<img src="./img/built-to-grow--alt.jpg" alt="A placeholder image" />
|
|
65
65
|
</usa-card-media>
|
|
66
66
|
|
|
67
67
|
<usa-card-header>Inset media</usa-card-header>
|
|
@@ -88,7 +88,7 @@ export const Flag = {
|
|
|
88
88
|
<usa-card-group variant="flag">
|
|
89
89
|
<usa-card variant="flag">
|
|
90
90
|
<usa-card-media>
|
|
91
|
-
<img src="
|
|
91
|
+
<img src="./img/built-to-grow--alt.jpg" alt="A placeholder image" />
|
|
92
92
|
</usa-card-media>
|
|
93
93
|
|
|
94
94
|
<usa-card-header>Card with media</usa-card-header>
|
|
@@ -105,7 +105,7 @@ export const Flag = {
|
|
|
105
105
|
|
|
106
106
|
<usa-card variant="flag">
|
|
107
107
|
<usa-card-media variant="inset">
|
|
108
|
-
<img src="
|
|
108
|
+
<img src="./img/built-to-grow--alt.jpg" alt="A placeholder image" />
|
|
109
109
|
</usa-card-media>
|
|
110
110
|
|
|
111
111
|
<usa-card-header>Card with media</usa-card-header>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare class USAConfig {
|
|
2
2
|
iconPath: string;
|
|
3
3
|
}
|
|
4
|
-
export declare class USAConfigElement extends HTMLElement
|
|
4
|
+
export declare class USAConfigElement extends HTMLElement {
|
|
5
5
|
#private;
|
|
6
6
|
accessor iconPath: string;
|
|
7
|
-
|
|
7
|
+
onInjected(): void;
|
|
8
8
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __esDecorate, __runInitializers } from "tslib";
|
|
2
|
-
import { inject, injectable, Injector } from "@joist/di";
|
|
2
|
+
import { inject, injectable, injected, Injector } from "@joist/di";
|
|
3
3
|
import { attr, css, element, html } from "@joist/element";
|
|
4
4
|
export class USAConfig {
|
|
5
5
|
iconPath = "";
|
|
6
6
|
}
|
|
7
7
|
let USAConfigElement = (() => {
|
|
8
|
-
let _classDecorators = [element({
|
|
8
|
+
let _classDecorators = [injectable(), element({
|
|
9
9
|
tagName: "usa-config",
|
|
10
10
|
shadowDom: [
|
|
11
11
|
css `
|
|
@@ -15,14 +15,16 @@ let USAConfigElement = (() => {
|
|
|
15
15
|
`,
|
|
16
16
|
html `<slot></slot>`,
|
|
17
17
|
],
|
|
18
|
-
})
|
|
18
|
+
})];
|
|
19
19
|
let _classDescriptor;
|
|
20
20
|
let _classExtraInitializers = [];
|
|
21
21
|
let _classThis;
|
|
22
22
|
let _classSuper = HTMLElement;
|
|
23
|
+
let _instanceExtraInitializers = [];
|
|
23
24
|
let _iconPath_decorators;
|
|
24
25
|
let _iconPath_initializers = [];
|
|
25
26
|
let _iconPath_extraInitializers = [];
|
|
27
|
+
let _onInjected_decorators;
|
|
26
28
|
var USAConfigElement = class extends _classSuper {
|
|
27
29
|
static { _classThis = this; }
|
|
28
30
|
static {
|
|
@@ -30,19 +32,32 @@ let USAConfigElement = (() => {
|
|
|
30
32
|
_iconPath_decorators = [attr({
|
|
31
33
|
name: "icon-path",
|
|
32
34
|
})];
|
|
35
|
+
_onInjected_decorators = [injected()];
|
|
33
36
|
__esDecorate(this, null, _iconPath_decorators, { kind: "accessor", name: "iconPath", static: false, private: false, access: { has: obj => "iconPath" in obj, get: obj => obj.iconPath, set: (obj, value) => { obj.iconPath = value; } }, metadata: _metadata }, _iconPath_initializers, _iconPath_extraInitializers);
|
|
37
|
+
__esDecorate(this, null, _onInjected_decorators, { kind: "method", name: "onInjected", static: false, private: false, access: { has: obj => "onInjected" in obj, get: obj => obj.onInjected }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
34
38
|
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
35
39
|
USAConfigElement = _classThis = _classDescriptor.value;
|
|
36
40
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
37
41
|
__runInitializers(_classThis, _classExtraInitializers);
|
|
38
42
|
}
|
|
39
|
-
#iconPath_accessor_storage = __runInitializers(this, _iconPath_initializers, "/assets/usa-icons/");
|
|
43
|
+
#iconPath_accessor_storage = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _iconPath_initializers, "/assets/usa-icons/"));
|
|
40
44
|
get iconPath() { return this.#iconPath_accessor_storage; }
|
|
41
45
|
set iconPath(value) { this.#iconPath_accessor_storage = value; }
|
|
42
46
|
#injector = (__runInitializers(this, _iconPath_extraInitializers), inject(Injector));
|
|
43
|
-
|
|
47
|
+
onInjected() {
|
|
44
48
|
const { providers } = this.#injector();
|
|
45
|
-
|
|
49
|
+
const config = this;
|
|
50
|
+
const usaConfig = {
|
|
51
|
+
provide: USAConfig,
|
|
52
|
+
factory() {
|
|
53
|
+
return {
|
|
54
|
+
get iconPath() {
|
|
55
|
+
return config.iconPath;
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
providers.push(usaConfig);
|
|
46
61
|
}
|
|
47
62
|
};
|
|
48
63
|
return USAConfigElement = _classThis;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.element.js","sourceRoot":"","sources":["../../../src/lib/config/config.element.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"config.element.js","sourceRoot":"","sources":["../../../src/lib/config/config.element.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAY,MAAM,WAAW,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAS,MAAM,gBAAgB,CAAC;AAEjE,MAAM,OAAO,SAAS;IACpB,QAAQ,GAAW,EAAE,CAAC;CACvB;IAcY,gBAAgB;4BAZ5B,UAAU,EAAE,EACZ,OAAO,CAAC;YACP,OAAO,EAAE,YAAY;YACrB,SAAS,EAAE;gBACT,GAAG,CAAA;;;;KAIF;gBACD,IAAI,CAAA,eAAe;aACpB;SACF,CAAC;;;;sBACoC,WAAW;;;;;;gCAAnB,SAAQ,WAAW;;;;oCAC9C,IAAI,CAAC;oBACJ,IAAI,EAAE,WAAW;iBAClB,CAAC;sCAKD,QAAQ,EAAE;YAJX,6KAAS,QAAQ,6BAAR,QAAQ,2FAAwB;YAKzC,iLAAA,UAAU,6DAgBT;YAzBH,6KA0BC;;;YA1BY,uDAAgB;;QAI3B,8BAJW,mDAAgB,kDAIP,oBAAoB,GAAC;QAAzC,IAAS,QAAQ,8CAAwB;QAAzC,IAAS,QAAQ,oDAAwB;QAEzC,SAAS,0DAAG,MAAM,CAAC,QAAQ,CAAC,EAAC;QAG7B,UAAU;YACR,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;YACvC,MAAM,MAAM,GAAG,IAAI,CAAC;YAEpB,MAAM,SAAS,GAAwB;gBACrC,OAAO,EAAE,SAAS;gBAClB,OAAO;oBACL,OAAO;wBACL,IAAI,QAAQ;4BACV,OAAO,MAAM,CAAC,QAAQ,CAAC;wBACzB,CAAC;qBACF,CAAC;gBACJ,CAAC;aACF,CAAC;YAEF,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC5B,CAAC;;;;SAzBU,gBAAgB"}
|
|
@@ -4,12 +4,10 @@ declare global {
|
|
|
4
4
|
"usa-icon": USAIconElement;
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
-
export declare const ICON_CACHE: Map<string, Promise<string>>;
|
|
8
7
|
export declare class USAIconElement extends HTMLElement {
|
|
9
8
|
#private;
|
|
10
9
|
accessor icon: USAIcon;
|
|
11
10
|
ariaHidden: string | null;
|
|
12
|
-
|
|
11
|
+
onInjected(): void;
|
|
13
12
|
attributeChangedCallback(): void;
|
|
14
|
-
fetchIcon(): Promise<string>;
|
|
15
13
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { __esDecorate, __runInitializers } from "tslib";
|
|
2
2
|
import { attr, css, element } from "@joist/element";
|
|
3
|
-
import { inject, injectable } from "@joist/di";
|
|
4
|
-
import {
|
|
5
|
-
export const ICON_CACHE = new Map();
|
|
3
|
+
import { inject, injectable, injected } from "@joist/di";
|
|
4
|
+
import { IconService } from "../services/icon.service.js";
|
|
6
5
|
let USAIconElement = (() => {
|
|
7
6
|
let _classDecorators = [element({
|
|
8
7
|
tagName: "usa-icon",
|
|
@@ -27,48 +26,45 @@ let USAIconElement = (() => {
|
|
|
27
26
|
let _classExtraInitializers = [];
|
|
28
27
|
let _classThis;
|
|
29
28
|
let _classSuper = HTMLElement;
|
|
29
|
+
let _instanceExtraInitializers = [];
|
|
30
30
|
let _icon_decorators;
|
|
31
31
|
let _icon_initializers = [];
|
|
32
32
|
let _icon_extraInitializers = [];
|
|
33
|
+
let _onInjected_decorators;
|
|
33
34
|
var USAIconElement = class extends _classSuper {
|
|
34
35
|
static { _classThis = this; }
|
|
35
36
|
static {
|
|
36
37
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
37
38
|
_icon_decorators = [attr()];
|
|
39
|
+
_onInjected_decorators = [injected()];
|
|
38
40
|
__esDecorate(this, null, _icon_decorators, { kind: "accessor", name: "icon", static: false, private: false, access: { has: obj => "icon" in obj, get: obj => obj.icon, set: (obj, value) => { obj.icon = value; } }, metadata: _metadata }, _icon_initializers, _icon_extraInitializers);
|
|
41
|
+
__esDecorate(this, null, _onInjected_decorators, { kind: "method", name: "onInjected", static: false, private: false, access: { has: obj => "onInjected" in obj, get: obj => obj.onInjected }, metadata: _metadata }, null, _instanceExtraInitializers);
|
|
39
42
|
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
40
43
|
USAIconElement = _classThis = _classDescriptor.value;
|
|
41
44
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
42
45
|
__runInitializers(_classThis, _classExtraInitializers);
|
|
43
46
|
}
|
|
44
|
-
#icon_accessor_storage = __runInitializers(this, _icon_initializers, "accessibility_new");
|
|
47
|
+
#icon_accessor_storage = (__runInitializers(this, _instanceExtraInitializers), __runInitializers(this, _icon_initializers, "accessibility_new"));
|
|
45
48
|
get icon() { return this.#icon_accessor_storage; }
|
|
46
49
|
set icon(value) { this.#icon_accessor_storage = value; }
|
|
47
50
|
ariaHidden = (__runInitializers(this, _icon_extraInitializers), "true");
|
|
48
|
-
#
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
#icon = inject(IconService);
|
|
52
|
+
#injected = false;
|
|
53
|
+
get #shadow() {
|
|
54
|
+
return this.shadowRoot;
|
|
55
|
+
}
|
|
56
|
+
onInjected() {
|
|
57
|
+
this.#injected = true;
|
|
53
58
|
this.#updateIcon();
|
|
54
59
|
}
|
|
55
60
|
attributeChangedCallback() {
|
|
56
|
-
if (this.#
|
|
61
|
+
if (this.#injected) {
|
|
57
62
|
this.#updateIcon();
|
|
58
63
|
}
|
|
59
64
|
}
|
|
60
65
|
async #updateIcon() {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
async fetchIcon() {
|
|
64
|
-
const cached = ICON_CACHE.get(this.icon);
|
|
65
|
-
if (cached) {
|
|
66
|
-
return cached;
|
|
67
|
-
}
|
|
68
|
-
const config = this.#config();
|
|
69
|
-
const svg = fetch(`${config.iconPath}/${this.icon}.svg`).then((res) => res.text());
|
|
70
|
-
ICON_CACHE.set(this.icon, svg);
|
|
71
|
-
return svg;
|
|
66
|
+
const icon = this.#icon();
|
|
67
|
+
this.#shadow.append(await icon.getIcon(this.icon));
|
|
72
68
|
}
|
|
73
69
|
};
|
|
74
70
|
return USAIconElement = _classThis;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.element.js","sourceRoot":"","sources":["../../../src/lib/icon/icon.element.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"icon.element.js","sourceRoot":"","sources":["../../../src/lib/icon/icon.element.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGzD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;IA4B7C,cAAc;4BApB1B,OAAO,CAAC;YACP,OAAO,EAAE,UAAU;YACnB,SAAS,EAAE;gBACT,GAAG,CAAA;;;;;;;;;;;;;KAaF;aACF;SACF,CAAC,EACD,UAAU,EAAE;;;;sBACuB,WAAW;;;;;;8BAAnB,SAAQ,WAAW;;;;gCAC5C,IAAI,EAAE;sCAYN,QAAQ,EAAE;YAXX,iKAAS,IAAI,6BAAJ,IAAI,mFAAgC;YAY7C,iLAAA,UAAU,6DAGT;YAjBH,6KA8BC;;;YA9BY,uDAAc;;QAEzB,0BAFW,mDAAc,8CAEA,mBAAmB,GAAC;QAA7C,IAAS,IAAI,0CAAgC;QAA7C,IAAS,IAAI,gDAAgC;QAE7C,UAAU,sDAAkB,MAAM,EAAC;QAEnC,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;QAC5B,SAAS,GAAG,KAAK,CAAC;QAElB,IAAI,OAAO;YACT,OAAO,IAAI,CAAC,UAAW,CAAC;QAC1B,CAAC;QAGD,UAAU;YACR,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,IAAI,CAAC,WAAW,EAAE,CAAC;QACrB,CAAC;QAED,wBAAwB;YACtB,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;gBACnB,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,CAAC;QACH,CAAC;QAED,KAAK,CAAC,WAAW;YACf,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;YAE1B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACrD,CAAC;;;;SA7BU,cAAc"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { __esDecorate, __runInitializers } from "tslib";
|
|
2
|
+
import { injectable } from "@joist/di";
|
|
3
|
+
let HttpService = (() => {
|
|
4
|
+
let _classDecorators = [injectable()];
|
|
5
|
+
let _classDescriptor;
|
|
6
|
+
let _classExtraInitializers = [];
|
|
7
|
+
let _classThis;
|
|
8
|
+
var HttpService = class {
|
|
9
|
+
static { _classThis = this; }
|
|
10
|
+
static {
|
|
11
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
12
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
13
|
+
HttpService = _classThis = _classDescriptor.value;
|
|
14
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
15
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
16
|
+
}
|
|
17
|
+
fetch(input, init) {
|
|
18
|
+
return fetch(input, init);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
return HttpService = _classThis;
|
|
22
|
+
})();
|
|
23
|
+
export { HttpService };
|
|
24
|
+
//# sourceMappingURL=http.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.service.js","sourceRoot":"","sources":["../../../src/lib/services/http.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;IAG1B,WAAW;4BADvB,UAAU,EAAE;;;;;;;;YACb,6KAIC;;;YAJY,uDAAW;;QACtB,KAAK,CAAC,KAAwB,EAAE,IAAkB;YAChD,OAAO,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAC5B,CAAC;;;;SAHU,WAAW"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { __esDecorate, __runInitializers } from "tslib";
|
|
2
|
+
import { inject, injectable } from "@joist/di";
|
|
3
|
+
import { HttpService } from "./http.service.js";
|
|
4
|
+
import { USAConfig } from "../config/config.element.js";
|
|
5
|
+
let IconService = (() => {
|
|
6
|
+
let _classDecorators = [injectable()];
|
|
7
|
+
let _classDescriptor;
|
|
8
|
+
let _classExtraInitializers = [];
|
|
9
|
+
let _classThis;
|
|
10
|
+
var IconService = class {
|
|
11
|
+
static { _classThis = this; }
|
|
12
|
+
static {
|
|
13
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
14
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
15
|
+
IconService = _classThis = _classDescriptor.value;
|
|
16
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
17
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
18
|
+
}
|
|
19
|
+
#config = inject(USAConfig);
|
|
20
|
+
#http = inject(HttpService);
|
|
21
|
+
#iconCache = new Map();
|
|
22
|
+
async getIcon(icon) {
|
|
23
|
+
const config = this.#config();
|
|
24
|
+
const http = this.#http();
|
|
25
|
+
const cached = this.#iconCache.get(icon);
|
|
26
|
+
if (cached) {
|
|
27
|
+
return cached.then((res) => {
|
|
28
|
+
return res.content.firstElementChild.cloneNode(true);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
const svg = http
|
|
32
|
+
.fetch(`${config.iconPath}${icon}.svg`)
|
|
33
|
+
.then((res) => {
|
|
34
|
+
switch (res.status) {
|
|
35
|
+
case 200:
|
|
36
|
+
return res.text();
|
|
37
|
+
}
|
|
38
|
+
return "";
|
|
39
|
+
})
|
|
40
|
+
.then((res) => {
|
|
41
|
+
const template = document.createElement("template");
|
|
42
|
+
template.innerHTML = res;
|
|
43
|
+
return template;
|
|
44
|
+
});
|
|
45
|
+
this.#iconCache.set(icon, svg);
|
|
46
|
+
return svg.then((res) => {
|
|
47
|
+
return res.content.firstElementChild.cloneNode(true);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
return IconService = _classThis;
|
|
52
|
+
})();
|
|
53
|
+
export { IconService };
|
|
54
|
+
//# sourceMappingURL=icon.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.service.js","sourceRoot":"","sources":["../../../src/lib/services/icon.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;IAG3C,WAAW;4BADvB,UAAU,EAAE;;;;;;;;YACb,6KAwCC;;;YAxCY,uDAAW;;QACtB,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;QAC5B,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;QAC5B,UAAU,GAA8C,IAAI,GAAG,EAAE,CAAC;QAElE,KAAK,CAAC,OAAO,CAAC,IAAY;YACxB,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;YAC9B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;YAE1B,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAEzC,IAAI,MAAM,EAAE,CAAC;gBACX,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;oBACzB,OAAO,GAAG,CAAC,OAAO,CAAC,iBAAkB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;gBACxD,CAAC,CAAC,CAAC;YACL,CAAC;YAED,MAAM,GAAG,GAAG,IAAI;iBACb,KAAK,CAAC,GAAG,MAAM,CAAC,QAAQ,GAAG,IAAI,MAAM,CAAC;iBACtC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;gBACZ,QAAQ,GAAG,CAAC,MAAM,EAAE,CAAC;oBACnB,KAAK,GAAG;wBACN,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC;gBACtB,CAAC;gBAED,OAAO,EAAE,CAAC;YACZ,CAAC,CAAC;iBACD,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;gBACZ,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;gBACpD,QAAQ,CAAC,SAAS,GAAG,GAAG,CAAC;gBAEzB,OAAO,QAAQ,CAAC;YAClB,CAAC,CAAC,CAAC;YAEL,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;YAE/B,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;gBACtB,OAAO,GAAG,CAAC,OAAO,CAAC,iBAAkB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACxD,CAAC,CAAC,CAAC;QACL,CAAC;;;;SAvCU,WAAW"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Injector } from "@joist/di";
|
|
2
|
+
import { assert } from "@open-wc/testing";
|
|
3
|
+
import { HttpService } from "./http.service.js";
|
|
4
|
+
import { IconService } from "./icon.service.js";
|
|
5
|
+
describe("IconService", () => {
|
|
6
|
+
it("should fetch icon if not in cache", async () => {
|
|
7
|
+
let callCount = 0;
|
|
8
|
+
const app = new Injector([
|
|
9
|
+
{
|
|
10
|
+
provide: HttpService,
|
|
11
|
+
use: class extends HttpService {
|
|
12
|
+
async fetch() {
|
|
13
|
+
callCount++;
|
|
14
|
+
return new Response("<svg></svg>");
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
]);
|
|
19
|
+
const icon = app.inject(IconService);
|
|
20
|
+
const res = await icon.getIcon("test");
|
|
21
|
+
assert.equal(res.nodeName, "svg");
|
|
22
|
+
assert.equal(callCount, 1);
|
|
23
|
+
});
|
|
24
|
+
it("should not fetch new icon if the icon is found in the cache", async () => {
|
|
25
|
+
let callCount = 0;
|
|
26
|
+
const app = new Injector([
|
|
27
|
+
{
|
|
28
|
+
provide: HttpService,
|
|
29
|
+
use: class extends HttpService {
|
|
30
|
+
async fetch() {
|
|
31
|
+
callCount++;
|
|
32
|
+
return new Response("<svg></svg>");
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
]);
|
|
37
|
+
const icon = app.inject(IconService);
|
|
38
|
+
await icon.getIcon("test");
|
|
39
|
+
const res = await icon.getIcon("test");
|
|
40
|
+
assert.equal(res.nodeName, "svg");
|
|
41
|
+
assert.equal(callCount, 1);
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=icon.service.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon.service.test.js","sourceRoot":"","sources":["../../../src/lib/services/icon.service.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,EAAE,CAAC,mCAAmC,EAAE,KAAK,IAAI,EAAE;QACjD,IAAI,SAAS,GAAG,CAAC,CAAC;QAElB,MAAM,GAAG,GAAG,IAAI,QAAQ,CAAC;YACvB;gBACE,OAAO,EAAE,WAAW;gBACpB,GAAG,EAAE,KAAM,SAAQ,WAAW;oBAC5B,KAAK,CAAC,KAAK;wBACT,SAAS,EAAE,CAAC;wBACZ,OAAO,IAAI,QAAQ,CAAC,aAAa,CAAC,CAAC;oBACrC,CAAC;iBACF;aACF;SACF,CAAC,CAAC;QAEH,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAErC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAEvC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QAClC,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6DAA6D,EAAE,KAAK,IAAI,EAAE;QAC3E,IAAI,SAAS,GAAG,CAAC,CAAC;QAElB,MAAM,GAAG,GAAG,IAAI,QAAQ,CAAC;YACvB;gBACE,OAAO,EAAE,WAAW;gBACpB,GAAG,EAAE,KAAM,SAAQ,WAAW;oBAC5B,KAAK,CAAC,KAAK;wBACT,SAAS,EAAE,CAAC;wBACZ,OAAO,IAAI,QAAQ,CAAC,aAAa,CAAC,CAAC;oBACrC,CAAC;iBACF;aACF;SACF,CAAC,CAAC;QAEH,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAErC,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAE3B,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAEvC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QAClC,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon-element.test.js","sourceRoot":"","sources":["../../../src/lib/icon/icon-element.test.ts"],"names":[],"mappings":""}
|
|
File without changes
|