@noctuatech/uswds 0.0.5 → 0.0.6
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 +13 -1
- package/src/lib/radio/radio.element.ts +7 -7
- package/src/lib/select/select.element.ts +6 -6
- package/target/lib/radio/radio.element.js +5 -7
- package/target/lib/radio/radio.element.js.map +1 -1
- package/target/lib/select/select.element.js +4 -6
- package/target/lib/select/select.element.js.map +1 -1
package/assets/uswds.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";function e(e,t,a,s,n,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var l,r=s.kind,c="getter"===r?"get":"setter"===r?"set":"value",d=!t&&e?s.static?e:e.prototype:null,h=t||(d?Object.getOwnPropertyDescriptor(d,s.name):{}),u=!1,m=a.length-1;m>=0;m--){var p={};for(var f in s)p[f]="access"===f?{}:s[f];for(var f in s.access)p.access[f]=s.access[f];p.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var b=(0,a[m])("accessor"===r?{get:h.get,set:h.set}:h[c],p);if("accessor"===r){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw new TypeError("Object expected");(l=o(b.get))&&(h.get=l),(l=o(b.set))&&(h.set=l),(l=o(b.init))&&n.unshift(l)}else(l=o(b))&&("field"===r?n.unshift(l):h[c]=l)}d&&Object.defineProperty(d,s.name,h),u=!0}function t(e,t,a){for(var s=arguments.length>2,n=0;n<t.length;n++)a=s?t[n].call(e,a):t[n].call(e);return s?a:void 0}function a(e,t,a){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:a?"".concat(a," ",t):t})}function s(e,t,a,s){if("a"===a&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===a?s:"a"===a?s.call(e):s?s.value:t.get(e)}function n(e,t,a,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,a):n?n.value=a:t.set(e,a),a}function i(e){return e[Symbol.metadata]}"function"==typeof SuppressedError&&SuppressedError;class o{#e;#t;get name(){return this.#e}get factory(){return this.#t}constructor(e,t){this.#e=e,this.#t=t}}const l=new WeakMap;class r{#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),a=i(e);return a&&c(t,a.onInjected),t}const t=this.#s(e);if(t){if(t.use){const a=t.use;return this.#n(e,(()=>new a))}if(t.factory){const a=t.factory;return this.#n(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 o){if(!e.factory)throw new Error(`Provider not found for "${e.name}"`);return this.#n(e,e.factory)}return this.#n(e,(()=>new e))}setParent(e){this.parent=e}clear(){this.#a=new WeakMap}#n(e,t){const a=t(this);if(this.#a.set(e,a),"object"==typeof a&&null!==a){const t=l.get(a);t&&t.setParent(this);const s=i(e);s&&(c(a,s.onCreated),c(a,s.onInjected))}return a}#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 c(e,t){if(Array.isArray(t))for(let a of t)"function"==typeof a&&a.call(e)}function d(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=l.get(a);if(s)return s;if(a===document.body)return null}return null}(e);t&&l.get(this)?.setParent(t)}))}connectedCallback(){this.isConnected&&(this.dispatchEvent(new Event("finddiroot",{bubbles:!0,composed:!0})),super.connectedCallback&&super.connectedCallback())}disconnectedCallback(){l.get(this)?.setParent(void 0),super.disconnectedCallback&&super.disconnectedCallback()}}}[e.name]}function h(e){return function(t,a){const s={[t.name]:class extends t{constructor(...t){super(...t);const a=new r(e?.providers);a.providers.push({provide:r,factory:()=>a}),l.set(this,a)}}};return"HTMLElement"in globalThis&&HTMLElement.prototype.isPrototypeOf(t.prototype)?d(s[t.name]):s[t.name]}}function u(e){return function(){const t=l.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 m{#i;constructor(e,...t){this.#i=document.createElement("template"),this.#i.innerHTML=g(e)}apply(e){e.shadowRoot&&e.shadowRoot.append(this.#i.content.cloneNode(!0))}}function p(e,...t){return new m(e,...t)}class f{#o;constructor(e,...t){this.#o=new CSSStyleSheet,this.#o.replaceSync(g(e))}apply(e){e.shadowRoot&&(e.shadowRoot.adoptedStyleSheets=[...e.shadowRoot.adoptedStyleSheets,this.#o])}}function b(e){return new f(e)}function g(e){let t="";for(let a=0;a<e.length;a++)t+=e[a];return t}Symbol.metadata??=Symbol("Symbol.metadata");class v extends Map{}class k extends Map{}class y{attrs=new v;attrChanges=new k;listeners=[];onReady=new Set}class w extends WeakMap{read(e){return this.has(e)||this.set(e,new y),this.get(e)}}const S=new w;function x(e){return function({get:t,set:a},s){const n=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),i=S.read(s.metadata),o=e?.reflect??!0;return i.attrs.set(n,{propName:s.name,observe:e?.observed??!0,reflect:o,getPropValue:t,setPropValue:a}),{set(e){if(o)if(!0===e)this.hasAttribute(n)||this.setAttribute(n,"");else if(!1===e)this.hasAttribute(n)&&this.removeAttribute(n);else{const t=String(e);this.getAttribute(n)!==t&&this.setAttribute(n,t)}a.call(this,e)}}}}function C(e,t){return function(a,s){const n=S.read(s.metadata);let i=e=>e.shadowRoot??e;t&&(i="string"==typeof t?e=>e.shadowRoot?e.shadowRoot.querySelector(t):e.querySelector(t):t),n.listeners.push({event:e,cb:a,selector:i})}}function M(e){return function(t,a){const s=S.read(a.metadata);a.addInitializer((function(){e?.tagName&&(customElements.get(e.tagName)||customElements.define(e.tagName,this))}));const n={[t.name]:class extends t{static observedAttributes=Array.from(s.attrs.keys());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{event:e,cb:t,selector:a}of s.listeners){const s=a(this);if(!s)throw new Error(`could not add listener to ${s}`);s.addEventListener(e,t.bind(this))}for(let e of s.onReady)e.call(this)}connectedCallback(){this.isConnected&&(!function(e,t){for(let[a,{getPropValue:s,reflect:n}]of t)if(n){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())}attributeChangedCallback(e,t,a){const n=s.attrs.get(e),i=s.attrChanges.get(e);if(n){if(t!==a){const e=n.getPropValue.call(this);""===a?n.setPropValue.call(this,!0):"number"==typeof e?n.setPropValue.call(this,Number(a)):n.setPropValue.call(this,a)}if(i)for(let e of i)e.call(this,t,a);super.attributeChangedCallback&&super.attributeChangedCallback(e,t,a)}}}};return n[t.name]}}function E(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}}class W{constructor(){this.spriteSheet=""}}(()=>{var i,o;let l,c,d,m=[M({tagName:"usa-config",shadowDom:[b`:host{display:contents}`,p`<slot></slot>`]}),h()],f=[],g=HTMLElement,v=[],k=[];c=class extends g{constructor(){super(...arguments),o.set(this,t(this,v,"/assets/img/sprite.svg")),i.set(this,(t(this,k),u(r)))}get spriteSheet(){return s(this,o,"f")}set spriteSheet(e){n(this,o,e,"f")}connectedCallback(){const{providers:e}=s(this,i,"f").call(this);e.push({provide:W,factory:()=>this})}},i=new WeakMap,o=new WeakMap,a(c,"USAConfigElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(g[Symbol.metadata]??null):void 0;d=[x()],e(c,null,d,{kind:"accessor",name:"spriteSheet",static:!1,private:!1,access:{has:e=>"spriteSheet"in e,get:e=>e.spriteSheet,set:(e,t)=>{e.spriteSheet=t}},metadata:a},v,k),e(null,l={value:c},m,{kind:"class",name:c.name,metadata:a},null,f),c=l.value,a&&Object.defineProperty(c,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(c,f)})()})();const A={info:{icon:"info"},warning:{icon:"warning"},success:{icon:"check_circle"},error:{icon:"error"},emergency:{icon:"error"}};(()=>{var i,o;let l,r,c,d=[M({tagName:"usa-alert",shadowDom:[b`: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}`,p`<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>`]})],h=[],u=HTMLElement,m=[],f=[];r=class extends u{constructor(){super(...arguments),o.set(this,t(this,m,"info")),i.set(this,(t(this,f),E("usa-icon")))}get type(){return s(this,o,"f")}set type(e){n(this,o,e,"f")}attributeChangedCallback(){s(this,i,"f").call(this).icon=A[this.type].icon}},i=new WeakMap,o=new WeakMap,a(r,"USAAlertElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(u[Symbol.metadata]??null):void 0;c=[x()],e(r,null,c,{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:a},m,f),e(null,l={value:r},d,{kind:"class",name:r.name,metadata:a},null,h),r=l.value,a&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(r,h)})()})(),(()=>{var i,o,l,r,c,d,h;let u,m,f,g,v,k,y,w=[M({tagName:"usa-button",shadowDom:[b`: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}`,p`<button class="usa-button"><slot></slot></button>`]})],S=[],W=HTMLElement,A=[],j=[],O=[],P=[],N=[],T=[],D=[];m=class extends W{constructor(){super(...arguments),i.add(this),c.set(this,(t(this,A),t(this,j,"button"))),d.set(this,(t(this,O),t(this,P,!1))),h.set(this,(t(this,N),t(this,T,"primary"))),o.set(this,(t(this,D),this.attachInternals())),l.set(this,E("button"))}get type(){return s(this,c,"f")}set type(e){n(this,c,e,"f")}get disabled(){return s(this,d,"f")}set disabled(e){n(this,d,e,"f")}get variant(){return s(this,h,"f")}set variant(e){n(this,h,e,"f")}onKeyDown(e){"submit"===this.type&&"ENTER"===e.key.toUpperCase()&&s(this,i,"m",r).call(this)}onInternalClick(){s(this,i,"m",r).call(this)}attributeChangedCallback(){const e=s(this,l,"f").call(this);e.type=this.type,e.disabled=this.disabled}},o=new WeakMap,l=new WeakMap,i=new WeakSet,c=new WeakMap,d=new WeakMap,h=new WeakMap,r=function(){const{form:e}=s(this,o,"f");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()},a(m,"USAButtonElement"),(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(W[Symbol.metadata]??null):void 0;f=[x()],g=[x()],v=[x()],k=[C("keydown",(()=>document.body))],y=[C("click")],e(m,null,f,{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},j,O),e(m,null,g,{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},P,N),e(m,null,v,{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},T,D),e(m,null,k,{kind:"method",name:"onKeyDown",static:!1,private:!1,access:{has:e=>"onKeyDown"in e,get:e=>e.onKeyDown},metadata:t},null,A),e(m,null,y,{kind:"method",name:"onInternalClick",static:!1,private:!1,access:{has:e=>"onInternalClick"in e,get:e=>e.onInternalClick},metadata:t},null,A),e(null,u={value:m},w,{kind:"class",name:m.name,metadata:t},null,S),m=u.value,t&&Object.defineProperty(m,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),m.formAssociated=!0,t(m,S)})(),(()=>{var i,o,l,r,c,d;let h,u,m,f,g,v,k,y=[M({tagName:"usa-checkbox",shadowDom:[b`*{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}`,p`<label><input type="checkbox"><div class="checkbox"></div><div class="title"><slot></slot></div></label>`]})],w=[],S=HTMLElement,W=[],A=[],j=[],O=[],P=[],N=[],T=[],D=[],H=[];u=class extends S{constructor(){super(...arguments),l.set(this,(t(this,W),t(this,A,!1))),r.set(this,(t(this,j),t(this,O,""))),c.set(this,(t(this,P),t(this,N,""))),d.set(this,(t(this,T),t(this,D,!1))),i.set(this,(t(this,H),E("input"))),o.set(this,this.attachInternals())}get checked(){return s(this,l,"f")}set checked(e){n(this,l,e,"f")}get name(){return s(this,r,"f")}set name(e){n(this,r,e,"f")}get value(){return s(this,c,"f")}set value(e){n(this,c,e,"f")}get tiled(){return s(this,d,"f")}set tiled(e){n(this,d,e,"f")}connectedCallback(){const e=s(this,i,"f").call(this);this.checked&&s(this,o,"f").setFormValue(this.value),e.checked=this.checked,e.name=this.name}attributeChangedCallback(){const e=s(this,i,"f").call(this);e.checked=this.checked,e.name=this.name}onCheckboxChange(){s(this,i,"f").call(this).checked?s(this,o,"f").setFormValue(this.value):s(this,o,"f").setFormValue(null)}},i=new WeakMap,o=new WeakMap,l=new WeakMap,r=new WeakMap,c=new WeakMap,d=new WeakMap,a(u,"USACheckboxElement"),(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(S[Symbol.metadata]??null):void 0;m=[x()],f=[x()],g=[x()],v=[x({observed:!1})],k=[C("change","input[type=checkbox]")],e(u,null,m,{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},A,j),e(u,null,f,{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},O,P),e(u,null,g,{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},N,T),e(u,null,v,{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},D,H),e(u,null,k,{kind:"method",name:"onCheckboxChange",static:!1,private:!1,access:{has:e=>"onCheckboxChange"in e,get:e=>e.onCheckboxChange},metadata:t},null,W),e(null,h={value:u},y,{kind:"class",name:u.name,metadata:t},null,w),u=h.value,t&&Object.defineProperty(u,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),u.formAssociated=!0,t(u,w)})(),(()=>{let s,n,i=[M({tagName:"usa-description",shadowDom:[b`:host{display:block;font-size:.93rem;margin-top:.5rem}`,p`<slot></slot>`]})],o=[],l=HTMLElement;n=class extends l{},a(n,"USADescriptionElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(l[Symbol.metadata]??null):void 0;e(null,s={value:n},i,{kind:"class",name:n.name,metadata:a},null,o),n=s.value,a&&Object.defineProperty(n,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(n,o)})()})(),Symbol.metadata??=Symbol("Symbol.metadata");class j extends Map{}class O{scheduler=null;changes=new j}class P extends WeakMap{read(e){let t=this.get(e);return t||(t=new O,this.set(e,t)),t}}class N{effects=new Set}class T extends WeakMap{read(e){let t=this.get(e);return t||(t=new N,this.set(e,t)),t}}const D=new P,H=new T;function I(){return function(e,t){const a=H.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 n=D.read(this);null===n.scheduler&&(n.scheduler=Promise.resolve().then((()=>{for(let e of a.effects)e.call(this,n.changes);n.scheduler=null,n.changes.clear()}))),n.changes.set(t.name,{oldValue:e.get.call(this),newValue:s}),e.set.call(this,s)}}}}function L(){return function(e,t){H.read(t.metadata).effects.add(e)}}function z(e){const t=new Image;return t.height=40,t.width=40,t.src=URL.createObjectURL(e),t.ariaHidden="true",t}var R;(()=>{var i,o;let l,r,c,d,h=[M({tagName:"usa-file-input-preview",shadowDom:[b`*{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}`,p`<slot class="preview-heading"></slot>`]})],u=[],m=HTMLElement,f=[],g=[],v=[];r=class extends m{constructor(){super(...arguments),o.set(this,(t(this,f),t(this,g,null))),i.set(this,(t(this,v),new Map))}get files(){return s(this,o,"f")}set files(e){n(this,o,e,"f")}connectedCallback(){this.onChange()}onChange(){if(this.files){this.hidden=!1;let e=new Set;for(let t of this.files)if(e.add(t.name),!s(this,i,"f").has(t.name)){const e=document.createElement("div");e.id=t.name,e.className="preview-item";const a=z(t);e.append(a,document.createTextNode(t.name)),this.shadowRoot.append(e),s(this,i,"f").set(t.name,e)}for(let[t,a]of s(this,i,"f"))e.has(t)||(a.remove(),s(this,i,"f").delete(t))}else this.hidden=!0}},i=new WeakMap,o=new WeakMap,a(r,"USAFileInputPreviewElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(m[Symbol.metadata]??null):void 0;c=[I()],d=[L()],e(r,null,c,{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:a},g,v),e(r,null,d,{kind:"method",name:"onChange",static:!1,private:!1,access:{has:e=>"onChange"in e,get:e=>e.onChange},metadata:a},null,f),e(null,l={value:r},h,{kind:"class",name:r.name,metadata:a},null,u),r=l.value,a&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(r,u)})()})(),(()=>{var i,o,l,r,c;let d,h,u,m,f,g,v=[M({tagName:"usa-link",shadowDom:[b`:host{display:inline-flex;color:#005ea2;text-decoration:underline}a{color:inherit;text-decoration:inherit;display:inherit}`,p`<a><slot></slot></a>`]})],k=[],y=HTMLElement,w=[],S=[],C=[],W=[],A=[],j=[],O=[],P=[];h=class extends y{constructor(){super(...arguments),o.set(this,t(this,w,"")),l.set(this,(t(this,S),t(this,C,""))),r.set(this,(t(this,W),t(this,A,""))),c.set(this,(t(this,j),t(this,O,!1))),i.set(this,(t(this,P),E("a")))}get href(){return s(this,o,"f")}set href(e){n(this,o,e,"f")}get target(){return s(this,l,"f")}set target(e){n(this,l,e,"f")}get title(){return s(this,r,"f")}set title(e){n(this,r,e,"f")}get disabled(){return s(this,c,"f")}set disabled(e){n(this,c,e,"f")}attributeChangedCallback(e){const t=s(this,i,"f").call(this);switch(e){case"href":t.href=this.href;break;case"target":t.target=this.target;break;case"title":t.target=this.title}}},i=new WeakMap,o=new WeakMap,l=new WeakMap,r=new WeakMap,c=new WeakMap,a(h,"USALinkElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(y[Symbol.metadata]??null):void 0;u=[x()],m=[x()],f=[x()],g=[x({observed:!1})],e(h,null,u,{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:a},w,S),e(h,null,m,{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:a},C,W),e(h,null,f,{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:a},A,j),e(h,null,g,{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:a},O,P),e(null,d={value:h},v,{kind:"class",name:h.name,metadata:a},null,k),h=d.value,a&&Object.defineProperty(h,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(h,k)})()})(),(()=>{var i,o,l,r,c,d,h,u;let m,f,g,v,k,y,w,S,W=[M({tagName:"usa-file-input",shadowDom:[b`*{box-sizing:border-box}:host{display:block;max-width:30rem;position:relative}label{display:block}input{cursor:pointer;height:100%;left:0;margin:0;max-width:none;position:absolute;text-indent:-999em;top:0;width:100%;z-index:1}label slot{font-size:1.06rem;line-height:1.3;display:block;font-weight:400;margin-bottom:.5rem}.box{border:1px dashed #adadad;display:block;font-size:.93rem;position:relative;text-align:center;width:100%;max-width:30rem;padding:2rem 1rem}`,p`<label><slot></slot><input type="file"></label><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>`]})],A=[],j=HTMLElement,O=[],P=[],N=[],T=[],D=[],H=[],z=[],R=[],U=[];f=class extends j{constructor(){super(...arguments),c.set(this,(t(this,O),t(this,P,""))),d.set(this,(t(this,N),t(this,T,!0))),h.set(this,(t(this,D),t(this,H,""))),u.set(this,(t(this,z),t(this,R,null))),i.set(this,(t(this,U),this.attachInternals())),o.set(this,E("input")),l.set(this,E(".box")),r.set(this,E("usa-file-input-preview"))}get name(){return s(this,c,"f")}set name(e){n(this,c,e,"f")}get multiple(){return s(this,d,"f")}set multiple(e){n(this,d,e,"f")}get accept(){return s(this,h,"f")}set accept(e){n(this,h,e,"f")}get files(){return s(this,u,"f")}set files(e){n(this,u,e,"f")}onChange(){const e=s(this,o,"f").call(this);this.files&&(e.files=this.files,this.onInputChange())}attributeChangedCallback(){const e=s(this,o,"f").call(this);e.name=this.name,e.multiple=this.multiple,e.accept=this.accept}onInputChange(){const e=s(this,o,"f").call(this),t=s(this,l,"f").call(this);s(this,r,"f").call(this).files=e.files;const a=new FormData;if(e.files){t.style.display="none";for(let t of e.files)a.append(this.name,t)}else t.style.display="block";s(this,i,"f").setFormValue(a)}},i=new WeakMap,o=new WeakMap,l=new WeakMap,r=new WeakMap,c=new WeakMap,d=new WeakMap,h=new WeakMap,u=new WeakMap,a(f,"USAFileInputElement"),(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(j[Symbol.metadata]??null):void 0;g=[x()],v=[x()],k=[x()],y=[I()],w=[L()],S=[C("change")],e(f,null,g,{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,N),e(f,null,v,{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},T,D),e(f,null,k,{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},H,z),e(f,null,y,{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},R,U),e(f,null,w,{kind:"method",name:"onChange",static:!1,private:!1,access:{has:e=>"onChange"in e,get:e=>e.onChange},metadata:t},null,O),e(f,null,S,{kind:"method",name:"onInputChange",static:!1,private:!1,access:{has:e=>"onInputChange"in e,get:e=>e.onInputChange},metadata:t},null,O),e(null,m={value:f},W,{kind:"class",name:f.name,metadata:t},null,A),f=m.value,t&&Object.defineProperty(f,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),f.formAssociated=!0,t(f,A)})(),(()=>{var i,o,l,r,c,d;let m,f,g,v=[M({tagName:"usa-icon",shadowDom:[b`:host{display:inline-block;height:2rem;position:relative;width:2rem}svg{fill:currentColor;height:100%;width:100%}`,p`<svg class="usa-icon" aria-hidden="true" focusable="false" role="img"><use></use></svg>`]}),h()],k=[],y=HTMLElement,w=[],S=[];f=class extends y{constructor(){super(...arguments),i.add(this),d.set(this,t(this,w,"accessibility_new")),o.set(this,(t(this,S),E("use"))),l.set(this,u(W)),r.set(this,!1)}get icon(){return s(this,d,"f")}set icon(e){n(this,d,e,"f")}connectedCallback(){n(this,r,!0,"f"),s(this,i,"m",c).call(this)}attributeChangedCallback(){s(this,r,"f")&&s(this,i,"m",c).call(this)}},o=new WeakMap,l=new WeakMap,r=new WeakMap,i=new WeakSet,d=new WeakMap,c=function(){const e=s(this,l,"f").call(this),t=s(this,o,"f").call(this);this.icon!==t.getAttribute("href")&&t.setAttribute("href",`${e.spriteSheet}#${this.icon}`)},a(f,"USAIconElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(y[Symbol.metadata]??null):void 0;g=[x()],e(f,null,g,{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:a},w,S),e(null,m={value:f},v,{kind:"class",name:f.name,metadata:a},null,k),f=m.value,a&&Object.defineProperty(f,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(f,k)})()})(),(()=>{var i,o,l,r,c,d;let h,u,m,f,g,v,k,y,w=[M({tagName:"usa-input",shadowDom:[b`*{box-sizing:border-box}:host{font-family:Source Sans Pro Web,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;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}`,p`<label><slot></slot><input></label>`]})],S=[],W=HTMLElement,A=[],j=[],O=[],P=[],N=[],T=[],D=[],H=[],z=[];u=class extends W{constructor(){super(...arguments),l.set(this,(t(this,A),t(this,j,""))),r.set(this,(t(this,O),t(this,P,"on"))),c.set(this,(t(this,N),t(this,T,""))),d.set(this,(t(this,D),t(this,H,""))),i.set(this,(t(this,z),this.attachInternals())),o.set(this,E("input"))}get name(){return s(this,l,"f")}set name(e){n(this,l,e,"f")}get autocomplete(){return s(this,r,"f")}set autocomplete(e){n(this,r,e,"f")}get placeholder(){return s(this,c,"f")}set placeholder(e){n(this,c,e,"f")}get value(){return s(this,d,"f")}set value(e){n(this,d,e,"f")}get selectionStart(){const{selectionStart:e}=s(this,o,"f").call(this);return e}setSelectionRange(e,t){s(this,o,"f").call(this).setSelectionRange(e,t)}onChange(){s(this,o,"f").call(this).value=this.value}onInputChange(){const e=s(this,o,"f").call(this);s(this,i,"f").setFormValue(e.value),this.value=e.value}attributeChangedCallback(e){const t=s(this,o,"f").call(this);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,s(this,i,"f").setFormValue(this.value)}}},i=new WeakMap,o=new WeakMap,l=new WeakMap,r=new WeakMap,c=new WeakMap,d=new WeakMap,a(u,"USATextInputElement"),(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(W[Symbol.metadata]??null):void 0;m=[x()],f=[x()],g=[x()],v=[x({reflect:!1}),I()],k=[L()],y=[C("input")],e(u,null,m,{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},j,O),e(u,null,f,{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},P,N),e(u,null,g,{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},T,D),e(u,null,v,{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},H,z),e(u,null,k,{kind:"method",name:"onChange",static:!1,private:!1,access:{has:e=>"onChange"in e,get:e=>e.onChange},metadata:t},null,A),e(u,null,y,{kind:"method",name:"onInputChange",static:!1,private:!1,access:{has:e=>"onInputChange"in e,get:e=>e.onInputChange},metadata:t},null,A),e(null,h={value:u},w,{kind:"class",name:u.name,metadata:t},null,S),u=h.value,t&&Object.defineProperty(u,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),u.formAssociated=!0,t(u,S)})(),function(e){e.Any="*",e.Number="9",e.Letter="A"}(R||(R={}));const U=Object.values(R),V={Letters:/^[a-z]/i,Numbers:/^[0-9]/i};function F(e,t){const a=e.replace(/[^a-z0-9]/gi,""),s=a.split("");let n=0,i="";for(var o=0;o<t.length;o++){const e=t[o],a=s[n];a&&e&&(e===R.Any?(i+=a,n++):e===R.Number?(/^[0-9]/i.test(a)&&(i+=a),n++):e===R.Letter?(/^[a-z]/i.test(a)&&(i+=a),n++):i+=e)}return{raw:a,formatted:i}}(()=>{var i,o,l;let r,c,d,h,u,m=[M({tagName:"usa-input-mask",shadowDom:[b`:host{display:contents}`,p`<slot></slot>`]})],f=[],g=HTMLElement,v=[],k=[],y=[];c=class extends g{get mask(){return s(this,l,"f")}set mask(e){n(this,l,e,"f")}connectedCallback(){for(let e of this.querySelectorAll("[mask]")){const{formatted:t}=F(e.value,s(this,i,"m",o).call(this,e));e.value=t}}async onInput(e){const t=e.target,a=t.selectionStart||0,n=t.value,l=s(this,i,"m",o).call(this,t),{formatted:r}=F(t.value,l);t.value=r;const c=t.value.length-n.length,d=l[a-1];await Promise.resolve(),d&&!U.includes(d)&&c>0?t.setSelectionRange(a+c,a+c):t.setSelectionRange(a,a),n!==t.value&&t.dispatchEvent(new Event("input",{bubbles:!0}))}onKeyDown(e){const t=e.target,a=s(this,i,"m",o).call(this,t),n=a[t.selectionStart||0];1===e.key.length&&/^[a-z0-9]/i.test(e.key)&&(t.value.length>=a.length?e.preventDefault():n===R.Number?V.Numbers.test(e.key)||e.preventDefault():n===R.Letter&&(V.Letters.test(e.key)||e.preventDefault()))}constructor(){super(...arguments),i.add(this),l.set(this,(t(this,v),t(this,k,""))),t(this,y)}},i=new WeakSet,l=new WeakMap,o=function(e){return this.mask||e.getAttribute("mask")||""},a(c,"USAInputMaskElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(g[Symbol.metadata]??null):void 0;d=[x()],h=[C("input")],u=[C("keydown")],e(c,null,d,{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:a},k,y),e(c,null,h,{kind:"method",name:"onInput",static:!1,private:!1,access:{has:e=>"onInput"in e,get:e=>e.onInput},metadata:a},null,v),e(c,null,u,{kind:"method",name:"onKeyDown",static:!1,private:!1,access:{has:e=>"onKeyDown"in e,get:e=>e.onKeyDown},metadata:a},null,v),e(null,r={value:c},m,{kind:"class",name:c.name,metadata:a},null,f),c=r.value,a&&Object.defineProperty(c,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(c,f)})()})();let K=(()=>{var i,o,l,r,c;let d,h,u,m,f,g=[M({tagName:"usa-radio-option",shadowDom:[b`:host{display:flex;flex-direction:column;margin-top:.05rem}`,p`<slot></slot>`]})],v=[],k=HTMLElement,y=[],w=[],S=[],C=[],E=[],W=[];return h=class extends k{get value(){return s(this,l,"f")}set value(e){n(this,l,e,"f")}get name(){return s(this,r,"f")}set name(e){n(this,r,e,"f")}get checked(){return s(this,c,"f")}set checked(e){n(this,c,e,"f")}constructor(){super(),l.set(this,t(this,y,"")),r.set(this,(t(this,w),t(this,S,""))),c.set(this,(t(this,C),t(this,E,!1))),this.radio=(t(this,W),document.createElement("label")),i.set(this,document.createElement("input")),o.set(this,document.createElement("slot")),s(this,i,"f").type="radio",this.radio.append(s(this,i,"f"),s(this,o,"f"))}attributeChangedCallback(){this.slot=this.value,s(this,i,"f").name=this.name,s(this,i,"f").value=this.value,s(this,i,"f").checked=this.checked,s(this,o,"f").name=this.value}connectedCallback(){this.dispatchEvent(new Event("usa::radio::option::added",{bubbles:!0}))}disconnectedCallback(){this.radio.remove()}},i=new WeakMap,o=new WeakMap,l=new WeakMap,r=new WeakMap,c=new WeakMap,a(h,"USARadioOptionElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(k[Symbol.metadata]??null):void 0;u=[x()],m=[x()],f=[x()],e(h,null,u,{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:a},y,w),e(h,null,m,{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:a},S,C),e(h,null,f,{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:a},E,W),e(null,d={value:h},g,{kind:"class",name:h.name,metadata:a},null,v),h=d.value,a&&Object.defineProperty(h,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(h,v)})(),h})();(()=>{var i,o,l,r;let c,d,h,u,m,f,g,v=[M({tagName:"usa-radio",shadowDom:[b`:host{display:flex;flex-direction:column;gap:1rem;max-width:30rem}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}slot#main{margin-bottom:.5rem}`,p`<slot id="main"></slot>`]})],k=[],y=HTMLElement,w=[],S=[],E=[],W=[],A=[],j=[],O=[];d=class extends y{constructor(){super(...arguments),o.set(this,(t(this,w),t(this,S,""))),l.set(this,(t(this,E),t(this,W,""))),r.set(this,(t(this,A),t(this,j,!1))),i.set(this,(t(this,O),this.attachInternals()))}get value(){return s(this,o,"f")}set value(e){n(this,o,e,"f")}get name(){return s(this,l,"f")}set name(e){n(this,l,e,"f")}get tiled(){return s(this,r,"f")}set tiled(e){n(this,r,e,"f")}get shadow(){return this.shadowRoot}onChange(e){e.target instanceof HTMLInputElement&&e.target.checked&&(this.value=e.target.value,s(this,i,"f").setFormValue(e.target.value))}connectedCallback(){this.value&&s(this,i,"f").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.target instanceof K&&(e.stopPropagation(),e.target.checked=e.target.value===this.value,e.target.name=this.name,this.shadow.append(e.target.radio))}},i=new WeakMap,o=new WeakMap,l=new WeakMap,r=new WeakMap,a(d,"USARadioElement"),(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(y[Symbol.metadata]??null):void 0;h=[x()],u=[x()],m=[x({observed:!1})],f=[C("change")],g=[C("usa::radio::option::added",(e=>e))],e(d,null,h,{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},S,E),e(d,null,u,{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},W,A),e(d,null,m,{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},j,O),e(d,null,f,{kind:"method",name:"onChange",static:!1,private:!1,access:{has:e=>"onChange"in e,get:e=>e.onChange},metadata:t},null,w),e(d,null,g,{kind:"method",name:"onOptionAdded",static:!1,private:!1,access:{has:e=>"onOptionAdded"in e,get:e=>e.onOptionAdded},metadata:t},null,w),e(null,c={value:d},v,{kind:"class",name:d.name,metadata:t},null,k),d=c.value,t&&Object.defineProperty(d,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),d.formAssociated=!0,t(d,k)})();let q=(()=>{var i;let o,l,r,c=[M({tagName:"usa-select-option",shadowDom:[b`:host{display:none}`]})],d=[],h=HTMLElement,u=[],m=[];return l=class extends h{constructor(){super(...arguments),i.set(this,t(this,u,"")),this.option=(t(this,m),document.createElement("option"))}get value(){return s(this,i,"f")}set value(e){n(this,i,e,"f")}attributeChangedCallback(){this.option.textContent=this.textContent,this.option.value=this.value}connectedCallback(){this.dispatchEvent(new Event("usa::select::option::added",{bubbles:!0}))}disconnectedCallback(){this.option.remove()}},i=new WeakMap,a(l,"USASelecOptionElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(h[Symbol.metadata]??null):void 0;r=[x()],e(l,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:a},u,m),e(null,o={value:l},c,{kind:"class",name:l.name,metadata:a},null,d),l=o.value,a&&Object.defineProperty(l,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(l,d)})(),l})();(()=>{var i,o,l,r;let c,d,h,u,m,f,g=[M({tagName:"usa-select",shadowDom:[b`: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}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}`,p`<usa-icon icon="unfold_more"></usa-icon><label><div class="label"><slot></slot></div><select></select></label>`]})],v=[],k=HTMLElement,y=[],w=[],S=[],W=[],A=[];d=class extends k{constructor(){super(...arguments),l.set(this,(t(this,y),t(this,w,""))),r.set(this,(t(this,S),t(this,W,""))),i.set(this,(t(this,A),E("select"))),o.set(this,this.attachInternals())}get value(){return s(this,l,"f")}set value(e){n(this,l,e,"f")}get name(){return s(this,r,"f")}set name(e){n(this,r,e,"f")}connectedCallback(){const e=s(this,i,"f").call(this);e.value=this.value,e.name=this.name,s(this,o,"f").setFormValue(this.value)}onSelectChange(){const e=s(this,i,"f").call(this);s(this,o,"f").setFormValue(e.value)}onOptionAdded(e){if(e.target instanceof q){e.stopPropagation();s(this,i,"f").call(this).append(e.target.option)}}},i=new WeakMap,o=new WeakMap,l=new WeakMap,r=new WeakMap,a(d,"USASelectElement"),(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(k[Symbol.metadata]??null):void 0;h=[x()],u=[x()],m=[C("change")],f=[C("usa::select::option::added")],e(d,null,h,{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},w,S),e(d,null,u,{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},W,A),e(d,null,m,{kind:"method",name:"onSelectChange",static:!1,private:!1,access:{has:e=>"onSelectChange"in e,get:e=>e.onSelectChange},metadata:t},null,y),e(d,null,f,{kind:"method",name:"onOptionAdded",static:!1,private:!1,access:{has:e=>"onOptionAdded"in e,get:e=>e.onOptionAdded},metadata:t},null,y),e(null,c={value:d},g,{kind:"class",name:d.name,metadata:t},null,v),d=c.value,t&&Object.defineProperty(d,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),d.formAssociated=!0,t(d,v)})(),(()=>{var i;let o,l,r,c=[M({tagName:"usa-tag",shadowDom:[b`: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}`,p`<slot></slot>`]})],d=[],h=HTMLElement,u=[],m=[];l=class extends h{get variant(){return s(this,i,"f")}set variant(e){n(this,i,e,"f")}constructor(){super(...arguments),i.set(this,t(this,u,"default")),t(this,m)}},i=new WeakMap,a(l,"USATagElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(h[Symbol.metadata]??null):void 0;r=[x()],e(l,null,r,{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:a},u,m),e(null,o={value:l},c,{kind:"class",name:l.name,metadata:a},null,d),l=o.value,a&&Object.defineProperty(l,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(l,d)})()})(),(()=>{var i,o,l;let r,c,d,h,u,m,f=[M({tagName:"usa-accordion",shadowDomOpts:{mode:"open",delegatesFocus:!0},shadowDom:[b`*{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}`,p`<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>`]})],g=[],v=HTMLElement,k=[],y=[],w=[],S=[],W=[];c=class extends v{constructor(){super(...arguments),o.set(this,(t(this,k),t(this,y,""))),l.set(this,(t(this,w),t(this,S,!1))),i.set(this,(t(this,W),E("details")))}get name(){return s(this,o,"f")}set name(e){n(this,o,e,"f")}get open(){return s(this,l,"f")}set open(e){n(this,l,e,"f")}attributeChangedCallback(){s(this,i,"f").call(this).open=this.open}onClick(e){e.preventDefault(),this.dispatchEvent(new $(!this.open))}onAccordionToggle(e){e.target.name===this.name?this.open=e.target===this&&e.open:e.target===this&&(this.open=e.open)}},i=new WeakMap,o=new WeakMap,l=new WeakMap,a(c,"USAAccordionElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(v[Symbol.metadata]??null):void 0;d=[x()],h=[x()],u=[C("click","summary")],m=[C("usa::accordion::toggle",(()=>document.body))],e(c,null,d,{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:a},y,w),e(c,null,h,{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:a},S,W),e(c,null,u,{kind:"method",name:"onClick",static:!1,private:!1,access:{has:e=>"onClick"in e,get:e=>e.onClick},metadata:a},null,k),e(c,null,m,{kind:"method",name:"onAccordionToggle",static:!1,private:!1,access:{has:e=>"onAccordionToggle"in e,get:e=>e.onAccordionToggle},metadata:a},null,k),e(null,r={value:c},f,{kind:"class",name:c.name,metadata:a},null,g),c=r.value,a&&Object.defineProperty(c,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(c,g)})()})();class $ extends Event{get target(){return super.target}constructor(e){super("usa::accordion::toggle",{bubbles:!0}),this.open=e}}(()=>{var i;let o,l,r,c=[M({tagName:"usa-side-nav-item",shadowDom:[b`: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}`,p`<div class="side-nav-item"><slot></slot></div><slot name="children"></slot>`]})],d=[],h=HTMLElement,u=[],m=[];l=class extends h{get current(){return s(this,i,"f")}set current(e){n(this,i,e,"f")}constructor(){super(...arguments),i.set(this,t(this,u,!1)),t(this,m)}},i=new WeakMap,a(l,"USASideNavItemElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(h[Symbol.metadata]??null):void 0;r=[x({observed:!1})],e(l,null,r,{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:a},u,m),e(null,o={value:l},c,{kind:"class",name:l.name,metadata:a},null,d),l=o.value,a&&Object.defineProperty(l,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(l,d)})()})(),(()=>{let s,n,i=[M({tagName:"usa-side-nav",shadowDom:[b`:host{display:block;font-size:1.06rem;line-height:1.3;border-bottom:1px solid #e6e6e6}`,p`<slot></slot>`]})],o=[],l=HTMLElement;n=class extends l{},a(n,"USASideNavElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(l[Symbol.metadata]??null):void 0;e(null,s={value:n},i,{kind:"class",name:n.name,metadata:a},null,o),n=s.value,a&&Object.defineProperty(n,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(n,o)})()})()}();
|
|
1
|
+
!function(){"use strict";function e(e,t,a,s,n,i){function o(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var l,r=s.kind,c="getter"===r?"get":"setter"===r?"set":"value",d=!t&&e?s.static?e:e.prototype:null,h=t||(d?Object.getOwnPropertyDescriptor(d,s.name):{}),u=!1,m=a.length-1;m>=0;m--){var p={};for(var f in s)p[f]="access"===f?{}:s[f];for(var f in s.access)p.access[f]=s.access[f];p.addInitializer=function(e){if(u)throw new TypeError("Cannot add initializers after decoration has completed");i.push(o(e||null))};var b=(0,a[m])("accessor"===r?{get:h.get,set:h.set}:h[c],p);if("accessor"===r){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw new TypeError("Object expected");(l=o(b.get))&&(h.get=l),(l=o(b.set))&&(h.set=l),(l=o(b.init))&&n.unshift(l)}else(l=o(b))&&("field"===r?n.unshift(l):h[c]=l)}d&&Object.defineProperty(d,s.name,h),u=!0}function t(e,t,a){for(var s=arguments.length>2,n=0;n<t.length;n++)a=s?t[n].call(e,a):t[n].call(e);return s?a:void 0}function a(e,t,a){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:a?"".concat(a," ",t):t})}function s(e,t,a,s){if("a"===a&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===a?s:"a"===a?s.call(e):s?s.value:t.get(e)}function n(e,t,a,s,n){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?n.call(e,a):n?n.value=a:t.set(e,a),a}function i(e){return e[Symbol.metadata]}"function"==typeof SuppressedError&&SuppressedError;class o{#e;#t;get name(){return this.#e}get factory(){return this.#t}constructor(e,t){this.#e=e,this.#t=t}}const l=new WeakMap;class r{#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),a=i(e);return a&&c(t,a.onInjected),t}const t=this.#s(e);if(t){if(t.use){const a=t.use;return this.#n(e,(()=>new a))}if(t.factory){const a=t.factory;return this.#n(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 o){if(!e.factory)throw new Error(`Provider not found for "${e.name}"`);return this.#n(e,e.factory)}return this.#n(e,(()=>new e))}setParent(e){this.parent=e}clear(){this.#a=new WeakMap}#n(e,t){const a=t(this);if(this.#a.set(e,a),"object"==typeof a&&null!==a){const t=l.get(a);t&&t.setParent(this);const s=i(e);s&&(c(a,s.onCreated),c(a,s.onInjected))}return a}#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 c(e,t){if(Array.isArray(t))for(let a of t)"function"==typeof a&&a.call(e)}function d(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=l.get(a);if(s)return s;if(a===document.body)return null}return null}(e);t&&l.get(this)?.setParent(t)}))}connectedCallback(){this.isConnected&&(this.dispatchEvent(new Event("finddiroot",{bubbles:!0,composed:!0})),super.connectedCallback&&super.connectedCallback())}disconnectedCallback(){l.get(this)?.setParent(void 0),super.disconnectedCallback&&super.disconnectedCallback()}}}[e.name]}function h(e){return function(t,a){const s={[t.name]:class extends t{constructor(...t){super(...t);const a=new r(e?.providers);a.providers.push({provide:r,factory:()=>a}),l.set(this,a)}}};return"HTMLElement"in globalThis&&HTMLElement.prototype.isPrototypeOf(t.prototype)?d(s[t.name]):s[t.name]}}function u(e){return function(){const t=l.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 m{#i;constructor(e,...t){this.#i=document.createElement("template"),this.#i.innerHTML=g(e)}apply(e){e.shadowRoot&&e.shadowRoot.append(this.#i.content.cloneNode(!0))}}function p(e,...t){return new m(e,...t)}class f{#o;constructor(e,...t){this.#o=new CSSStyleSheet,this.#o.replaceSync(g(e))}apply(e){e.shadowRoot&&(e.shadowRoot.adoptedStyleSheets=[...e.shadowRoot.adoptedStyleSheets,this.#o])}}function b(e){return new f(e)}function g(e){let t="";for(let a=0;a<e.length;a++)t+=e[a];return t}Symbol.metadata??=Symbol("Symbol.metadata");class v extends Map{}class k extends Map{}class y{attrs=new v;attrChanges=new k;listeners=[];onReady=new Set}class w extends WeakMap{read(e){return this.has(e)||this.set(e,new y),this.get(e)}}const S=new w;function x(e){return function({get:t,set:a},s){const n=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),i=S.read(s.metadata),o=e?.reflect??!0;return i.attrs.set(n,{propName:s.name,observe:e?.observed??!0,reflect:o,getPropValue:t,setPropValue:a}),{set(e){if(o)if(!0===e)this.hasAttribute(n)||this.setAttribute(n,"");else if(!1===e)this.hasAttribute(n)&&this.removeAttribute(n);else{const t=String(e);this.getAttribute(n)!==t&&this.setAttribute(n,t)}a.call(this,e)}}}}function C(e,t){return function(a,s){const n=S.read(s.metadata);let i=e=>e.shadowRoot??e;t&&(i="string"==typeof t?e=>e.shadowRoot?e.shadowRoot.querySelector(t):e.querySelector(t):t),n.listeners.push({event:e,cb:a,selector:i})}}function M(e){return function(t,a){const s=S.read(a.metadata);a.addInitializer((function(){e?.tagName&&(customElements.get(e.tagName)||customElements.define(e.tagName,this))}));const n={[t.name]:class extends t{static observedAttributes=Array.from(s.attrs.keys());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{event:e,cb:t,selector:a}of s.listeners){const s=a(this);if(!s)throw new Error(`could not add listener to ${s}`);s.addEventListener(e,t.bind(this))}for(let e of s.onReady)e.call(this)}connectedCallback(){this.isConnected&&(!function(e,t){for(let[a,{getPropValue:s,reflect:n}]of t)if(n){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())}attributeChangedCallback(e,t,a){const n=s.attrs.get(e),i=s.attrChanges.get(e);if(n){if(t!==a){const e=n.getPropValue.call(this);""===a?n.setPropValue.call(this,!0):"number"==typeof e?n.setPropValue.call(this,Number(a)):n.setPropValue.call(this,a)}if(i)for(let e of i)e.call(this,t,a);super.attributeChangedCallback&&super.attributeChangedCallback(e,t,a)}}}};return n[t.name]}}function E(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}}class W{constructor(){this.spriteSheet=""}}(()=>{var i,o;let l,c,d,m=[M({tagName:"usa-config",shadowDom:[b`:host{display:contents}`,p`<slot></slot>`]}),h()],f=[],g=HTMLElement,v=[],k=[];c=class extends g{constructor(){super(...arguments),o.set(this,t(this,v,"/assets/img/sprite.svg")),i.set(this,(t(this,k),u(r)))}get spriteSheet(){return s(this,o,"f")}set spriteSheet(e){n(this,o,e,"f")}connectedCallback(){const{providers:e}=s(this,i,"f").call(this);e.push({provide:W,factory:()=>this})}},i=new WeakMap,o=new WeakMap,a(c,"USAConfigElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(g[Symbol.metadata]??null):void 0;d=[x()],e(c,null,d,{kind:"accessor",name:"spriteSheet",static:!1,private:!1,access:{has:e=>"spriteSheet"in e,get:e=>e.spriteSheet,set:(e,t)=>{e.spriteSheet=t}},metadata:a},v,k),e(null,l={value:c},m,{kind:"class",name:c.name,metadata:a},null,f),c=l.value,a&&Object.defineProperty(c,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(c,f)})()})();const A={info:{icon:"info"},warning:{icon:"warning"},success:{icon:"check_circle"},error:{icon:"error"},emergency:{icon:"error"}};(()=>{var i,o;let l,r,c,d=[M({tagName:"usa-alert",shadowDom:[b`: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}`,p`<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>`]})],h=[],u=HTMLElement,m=[],f=[];r=class extends u{constructor(){super(...arguments),o.set(this,t(this,m,"info")),i.set(this,(t(this,f),E("usa-icon")))}get type(){return s(this,o,"f")}set type(e){n(this,o,e,"f")}attributeChangedCallback(){s(this,i,"f").call(this).icon=A[this.type].icon}},i=new WeakMap,o=new WeakMap,a(r,"USAAlertElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(u[Symbol.metadata]??null):void 0;c=[x()],e(r,null,c,{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:a},m,f),e(null,l={value:r},d,{kind:"class",name:r.name,metadata:a},null,h),r=l.value,a&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(r,h)})()})(),(()=>{var i,o,l,r,c,d,h;let u,m,f,g,v,k,y,w=[M({tagName:"usa-button",shadowDom:[b`: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}`,p`<button class="usa-button"><slot></slot></button>`]})],S=[],W=HTMLElement,A=[],j=[],O=[],P=[],T=[],N=[],H=[];m=class extends W{constructor(){super(...arguments),i.add(this),c.set(this,(t(this,A),t(this,j,"button"))),d.set(this,(t(this,O),t(this,P,!1))),h.set(this,(t(this,T),t(this,N,"primary"))),o.set(this,(t(this,H),this.attachInternals())),l.set(this,E("button"))}get type(){return s(this,c,"f")}set type(e){n(this,c,e,"f")}get disabled(){return s(this,d,"f")}set disabled(e){n(this,d,e,"f")}get variant(){return s(this,h,"f")}set variant(e){n(this,h,e,"f")}onKeyDown(e){"submit"===this.type&&"ENTER"===e.key.toUpperCase()&&s(this,i,"m",r).call(this)}onInternalClick(){s(this,i,"m",r).call(this)}attributeChangedCallback(){const e=s(this,l,"f").call(this);e.type=this.type,e.disabled=this.disabled}},o=new WeakMap,l=new WeakMap,i=new WeakSet,c=new WeakMap,d=new WeakMap,h=new WeakMap,r=function(){const{form:e}=s(this,o,"f");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()},a(m,"USAButtonElement"),(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(W[Symbol.metadata]??null):void 0;f=[x()],g=[x()],v=[x()],k=[C("keydown",(()=>document.body))],y=[C("click")],e(m,null,f,{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},j,O),e(m,null,g,{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},P,T),e(m,null,v,{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},N,H),e(m,null,k,{kind:"method",name:"onKeyDown",static:!1,private:!1,access:{has:e=>"onKeyDown"in e,get:e=>e.onKeyDown},metadata:t},null,A),e(m,null,y,{kind:"method",name:"onInternalClick",static:!1,private:!1,access:{has:e=>"onInternalClick"in e,get:e=>e.onInternalClick},metadata:t},null,A),e(null,u={value:m},w,{kind:"class",name:m.name,metadata:t},null,S),m=u.value,t&&Object.defineProperty(m,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),m.formAssociated=!0,t(m,S)})(),(()=>{var i,o,l,r,c,d;let h,u,m,f,g,v,k,y=[M({tagName:"usa-checkbox",shadowDom:[b`*{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}`,p`<label><input type="checkbox"><div class="checkbox"></div><div class="title"><slot></slot></div></label>`]})],w=[],S=HTMLElement,W=[],A=[],j=[],O=[],P=[],T=[],N=[],H=[],D=[];u=class extends S{constructor(){super(...arguments),l.set(this,(t(this,W),t(this,A,!1))),r.set(this,(t(this,j),t(this,O,""))),c.set(this,(t(this,P),t(this,T,""))),d.set(this,(t(this,N),t(this,H,!1))),i.set(this,(t(this,D),E("input"))),o.set(this,this.attachInternals())}get checked(){return s(this,l,"f")}set checked(e){n(this,l,e,"f")}get name(){return s(this,r,"f")}set name(e){n(this,r,e,"f")}get value(){return s(this,c,"f")}set value(e){n(this,c,e,"f")}get tiled(){return s(this,d,"f")}set tiled(e){n(this,d,e,"f")}connectedCallback(){const e=s(this,i,"f").call(this);this.checked&&s(this,o,"f").setFormValue(this.value),e.checked=this.checked,e.name=this.name}attributeChangedCallback(){const e=s(this,i,"f").call(this);e.checked=this.checked,e.name=this.name}onCheckboxChange(){s(this,i,"f").call(this).checked?s(this,o,"f").setFormValue(this.value):s(this,o,"f").setFormValue(null)}},i=new WeakMap,o=new WeakMap,l=new WeakMap,r=new WeakMap,c=new WeakMap,d=new WeakMap,a(u,"USACheckboxElement"),(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(S[Symbol.metadata]??null):void 0;m=[x()],f=[x()],g=[x()],v=[x({observed:!1})],k=[C("change","input[type=checkbox]")],e(u,null,m,{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},A,j),e(u,null,f,{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},O,P),e(u,null,g,{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},T,N),e(u,null,v,{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},H,D),e(u,null,k,{kind:"method",name:"onCheckboxChange",static:!1,private:!1,access:{has:e=>"onCheckboxChange"in e,get:e=>e.onCheckboxChange},metadata:t},null,W),e(null,h={value:u},y,{kind:"class",name:u.name,metadata:t},null,w),u=h.value,t&&Object.defineProperty(u,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),u.formAssociated=!0,t(u,w)})(),(()=>{let s,n,i=[M({tagName:"usa-description",shadowDom:[b`:host{display:block;font-size:.93rem;margin-top:.5rem}`,p`<slot></slot>`]})],o=[],l=HTMLElement;n=class extends l{},a(n,"USADescriptionElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(l[Symbol.metadata]??null):void 0;e(null,s={value:n},i,{kind:"class",name:n.name,metadata:a},null,o),n=s.value,a&&Object.defineProperty(n,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(n,o)})()})(),Symbol.metadata??=Symbol("Symbol.metadata");class j extends Map{}class O{scheduler=null;changes=new j}class P extends WeakMap{read(e){let t=this.get(e);return t||(t=new O,this.set(e,t)),t}}class T{effects=new Set}class N extends WeakMap{read(e){let t=this.get(e);return t||(t=new T,this.set(e,t)),t}}const H=new P,D=new N;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 n=H.read(this);null===n.scheduler&&(n.scheduler=Promise.resolve().then((()=>{for(let e of a.effects)e.call(this,n.changes);n.scheduler=null,n.changes.clear()}))),n.changes.set(t.name,{oldValue:e.get.call(this),newValue:s}),e.set.call(this,s)}}}}function I(){return function(e,t){D.read(t.metadata).effects.add(e)}}function z(e){const t=new Image;return t.height=40,t.width=40,t.src=URL.createObjectURL(e),t.ariaHidden="true",t}var R;(()=>{var i,o;let l,r,c,d,h=[M({tagName:"usa-file-input-preview",shadowDom:[b`*{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}`,p`<slot class="preview-heading"></slot>`]})],u=[],m=HTMLElement,f=[],g=[],v=[];r=class extends m{constructor(){super(...arguments),o.set(this,(t(this,f),t(this,g,null))),i.set(this,(t(this,v),new Map))}get files(){return s(this,o,"f")}set files(e){n(this,o,e,"f")}connectedCallback(){this.onChange()}onChange(){if(this.files){this.hidden=!1;let e=new Set;for(let t of this.files)if(e.add(t.name),!s(this,i,"f").has(t.name)){const e=document.createElement("div");e.id=t.name,e.className="preview-item";const a=z(t);e.append(a,document.createTextNode(t.name)),this.shadowRoot.append(e),s(this,i,"f").set(t.name,e)}for(let[t,a]of s(this,i,"f"))e.has(t)||(a.remove(),s(this,i,"f").delete(t))}else this.hidden=!0}},i=new WeakMap,o=new WeakMap,a(r,"USAFileInputPreviewElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(m[Symbol.metadata]??null):void 0;c=[L()],d=[I()],e(r,null,c,{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:a},g,v),e(r,null,d,{kind:"method",name:"onChange",static:!1,private:!1,access:{has:e=>"onChange"in e,get:e=>e.onChange},metadata:a},null,f),e(null,l={value:r},h,{kind:"class",name:r.name,metadata:a},null,u),r=l.value,a&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(r,u)})()})(),(()=>{var i,o,l,r,c;let d,h,u,m,f,g,v=[M({tagName:"usa-link",shadowDom:[b`:host{display:inline-flex;color:#005ea2;text-decoration:underline}a{color:inherit;text-decoration:inherit;display:inherit}`,p`<a><slot></slot></a>`]})],k=[],y=HTMLElement,w=[],S=[],C=[],W=[],A=[],j=[],O=[],P=[];h=class extends y{constructor(){super(...arguments),o.set(this,t(this,w,"")),l.set(this,(t(this,S),t(this,C,""))),r.set(this,(t(this,W),t(this,A,""))),c.set(this,(t(this,j),t(this,O,!1))),i.set(this,(t(this,P),E("a")))}get href(){return s(this,o,"f")}set href(e){n(this,o,e,"f")}get target(){return s(this,l,"f")}set target(e){n(this,l,e,"f")}get title(){return s(this,r,"f")}set title(e){n(this,r,e,"f")}get disabled(){return s(this,c,"f")}set disabled(e){n(this,c,e,"f")}attributeChangedCallback(e){const t=s(this,i,"f").call(this);switch(e){case"href":t.href=this.href;break;case"target":t.target=this.target;break;case"title":t.target=this.title}}},i=new WeakMap,o=new WeakMap,l=new WeakMap,r=new WeakMap,c=new WeakMap,a(h,"USALinkElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(y[Symbol.metadata]??null):void 0;u=[x()],m=[x()],f=[x()],g=[x({observed:!1})],e(h,null,u,{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:a},w,S),e(h,null,m,{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:a},C,W),e(h,null,f,{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:a},A,j),e(h,null,g,{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:a},O,P),e(null,d={value:h},v,{kind:"class",name:h.name,metadata:a},null,k),h=d.value,a&&Object.defineProperty(h,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(h,k)})()})(),(()=>{var i,o,l,r,c,d,h,u;let m,f,g,v,k,y,w,S,W=[M({tagName:"usa-file-input",shadowDom:[b`*{box-sizing:border-box}:host{display:block;max-width:30rem;position:relative}label{display:block}input{cursor:pointer;height:100%;left:0;margin:0;max-width:none;position:absolute;text-indent:-999em;top:0;width:100%;z-index:1}label slot{font-size:1.06rem;line-height:1.3;display:block;font-weight:400;margin-bottom:.5rem}.box{border:1px dashed #adadad;display:block;font-size:.93rem;position:relative;text-align:center;width:100%;max-width:30rem;padding:2rem 1rem}`,p`<label><slot></slot><input type="file"></label><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>`]})],A=[],j=HTMLElement,O=[],P=[],T=[],N=[],H=[],D=[],z=[],R=[],U=[];f=class extends j{constructor(){super(...arguments),c.set(this,(t(this,O),t(this,P,""))),d.set(this,(t(this,T),t(this,N,!0))),h.set(this,(t(this,H),t(this,D,""))),u.set(this,(t(this,z),t(this,R,null))),i.set(this,(t(this,U),this.attachInternals())),o.set(this,E("input")),l.set(this,E(".box")),r.set(this,E("usa-file-input-preview"))}get name(){return s(this,c,"f")}set name(e){n(this,c,e,"f")}get multiple(){return s(this,d,"f")}set multiple(e){n(this,d,e,"f")}get accept(){return s(this,h,"f")}set accept(e){n(this,h,e,"f")}get files(){return s(this,u,"f")}set files(e){n(this,u,e,"f")}onChange(){const e=s(this,o,"f").call(this);this.files&&(e.files=this.files,this.onInputChange())}attributeChangedCallback(){const e=s(this,o,"f").call(this);e.name=this.name,e.multiple=this.multiple,e.accept=this.accept}onInputChange(){const e=s(this,o,"f").call(this),t=s(this,l,"f").call(this);s(this,r,"f").call(this).files=e.files;const a=new FormData;if(e.files){t.style.display="none";for(let t of e.files)a.append(this.name,t)}else t.style.display="block";s(this,i,"f").setFormValue(a)}},i=new WeakMap,o=new WeakMap,l=new WeakMap,r=new WeakMap,c=new WeakMap,d=new WeakMap,h=new WeakMap,u=new WeakMap,a(f,"USAFileInputElement"),(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(j[Symbol.metadata]??null):void 0;g=[x()],v=[x()],k=[x()],y=[L()],w=[I()],S=[C("change")],e(f,null,g,{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,T),e(f,null,v,{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},N,H),e(f,null,k,{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},D,z),e(f,null,y,{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},R,U),e(f,null,w,{kind:"method",name:"onChange",static:!1,private:!1,access:{has:e=>"onChange"in e,get:e=>e.onChange},metadata:t},null,O),e(f,null,S,{kind:"method",name:"onInputChange",static:!1,private:!1,access:{has:e=>"onInputChange"in e,get:e=>e.onInputChange},metadata:t},null,O),e(null,m={value:f},W,{kind:"class",name:f.name,metadata:t},null,A),f=m.value,t&&Object.defineProperty(f,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),f.formAssociated=!0,t(f,A)})(),(()=>{var i,o,l,r,c,d;let m,f,g,v=[M({tagName:"usa-icon",shadowDom:[b`:host{display:inline-block;height:2rem;position:relative;width:2rem}svg{fill:currentColor;height:100%;width:100%}`,p`<svg class="usa-icon" aria-hidden="true" focusable="false" role="img"><use></use></svg>`]}),h()],k=[],y=HTMLElement,w=[],S=[];f=class extends y{constructor(){super(...arguments),i.add(this),d.set(this,t(this,w,"accessibility_new")),o.set(this,(t(this,S),E("use"))),l.set(this,u(W)),r.set(this,!1)}get icon(){return s(this,d,"f")}set icon(e){n(this,d,e,"f")}connectedCallback(){n(this,r,!0,"f"),s(this,i,"m",c).call(this)}attributeChangedCallback(){s(this,r,"f")&&s(this,i,"m",c).call(this)}},o=new WeakMap,l=new WeakMap,r=new WeakMap,i=new WeakSet,d=new WeakMap,c=function(){const e=s(this,l,"f").call(this),t=s(this,o,"f").call(this);this.icon!==t.getAttribute("href")&&t.setAttribute("href",`${e.spriteSheet}#${this.icon}`)},a(f,"USAIconElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(y[Symbol.metadata]??null):void 0;g=[x()],e(f,null,g,{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:a},w,S),e(null,m={value:f},v,{kind:"class",name:f.name,metadata:a},null,k),f=m.value,a&&Object.defineProperty(f,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(f,k)})()})(),(()=>{var i,o,l,r,c,d;let h,u,m,f,g,v,k,y,w=[M({tagName:"usa-input",shadowDom:[b`*{box-sizing:border-box}:host{font-family:Source Sans Pro Web,Helvetica Neue,Helvetica,Roboto,Arial,sans-serif;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}`,p`<label><slot></slot><input></label>`]})],S=[],W=HTMLElement,A=[],j=[],O=[],P=[],T=[],N=[],H=[],D=[],z=[];u=class extends W{constructor(){super(...arguments),l.set(this,(t(this,A),t(this,j,""))),r.set(this,(t(this,O),t(this,P,"on"))),c.set(this,(t(this,T),t(this,N,""))),d.set(this,(t(this,H),t(this,D,""))),i.set(this,(t(this,z),this.attachInternals())),o.set(this,E("input"))}get name(){return s(this,l,"f")}set name(e){n(this,l,e,"f")}get autocomplete(){return s(this,r,"f")}set autocomplete(e){n(this,r,e,"f")}get placeholder(){return s(this,c,"f")}set placeholder(e){n(this,c,e,"f")}get value(){return s(this,d,"f")}set value(e){n(this,d,e,"f")}get selectionStart(){const{selectionStart:e}=s(this,o,"f").call(this);return e}setSelectionRange(e,t){s(this,o,"f").call(this).setSelectionRange(e,t)}onChange(){s(this,o,"f").call(this).value=this.value}onInputChange(){const e=s(this,o,"f").call(this);s(this,i,"f").setFormValue(e.value),this.value=e.value}attributeChangedCallback(e){const t=s(this,o,"f").call(this);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,s(this,i,"f").setFormValue(this.value)}}},i=new WeakMap,o=new WeakMap,l=new WeakMap,r=new WeakMap,c=new WeakMap,d=new WeakMap,a(u,"USATextInputElement"),(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(W[Symbol.metadata]??null):void 0;m=[x()],f=[x()],g=[x()],v=[x({reflect:!1}),L()],k=[I()],y=[C("input")],e(u,null,m,{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},j,O),e(u,null,f,{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},P,T),e(u,null,g,{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},N,H),e(u,null,v,{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},D,z),e(u,null,k,{kind:"method",name:"onChange",static:!1,private:!1,access:{has:e=>"onChange"in e,get:e=>e.onChange},metadata:t},null,A),e(u,null,y,{kind:"method",name:"onInputChange",static:!1,private:!1,access:{has:e=>"onInputChange"in e,get:e=>e.onInputChange},metadata:t},null,A),e(null,h={value:u},w,{kind:"class",name:u.name,metadata:t},null,S),u=h.value,t&&Object.defineProperty(u,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),u.formAssociated=!0,t(u,S)})(),function(e){e.Any="*",e.Number="9",e.Letter="A"}(R||(R={}));const U=Object.values(R),V={Letters:/^[a-z]/i,Numbers:/^[0-9]/i};function F(e,t){const a=e.replace(/[^a-z0-9]/gi,""),s=a.split("");let n=0,i="";for(var o=0;o<t.length;o++){const e=t[o],a=s[n];a&&e&&(e===R.Any?(i+=a,n++):e===R.Number?(/^[0-9]/i.test(a)&&(i+=a),n++):e===R.Letter?(/^[a-z]/i.test(a)&&(i+=a),n++):i+=e)}return{raw:a,formatted:i}}(()=>{var i,o,l;let r,c,d,h,u,m=[M({tagName:"usa-input-mask",shadowDom:[b`:host{display:contents}`,p`<slot></slot>`]})],f=[],g=HTMLElement,v=[],k=[],y=[];c=class extends g{get mask(){return s(this,l,"f")}set mask(e){n(this,l,e,"f")}connectedCallback(){for(let e of this.querySelectorAll("[mask]")){const{formatted:t}=F(e.value,s(this,i,"m",o).call(this,e));e.value=t}}async onInput(e){const t=e.target,a=t.selectionStart||0,n=t.value,l=s(this,i,"m",o).call(this,t),{formatted:r}=F(t.value,l);t.value=r;const c=t.value.length-n.length,d=l[a-1];await Promise.resolve(),d&&!U.includes(d)&&c>0?t.setSelectionRange(a+c,a+c):t.setSelectionRange(a,a),n!==t.value&&t.dispatchEvent(new Event("input",{bubbles:!0}))}onKeyDown(e){const t=e.target,a=s(this,i,"m",o).call(this,t),n=a[t.selectionStart||0];1===e.key.length&&/^[a-z0-9]/i.test(e.key)&&(t.value.length>=a.length?e.preventDefault():n===R.Number?V.Numbers.test(e.key)||e.preventDefault():n===R.Letter&&(V.Letters.test(e.key)||e.preventDefault()))}constructor(){super(...arguments),i.add(this),l.set(this,(t(this,v),t(this,k,""))),t(this,y)}},i=new WeakSet,l=new WeakMap,o=function(e){return this.mask||e.getAttribute("mask")||""},a(c,"USAInputMaskElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(g[Symbol.metadata]??null):void 0;d=[x()],h=[C("input")],u=[C("keydown")],e(c,null,d,{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:a},k,y),e(c,null,h,{kind:"method",name:"onInput",static:!1,private:!1,access:{has:e=>"onInput"in e,get:e=>e.onInput},metadata:a},null,v),e(c,null,u,{kind:"method",name:"onKeyDown",static:!1,private:!1,access:{has:e=>"onKeyDown"in e,get:e=>e.onKeyDown},metadata:a},null,v),e(null,r={value:c},m,{kind:"class",name:c.name,metadata:a},null,f),c=r.value,a&&Object.defineProperty(c,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(c,f)})()})();let K=(()=>{var i,o,l,r,c;let d,h,u,m,f,g=[M({tagName:"usa-radio-option",shadowDom:[b`:host{display:flex;flex-direction:column;margin-top:.05rem}`,p`<slot></slot>`]})],v=[],k=HTMLElement,y=[],w=[],S=[],C=[],E=[],W=[];return h=class extends k{get value(){return s(this,l,"f")}set value(e){n(this,l,e,"f")}get name(){return s(this,r,"f")}set name(e){n(this,r,e,"f")}get checked(){return s(this,c,"f")}set checked(e){n(this,c,e,"f")}constructor(){super(),l.set(this,t(this,y,"")),r.set(this,(t(this,w),t(this,S,""))),c.set(this,(t(this,C),t(this,E,!1))),this.radio=(t(this,W),document.createElement("label")),i.set(this,document.createElement("input")),o.set(this,document.createElement("slot")),s(this,i,"f").type="radio",this.radio.append(s(this,i,"f"),s(this,o,"f"))}attributeChangedCallback(){this.slot=this.value,s(this,i,"f").name=this.name,s(this,i,"f").value=this.value,s(this,i,"f").checked=this.checked,s(this,o,"f").name=this.value}connectedCallback(){this.dispatchEvent(new Event("usa::radio::option::added",{bubbles:!0}))}disconnectedCallback(){this.radio.remove()}},i=new WeakMap,o=new WeakMap,l=new WeakMap,r=new WeakMap,c=new WeakMap,a(h,"USARadioOptionElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(k[Symbol.metadata]??null):void 0;u=[x()],m=[x()],f=[x()],e(h,null,u,{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:a},y,w),e(h,null,m,{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:a},S,C),e(h,null,f,{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:a},E,W),e(null,d={value:h},g,{kind:"class",name:h.name,metadata:a},null,v),h=d.value,a&&Object.defineProperty(h,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(h,v)})(),h})();(()=>{var i,o,l,r;let c,d,h,u,m,f,g,v=[M({tagName:"usa-radio",shadowDom:[b`:host{display:flex;flex-direction:column;gap:1rem;max-width:30rem}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}slot#main{margin-bottom:.5rem}`,p`<slot id="main"></slot>`]})],k=[],y=HTMLElement,w=[],S=[],E=[],W=[],A=[],j=[],O=[];d=class extends y{constructor(){super(...arguments),o.set(this,(t(this,w),t(this,S,""))),l.set(this,(t(this,E),t(this,W,""))),r.set(this,(t(this,A),t(this,j,!1))),i.set(this,(t(this,O),this.attachInternals()))}get value(){return s(this,o,"f")}set value(e){n(this,o,e,"f")}get name(){return s(this,l,"f")}set name(e){n(this,l,e,"f")}get tiled(){return s(this,r,"f")}set tiled(e){n(this,r,e,"f")}get shadow(){return this.shadowRoot}onChange(e){e.target instanceof HTMLInputElement&&e.target.checked&&(this.value=e.target.value,s(this,i,"f").setFormValue(e.target.value))}connectedCallback(){this.value&&s(this,i,"f").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.target instanceof K&&(e.stopPropagation(),e.target.checked=e.target.value===this.value,e.target.name=this.name,this.shadow.append(e.target.radio))}},i=new WeakMap,o=new WeakMap,l=new WeakMap,r=new WeakMap,a(d,"USARadioElement"),(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(y[Symbol.metadata]??null):void 0;h=[x()],u=[x()],m=[x({observed:!1})],f=[C("change")],g=[C("usa::radio::option::added",(e=>e))],e(d,null,h,{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},S,E),e(d,null,u,{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},W,A),e(d,null,m,{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},j,O),e(d,null,f,{kind:"method",name:"onChange",static:!1,private:!1,access:{has:e=>"onChange"in e,get:e=>e.onChange},metadata:t},null,w),e(d,null,g,{kind:"method",name:"onOptionAdded",static:!1,private:!1,access:{has:e=>"onOptionAdded"in e,get:e=>e.onOptionAdded},metadata:t},null,w),e(null,c={value:d},v,{kind:"class",name:d.name,metadata:t},null,k),d=c.value,t&&Object.defineProperty(d,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),d.formAssociated=!0,t(d,k)})();let q=(()=>{var i;let o,l,r,c=[M({tagName:"usa-select-option",shadowDom:[b`:host{display:none}`]})],d=[],h=HTMLElement,u=[],m=[];return l=class extends h{constructor(){super(...arguments),i.set(this,t(this,u,"")),this.option=(t(this,m),document.createElement("option"))}get value(){return s(this,i,"f")}set value(e){n(this,i,e,"f")}attributeChangedCallback(){this.option.innerHTML=this.innerHTML,this.option.value=this.value}connectedCallback(){this.option.innerHTML=this.innerHTML,this.option.value=this.value,this.dispatchEvent(new Event("usa::select::option::added",{bubbles:!0}))}disconnectedCallback(){this.option.remove()}},i=new WeakMap,a(l,"USASelecOptionElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(h[Symbol.metadata]??null):void 0;r=[x()],e(l,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:a},u,m),e(null,o={value:l},c,{kind:"class",name:l.name,metadata:a},null,d),l=o.value,a&&Object.defineProperty(l,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(l,d)})(),l})();(()=>{var i,o,l,r;let c,d,h,u,m,f,g=[M({tagName:"usa-select",shadowDom:[b`: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}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}`,p`<usa-icon icon="unfold_more"></usa-icon><label><div class="label"><slot></slot></div><select></select></label>`]})],v=[],k=HTMLElement,y=[],w=[],S=[],W=[],A=[];d=class extends k{constructor(){super(...arguments),l.set(this,(t(this,y),t(this,w,""))),r.set(this,(t(this,S),t(this,W,""))),i.set(this,(t(this,A),E("select"))),o.set(this,this.attachInternals())}get value(){return s(this,l,"f")}set value(e){n(this,l,e,"f")}get name(){return s(this,r,"f")}set name(e){n(this,r,e,"f")}connectedCallback(){const e=s(this,i,"f").call(this);e.value=this.value,e.name=this.name,s(this,o,"f").setFormValue(this.value)}onSelectChange(){const e=s(this,i,"f").call(this);s(this,o,"f").setFormValue(e.value)}onOptionAdded(e){if(e.target instanceof q){e.stopPropagation();s(this,i,"f").call(this).append(e.target.option)}}},i=new WeakMap,o=new WeakMap,l=new WeakMap,r=new WeakMap,a(d,"USASelectElement"),(()=>{const t="function"==typeof Symbol&&Symbol.metadata?Object.create(k[Symbol.metadata]??null):void 0;h=[x()],u=[x()],m=[C("change")],f=[C("usa::select::option::added")],e(d,null,h,{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},w,S),e(d,null,u,{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},W,A),e(d,null,m,{kind:"method",name:"onSelectChange",static:!1,private:!1,access:{has:e=>"onSelectChange"in e,get:e=>e.onSelectChange},metadata:t},null,y),e(d,null,f,{kind:"method",name:"onOptionAdded",static:!1,private:!1,access:{has:e=>"onOptionAdded"in e,get:e=>e.onOptionAdded},metadata:t},null,y),e(null,c={value:d},g,{kind:"class",name:d.name,metadata:t},null,v),d=c.value,t&&Object.defineProperty(d,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),d.formAssociated=!0,t(d,v)})(),(()=>{var i;let o,l,r,c=[M({tagName:"usa-tag",shadowDom:[b`: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}`,p`<slot></slot>`]})],d=[],h=HTMLElement,u=[],m=[];l=class extends h{get variant(){return s(this,i,"f")}set variant(e){n(this,i,e,"f")}constructor(){super(...arguments),i.set(this,t(this,u,"default")),t(this,m)}},i=new WeakMap,a(l,"USATagElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(h[Symbol.metadata]??null):void 0;r=[x()],e(l,null,r,{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:a},u,m),e(null,o={value:l},c,{kind:"class",name:l.name,metadata:a},null,d),l=o.value,a&&Object.defineProperty(l,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(l,d)})()})(),(()=>{var i,o,l;let r,c,d,h,u,m,f=[M({tagName:"usa-accordion",shadowDomOpts:{mode:"open",delegatesFocus:!0},shadowDom:[b`*{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}`,p`<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>`]})],g=[],v=HTMLElement,k=[],y=[],w=[],S=[],W=[];c=class extends v{constructor(){super(...arguments),o.set(this,(t(this,k),t(this,y,""))),l.set(this,(t(this,w),t(this,S,!1))),i.set(this,(t(this,W),E("details")))}get name(){return s(this,o,"f")}set name(e){n(this,o,e,"f")}get open(){return s(this,l,"f")}set open(e){n(this,l,e,"f")}attributeChangedCallback(){s(this,i,"f").call(this).open=this.open}onClick(e){e.preventDefault(),this.dispatchEvent(new $(!this.open))}onAccordionToggle(e){e.target.name===this.name?this.open=e.target===this&&e.open:e.target===this&&(this.open=e.open)}},i=new WeakMap,o=new WeakMap,l=new WeakMap,a(c,"USAAccordionElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(v[Symbol.metadata]??null):void 0;d=[x()],h=[x()],u=[C("click","summary")],m=[C("usa::accordion::toggle",(()=>document.body))],e(c,null,d,{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:a},y,w),e(c,null,h,{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:a},S,W),e(c,null,u,{kind:"method",name:"onClick",static:!1,private:!1,access:{has:e=>"onClick"in e,get:e=>e.onClick},metadata:a},null,k),e(c,null,m,{kind:"method",name:"onAccordionToggle",static:!1,private:!1,access:{has:e=>"onAccordionToggle"in e,get:e=>e.onAccordionToggle},metadata:a},null,k),e(null,r={value:c},f,{kind:"class",name:c.name,metadata:a},null,g),c=r.value,a&&Object.defineProperty(c,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(c,g)})()})();class $ extends Event{get target(){return super.target}constructor(e){super("usa::accordion::toggle",{bubbles:!0}),this.open=e}}(()=>{var i;let o,l,r,c=[M({tagName:"usa-side-nav-item",shadowDom:[b`: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}`,p`<div class="side-nav-item"><slot></slot></div><slot name="children"></slot>`]})],d=[],h=HTMLElement,u=[],m=[];l=class extends h{get current(){return s(this,i,"f")}set current(e){n(this,i,e,"f")}constructor(){super(...arguments),i.set(this,t(this,u,!1)),t(this,m)}},i=new WeakMap,a(l,"USASideNavItemElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(h[Symbol.metadata]??null):void 0;r=[x({observed:!1})],e(l,null,r,{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:a},u,m),e(null,o={value:l},c,{kind:"class",name:l.name,metadata:a},null,d),l=o.value,a&&Object.defineProperty(l,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(l,d)})()})(),(()=>{let s,n,i=[M({tagName:"usa-side-nav",shadowDom:[b`:host{display:block;font-size:1.06rem;line-height:1.3;border-bottom:1px solid #e6e6e6}`,p`<slot></slot>`]})],o=[],l=HTMLElement;n=class extends l{},a(n,"USASideNavElement"),(()=>{const a="function"==typeof Symbol&&Symbol.metadata?Object.create(l[Symbol.metadata]??null):void 0;e(null,s={value:n},i,{kind:"class",name:n.name,metadata:a},null,o),n=s.value,a&&Object.defineProperty(n,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a}),t(n,o)})()})()}();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noctuatech/uswds",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"workspaces": [
|
|
6
6
|
"packages/**"
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"scripts": {
|
|
20
20
|
"test": "wireit",
|
|
21
21
|
"build": "wireit",
|
|
22
|
+
"preview": "wireit",
|
|
22
23
|
"storybook": "storybook dev -p 6006",
|
|
23
24
|
"build-storybook": "wireit",
|
|
24
25
|
"gen": "plop",
|
|
@@ -38,6 +39,16 @@
|
|
|
38
39
|
"rollup"
|
|
39
40
|
]
|
|
40
41
|
},
|
|
42
|
+
"preview": {
|
|
43
|
+
"command": "browser-sync start --server --files \"target/**\" \"index.html\"",
|
|
44
|
+
"service": true,
|
|
45
|
+
"dependencies": [
|
|
46
|
+
{
|
|
47
|
+
"script": "tsc",
|
|
48
|
+
"cascade": false
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
41
52
|
"build-storybook": {
|
|
42
53
|
"command": "storybook build"
|
|
43
54
|
},
|
|
@@ -92,6 +103,7 @@
|
|
|
92
103
|
"@types/mocha": "^10.0.7",
|
|
93
104
|
"@types/node": "^22.0.0",
|
|
94
105
|
"@web/test-runner": "^0.19.0",
|
|
106
|
+
"browser-sync": "^3.0.3",
|
|
95
107
|
"husky": "^9.0.11",
|
|
96
108
|
"js-beautify": "^1.15.1",
|
|
97
109
|
"lint-staged": "^15.2.2",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { attr, css, element, html, listen } from "@joist/element";
|
|
2
2
|
|
|
3
|
-
import { USARadioOptionElement } from "./radio-option.element.js";
|
|
3
|
+
import type { USARadioOptionElement } from "./radio-option.element.js";
|
|
4
4
|
|
|
5
5
|
declare global {
|
|
6
6
|
interface HTMLElementTagNameMap {
|
|
@@ -128,13 +128,13 @@ export class USARadioElement extends HTMLElement {
|
|
|
128
128
|
|
|
129
129
|
@listen("usa::radio::option::added", (el) => el)
|
|
130
130
|
onOptionAdded(e: Event) {
|
|
131
|
-
|
|
132
|
-
e.stopPropagation();
|
|
131
|
+
e.stopPropagation();
|
|
133
132
|
|
|
134
|
-
|
|
135
|
-
e.target.name = this.name;
|
|
133
|
+
const target = e.target as USARadioOptionElement;
|
|
136
134
|
|
|
137
|
-
|
|
138
|
-
|
|
135
|
+
target.checked = target.value === this.value;
|
|
136
|
+
target.name = this.name;
|
|
137
|
+
|
|
138
|
+
this.shadow.append(target.radio);
|
|
139
139
|
}
|
|
140
140
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { attr, css, element, html, listen, query } from "@joist/element";
|
|
2
2
|
|
|
3
|
-
import { USASelecOptionElement } from "./select-option.element.js";
|
|
3
|
+
import type { USASelecOptionElement } from "./select-option.element.js";
|
|
4
4
|
|
|
5
5
|
declare global {
|
|
6
6
|
interface HTMLElementTagNameMap {
|
|
@@ -97,11 +97,11 @@ export class USASelectElement extends HTMLElement {
|
|
|
97
97
|
|
|
98
98
|
@listen("usa::select::option::added")
|
|
99
99
|
onOptionAdded(e: Event) {
|
|
100
|
-
|
|
101
|
-
e.stopPropagation();
|
|
100
|
+
const target = e.target as USASelecOptionElement;
|
|
102
101
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
e.stopPropagation();
|
|
103
|
+
|
|
104
|
+
const select = this.#select();
|
|
105
|
+
select.append(target.option);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __classPrivateFieldGet, __classPrivateFieldSet, __esDecorate, __runInitializers, __setFunctionName } from "tslib";
|
|
2
2
|
import { attr, css, element, html, listen } from "@joist/element";
|
|
3
|
-
import { USARadioOptionElement } from "./radio-option.element.js";
|
|
4
3
|
let USARadioElement = (() => {
|
|
5
4
|
var _USARadioElement_internals, _USARadioElement_value_accessor_storage, _USARadioElement_name_accessor_storage, _USARadioElement_tiled_accessor_storage;
|
|
6
5
|
let _classDecorators = [element({
|
|
@@ -131,12 +130,11 @@ let USARadioElement = (() => {
|
|
|
131
130
|
}
|
|
132
131
|
}
|
|
133
132
|
onOptionAdded(e) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
133
|
+
e.stopPropagation();
|
|
134
|
+
const target = e.target;
|
|
135
|
+
target.checked = target.value === this.value;
|
|
136
|
+
target.name = this.name;
|
|
137
|
+
this.shadow.append(target.radio);
|
|
140
138
|
}
|
|
141
139
|
};
|
|
142
140
|
_USARadioElement_internals = new WeakMap();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.element.js","sourceRoot":"","sources":["../../../src/lib/radio/radio.element.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"radio.element.js","sourceRoot":"","sources":["../../../src/lib/radio/radio.element.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;IAqFrD,eAAe;;4BA3E3B,OAAO,CAAC;YACP,OAAO,EAAE,WAAW;YACpB,SAAS,EAAE;gBACT,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoEF;gBACD,IAAI,CAAA,yBAAyB;aAC9B;SACF,CAAC;;;;sBACmC,WAAW;;;;;;;;;;;;;4CAAnB,SAAQ,WAAW;;;YAIrC,mDAJE,mDAAe,+CAIT,EAAE,IAAC;YAGX,iJAAO,EAAE,IAAC;YAKV,kJAAQ,KAAK,IAAC;YAMvB,yFAAa,IAAI,CAAC,eAAe,EAAE,GAAC;QAoCtC,CAAC;QAlDC,IAAS,KAAK,yFAAM;QAApB,IAAS,KAAK,8FAAM;QAGpB,IAAS,IAAI,wFAAM;QAAnB,IAAS,IAAI,6FAAM;QAKnB,IAAS,KAAK,yFAAS;QAAvB,IAAS,KAAK,8FAAS;QAEvB,IAAI,MAAM;YACR,OAAO,IAAI,CAAC,UAAW,CAAC;QAC1B,CAAC;QAKD,QAAQ,CAAC,CAAQ;YACf,IAAI,CAAC,CAAC,MAAM,YAAY,gBAAgB,EAAE,CAAC;gBACzC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;oBACrB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;oBAC5B,uBAAA,IAAI,kCAAW,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBAC/C,CAAC;YACH,CAAC;QACH,CAAC;QAED,iBAAiB;YACf,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;gBACf,uBAAA,IAAI,kCAAW,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC3C,CAAC;QACH,CAAC;QAED,wBAAwB;YACtB,KAAK,IAAI,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,EAAE,CAAC;gBACnE,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC;gBAC3C,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;YACzB,CAAC;QACH,CAAC;QAGD,aAAa,CAAC,CAAQ;YACpB,CAAC,CAAC,eAAe,EAAE,CAAC;YAEpB,MAAM,MAAM,GAAG,CAAC,CAAC,MAA+B,CAAC;YAEjD,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC;YAC7C,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;YAExB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACnC,CAAC;;;;;;;;;6BAlDA,IAAI,EAAE;4BAGN,IAAI,EAAE;6BAGN,IAAI,CAAC;gBACJ,QAAQ,EAAE,KAAK;aAChB,CAAC;gCASD,MAAM,CAAC,QAAQ,CAAC;qCAuBhB,MAAM,CAAC,2BAA2B,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC;QAvChD,0KAAS,KAAK,6BAAL,KAAK,qFAAM;QAGpB,uKAAS,IAAI,6BAAJ,IAAI,mFAAM;QAKnB,0KAAS,KAAK,6BAAL,KAAK,qFAAS;QASvB,iLAAA,QAAQ,6DAOP;QAgBD,gMAAA,aAAa,6DASZ;QArDH,6KAsDC;;;;IArDQ,yBAAc,GAAG,IAAI,AAAP,CAAQ;;QADlB,uDAAe;;;;SAAf,eAAe"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { __classPrivateFieldGet, __classPrivateFieldSet, __esDecorate, __runInitializers, __setFunctionName } from "tslib";
|
|
2
2
|
import { attr, css, element, html, listen, query } from "@joist/element";
|
|
3
|
-
import { USASelecOptionElement } from "./select-option.element.js";
|
|
4
3
|
let USASelectElement = (() => {
|
|
5
4
|
var _USASelectElement_select, _USASelectElement_internals, _USASelectElement_value_accessor_storage, _USASelectElement_name_accessor_storage;
|
|
6
5
|
let _classDecorators = [element({
|
|
@@ -99,11 +98,10 @@ let USASelectElement = (() => {
|
|
|
99
98
|
__classPrivateFieldGet(this, _USASelectElement_internals, "f").setFormValue(select.value);
|
|
100
99
|
}
|
|
101
100
|
onOptionAdded(e) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
101
|
+
const target = e.target;
|
|
102
|
+
e.stopPropagation();
|
|
103
|
+
const select = __classPrivateFieldGet(this, _USASelectElement_select, "f").call(this);
|
|
104
|
+
select.append(target.option);
|
|
107
105
|
}
|
|
108
106
|
};
|
|
109
107
|
_USASelectElement_select = new WeakMap();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.element.js","sourceRoot":"","sources":["../../../src/lib/select/select.element.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"select.element.js","sourceRoot":"","sources":["../../../src/lib/select/select.element.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;IAsE5D,gBAAgB;;4BA5D5B,OAAO,CAAC;YACP,OAAO,EAAE,YAAY;YACrB,SAAS,EAAE;gBACT,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2CF;gBACD,IAAI,CAAA;;;;;;;;;;KAUH;aACF;SACF,CAAC;;;;sBACoC,WAAW;;;;;;;;;;6CAAnB,SAAQ,WAAW;;;YAItC,oDAJE,mDAAgB,+CAIV,EAAE,IAAC;YAGX,kJAAO,EAAE,IAAC;YAEnB,sFAAU,KAAK,CAAC,QAAQ,CAAC,GAAC;YAC1B,sCAAa,IAAI,CAAC,eAAe,EAAE,EAAC;QA0BtC,CAAC;QAhCC,IAAS,KAAK,0FAAM;QAApB,IAAS,KAAK,+FAAM;QAGpB,IAAS,IAAI,yFAAM;QAAnB,IAAS,IAAI,8FAAM;QAKnB,iBAAiB;YACf,MAAM,MAAM,GAAG,uBAAA,IAAI,gCAAQ,MAAZ,IAAI,CAAU,CAAC;YAC9B,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;YAC1B,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;YAExB,uBAAA,IAAI,mCAAW,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3C,CAAC;QAGD,cAAc;YACZ,MAAM,MAAM,GAAG,uBAAA,IAAI,gCAAQ,MAAZ,IAAI,CAAU,CAAC;YAE9B,uBAAA,IAAI,mCAAW,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC7C,CAAC;QAGD,aAAa,CAAC,CAAQ;YACpB,MAAM,MAAM,GAAG,CAAC,CAAC,MAA+B,CAAC;YAEjD,CAAC,CAAC,eAAe,EAAE,CAAC;YAEpB,MAAM,MAAM,GAAG,uBAAA,IAAI,gCAAQ,MAAZ,IAAI,CAAU,CAAC;YAC9B,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC/B,CAAC;;;;;;;;;6BAhCA,IAAI,EAAE;4BAGN,IAAI,EAAE;sCAcN,MAAM,CAAC,QAAQ,CAAC;qCAOhB,MAAM,CAAC,4BAA4B,CAAC;QAvBrC,0KAAS,KAAK,6BAAL,KAAK,qFAAM;QAGpB,uKAAS,IAAI,6BAAJ,IAAI,mFAAM;QAcnB,mMAAA,cAAc,6DAIb;QAGD,gMAAA,aAAa,6DAOZ;QAnCH,6KAoCC;;;;IAnCQ,yBAAc,GAAG,IAAI,AAAP,CAAQ;;QADlB,uDAAgB;;;;SAAhB,gBAAgB"}
|