1"use strict";(self.webpackChunkwebpack=self.webpackChunkwebpack||[]).push([[6471,2435],{36471:function(e,t,s){s.r(t);var i=s(68687),a=s(29805),n=s(43322),d=s(41181),l=(s(67236),s(35854)),c=s(47359),r=(s(82435),s(71727));class o extends l.C{static get properties(){return{showSelectedItems:{type:Boolean,reflect:!0,attribute:"show-selected-items"},parm:{type:Object,attribute:"parm",reflect:!0},selectedCards:{type:Array},isLoadingMode:{type:Boolean},itemsSelected:{type:Boolean,attribute:"items-selected",reflect:!0}}}id="lister-lookbook";set selectedCards(e){let t=this._selectedCards;this._selectedCards=e,this.itemsSelected=this.selectedCards.length>0,this.showSelectedItems&&(this.showSelectedItems=this.itemsSelected),this.requestUpdate("selectedCards",t)}get selectedCards(){return this._selectedCards}constructor(){super(),this.selectedCards=[],this.isLoadingMode=!1}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(this.id)}disconnectedCallback(){super.disconnectedCallback()}firstUpdated(){this.executeCallbacksOnInit()}handleSelectedItemsClick(){this.showSelectedItems=!this.showSelectedItems}setCardChecked(e,t){if(e.checked){const s={};s.id=e.id,s.target=e,s.data=t,this.selectedCards.push(s),this.itemsSelected=this.selectedCards.length>0,this.requestUpdate("selectedCards")}else{this.selectedCards.find((t=>t.id===e.id)).target.checked=!1,this.selectedCards=this.selectedCards.filter((t=>t.id!==e.id))}}renderCtaBtnGroup(){return i.dy` <div class="a-btn-group" role="group">${this.renderCtaList()}</div> `}renderCtaList(){return i.dy` 2 ${this.parm.ctaList.map((e=>e.tooltipMessage&&(e.label||e.icon)?i.dy`<wc-tooltip 3 placement="top-end" 4 z-index="5000" 5 trigger="mouseenter" 6 offset-y="18" 7 .disable=${this.selectedCards.length<=e.amount} 8 > 9 <button 10 class="a-btn a-btn--secondary ${e.label?"":"a-btn--icon"}" 11 disabled="${!!(this.isLoadingMode||this.selectedCards.length>e.amount)||i.Ld}" 12 @click="${t=>this.handleCtaClicked(t,e.callbackId)}" 13 type="button" 14 aria-label="${e.ariaLabel}" 15 slot="trigger" 16 > 17 ${e.icon?i.dy`${(0,n.aT)(e.icon,"a-btn__icon")}`:i.Ld} 18 ${e.label?i.dy`<span class="a-btn__label">${e.label}</span>`:i.Ld} 19 </button> 20 <div slot="content">${(0,r.A)(e.tooltipMessage)}</div> 21 </wc-tooltip>`:e.label||e.icon?i.dy` 22 <button 23 class="a-btn a-btn--secondary ${e.label?"":"a-btn--icon"}" 24 disabled="${!!this.isLoadingMode||i.Ld}" 25 @click="${t=>this.handleCtaClicked(t,e.callbackId)}" 26 > 27 ${e.icon?i.dy`${(0,n.aT)(e.icon,"a-btn__icon")}`:i.Ld} 28 ${e.label?i.dy`<span class="a-btn__label">${e.label}</span>`:i.Ld} 29 </button> 30 `:i.Ld))} 31 `}render(){const e=this.parm?.ctaList?.length>1;return i.dy` 32 <div class="o-flex o-flex--ai-center o-flex--jc-end o-flex--row"> 33 <div class="m-sticky-menu-inner u-bg-color-dark"> 34 ${this.selectedCards.length>0?i.dy` 35 <button 36 class="a-btn a-btn--small u-p-0" 37 type="button" 38 @click="${e=>{this.handleSelectedItemsClick(e)}}" 39 > 40 ${this.renderSelectedItems()} 41 ${(0,n.aT)(d.aX.ArrowDown,"m-sticky-menu__arrow u-icon-tiny")} 42 </button> 43 44 <div class="o-flex o-flex--ai-center u-h-100"> 45 ${e?this.renderCtaBtnGroup():this.renderCtaList()} 46 <div class="m-sticky-menu-inner__vertical-divider"></div> 47 <button 48 class="a-btn u-p-0" 49 type="button" 50 aria-label="Close sticky menu" 51 ?hidden="${this.isLoadingMode}" 52 @click="${e=>this.handleClearAll(e)}" 53 > 54 ${(0,n.aT)(d.aX.Close,"u-icon-small a-btn__icon")} 55 </button> 56 </div> 57 `:i.dy`<div>${this.parm.noSelectionLabel}</div>`} 58 </div> 59 </div> 60 61 <div class="m-sticky-menu-selected" ?hidden="${!this.showSelectedItems}"> 62 <div class="m-sticky-menu-selected__inner">
62${this.getSelectedStickyCards()}</div> 63 </div> 64 `}handleCtaClicked(e,t){const s=this.selectedCards.map((e=>e.id));(0,c.r)(this,"wc-sticky-menu-cta-clicked",{callbackId:t,idList:s})}handleClearAll(e){this.selectedCards.forEach((e=>{e.target.checked=!1,(0,c.r)(e.target,"change")})),this.selectedCards=[]}handleRemoveCard(e){const t=this.selectedCards.find((t=>t.id===e));t.target.checked=!1,(0,c.r)(t.target,"change"),this.selectedCards=this.selectedCards.filter((t=>t.id!==e))}renderSelectedItems(){return i.dy` 65 <span class="m-sticky-menu__selected-label" 66 >${this.parm.selectedLabel.replace("{0}",this.selectedCards.length)}</span 67 > 68 <span class="m-sticky-menu__selected-circle">${this.selectedCards.length}</span> 69 `}getSelectedStickyCards(){if(this.selectedCards&&!(this.selectedCards.length<0))return i.dy` 70 ${(0,a.r)(this.selectedCards,((e,t)=>i.dy`${this.getStickyCard(e)}`))} 71 `}getStickyCard(e){const t=e.data;return i.dy` <div class="m-sticky-menu-selected__card u-pos-relative"> 72 <div class="o-flex o-flex--ai-center o-flex--jc-center o-gap-3"> 73 ${t.image?i.dy` 74 <img 75 src="${t.image}" 76 alt="" 77 class="m-sticky-menu-selected__card-img o-fit" 78 width="80" 79 height="80" 80 /> 81 `:i.Ld} 82 ${t.title||t.description?i.dy` 83 <div> 84 ${t.link?i.dy` <a href="${t.link}" class="u-label u-overlay"> 85 ${t.title} 86 </a>`:i.dy`<div class="u-h6 u-m-0">${t.title}</div>`} 87 88 <div class="u-text-small">${t.description}</div> 89 </div> 90 `:i.Ld} 91 </div> 92 <div class="o-flex o-flex--ai-center o-flex--jc-center u-zindex-one"> 93 <button 94 class="o-flex o-flex--ai-center o-flex--jc-center u-cursor-pointer" 95 type="button" 96 id="${e.id}" 97 ?hidden="${this.isLoadingMode}" 98 @click="${t=>{this.handleRemoveCard(e.id)}}" 99 > 100 ${(0,n.aT)(d.aX.Close,"u-icon-small a-btn__icon")} 101 </button> 102 </div> 103 </div>`}}customElements.define("wc-sticky-menu",o)},82435:function(e,t,s){s.r(t),s.d(t,{Tooltip:function(){return l}});var i=s(68687),a=s(91759),n=s(41181),d=s(43322);class l extends i.oi{static get properties(){return{placement:{type:String,attribute:"placement"},appendTo:{type:String,attribute:"append-to"},trigger:{type:String,attribute:"trigger"},theme:{type:String,attribute:"theming"},maxWidth:{type:Number,attribute:"max-width"},offsetX:{type:Number,attribute:"offset-x"},offsetY:{type:Number,attribute:"offset-y"},webId:{type:String,attribute:"webid"},interactive:{type:Boolean,attribute:"interactive"},options:{type:Object,attribute:"options",reflect:!0},destroy:{type:Boolean,attribute:"destroy",reflect:!0},disable:{type:Boolean,attribute:"disable",reflect:!0},ZIndex:{type:Number,attribute:"z-index"},hideIcon:{type:Boolean,attribute:"hide-icon"},tippyInstance:{type:Object,attribute:!1},defaultOptions:{type:Object,attribute:!1},extraOptions:{type:Object,attribute:!1}}}constructor(){super()}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}createRenderRoot(){return this}render(){return i.dy` 104 <slot name="trigger" aria-expanded="false"></slot> 105 <slot name="content" aria-hidden="true"></slot> 106 `}firstUpdated(){super.firstUpdated(),this._setDefaultSettings(),this.tippyInstance||this._buildTippy()}updated(e){super.firstUpdated(e),e.forEach(((e,t)=>{const s=this[t];if(e!=s)switch(t){case"destroy":this._destroyInstance(s);break;case"disable":this._toggleInactive(s);break;default:this._updateOptions(t,s)}}))}_setDefaultSettings(){"parent"===this.appendTo?this.appendTo:document.querySelector(`#${this.appendTo}`)||document.body;this.defaultOptions={delay:[300,0],allowHTML:!0,animation:"scale",zIndex:this.ZIndex||100,offset:this.offsetX||this.offsetY?[this.offsetX??0,this.offsetY??0]:i.Ld,popperOptions:{strategy:"fixed",modifiers:{preventOverflow:{boundariesElement:"window"}}},content:()=>this.querySelector('[slot="content"]')?.innerHTML||""},"parent"===this.appendTo?this.defaultOptions.appendTo=this.appendTo:"this"===this.appendTo?this.defaultOptions.appendTo=()=>this:this.defaultOptions.appendTo=()=>document.querySelector(`#${this.appendTo}`)||document.body}_setCloseButton(){if((0,a.MG)(this.trigger)||-1==this.trigger.indexOf("click"))return;let e=this.tippyInstance.popper;if(!e||this.hideIcon)return;const t=`<button type="button" class="a-btn a-btn--icon tippy-close js-close" aria-label="Close tooltip"> \n ${(0,d.QP)(n.aX.Close,"u-icon-micro")}\n </button>`;e.firstChild.classList.add("has-close"),e.firstChild.insertAdjacentHTML("beforeend",t),e.querySelector(".js-close").addEventListener("keydown",(()=>{this.tippyInstance.hide()})),e.querySelector(".js-close").addEventListener("click",(()=>{this.tippyInstance.hide()}))}_setExtraOptions(){let e={};(0,a.MG)(this.placement)||(e.placement=this.placement),(0,a.MG)(this.trigger)||(e.trigger=this.trigger,-1!=this.trigger.indexOf("click")&&(e.interactive=!0)),(0,a.MG)(this.theme)||(e.theme=this.theme),this.maxWidth&&(e.maxWidth=this.maxWidth?this.maxWidth:"none"),this.interactive&&(e.interactive=!0),this.options&&(e={...e,...this.options}),this.extraOptions=e}_updateOptions(e,t){(this.tippyInstance||this.extraOptions)&&(t?this.extraOptions[e]="object"==typeof t?{...this.extraOptions[e],key:t}:t:delete this.extraOptions[e],this.tippyInstance.setProps(this.extraOptions))}_toggleInactive(e){this.tippyInstance&&(e&&this.tippyInstance.disable(),e||this.tippyInstance.state.isEnabled||this.tippyInstance.enable())}_destroyInstance(e){this.tippyInstance&&"true"==e&&this.tippyInstance.destroy()}async _buildTippy(){Promise.all([Promise.resolve().then(s.bind(s,71378)),s.e(9477).then(s.bind(s,79477)),s.e(3230).then(s.bind(s,93230))]).then((([e])=>{"light"==this.theme&&s.e(5613).then(s.bind(s,25613)),this.defaultOptions&&e.default.setDefaultProps(this.defaultOptions),this._setExtraOptions(),this.tippyInstance=e.default(this,this.extraOptions),this._toggleInactive(this.disable),this._setCloseButton()}))}}customElements.define("wc-tooltip",l)}}]);
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.