PageSourceSearch

https://www.acollectedman.com/cdn/shop/t/312/assets/uwp.boost-filter.js?v=102127640219491672161747299482

js acollectedman.com collected 2026-10-02 03:35:33 UTC 16,454 bytes, 59 lines download raw bytes

1import{g as _}from"./uwp._commonjsHelpers.js";var d={exports:{}},g=d.exports,b;function y(){return b||(b=1,function(h,t){(function(e,r,o){h.exports=o(),h.exports.default=o()})("slugify",g,function(){var e=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","Â¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","Ã¥":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ä¢":"G","Ä£":"g","Ĩ":"I","Ä©":"i","Ī":"i","Ä«":"i","Ä®":"I","į":"i","İ":"I","ı":"i","Ķ":"k","Ä·":"k","Ä»":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Å ":"S","Å¡":"s","Å¢":"T","Å£":"t","Ť":"T","Å¥":"t","Ũ":"U","Å©":"u","Ū":"u","Å«":"u","Å®":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Å´":"W","ŵ":"w","Ŷ":"Y","Å·":"y","Ÿ":"Y","Ź":"Z","ź":"z","Å»":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Æ ":"O","Æ¡":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Î¥":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Ð¥":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ò¢":"NG","Ò£":"ng","Ò®":"UE","Ò¯":"ue","Ò°":"U","Ò±":"u","Òº":"H","Ò»":"h","Ә":"AE","ә":"ae","Ó¨":"OE","Ó©":"oe","Ô±":"A","Ô²":"B","Ô³":"G","Ô´":"D","Ôµ":"E","Ô¶":"Z","Ô·":"E'","Ô¸":"Y'","Ô¹":"T'","Ôº":"JH","Ô»":"I","Ô¼":"L","Ô½":"X","Ô¾":"C'","Ô¿":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","Ø¡":"a","Ø¢":"aa","Ø£":"a","ؤ":"u","Ø¥":"i","ئ":"e","ا":"a","ب":"b","Ø©":"h","ت":"t","Ø«":"th","ج":"j","Ø­":"h","Ø®":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","Ø´":"sh","ص":"s","ض":"dh","Ø·":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","Ù ":"0","Ù¡":"1","Ù¢":"2","Ù£":"3","Ù¤":"4","Ù¥":"5","Ù¦":"6","Ù§":"7","Ù¨":"8","Ù©":"9","Ù¾":"p","چ":"ch","ژ":"zh","Ú©":"k","Ú¯":"g","ی":"y","Û°":"0","Û±":"1","Û²":"2","Û³":"3","Û´":"4","Ûµ":"5","Û¶":"6","Û·":"7","Û¸":"8","Û¹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","á¹¢":"S","á¹£":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","á» ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","á»§":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","á»­":"u","á»®":"U","ữ":"u","á»°":"U","á»±":"u","Ỳ":"Y","ỳ":"y","á»´":"Y","ỵ":"y","á»¶":"Y","á»·":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","â
1‚§":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","ï·¼":"rial","ﻵ":"laa","ï»·":"laa","ﻹ":"lai","ï»»":"la"}`),r=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Ð¥":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","Ã¥":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","Ã¥":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","Ã¥":"aa","ä":"ae","ö":"oe"}}');function o(l,i){if(typeof l!="string")throw new Error("slugify: string argument expected");i=typeof i=="string"?{replacement:i}:i||{};var n=r[i.locale]||{},c=i.replacement===void 0?"-":i.replacement,a=i.trim===void 0?!0:i.trim,s=l.normalize().split("").reduce(function(u,f){var p=n[f]||e[f]||f;return p===c&&(p=" "),u+p.replace(i.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return i.strict&&(s=s.replace(/[^A-Za-z0-9\s]/g,"")),a&&(s=s.trim()),s=s.replace(/\s+/g,c),i.lower&&(s=s.toLowerCase()),s}return o.extend=function(l){Object.assign(e,l)},o})}(d)),d.exports}var v=y();const m=_(v);class A extends HTMLElement{constructor(){super(),this._filter=null,this._breakpoint=window.innerWidth<="768"?"mobile":"desktop"}connectedCallback(){var t,e;if(this._breakpoint==="mobile"){this.renderMobileFilter();return}this._filter.displayType==="list"&&(((t=this._filter.manualValues)==null?void 0:t.length)>1||((e=this._filter.values)==null?void 0:e.length)>1||this.filter.filterType==="vendor"||this.filter.filterType==="product_type")?(this.renderAccordionFilter(),this.renderAccordionContent(),this.setAccordionEventListeners()):this._filter.displayType==="list"&&(this.renderInlineFilter(),this.setInlineEventListeners()),this.dataset.option=this._filter.filterOptionId}renderMobileFilter(t=!1){var e,r,o,l,i,n;if(!t&&((e=this._filter.manualValues)!=null&&e.length||(r=this._filter.values)!=null&&r.length)){let c='<div class="boost-filter__mobile-values">';((l=(o=this._filter)==null?void 0:o.manualValues)!=null&&l.length?(i=this._filter)==null?void 0:i.manualValues:(n=this._filter)==null?void 0:n.values).forEach(s=>{let u="";if(typeof s=="string"){const f=this.removeLabelPrefix(s);u=this.renderInlineFilter(m(s,{lower:!0,strict:!0,trim:!0}),f,this._filter.filterOptionId,!1,s)}else{const f=s!=null&&s.label?s.label:s.key;u=this.renderInlineFilter(m(f,{lower:!0,strict:!0,trim:!0}),f,this._filter.filterOptionId,!1)}c+=u}),c+="</div>",this.innerHTML=`
2        <div class="boost-filter boost-filter__mobile">
3          <h4 class=" boost-filter__mobile-title subtitle-1">
4            ${this._filter.label}
5          </h4>
6          ${c}
7        </div>
8      `,this.setMobileEventListeners(),this._filter.filterType==="vendor"&&this._filter.values.length===1&&this.updateCollectionBrand(this._filter.values[0].key);return}this.innerHTML=""}renderInlineFilter(t=this._filterHandle,e=this._filter.label,r=this._filter.filterOptionId,o=!0,l=e){const i=`
9      <div
10        class="
11          boost-filter
12          boost-filter--top-level
13          boost-filter__checkbox
14          boost-filter--inline
15        "
16        data-filter-value="${t==="available-now"?!0:l}"
17        js-boost-filter="${t}"
18        js-boost-option="${r}"
19      >
20        <input
21          class="checkbox__input"
22          id="boost-filter-checkbox-${t}"
23          js-boost-filter="checkbox"
24          name="boost-filter-checkbox-${t}"
25          type="checkbox"
26        >
27
28        <label
29          class="boost-filter__label checkbox__label"
30          for="boost-filter-checkbox-${t}"
31        >
32          ${e}
33        </label>
34      </div>
35    `;return o&&(this.innerHTML=i),i}renderAccordionFilter(){this.innerHTML=`
36      <button
37        class="
38          boost-filter
39          boost-filter--top-level
40          boost-filter--${this._filterHandle}
41        "
42        js-boost-filter="${this._filterHandle}"
43      >
44        <span class="boost-filter__label subtitle-2">
45          ${this._filter.label}
46        </span>
47
48        <span class="boost-filter__icon">
49          ${window.Frame.Boost.icons.expand}
50        </span>
51      </button>
52    `}updateCollectionBrand(t){const e=this._breakpoint==="mobile"?'[js-boost-option="pf_v_brand"]':'[data-filter-option="pf_v_brand"]',r=[...document.querySelectorAll(e)];r.forEach(i=>{i.classList.remove("is-active"),i.classList.add("is-disabled"),i.disabled=!0});const o=r.find(i=>i.dataset.filterValue===t);if(!o)return;o.classList.add("is-active");const l=o.querySelector(".checkbox__input");l&&(l.checked=!0)}renderAccordionContent(){var l,i,n,c;const t=(i=(l=this._filter)==null?void 0:l.manualValues)!=null&&i.length?(n=this._filter)==null?void 0:n.manualValues:(c=this._filter)==null?void 0:c.values,e=document.createElement("div"),r=4;e.setAttribute("js-boost-filter",`panel-${this._filterHandle}`),e.classList.add("boost-filter__accordion","visually-hidden"),e.setAttribute("style",`--column-item-count: ${Math.ceil(t.length/r)}`),t.forEach(a=>{const s=document.createElement("button");s.classList.add("boost-filter__facet","subtitle-2"),s.dataset.filterValue=this._filter.filterType==="collection"?a.handle:(a==null?void 0:a.key)||a,s.dataset.filterParent=this._filterHandle,s.dataset.f
52ilterOption=this._filter.filterOptionId,s.innerHTML=`
53        <span class="boost-filter__facet-icon">
54          ${Frame.Boost.icons.tick}
55        </span>
56        <span class="boost-filter__facet-label">
57          ${this.removeLabelPrefix((a==null?void 0:a.key)||a)}
58        </span>
59      `,s.addEventListener("click",u=>{this.handleFilterClick(u)}),e.insertAdjacentElement("beforeend",s)});const o=document.querySelector('[js-boost-filter-bar="accordion"]');o&&(o.insertAdjacentElement("beforeend",e),this._filter.filterType==="vendor"&&this._filter.values.length===1&&this.updateCollectionBrand(this._filter.values[0].key))}removeLabelPrefix(t){return typeof t!="string"?t.label.replace("Material:","").replace("filter:","").replace("Filter:","").trim():t.replace("Material:","").replace("filter:","").replace("Filter:","").trim()}setMobileEventListeners(){[...this.querySelectorAll('[js-boost-filter="checkbox"]')].forEach(e=>{e.addEventListener("change",r=>{this.handleMobileFilterChange(r)})})}handleMobileFilterChange(t){const e=t.target,r=e.closest(".boost-filter");if(!r)return;const o=r.getAttribute("js-boost-option"),l=r.dataset.filterValue;let i="add";const n=this._filter.selectType==="multiple"||this._filter.filterOptionId==="pf_st_available_now"||this._filter.filterOptionId==="pf_t_available_tag"?`${o}${encodeURIComponent("[]")}`:o;if(r.classList.contains("is-active")?(i="update",r.classList.remove("is-active"),e.checked=!1):(r.classList.add("is-active"),e.checked=!0),this._filter.filterType==="collection"){window.location.href=`/collections/${l}`;return}const c={action:i,requestParam:`${n}=${l.replace(/ /g,"+").replaceAll("&","%26")}`,option:`${n}`,optionValue:l};Frame.EventBus.emit("BoostApi:choices-updated",c)}handleFilterClick(t){const e=t.target;if(!e)return;const r=e.dataset.filterOption,o=e.dataset.filterValue,l=this._filter.selectType==="multiple"?`${r}${encodeURIComponent("[]")}`:r,i=e.classList.contains("is-active")?"update":"add";if(e.classList.toggle("is-active"),this._filter.filterType==="collection"){window.location.href=`/collections/${o}`;return}const n={action:i,requestParam:`${l}=${o.replace(/ /g,"+").replaceAll("&","%26")}`,option:`${l}`,optionValue:o};Frame.EventBus.emit("BoostApi:choices-updated",n)}setAccordionEventListeners(){const t=this.querySelector(`[js-boost-filter="${this._filterHandle}"]`);t&&t.addEventListener("click",()=>this.handleTopLevelToggle())}setInlineEventListeners(){const t=this.querySelector(`[js-boost-filter="${this._filterHandle}"]`),e=t==null?void 0:t.querySelector('[type="checkbox"]');!t||!e||e.addEventListener("input",r=>this.handleInlineFilterToggle(r))}handleTopLevelToggle(){this.openActivePanel(),this.toggleActiveButton()}handleInlineFilterToggle(t){var n,c,a,s;const e=this._filter.filterOptionId,r=t.target.closest(".boost-filter"),o=r.classList.contains("is-active")?"update":"add";let l="";((n=this._filter.values[0])==null?void 0:n.key)==="in-stock"?l=((c=this._filter.manualValues[0])==null?void 0:c.key)==="in-stock"||((a=this._filter.values[0])==null?void 0:a.key)==="in-stock":(((s=this._filter.values[0])==null?void 0:s.key)==="Available"||this._filter.filterOptionId==="pf_t_available_now")&&(l="Available"),r.classList.toggle("is-active");const i={action:o,requestParam:`${e}${encodeURIComponent("[]")}=${l}`,option:`${e}${encodeURIComponent("[]")}`,optionValue:l};Frame.EventBus.emit("BoostApi:choices-updated",i)}openActivePanel(){[...document.querySelectorAll(".boost-filter__accordion")].forEach(e=>{if(e.getAttribute("js-boost-filter")===`panel-${this._filterHandle}`){e.classList.toggle("visually-hidden");return}e.classList.add("visually-hidden")})}toggleActiveButton(){[...document.querySelectorAll(".boost-filter--top-level")].forEach(e=>{if(e.getAttribute("js-boost-filter")===this._filterHandle){e.classList.toggle("is-active");return}e.classList.remove("is-active")})}get filter(){return this._filter}set filter(t){this._filter=t,this._filterHandle=t.label.toLowerCase()}}customElements.define("boost-filter",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.