UNPKG

@cfpb/cfpb-design-system

Version:
38 lines (33 loc) 35.4 kB
(()=>{var Ve=Object.defineProperty;var se=i=>{throw TypeError(i)};var qe=(i,e,t)=>e in i?Ve(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var le=(i,e,t)=>qe(i,typeof e!="symbol"?e+"":e,t),de=(i,e,t)=>e.has(i)||se("Cannot "+t);var S=(i,e,t)=>(de(i,e,"read from private field"),t?t.call(i):e.get(i)),ce=(i,e,t)=>e.has(i)?se("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(i):e.set(i,t);var V=(i,e,t)=>(de(i,e,"access private method"),t);var he=(i,e,t)=>new Promise((o,r)=>{var a=l=>{try{d(t.next(l))}catch(c){r(c)}},s=l=>{try{d(t.throw(l))}catch(c){r(c)}},d=l=>l.done?o(l.value):Promise.resolve(l.value).then(a,s);d((t=t.apply(i,e)).next())});var N=globalThis,L=N.ShadowRoot&&(N.ShadyCSS===void 0||N.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,q=Symbol(),ne=new WeakMap,C=class{constructor(e,t,o){if(this._$cssResult$=!0,o!==q)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(L&&e===void 0){let o=t!==void 0&&t.length===1;o&&(e=ne.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&ne.set(t,e))}return e}toString(){return this.cssText}},z=i=>new C(typeof i=="string"?i:i+"",void 0,q),W=(i,...e)=>{let t=i.length===1?i[0]:e.reduce(((o,r,a)=>o+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+i[a+1]),i[0]);return new C(t,i,q)},fe=(i,e)=>{if(L)i.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(let t of e){let o=document.createElement("style"),r=N.litNonce;r!==void 0&&o.setAttribute("nonce",r),o.textContent=t.cssText,i.appendChild(o)}},K=L?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(let o of e.cssRules)t+=o.cssText;return z(t)})(i):i;var{is:We,defineProperty:Ke,getOwnPropertyDescriptor:Ze,getOwnPropertyNames:Je,getOwnPropertySymbols:Ye,getPrototypeOf:Fe}=Object,v=globalThis,be=v.trustedTypes,Ge=be?be.emptyScript:"",Z=v.reactiveElementPolyfillSupport,P=(i,e)=>i,J={toAttribute(i,e){switch(e){case Boolean:i=i?Ge:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch(o){t=null}}return t}},ve=(i,e)=>!We(i,e),me={attribute:!0,type:String,converter:J,reflect:!1,useDefault:!1,hasChanged:ve},ue,pe;(ue=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(pe=v.litPropertyMetadata)!=null||(v.litPropertyMetadata=new WeakMap);var u=class extends HTMLElement{static addInitializer(e){var t;this._$Ei(),((t=this.l)!=null?t:this.l=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=me){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let o=Symbol(),r=this.getPropertyDescriptor(e,o,t);r!==void 0&&Ke(this.prototype,e,r)}}static getPropertyDescriptor(e,t,o){var s;let{get:r,set:a}=(s=Ze(this.prototype,e))!=null?s:{get(){return this[t]},set(d){this[t]=d}};return{get:r,set(d){let l=r==null?void 0:r.call(this);a==null||a.call(this,d),this.requestUpdate(e,l,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){var t;return(t=this.elementProperties.get(e))!=null?t:me}static _$Ei(){if(this.hasOwnProperty(P("elementProperties")))return;let e=Fe(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(P("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(P("properties"))){let t=this.properties,o=[...Je(t),...Ye(t)];for(let r of o)this.createProperty(r,t[r])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[o,r]of t)this.elementProperties.set(o,r)}this._$Eh=new Map;for(let[t,o]of this.elementProperties){let r=this._$Eu(t,o);r!==void 0&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let o=new Set(e.flat(1/0).reverse());for(let r of o)t.unshift(K(r))}else e!==void 0&&t.push(K(e));return t}static _$Eu(e,t){let o=t.attribute;return o===!1?void 0:typeof o=="string"?o:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach((t=>t(this)))}addController(e){var t,o;((t=this._$EO)!=null?t:this._$EO=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&((o=e.hostConnected)==null||o.call(e))}removeController(e){var t;(t=this._$EO)==null||t.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let o of t.keys())this.hasOwnProperty(o)&&(e.set(o,this[o]),delete this[o]);e.size>0&&(this._$Ep=e)}createRenderRoot(){var t;let e=(t=this.shadowRoot)!=null?t:this.attachShadow(this.constructor.shadowRootOptions);return fe(e,this.constructor.elementStyles),e}connectedCallback(){var e,t;(e=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach((o=>{var r;return(r=o.hostConnected)==null?void 0:r.call(o)}))}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach((t=>{var o;return(o=t.hostDisconnected)==null?void 0:o.call(t)}))}attributeChangedCallback(e,t,o){this._$AK(e,o)}_$ET(e,t){var a;let o=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,o);if(r!==void 0&&o.reflect===!0){let s=(((a=o.converter)==null?void 0:a.toAttribute)!==void 0?o.converter:J).toAttribute(t,o.type);this._$Em=e,s==null?this.removeAttribute(r):this.setAttribute(r,s),this._$Em=null}}_$AK(e,t){var a,s,d,l;let o=this.constructor,r=o._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let c=o.getPropertyOptions(r),n=typeof c.converter=="function"?{fromAttribute:c.converter}:((a=c.converter)==null?void 0:a.fromAttribute)!==void 0?c.converter:J;this._$Em=r,this[r]=(l=(d=n.fromAttribute(t,c.type))!=null?d:(s=this._$Ej)==null?void 0:s.get(r))!=null?l:null,this._$Em=null}}requestUpdate(e,t,o){var r,a;if(e!==void 0){let s=this.constructor,d=this[e];if(o!=null||(o=s.getPropertyOptions(e)),!(((r=o.hasChanged)!=null?r:ve)(d,t)||o.useDefault&&o.reflect&&d===((a=this._$Ej)==null?void 0:a.get(e))&&!this.hasAttribute(s._$Eu(e,o))))return;this.C(e,t,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:o,reflect:r,wrapped:a},s){var d,l,c;o&&!((d=this._$Ej)!=null?d:this._$Ej=new Map).has(e)&&(this._$Ej.set(e,(l=s!=null?s:t)!=null?l:this[e]),a!==!0||s!==void 0)||(this._$AL.has(e)||(this.hasUpdated||o||(t=void 0),this._$AL.set(e,t)),r===!0&&this._$Em!==e&&((c=this._$Eq)!=null?c:this._$Eq=new Set).add(e))}_$EP(){return he(this,null,function*(){this.isUpdatePending=!0;try{yield this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&(yield e),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var o,r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((o=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[s,d]of this._$Ep)this[s]=d;this._$Ep=void 0}let a=this.constructor.elementProperties;if(a.size>0)for(let[s,d]of a){let{wrapped:l}=d,c=this[s];l!==!0||this._$AL.has(s)||c===void 0||this.C(s,void 0,d,c)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),(r=this._$EO)==null||r.forEach((a=>{var s;return(s=a.hostUpdate)==null?void 0:s.call(a)})),this.update(t)):this._$EM()}catch(a){throw e=!1,this._$EM(),a}e&&this._$AE(t)}willUpdate(e){}_$AE(e){var t;(t=this._$EO)==null||t.forEach((o=>{var r;return(r=o.hostUpdated)==null?void 0:r.call(o)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&(this._$Eq=this._$Eq.forEach((t=>this._$ET(t,this[t])))),this._$EM()}updated(e){}firstUpdated(e){}},ge;u.elementStyles=[],u.shadowRootOptions={mode:"open"},u[P("elementProperties")]=new Map,u[P("finalized")]=new Map,Z==null||Z({ReactiveElement:u}),((ge=v.reactiveElementVersions)!=null?ge:v.reactiveElementVersions=[]).push("2.1.0");var U=globalThis,B=U.trustedTypes,xe=B?B.createPolicy("lit-html",{createHTML:i=>i}):void 0,Ee="$lit$",x=`lit$${Math.random().toFixed(9).slice(2)}$`,Se="?"+x,Qe=`<${Se}>`,w=document,j=()=>w.createComment(""),O=i=>i===null||typeof i!="object"&&typeof i!="function",oe=Array.isArray,Xe=i=>oe(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",Y=`[ \f\r]`,T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$e=/-->/g,_e=/>/g,_=RegExp(`>|${Y}(?:([^\\s"'>=/]+)(${Y}*=${Y}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`,"g"),ye=/'/g,we=/"/g,Ce=/^(?:script|style|textarea|title)$/i,re=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),Pe=re(1),ht=re(2),nt=re(3),p=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),Ae=new WeakMap,y=w.createTreeWalker(w,129);function Te(i,e){if(!oe(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return xe!==void 0?xe.createHTML(e):e}var et=(i,e)=>{let t=i.length-1,o=[],r,a=e===2?"<svg>":e===3?"<math>":"",s=T;for(let d=0;d<t;d++){let l=i[d],c,n,h=-1,m=0;for(;m<l.length&&(s.lastIndex=m,n=s.exec(l),n!==null);)m=s.lastIndex,s===T?n[1]==="!--"?s=$e:n[1]!==void 0?s=_e:n[2]!==void 0?(Ce.test(n[2])&&(r=RegExp("</"+n[2],"g")),s=_):n[3]!==void 0&&(s=_):s===_?n[0]===">"?(s=r!=null?r:T,h=-1):n[1]===void 0?h=-2:(h=s.lastIndex-n[2].length,c=n[1],s=n[3]===void 0?_:n[3]==='"'?we:ye):s===we||s===ye?s=_:s===$e||s===_e?s=T:(s=_,r=void 0);let g=s===_&&i[d+1].startsWith("/>")?" ":"";a+=s===T?l+Qe:h>=0?(o.push(c),l.slice(0,h)+Ee+l.slice(h)+x+g):l+x+(h===-2?d:g)}return[Te(i,a+(i[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),o]},M=class i{constructor({strings:e,_$litType$:t},o){let r;this.parts=[];let a=0,s=0,d=e.length-1,l=this.parts,[c,n]=et(e,t);if(this.el=i.createElement(c,o),y.currentNode=this.el.content,t===2||t===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(r=y.nextNode())!==null&&l.length<d;){if(r.nodeType===1){if(r.hasAttributes())for(let h of r.getAttributeNames())if(h.endsWith(Ee)){let m=n[s++],g=r.getAttribute(h).split(x),H=/([.?@])?(.*)/.exec(m);l.push({type:1,index:a,name:H[2],strings:g,ctor:H[1]==="."?Q:H[1]==="?"?X:H[1]==="@"?ee:E}),r.removeAttribute(h)}else h.startsWith(x)&&(l.push({type:6,index:a}),r.removeAttribute(h));if(Ce.test(r.tagName)){let h=r.textContent.split(x),m=h.length-1;if(m>0){r.textContent=B?B.emptyScript:"";for(let g=0;g<m;g++)r.append(h[g],j()),y.nextNode(),l.push({type:2,index:++a});r.append(h[m],j())}}}else if(r.nodeType===8)if(r.data===Se)l.push({type:2,index:a});else{let h=-1;for(;(h=r.data.indexOf(x,h+1))!==-1;)l.push({type:7,index:a}),h+=x.length-1}a++}}static createElement(e,t){let o=w.createElement("template");return o.innerHTML=e,o}};function k(i,e,t=i,o){var s,d,l;if(e===p)return e;let r=o!==void 0?(s=t._$Co)==null?void 0:s[o]:t._$Cl,a=O(e)?void 0:e._$litDirective$;return(r==null?void 0:r.constructor)!==a&&((d=r==null?void 0:r._$AO)==null||d.call(r,!1),a===void 0?r=void 0:(r=new a(i),r._$AT(i,t,o)),o!==void 0?((l=t._$Co)!=null?l:t._$Co=[])[o]=r:t._$Cl=r),r!==void 0&&(e=k(i,r._$AS(i,e.values),r,o)),e}var G=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var c;let{el:{content:t},parts:o}=this._$AD,r=((c=e==null?void 0:e.creationScope)!=null?c:w).importNode(t,!0);y.currentNode=r;let a=y.nextNode(),s=0,d=0,l=o[0];for(;l!==void 0;){if(s===l.index){let n;l.type===2?n=new R(a,a.nextSibling,this,e):l.type===1?n=new l.ctor(a,l.name,l.strings,this,e):l.type===6&&(n=new te(a,this,e)),this._$AV.push(n),l=o[++d]}s!==(l==null?void 0:l.index)&&(a=y.nextNode(),s++)}return y.currentNode=w,r}p(e){let t=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(e,o,t),t+=o.strings.length-2):o._$AI(e[t])),t++}},R=class i{get _$AU(){var e,t;return(t=(e=this._$AM)==null?void 0:e._$AU)!=null?t:this._$Cv}constructor(e,t,o,r){var a;this.type=2,this._$AH=f,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=o,this.options=r,this._$Cv=(a=r==null?void 0:r.isConnected)!=null?a:!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=k(this,e,t),O(e)?e===f||e==null||e===""?(this._$AH!==f&&this._$AR(),this._$AH=f):e!==this._$AH&&e!==p&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Xe(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==f&&O(this._$AH)?this._$AA.nextSibling.data=e:this.T(w.createTextNode(e)),this._$AH=e}$(e){var a;let{values:t,_$litType$:o}=e,r=typeof o=="number"?this._$AC(e):(o.el===void 0&&(o.el=M.createElement(Te(o.h,o.h[0]),this.options)),o);if(((a=this._$AH)==null?void 0:a._$AD)===r)this._$AH.p(t);else{let s=new G(r,this),d=s.u(this.options);s.p(t),this.T(d),this._$AH=s}}_$AC(e){let t=Ae.get(e.strings);return t===void 0&&Ae.set(e.strings,t=new M(e)),t}k(e){oe(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,o,r=0;for(let a of e)r===t.length?t.push(o=new i(this.O(j()),this.O(j()),this,this.options)):o=t[r],o._$AI(a),r++;r<t.length&&(this._$AR(o&&o._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){var o;for((o=this._$AP)==null?void 0:o.call(this,!1,!0,t);e&&e!==this._$AB;){let r=e.nextSibling;e.remove(),e=r}}setConnected(e){var t;this._$AM===void 0&&(this._$Cv=e,(t=this._$AP)==null||t.call(this,e))}},E=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,o,r,a){this.type=1,this._$AH=f,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=a,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=f}_$AI(e,t=this,o,r){let a=this.strings,s=!1;if(a===void 0)e=k(this,e,t,0),s=!O(e)||e!==this._$AH&&e!==p,s&&(this._$AH=e);else{let d=e,l,c;for(e=a[0],l=0;l<a.length-1;l++)c=k(this,d[o+l],t,l),c===p&&(c=this._$AH[l]),s||(s=!O(c)||c!==this._$AH[l]),c===f?e=f:e!==f&&(e+=(c!=null?c:"")+a[l+1]),this._$AH[l]=c}s&&!r&&this.j(e)}j(e){e===f?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}},Q=class extends E{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===f?void 0:e}},X=class extends E{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==f)}},ee=class extends E{constructor(e,t,o,r,a){super(e,t,o,r,a),this.type=5}_$AI(e,t=this){var s;if((e=(s=k(this,e,t,0))!=null?s:f)===p)return;let o=this._$AH,r=e===f&&o!==f||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,a=e!==f&&(o===f||r);r&&this.element.removeEventListener(this.name,this,o),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,o;typeof this._$AH=="function"?this._$AH.call((o=(t=this.options)==null?void 0:t.host)!=null?o:this.element,e):this._$AH.handleEvent(e)}},te=class{constructor(e,t,o){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(e){k(this,e)}};var F=U.litHtmlPolyfillSupport,ke;F==null||F(M,R),((ke=U.litHtmlVersions)!=null?ke:U.litHtmlVersions=[]).push("3.3.0");var Ue=(i,e,t)=>{var a,s;let o=(a=t==null?void 0:t.renderBefore)!=null?a:e,r=o._$litPart$;if(r===void 0){let d=(s=t==null?void 0:t.renderBefore)!=null?s:null;o._$litPart$=r=new R(e.insertBefore(j(),d),d,void 0,t!=null?t:{})}return r._$AI(i),r};var A=globalThis,$=class extends u{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,o;let e=super.createRenderRoot();return(o=(t=this.renderOptions).renderBefore)!=null||(t.renderBefore=e.firstChild),e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ue(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return p}},je;$._$litElement$=!0,$.finalized=!0,(je=A.litElementHydrateSupport)==null||je.call(A,{LitElement:$});var ie=A.litElementPolyfillSupport;ie==null||ie({LitElement:$});var Oe;((Oe=A.litElementVersions)!=null?Oe:A.litElementVersions=[]).push("4.2.0");var Me={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Re=i=>(...e)=>({_$litDirective$:i,values:e}),D=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,o){this._$Ct=e,this._$AM=t,this._$Ci=o}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};var He=Re(class extends D{constructor(i){var e;if(super(i),i.type!==Me.ATTRIBUTE||i.name!=="class"||((e=i.strings)==null?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter((e=>i[e])).join(" ")+" "}update(i,[e]){var o,r;if(this.st===void 0){this.st=new Set,i.strings!==void 0&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter((a=>a!==""))));for(let a in e)e[a]&&!((o=this.nt)!=null&&o.has(a))&&this.st.add(a);return this.render(e)}let t=i.element.classList;for(let a of this.st)a in e||(t.remove(a),this.st.delete(a));for(let a in e){let s=!!e[a];s===this.st.has(a)||(r=this.nt)!=null&&r.has(a)||(s?(t.add(a),this.st.add(a)):(t.remove(a),this.st.delete(a)))}return p}});var Ne=`:root{--font-adjust-base:0.517;--font-adjust-step:0.0054;--font-adjust-h1:calc(var(--font-size-adjust-base) + var(--font-adjust-step)*5);--font-adjust-h2:calc(var(--font-size-adjust-base) + var(--font-adjust-step)*4);--font-adjust-h3:calc(var(--font-size-adjust-base) + var(--font-adjust-step)*3);--font-adjust-h4:calc(var(--font-size-adjust-base) + var(--font-adjust-step)*2);--font-adjust-h5:calc(var(--font-size-adjust-base) + var(--font-adjust-step)*1);--font-adjust-h6:var(--font-adjust-base);--font-adjust-body:var(--font-adjust-base);--input-text-default:var(--black);--input-text-disabled-default:var(--gray-dark);--input-text-placeholder-default:var(--gray-dark);--input-border-default:var(--gray-60);--input-border-disabled:var(--gray-60);--input-border-success:var(--green);--input-border-warning:var(--gold);--input-border-error:var(--red);--input-border-hover-default:var(--pacific);--input-border-focus-default:var(--pacific);--input-bg-default:var(--white);--input-bg-disabled-default:var(--gray-10);--form-alert-icon-color-default:var(--gray);--form-alert-icon-color-success:var(--green);--form-alert-icon-color-warning:var(--gold);--form-alert-icon-color-error:var(--red);--select-border-default:var(--gray-60);--select-border-width-default:1px;--select-border-error:var(--red);--select-border-width-error:2px;--select-border-hover-default:var(--pacific);--select-border-focus-default:var(--pacific);--select-bg-disabled-default:var(--gray-10);--select-icon-bg-default:var(--gray-10);--select-text-disabled-default:var(--gray-dark);--choice-border-default:var(--gray-60);--choice-border-disabled:var(--gray-60);--choice-border-success:var(--green);--choice-border-warning:var(--gold);--choice-border-error:var(--red);--choice-border-hover-default:var(--pacific);--choice-border-focus-default:var(--pacific);--choice-outline-focus-default:var(--pacific);--choice-bg-default:var(--white);--choice-bg-disabled:var(--gray-10);--choice-bg-selected-default:var(--pacific);--choice-bg-selected-disabled:var(--gray-40);--choice-bg-selected-focus-default:var(--pacific);--choice-label-disabled-default:var(--gray-dark)}.no-js .u-js-only,.u-hide-if-js{display:none!important}.no-js .u-hide-if-js{display:block!important}@media screen{.u-print-only{display:none}}@media print{.u-screen-only{display:none}}.u-clearfix:after{clear:both;content:"";display:table}.u-visually-hidden{border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0 0 0 0)}@media only screen and (max-width:37.5em){.u-hide-on-mobile{display:none}}@media only screen and (min-width:37.5625em){.u-show-on-mobile{display:none}}.u-hidden{display:none!important}.u-invisible{visibility:hidden}.u-right{float:right}.u-nowrap{white-space:nowrap}.u-flexible-container{height:0;padding-bottom:56.25%;position:relative}.u-flexible-container__inner{height:100%;left:0;position:absolute;top:0;width:100%}.u-flexible-container--4-3{height:0;padding-bottom:75%;position:relative}.u-mt0{margin-top:0!important}.u-mb0{margin-bottom:0!important}.u-mt5{margin-top:5px!important}.u-mb5{margin-bottom:5px!important}.u-mt10{margin-top:10px!important}.u-mb10{margin-bottom:10px!important}.u-mt15{margin-top:15px!important}.u-mb15{margin-bottom:15px!important}.u-mt20{margin-top:20px!important}.u-mb20{margin-bottom:20px!important}.u-mt30{margin-top:30px!important}.u-mb30{margin-bottom:30px!important}.u-mt45{margin-top:45px!important}.u-mb45{margin-bottom:45px!important}.u-mt60{margin-top:60px!important}.u-mb60{margin-bottom:60px!important}.u-w100pct{width:100%}.u-w90pct{width:90%}.u-w80pct{width:80%}.u-w70pct{width:70%}.u-w60pct{width:60%}.u-w50pct{width:50%}.u-w40pct{width:40%}.u-w30pct{width:30%}.u-w20pct{width:20%}.u-w10pct{width:10%}.u-w75pct{width:75%}.u-w65pct{width:65%}.u-w25pct{width:25%}.u-w15pct{width:15%}.u-w66pct{width:66.6666666667%}.u-w33pct{width:33.3333333333%}.u-small-text,small{font-size:.875em}.u-small-text--subtle,small--subtle{color:var(--gray)}.u-no-animation{transition-duration:0s!important}.u-move-transition{transition:transform .25s ease-out}.u-move-to-origin{transform:translateZ(0)}.u-move-left{transform:translate3d(-100%,0,0)}.u-move-left-2x{transform:translate3d(-200%,0,0)}.u-move-left-3x{transform:translate3d(-300%,0,0)}.u-move-right{transform:translate3d(100%,0,0)}.u-move-up{transform:translate3d(0,-100%,0)}.u-alpha-transition{transition:opacity .25s linear}.u-alpha-100{opacity:1}.u-alpha-0{opacity:0}.u-max-height-transition{contain:paint;overflow:hidden;transition:max-height .2s ease-out}.u-max-height-zero{max-height:0!important}.u-max-height-summary{max-height:88px!important}:host .m-form-field{--choice-border:var(--choice-border-default);--choice-border-hover:var(--choice-border-hover-default);--choice-border-focus:var(--choice-border-focus-default);--choice-outline-focus:var(--choice-outline-focus-default);--choice-bg:var(--choice-bg-default);--choice-bg-selected:var(--choice-bg-selected-default);--choice-bg-selected-focus:var(--choice-bg-selected-focus-default);--choice-label-disabled:var(--choice-label-disabled-default);--choice-border-width-addendum:0}:host .m-form-field--in-list label{box-sizing:border-box;padding:.3125em 0 .3125em .625em;width:100%}:host .m-form-field .a-label+.a-text-input{margin-top:.3125em}:host .m-form-field--checkbox .a-label,:host .m-form-field--radio .a-label{cursor:pointer;display:inline-grid;grid-template-columns:1.875em auto;overflow-wrap:anywhere;vertical-align:top}:host .m-form-field--checkbox .a-label:before,:host .m-form-field--radio .a-label:before{background-color:var(--choice-bg);border:1px solid var(--choice-border);content:"";display:inline-block;grid-row-end:3;grid-row-start:1;height:1.125em;left:1px;margin-right:10px;outline:var(--choice-border-width-addendum) solid var(--choice-border);position:relative;top:1px;vertical-align:top;width:1.125em}:host .m-form-field--checkbox .a-label.hover:before,:host .m-form-field--checkbox .a-label:hover:before,:host .m-form-field--radio .a-label.hover:before,:host .m-form-field--radio .a-label:hover:before{border-color:var(--choice-border-hover)}:host .m-form-field--checkbox .a-checkbox,:host .m-form-field--checkbox .a-radio,:host .m-form-field--radio .a-checkbox,:host .m-form-field--radio .a-radio{border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0 0 0 0)}:host .m-form-field--checkbox .a-checkbox.focus+.a-label,:host .m-form-field--checkbox .a-checkbox:focus+.a-label,:host .m-form-field--checkbox .a-radio.focus+.a-label,:host .m-form-field--checkbox .a-radio:focus+.a-label,:host .m-form-field--radio .a-checkbox.focus+.a-label,:host .m-form-field--radio .a-checkbox:focus+.a-label,:host .m-form-field--radio .a-radio.focus+.a-label,:host .m-form-field--radio .a-radio:focus+.a-label{outline:1px dotted var(--choice-outline-focus);outline-offset:1px}:host .m-form-field--checkbox .a-checkbox:disabled.focus+.a-label:before,:host .m-form-field--checkbox .a-checkbox:disabled.hover+.a-label:before,:host .m-form-field--checkbox .a-checkbox:disabled:checked+.a-label:before,:host .m-form-field--checkbox .a-checkbox:disabled:focus+.a-label:before,:host .m-form-field--checkbox .a-checkbox:disabled:hover+.a-label:before,:host .m-form-field--checkbox .a-radio:disabled.focus+.a-label:before,:host .m-form-field--checkbox .a-radio:disabled.hover+.a-label:before,:host .m-form-field--checkbox .a-radio:disabled:checked+.a-label:before,:host .m-form-field--checkbox .a-radio:disabled:focus+.a-label:before,:host .m-form-field--checkbox .a-radio:disabled:hover+.a-label:before,:host .m-form-field--radio .a-checkbox:disabled.focus+.a-label:before,:host .m-form-field--radio .a-checkbox:disabled.hover+.a-label:before,:host .m-form-field--radio .a-checkbox:disabled:checked+.a-label:before,:host .m-form-field--radio .a-checkbox:disabled:focus+.a-label:before,:host .m-form-field--radio .a-checkbox:disabled:hover+.a-label:before,:host .m-form-field--radio .a-radio:disabled.focus+.a-label:before,:host .m-form-field--radio .a-radio:disabled.hover+.a-label:before,:host .m-form-field--radio .a-radio:disabled:checked+.a-label:before,:host .m-form-field--radio .a-radio:disabled:focus+.a-label:before,:host .m-form-field--radio .a-radio:disabled:hover+.a-label:before{border-color:var(--choice-border);box-shadow:none;outline:none}:host .m-form-field--checkbox .a-checkbox:disabled+.a-label,:host .m-form-field--checkbox .a-radio:disabled+.a-label,:host .m-form-field--radio .a-checkbox:disabled+.a-label,:host .m-form-field--radio .a-radio:disabled+.a-label{color:var(--choice-label-disabled);cursor:not-allowed}:host .m-form-field--checkbox .a-checkbox:disabled+.a-label:before,:host .m-form-field--checkbox .a-radio:disabled+.a-label:before,:host .m-form-field--radio .a-checkbox:disabled+.a-label:before,:host .m-form-field--radio .a-radio:disabled+.a-label:before{outline:none}:host .m-form-field--checkbox:has(.a-checkbox:disabled),:host .m-form-field--checkbox:has(.a-radio:disabled),:host .m-form-field--radio:has(.a-checkbox:disabled),:host .m-form-field--radio:has(.a-radio:disabled){--choice-border:var(--choice-border-disabled);--choice-bg:var(--choice-bg-disabled);--choice-bg-selected:var(--choice-bg-selected-disabled)}:host .m-form-field--checkbox-error,:host .m-form-field--checkbox-success,:host .m-form-field--checkbox-warning,:host .m-form-field--radio-error,:host .m-form-field--radio-success,:host .m-form-field--radio-warning{--choice-border-width-addendum:1px}:host .m-form-field--checkbox-success,:host .m-form-field--radio-success{--choice-border:var(--choice-border-success)}:host .m-form-field--checkbox-warning,:host .m-form-field--radio-warning{--choice-border:var(--choice-border-warning)}:host .m-form-field--checkbox-error,:host .m-form-field--radio-error{--choice-border:var(--choice-border-error)}:host .m-form-field--checkbox .a-checkbox.focus+.a-label:before,:host .m-form-field--checkbox .a-checkbox:focus+.a-label:before{border-color:var(--choice-border-focus);box-shadow:0 0 0 1px var(--choice-border-focus);outline-color:var(--choice-border-focus)}:host .m-form-field--checkbox .a-checkbox.hover+.a-label:before,:host .m-form-field--checkbox .a-checkbox:hover+.a-label:before{border-color:var(--choice-border-hover);box-shadow:0 0 0 1px var(--choice-border-hover);outline-color:var(--choice-border-hover)}:host .m-form-field--checkbox .a-checkbox:checked+.a-label:before{background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" class="cf-icon-svg cf-icon-svg--approved" viewBox="0 0 12 19"><path d="M4.63 15.638a1.03 1.03 0 0 1-.79-.37L.36 11.09a1.03 1.03 0 1 1 1.58-1.316l2.535 3.043L9.958 3.32a1.029 1.029 0 0 1 1.783 1.03L5.52 15.122a1.03 1.03 0 0 1-.803.511l-.088.004z"/></svg>');background-position:center 0;background-repeat:no-repeat;background-size:auto 1.1875em}:host .m-form-field--checkbox .a-checkbox:disabled:checked+.a-label:before{background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" fill="%235a5d61" aria-hidden="true" viewBox="0 0 12 19"><path d="M4.63 15.638a1.03 1.03 0 0 1-.79-.37L.36 11.09a1.03 1.03 0 1 1 1.58-1.316l2.535 3.043L9.958 3.32a1.029 1.029 0 0 1 1.783 1.03L5.52 15.122a1.03 1.03 0 0 1-.803.511l-.088.004z"/></svg>')}:host .m-form-field--radio .a-label:before{border-radius:50%;transform:rotate(0deg)}:host .m-form-field--radio .a-radio.focus+.a-label:before,:host .m-form-field--radio .a-radio:focus+.a-label:before{border-color:var(--choice-border-focus);box-shadow:0 0 0 1px var(--choice-border-focus);outline:none}:host .m-form-field--radio .a-radio.hover+.a-label:before,:host .m-form-field--radio .a-radio:hover+.a-label:before{border-color:var(--choice-border-hover);box-shadow:0 0 0 1px var(--choice-border-hover);outline:none}:host .m-form-field--radio .a-radio:checked+.a-label:before{background-color:var(--choice-bg-selected);box-shadow:inset 0 0 0 2px var(--white)}:host .m-form-field--radio .a-radio.focus:checked+.a-label:before,:host .m-form-field--radio .a-radio:focus:checked+.a-label:before{background-color:var(--choice-bg-selected-focus);border-color:var(--choice-border-focus);box-shadow:0 0 0 1px var(--choice-border-focus),inset 0 0 0 2px var(--white)}:host .m-form-field--radio .a-radio.hover:checked+.a-label:before,:host .m-form-field--radio .a-radio:hover:checked+.a-label:before{border-color:var(--choice-border-hover);box-shadow:0 0 0 1px var(--choice-border-hover),inset 0 0 0 2px var(--white)}:host .m-form-field--radio .a-radio.hover:checked:disabled+.a-label:before,:host .m-form-field--radio .a-radio:checked:disabled+.a-label:before,:host .m-form-field--radio .a-radio:hover:checked:disabled+.a-label:before{background-color:var(--choice-bg-selected);border-color:var(--choice-border-disabled);box-shadow:inset 0 0 0 2px var(--gray-10)}:host .m-form-field--lg-target{display:block}:host .m-form-field--lg-target .a-label{background-color:var(--gray-10);box-sizing:border-box;padding:15px;width:100%}:host .m-form-field--lg-target .a-checkbox:checked+.a-label,:host .m-form-field--lg-target .a-radio:checked+.a-label{background-color:var(--pacific-20);box-shadow:inset 0 0 0 1px var(--pacific)}:host .m-form-field--lg-target .a-checkbox.focus+.a-label,:host .m-form-field--lg-target .a-checkbox.hover+.a-label,:host .m-form-field--lg-target .a-checkbox:focus+.a-label,:host .m-form-field--lg-target .a-checkbox:hover+.a-label,:host .m-form-field--lg-target .a-radio.focus+.a-label,:host .m-form-field--lg-target .a-radio.hover+.a-label,:host .m-form-field--lg-target .a-radio:focus+.a-label,:host .m-form-field--lg-target .a-radio:hover+.a-label{box-shadow:inset 0 0 0 2px var(--pacific)}:host .m-form-field--lg-target .a-checkbox.focus+.a-label,:host .m-form-field--lg-target .a-checkbox:checked+.a-label,:host .m-form-field--lg-target .a-checkbox:focus+.a-label,:host .m-form-field--lg-target .a-radio.focus+.a-label,:host .m-form-field--lg-target .a-radio:checked+.a-label,:host .m-form-field--lg-target .a-radio:focus+.a-label{outline-offset:1px}:host .m-form-field--lg-target .a-checkbox:checked:disabled+.a-label,:host .m-form-field--lg-target .a-checkbox:disabled+.a-label,:host .m-form-field--lg-target .a-checkbox:hover:disabled+.a-label,:host .m-form-field--lg-target .a-radio:checked:disabled+.a-label,:host .m-form-field--lg-target .a-radio:disabled+.a-label,:host .m-form-field--lg-target .a-radio:hover:disabled+.a-label{background-color:var(--gray-20);box-shadow:none;color:var(--choice-label-disabled)}:host .m-form-field--lg-target .a-checkbox:checked:disabled+.a-label,:host .m-form-field--lg-target .a-checkbox:checked:disabled+.a-label:before,:host .m-form-field--lg-target .a-radio:checked:disabled+.a-label,:host .m-form-field--lg-target .a-radio:checked:disabled+.a-label:before{border:1px solid var(--form-field-border-disabled)}`;var ot=["error","warning","success"],rt=["checkbox","radio"],b,ze,Be,ae,De,Ie,I=class I extends ${constructor(){super();ce(this,b);this.checked=!1,this.disabled=!1,this.large=!1,this.validation="",this.type="checkbox",this.inlist=!1,this.name="",this.value=""}static get properties(){return{checked:{type:Boolean,reflect:!0},disabled:{type:Boolean},large:{type:Boolean},validation:{type:String},type:{type:String},inlist:{type:Boolean,attribute:!0},name:{type:String},value:{type:String}}}focus(){this.shadowRoot.querySelector("input").focus()}render(){let t=He(S(this,b,Ie));return Pe`<div class="${t}" ?large="${this.large}"><input class="a-${this.type}" type="${S(this,b,De)}" id="choice-input" ?disabled="${this.disabled}" .checked="${this.checked}" @change="${V(this,b,ze)}" @input="${V(this,b,Be)}" aria-invalid="${S(this,b,ae)==="error"?"true":"false"}"> <label class="a-label" for="choice-input"><slot></slot></label></div>`}static init(){window.customElements.get("cfpb-form-choice")||window.customElements.define("cfpb-form-choice",I)}};b=new WeakSet,ze=function(){this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))},Be=function(){this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))},ae=function(){return ot.includes(this.validation)?this.validation:void 0},De=function(){return rt.includes(this.type)?this.type:"checkbox"},Ie=function(){let t={"m-form-field":!0,[`m-form-field--${this.type}`]:!0,"m-form-field--lg-target":this.large,"m-form-field--in-list":this.inlist};return S(this,b,ae)&&(t[[`m-form-field--${this.type}-${this.validation}`]]=this.validation),t},le(I,"styles",W`${z(Ne)}`);var Le=I;})(); /*! Bundled license information: @lit/reactive-element/css-tag.js: (** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) @lit/reactive-element/reactive-element.js: lit-html/lit-html.js: lit-element/lit-element.js: lit-html/directive.js: (** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) lit-html/is-server.js: (** * @license * Copyright 2022 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) lit-html/directives/class-map.js: (** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) */ //# sourceMappingURL=index.js.map