UNPKG

@cfpb/cfpb-design-system

Version:
30 lines (26 loc) 22.2 kB
(()=>{var Dt=Object.defineProperty;var dt=o=>{throw TypeError(o)};var zt=(o,t,e)=>t in o?Dt(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var pt=(o,t,e)=>zt(o,typeof t!="symbol"?t+"":t,e),Z=(o,t,e)=>t.has(o)||dt("Cannot "+e);var O=(o,t,e)=>(Z(o,t,"read from private field"),e?e.call(o):t.get(o)),I=(o,t,e)=>t.has(o)?dt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(o):t.set(o,e),U=(o,t,e,s)=>(Z(o,t,"write to private field"),s?s.call(o,e):t.set(o,e),e),C=(o,t,e)=>(Z(o,t,"access private method"),e);var ut=(o,t,e)=>new Promise((s,i)=>{var n=a=>{try{h(e.next(a))}catch(l){i(l)}},r=a=>{try{h(e.throw(a))}catch(l){i(l)}},h=a=>a.done?s(a.value):Promise.resolve(a.value).then(n,r);h((e=e.apply(o,t)).next())});var B=globalThis,q=B.ShadowRoot&&(B.ShadyCSS===void 0||B.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,J=Symbol(),ft=new WeakMap,R=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==J)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(q&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=ft.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&ft.set(e,t))}return t}toString(){return this.cssText}},W=o=>new R(typeof o=="string"?o:o+"",void 0,J),G=(o,...t)=>{let e=o.length===1?o[0]:t.reduce(((s,i,n)=>s+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+o[n+1]),o[0]);return new R(e,o,J)},$t=(o,t)=>{if(q)o.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),i=B.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,o.appendChild(s)}},X=q?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return W(e)})(o):o;var{is:It,defineProperty:Bt,getOwnPropertyDescriptor:qt,getOwnPropertyNames:Wt,getOwnPropertySymbols:Vt,getPrototypeOf:Kt}=Object,_=globalThis,vt=_.trustedTypes,Ft=vt?vt.emptyScript:"",Q=_.reactiveElementPolyfillSupport,T=(o,t)=>o,Y={toAttribute(o,t){switch(t){case Boolean:o=o?Ft:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch(s){e=null}}return e}},At=(o,t)=>!It(o,t),_t={attribute:!0,type:String,converter:Y,reflect:!1,useDefault:!1,hasChanged:At},gt,mt;(gt=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(mt=_.litPropertyMetadata)!=null||(_.litPropertyMetadata=new WeakMap);var f=class extends HTMLElement{static addInitializer(t){var e;this._$Ei(),((e=this.l)!=null?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=_t){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Bt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){var r;let{get:i,set:n}=(r=qt(this.prototype,t))!=null?r:{get(){return this[e]},set(h){this[e]=h}};return{get:i,set(h){let a=i==null?void 0:i.call(this);n==null||n.call(this,h),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return(e=this.elementProperties.get(t))!=null?e:_t}static _$Ei(){if(this.hasOwnProperty(T("elementProperties")))return;let t=Kt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(T("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(T("properties"))){let e=this.properties,s=[...Wt(e),...Vt(e)];for(let i of s)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let i of s)e.unshift(X(i))}else t!==void 0&&e.push(X(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach((e=>e(this)))}addController(t){var e,s;((e=this._$EO)!=null?e:this._$EO=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)==null||s.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var e;let t=(e=this.shadowRoot)!=null?e:this.attachShadow(this.constructor.shadowRootOptions);return $t(t,this.constructor.elementStyles),t}connectedCallback(){var t,e;(t=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach((s=>{var i;return(i=s.hostConnected)==null?void 0:i.call(s)}))}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach((e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)}))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var n;let s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){let r=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:Y).toAttribute(e,s.type);this._$Em=t,r==null?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){var n,r,h,a;let s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let l=s.getPropertyOptions(i),d=typeof l.converter=="function"?{fromAttribute:l.converter}:((n=l.converter)==null?void 0:n.fromAttribute)!==void 0?l.converter:Y;this._$Em=i,this[i]=(a=(h=d.fromAttribute(e,l.type))!=null?h:(r=this._$Ej)==null?void 0:r.get(i))!=null?a:null,this._$Em=null}}requestUpdate(t,e,s){var i,n;if(t!==void 0){let r=this.constructor,h=this[t];if(s!=null||(s=r.getPropertyOptions(t)),!(((i=s.hasChanged)!=null?i:At)(h,e)||s.useDefault&&s.reflect&&h===((n=this._$Ej)==null?void 0:n.get(t))&&!this.hasAttribute(r._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:n},r){var h,a,l;s&&!((h=this._$Ej)!=null?h:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,(a=r!=null?r:e)!=null?a:this[t]),n!==!0||r!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&((l=this._$Eq)!=null?l:this._$Eq=new Set).add(t))}_$EP(){return ut(this,null,function*(){this.isUpdatePending=!0;try{yield this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&(yield t),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s,i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((s=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[r,h]of this._$Ep)this[r]=h;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[r,h]of n){let{wrapped:a}=h,l=this[r];a!==!0||this._$AL.has(r)||l===void 0||this.C(r,void 0,h,l)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach((n=>{var r;return(r=n.hostUpdate)==null?void 0:r.call(n)})),this.update(e)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach((s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((e=>this._$ET(e,this[e])))),this._$EM()}updated(t){}firstUpdated(t){}},yt;f.elementStyles=[],f.shadowRootOptions={mode:"open"},f[T("elementProperties")]=new Map,f[T("finalized")]=new Map,Q==null||Q({ReactiveElement:f}),((yt=_.reactiveElementVersions)!=null?yt:_.reactiveElementVersions=[]).push("2.1.0");var M=globalThis,V=M.trustedTypes,bt=V?V.createPolicy("lit-html",{createHTML:o=>o}):void 0,Nt="$lit$",g=`lit$${Math.random().toFixed(9).slice(2)}$`,Ot="?"+g,Zt=`<${Ot}>`,S=document,j=()=>S.createComment(""),L=o=>o===null||typeof o!="object"&&typeof o!="function",at=Array.isArray,Jt=o=>at(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",tt=`[ \f\r]`,H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,St=/-->/g,Et=/>/g,A=RegExp(`>|${tt}(?:([^\\s"'>=/]+)(${tt}*=${tt}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`,"g"),wt=/'/g,Ct=/"/g,Ut=/^(?:script|style|textarea|title)$/i,ht=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),Rt=ht(1),oe=ht(2),re=ht(3),E=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),xt=new WeakMap,b=S.createTreeWalker(S,129);function Tt(o,t){if(!at(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return bt!==void 0?bt.createHTML(t):t}var Gt=(o,t)=>{let e=o.length-1,s=[],i,n=t===2?"<svg>":t===3?"<math>":"",r=H;for(let h=0;h<e;h++){let a=o[h],l,d,c=-1,u=0;for(;u<a.length&&(r.lastIndex=u,d=r.exec(a),d!==null);)u=r.lastIndex,r===H?d[1]==="!--"?r=St:d[1]!==void 0?r=Et:d[2]!==void 0?(Ut.test(d[2])&&(i=RegExp("</"+d[2],"g")),r=A):d[3]!==void 0&&(r=A):r===A?d[0]===">"?(r=i!=null?i:H,c=-1):d[1]===void 0?c=-2:(c=r.lastIndex-d[2].length,l=d[1],r=d[3]===void 0?A:d[3]==='"'?Ct:wt):r===Ct||r===wt?r=A:r===St||r===Et?r=H:(r=A,i=void 0);let v=r===A&&o[h+1].startsWith("/>")?" ":"";n+=r===H?a+Zt:c>=0?(s.push(l),a.slice(0,c)+Nt+a.slice(c)+g+v):a+g+(c===-2?h:v)}return[Tt(o,n+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},k=class o{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,r=0,h=t.length-1,a=this.parts,[l,d]=Gt(t,e);if(this.el=o.createElement(l,s),b.currentNode=this.el.content,e===2||e===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(i=b.nextNode())!==null&&a.length<h;){if(i.nodeType===1){if(i.hasAttributes())for(let c of i.getAttributeNames())if(c.endsWith(Nt)){let u=d[r++],v=i.getAttribute(c).split(g),z=/([.?@])?(.*)/.exec(u);a.push({type:1,index:n,name:z[2],strings:v,ctor:z[1]==="."?it:z[1]==="?"?ot:z[1]==="@"?rt:P}),i.removeAttribute(c)}else c.startsWith(g)&&(a.push({type:6,index:n}),i.removeAttribute(c));if(Ut.test(i.tagName)){let c=i.textContent.split(g),u=c.length-1;if(u>0){i.textContent=V?V.emptyScript:"";for(let v=0;v<u;v++)i.append(c[v],j()),b.nextNode(),a.push({type:2,index:++n});i.append(c[u],j())}}}else if(i.nodeType===8)if(i.data===Ot)a.push({type:2,index:n});else{let c=-1;for(;(c=i.data.indexOf(g,c+1))!==-1;)a.push({type:7,index:n}),c+=g.length-1}n++}}static createElement(t,e){let s=S.createElement("template");return s.innerHTML=t,s}};function x(o,t,e=o,s){var r,h,a;if(t===E)return t;let i=s!==void 0?(r=e._$Co)==null?void 0:r[s]:e._$Cl,n=L(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((h=i==null?void 0:i._$AO)==null||h.call(i,!1),n===void 0?i=void 0:(i=new n(o),i._$AT(o,e,s)),s!==void 0?((a=e._$Co)!=null?a:e._$Co=[])[s]=i:e._$Cl=i),i!==void 0&&(t=x(o,i._$AS(o,t.values),i,s)),t}var st=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var l;let{el:{content:e},parts:s}=this._$AD,i=((l=t==null?void 0:t.creationScope)!=null?l:S).importNode(e,!0);b.currentNode=i;let n=b.nextNode(),r=0,h=0,a=s[0];for(;a!==void 0;){if(r===a.index){let d;a.type===2?d=new D(n,n.nextSibling,this,t):a.type===1?d=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(d=new nt(n,this,t)),this._$AV.push(d),a=s[++h]}r!==(a==null?void 0:a.index)&&(n=b.nextNode(),r++)}return b.currentNode=S,i}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},D=class o{get _$AU(){var t,e;return(e=(t=this._$AM)==null?void 0:t._$AU)!=null?e:this._$Cv}constructor(t,e,s,i){var n;this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(n=i==null?void 0:i.isConnected)!=null?n:!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=x(this,t,e),L(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==E&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Jt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==p&&L(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.createTextNode(t)),this._$AH=t}$(t){var n;let{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=k.createElement(Tt(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{let r=new st(i,this),h=r.u(this.options);r.p(e),this.T(h),this._$AH=r}}_$AC(t){let e=xt.get(t.strings);return e===void 0&&xt.set(t.strings,e=new k(t)),e}k(t){at(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let n of t)i===e.length?e.push(s=new o(this.O(j()),this.O(j()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){let i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=p}_$AI(t,e=this,s,i){let n=this.strings,r=!1;if(n===void 0)t=x(this,t,e,0),r=!L(t)||t!==this._$AH&&t!==E,r&&(this._$AH=t);else{let h=t,a,l;for(t=n[0],a=0;a<n.length-1;a++)l=x(this,h[s+a],e,a),l===E&&(l=this._$AH[a]),r||(r=!L(l)||l!==this._$AH[a]),l===p?t=p:t!==p&&(t+=(l!=null?l:"")+n[a+1]),this._$AH[a]=l}r&&!i&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"")}},it=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}},ot=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}},rt=class extends P{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){var r;if((t=(r=x(this,t,e,0))!=null?r:p)===E)return;let s=this._$AH,i=t===p&&s!==p||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==p&&(s===p||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;typeof this._$AH=="function"?this._$AH.call((s=(e=this.options)==null?void 0:e.host)!=null?s:this.element,t):this._$AH.handleEvent(t)}},nt=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){x(this,t)}};var et=M.litHtmlPolyfillSupport,Pt;et==null||et(k,D),((Pt=M.litHtmlVersions)!=null?Pt:M.litHtmlVersions=[]).push("3.3.0");var Ht=(o,t,e)=>{var n,r;let s=(n=e==null?void 0:e.renderBefore)!=null?n:t,i=s._$litPart$;if(i===void 0){let h=(r=e==null?void 0:e.renderBefore)!=null?r:null;s._$litPart$=i=new D(t.insertBefore(j(),h),h,void 0,e!=null?e:{})}return i._$AI(o),i};var w=globalThis,m=class extends f{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,s;let t=super.createRenderRoot();return(s=(e=this.renderOptions).renderBefore)!=null||(e.renderBefore=t.firstChild),t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ht(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return E}},Mt;m._$litElement$=!0,m.finalized=!0,(Mt=w.litElementHydrateSupport)==null||Mt.call(w,{LitElement:m});var lt=w.litElementPolyfillSupport;lt==null||lt({LitElement:m});var jt;((jt=w.litElementVersions)!=null?jt:w.litElementVersions=[]).push("4.2.0");var Lt=':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)}:host{--icon-text-divider:var(--pacific-60)}:host div{align-items:center;display:flex;width:fit-content}:host div ::slotted(svg){display:none}:host div.u-has-icon{gap:.625rem}:host div.u-has-icon slot:before{border-left:1px solid var(--icon-text-divider);content:"";order:2;place-self:normal}:host div.u-has-icon ::slotted(svg){display:initial}:host div.u-has-icon--left ::slotted(svg){order:1}:host div.u-has-icon--left ::slotted(span){order:3}:host div.u-has-icon--right ::slotted(svg){order:3}:host div.u-has-icon--right ::slotted(span){order:1}:host([disabled]){--icon-text-divider:var(--gray-60)}';var y,N,$,ct,K,F=class F extends m{constructor(){super();I(this,$);I(this,y);I(this,N);U(this,N,"")}static get properties(){return{disabled:{type:Boolean,reflect:!0}}}connectedCallback(){super.connectedCallback(),U(this,y,new MutationObserver(()=>{C(this,$,ct).call(this)})),O(this,y).observe(this,{childList:!0,subtree:!1})}disconnectedCallback(){super.disconnectedCallback(),O(this,y)&&(O(this,y).disconnect(),U(this,y,null))}firstUpdated(){C(this,$,ct).call(this)}hideIcon(){let e=C(this,$,K).call(this),s=this.shadowRoot.querySelector("div");e&&(U(this,N,s.className),s.className="")}showIcon(){let e=C(this,$,K).call(this),s=this.shadowRoot.querySelector("div");e&&(s.className=O(this,N))}hasIcon(){return!!C(this,$,K).call(this)}render(){return Rt`<div><slot></slot></div>`}static init(){window.customElements.get("cfpb-icon-text")||window.customElements.define("cfpb-icon-text",F)}};y=new WeakMap,N=new WeakMap,$=new WeakSet,ct=function(){let e=this.shadowRoot.querySelector("div"),i=this.shadowRoot.querySelector("slot").assignedNodes({flatten:!0}),n=null,r=null;for(let h of i)if(h.nodeType===Node.TEXT_NODE&&h.textContent.trim().length>0){let a=document.createElement("span");a.textContent=h.textContent,h.replaceWith(a),r||(r=a)}else if(h.nodeType===Node.ELEMENT_NODE){let a=h.tagName.toLowerCase();a==="svg"&&!n?n=h:a==="span"&&!r&&(r=h)}n&&r&&(e.classList.add("u-has-icon"),n.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING?e.classList.add("u-has-icon--left"):e.classList.add("u-has-icon--right"))},K=function(){let s=this.shadowRoot.querySelector("slot").assignedNodes({flatten:!0});for(let i of s)if(i.tagName&&i.tagName.toLowerCase()==="svg")return i},pt(F,"styles",G`${W(Lt)}`);var kt=F;})(); /*! 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: (** * @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 *) */ //# sourceMappingURL=index.js.map