1"use strict";(self.webpackChunkwebpack=self.webpackChunkwebpack||[]).push([[2687],{41874:function(t,e,a){a.d(e,{Y:function(){return l}});var s=a(33712);const l=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,l=1==e?"u-text-ellipsis":"u-truncate-multi";return a=a?` ${a}`:"",l=`${l}${a}`,s.dy` 2 <span class="${l}" style="--truncate-multi: ${1===e?s.Ld:e};" 3 >${t}</span 4 > 5 `}},22687:function(t,e,a){a.r(e),a.d(e,{Facets:function(){return f}});var s=a(68687),l=a(47359),r=a(29805),i=a(33712),c=a(96627),n=a(90933),o=a(41874),u=a(43322);function d(t){return i.dy` 6 ${t.icon?i.dy` ${(0,u.aT)(t.icon,"u-icon-micro")} `:i.Ld} 7 ${(0,o.Y)(t.label,1,"a-tag__label")} 8 `}var h=a(77905),p=a(74873);class f extends s.oi{static get properties(){return{amountLabel:{type:String},searchTerm:{type:String},clearButtonLabel:{type:String},amountFacets:{type:Number},hideFacets:{type:Boolean,attribute:"hide-facets",reflect:!0},parm:{type:Object},facets:{type:Array},isLoading:{type:Boolean,attribute:"is-loading"}}}internalIdAttr="internal-id";facetAttr="facet";facetValueAttr="facet-value";constructor(){super()}connectedCallback(){super.connectedCallback(),this.addEventListener("external-clear-all",(t=>{this.clearAll()}))}disconnectedCallback(){super.disconnectedCallback()}createRenderRoot(){return this}firstUpdated(){this._UpdateRoot()}removeFacet=t=>{const e=t.currentTarget,a=e.getAttribute(this.internalIdAttr),s=e.getAttribute(this.facetAttr),r=e.getAttribute(this.facetValueAttr);(0,l.r)(this,"wc-facet-removed",{internalId:a,facet:s,facetValue:r}),this.facets=this.facets.filter((t=>t.internalId!==a)),e.remove(),this.resetStates()};_UpdateRoot(){}_ToggleActions(t){}clearAll(t){this.facets.forEach((t=>{const e=this.querySelector(`[${this.internalIdAttr}="${t.internalId}"]`);e&&e.remove()})),(0,l.r)(this,"wc-facet-clear-all"),this.resetStates()}willUpdate(){super.willUpdate()}resetStates(){this.amountFacets=this.facets?this.facets.length:0,this.hideFacets=this.amountFacets<1&&!this.searchTerm}attributeChangedCallback(t,e,a){if(super.attributeChangedCallback(t,e,a),"parm"===t){this.facets=this.parm.facets;const t=this.parm.amountLabel.indexOf("{0}")>-1?"{0}":"{X}";this.amountLabel=this.parm.amountLabel.replace(t,this.parm.amount),this.searchTerm=this.parm.searchTerm,this.amountLabel=this.amountLabel.replace("{1}",this.searchTerm),this.clearButtonLabel=this.parm.clearButtonLabel,this.resetStates(),this.setShadows()}"is-loading"===t&&this.setShadows()}async setShadows(){await this.updateComplete;const t=this.querySelector(".js-tag-group");t&&(0,p.Xy)(t,this.querySelector(".js-scroll"))}render(){return s.dy` 9 ${this.hideFacets?s.Ld:this.getFacetHtml(this.isLoading?"a-tag--partial-skeleton":"")} 10 `}getClearButtonHtml(){return this.amountFacets>1&&this.clearButtonLabel?s.dy`<button 11 type="button" 12 class="a-link a-link--primary a-link--small u-white-space-nowrap js-clear-all" 13 @click="${this.clearAll}" 14 aria-label="${this.clearButtonLabel}" 15 > 16 <span class="a-link__text">${this.clearButtonLabel}</span> 17 </button>`:s.Ld}getFacetHtml(t){return s.dy` 18 <div class="wc-facets-scroll"> 19 ${this.amountLabel?s.dy`<div class="u-white-space-nowrap u-text-small">${this.amountLabel}</div>`:s.Ld} 20 <div class="wc-facets-scroll__inner a-scroll a-scroll--horizontal js-scroll"> 21 <div class="wc-facets__tag-group js-tag-group"> 22 ${this.facets?s.dy` 23 <div class="a-tag-group o-flex--nowrap"> 24 ${(0,r.r)(this.facets,(t=>t.internalId),((e,a)=>s.dy` 25 ${(t=>{const e=t.state&&"default"!==t.state?` ${t.state}`:"";return(0,n.R)(t.HTMLVariants,[["link",()=>i.dy` 26 <a class="a-tag u-label-tiny${e}" href="${t.link}" target="_self"> 27 ${d(t)} 28 </a> 29 `],["button",()=>i.dy` 30 <button 31 class="a-tag u-label-tiny${e}" 32 type="button" 33 internal-id="${t.internalId?`${t.internalId}`:i.Ld}" 34 facet="${t.facetType?`${t.facetType}`:i.Ld}" 35 facet-value="${t.facetValue?`${t.facetValue}`:i.Ld}" 36 @click="${t.callback?t.callback:i.Ld}" 37 > 38 ${d(t)} 39 ${t.facet?i.dy`
40 <span class="a-tag__remove"> 41 ${(0,u.aT)(c.aX.Close,"u-icon-micro")} 42 </span> 43 `:i.Ld} 44 </button> 45 `]],(()=>i.dy`<span 46 id=${t.id?t.id:i.Ld} 47 class="a-tag u-label-tiny${e} ${t.extraClasses}" 48 > 49 ${d(t)} 50 </span> `))})({id:(0,h.y)(),label:e.label,internalId:e.internalId,facetType:e.facetType,facetValue:e.facetValue,facet:!0,state:t,HTMLVariants:"button",callback:this.removeFacet})} 51 `))} 52 ${this.getClearButtonHtml()} 53 </div> 54 `:s.Ld} 55 </div> 56 </div> 57 </div> 58 `}}customElements.define("wc-facets",f)},90933:function(t,e,a){a.d(e,{R:function(){return s}});const s=(t,e,a)=>{for(const a of e)if(a[0]===t)return(0,a[1])();return a?.()}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.