1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([["swag-cms-extensions-listing-extension.plugin"],{998:e=>{var t="%[a-f0-9]{2}",r=RegExp("("+t+")|([^%]+?)","gi"),i=RegExp("("+t+")+","gi");e.exports=function(e){if("string"!=typeof e)throw TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=i.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var s=function(e){try{return decodeURIComponent(e)}catch(n){for(var t=e.match(r)||[],i=1;i<t.length;i++)t=(e=(function e(t,r){try{return[decodeURIComponent(t.join(""))]}catch(e){}if(1===t.length)return t;r=r||1;var i=t.slice(0,r),n=t.slice(r);return Array.prototype.concat.call([],e(i),e(n))})(t,i).join("")).match(r)||[];return e}}(n[0]);s!==n[0]&&(t[n[0]]=s)}n=i.exec(e)}t["%C2"]="�";for(var a=Object.keys(t),o=0;o<a.length;o++){var l=a[o];e=e.replace(RegExp(l,"g"),t[l])}return e}(e)}}},857:e=>{var t=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==r},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(e,t){return!1!==t.clone&&t.isMergeableObject(e)?o(Array.isArray(e)?[]:{},e,t):e}function n(e,t,r){return e.concat(t).map(function(e){return i(e,r)})}function s(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function a(e,t){try{return t in e}catch(e){return!1}}function o(e,r,l){(l=l||{}).arrayMerge=l.arrayMerge||n,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=i;var c,u,h=Array.isArray(r);return h!==Array.isArray(e)?i(r,l):h?l.arrayMerge(e,r,l):(u={},(c=l).isMergeableObject(e)&&s(e).forEach(function(t){u[t]=i(e[t],c)}),s(r).forEach(function(t){(!a(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(a(e,t)&&c.isMergeableObject(r[t])?u[t]=(function(e,t){if(!t.customMerge)return o;var r=t.customMerge(e);return"function"==typeof r?r:o})(t,c)(e[t],r[t],c):u[t]=i(r[t],c))}),u)}o.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,r){return o(e,r,t)},{})},e.exports=o},728:e=>{e.exports=function(e,t){for(var r={},i=Object.keys(e),n=Array.isArray(t),s=0;s<i.length;s++){var a=i[s],o=e[a];(n?-1!==t.indexOf(a):t(a,o,e))&&(r[a]=o)}return r}},742:e=>{e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},940:(e,t,r)=>{let i=r(742),n=r(998),s=r(231),a=r(728),o=e=>null==e,l=Symbol("encodeFragmentIdentifier");function c(e){if("string"!=typeof e||1!==e.length)throw TypeError("arrayFormatSeparator must be single character string")}function u(e,t){return t.encode?t.strict?i(e):encodeURIComponent(e):e}function h(e,t){return t.decode?n(e):e}function d(e){let t=e.indexOf("#");return -1!==t&&(e=e.slice(0,t)),e}function p(e){let t=(e=d(e)).indexOf("?");return -1===t?"":e.slice(t+1)}function f(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):t.parseBooleans&&null!==e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())&&(e="true"===e.toLowerCase()),e}function g(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);let r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,i)=>{if(t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),!t){i[e]=r;return}void 0===i[e]&&(i[e]={}),i[e][t[1]]=r};case"bracket":return(e,r,i)=>{if(t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),!t){i[e]=r;return}if(void 0===i[e]){i[e]=[r];return}i[e]=[].concat(i[e],r)};case"colon-list-separator":return(e,r,i)=>{if(t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),!t){i[e]=r;return}if(void 0===i[e]){i[e]=[r];return}i[e]=[].concat(i[e],r)};case"comma":case"separator":return(t,r,i)=>{let n="string"==typeof r&&r.includes(e.arrayFormatSeparator),s="string"==typeof r&&!n&&h(r,e).includes(e.arrayFormatSeparator);r=s?h(r,e):r;let a=n||s?r.split(e.arrayFormatSeparator).map(t=>h(t,e)):null===r?r:h(r,e);i[t]=a};case"bracket-separator":return(t,r,i)=>{let n=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!n){i[t]=r?h(r,e):r;return}let s=null===r?[]:r.split(e.arrayFormatSeparator).map(t=>h(t,e));if(void 0===i[t]){i[t]=s;return}i[t]=[].concat(i[t],s)};default:return(e,t,r)=>{if(void 0===r[e]){r[e]=t;return}r[e]=[].concat(r[e],t)}}}(t),i=Object.create(null);if("string"!=typeof e||!(e=e.trim().replace(/^[?#&]/,"")))return i;for(let n of e.split("&")){if(""===n)continue;let[e,a]=s(t.decode?n.replace(/\+/g," "):n,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:h(a,t),r(h(e,t),a,i)}for(let e of Object.keys(i)){let r=i[e];if("object"==typeof r&&null!==r)for(let e of Object.keys(r))r[e]=f(r[e],t);else i[e]=f(r,t)}return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce((e,t)=>
1{let r=i[t];return r&&"object"==typeof r&&!Array.isArray(r)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(r):e[t]=r,e},Object.create(null))}t.extract=p,t.parse=g,t.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);let r=r=>t.skipNull&&o(e[r])||t.skipEmptyString&&""===e[r],i=function(e){switch(e.arrayFormat){case"index":return t=>(r,i)=>{let n=r.length;return void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:null===i?[...r,[u(t,e),"[",n,"]"].join("")]:[...r,[u(t,e),"[",u(n,e),"]=",u(i,e)].join("")]};case"bracket":return t=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:null===i?[...r,[u(t,e),"[]"].join("")]:[...r,[u(t,e),"[]=",u(i,e)].join("")];case"colon-list-separator":return t=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:null===i?[...r,[u(t,e),":list="].join("")]:[...r,[u(t,e),":list=",u(i,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(i,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?i:(n=null===n?"":n,0===i.length)?[[u(r,e),t,u(n,e)].join("")]:[[i,u(n,e)].join(e.arrayFormatSeparator)]}default:return t=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:null===i?[...r,u(t,e)]:[...r,[u(t,e),"=",u(i,e)].join("")]}}(t),n={};for(let t of Object.keys(e))r(t)||(n[t]=e[t]);let s=Object.keys(n);return!1!==t.sort&&s.sort(t.sort),s.map(r=>{let n=e[r];return void 0===n?"":null===n?u(r,t):Array.isArray(n)?0===n.length&&"bracket-separator"===t.arrayFormat?u(r,t)+"[]":n.reduce(i(r),[]).join("&"):u(r,t)+"="+u(n,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>
1{t=Object.assign({decode:!0},t);let[r,i]=s(e,"#");return Object.assign({url:r.split("?")[0]||"",query:g(p(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:h(i,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0,[l]:!0},r);let i=d(e.url).split("?")[0]||"",n=t.extract(e.url),s=Object.assign(t.parse(n,{sort:!1}),e.query),a=t.stringify(s,r);a&&(a="?".concat(a));let o=function(e){let t="",r=e.indexOf("#");return -1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(o="#".concat(r[l]?u(e.fragmentIdentifier,r):e.fragmentIdentifier)),"".concat(i).concat(a).concat(o)},t.pick=(e,r,i)=>{i=Object.assign({parseFragmentIdentifier:!0,[l]:!1},i);let{url:n,query:s,fragmentIdentifier:o}=t.parseUrl(e,i);return t.stringifyUrl({url:n,query:a(s,r),fragmentIdentifier:o},i)},t.exclude=(e,r,i)=>{let n=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return t.pick(e,n,i)}},231:e=>{e.exports=(e,t)=>{if(!("string"==typeof e&&"string"==typeof t))throw TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];let r=e.indexOf(t);return -1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},610:(e,t,r)=>{r.d(t,{Z:()=>i});class i{static debounce(e,t){let r,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){for(var n=arguments.length,s=Array(n),a=0;a<n;a++)s[a]=arguments[a];i&&!r&&setTimeout(e.bind(e,...s),0),clearTimeout(r),r=setTimeout(e.bind(e,...s),t)}}}},49:(e,t,r)=>{r.d(t,{Z:()=>n});var i=r(140);class n{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!n.isNode(e))throw Error("The element must be a valid HTML Node!");return"function"==typeof e.hasAttribute&&e.hasAttribute(t)}static getAttribute(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!1===n.hasAttribute(e,t))throw Error('The required property "'.concat(t,'" does not exist!'));if("function"!=typeof e.getAttribute){if(r)throw Error("This node doesn't support the getAttribute function!");return}return e.getAttribute(t)}static getDataAttribute(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],s=t.replace(/^data(|-)/,""),a=i.Z.toLowerCamelCase(s,"-");if(!n.isNode(e)){if(r)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===e.dataset){if(r)throw Error("This node doesn't support the dataset attribute!");return}let o=e.dataset[a];if(void 0===o){if(r)throw Error('The required data attribute "'.concat(t,'" does not exist on ').concat(e,"!"));return o}return i.Z.parsePrimitive(o)}static querySelector(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!n.isNode(e))throw Error("The parent node is not a valid HTML Node!");let i=e.querySelector(t)||!1;if(r&&!1===i)throw Error('The required element "'.concat(t,'" does not exist in parent node!'));return i}static querySelectorAll(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!n.isNode(e))throw Error("The parent node is not a valid HTML Node!");let i=e.querySelectorAll(t);if(0===i.length&&(i=!1),r&&!1===i)throw Error('At least one item of "'.concat(t,'" must exist in parent node!'));return i}static getFocusableElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return e.querySelectorAll('\n input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),\n select:not([tabindex^="-"]):not([disabled]),\n textarea:not([tabindex^="-"]):not([disabled]),\n button:not([tabindex^="-"]):not([disabled]),\n a[href]:not([tabindex^="-"]):not([disabled]),\n [tabindex]:not([tabindex^="-"]):not([disabled])\n ')}static getFirstFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(e)[0]}static getLastFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=this.getFocusableElements(e);return t[t.length-1]}}},830:(e,t,r)=>{r.d(t,{Z:()=>i});class i{publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new CustomEvent(e,{detail:t,cancelable:r});return this.el.dispatchEvent(i),i}subscribe(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,n=e.split("."),s=r.scope?t.bind(r.scope):t;if(r.once&&!0===r.once){let t=s;s=function(r){i.unsubscribe(e),t(r)}}return this.el.addEventListener(n[0],s),this.listeners.push({splitEventName:n,opts:r,cb:s}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,r)=>([...r.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(r.splitEventName[0],r.cb):e.push(r),e),[]),!0}
1reset(){return this.listeners.forEach(e=>{this.el.removeEventListener(e.splitEventName[0],e.cb)}),this.listeners=[],!0}get el(){return this._el}set el(e){this._el=e}get listeners(){return this._listeners}set listeners(e){this._listeners=e}constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}}},266:(e,t,r)=>{r.d(t,{Z:()=>i});class i{static iterate(e,t){if(e instanceof Map||Array.isArray(e))return e.forEach(t);if(e instanceof FormData){for(var r of e.entries())t(r[1],r[0]);return}if(e instanceof NodeList)return e.forEach(t);if(e instanceof HTMLCollection)return Array.from(e).forEach(t);if(e instanceof Object)return Object.keys(e).forEach(r=>{t(e[r],r)});throw Error("The element type ".concat(typeof e," is not iterable!"))}}},140:(e,t,r)=>{r.d(t,{Z:()=>i});class i{static ucFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}static lcFirst(e){return e.charAt(0).toLowerCase()+e.slice(1)}static toDashCase(e){return e.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(e,t){let r=i.toUpperCamelCase(e,t);return i.lcFirst(r)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>i.ucFirst(e.toLowerCase())).join(""):i.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}},568:(e,t,r)=>{r.d(t,{Z:()=>l});var i=r(857),n=r.n(i),s=r(49),a=r(140),o=r(830);class l{init(){throw Error('The "init" method for the plugin "'.concat(this._pluginName,'" is not defined.'))}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(e){let t=a.Z.toDashCase(this._pluginName),r=s.Z.getDataAttribute(this.el,"data-".concat(t,"-config"),!1),i=s.Z.getAttribute(this.el,"data-".concat(t,"-options"),!1),o=[this.constructor.options,this.options,e];r&&o.push(window.PluginConfigManager.get(this._pluginName,r));try{i&&o.push(JSON.parse(i))}catch(e){throw console.error(this.el),Error('The data attribute "data-'.concat(t,'-options" could not be parsed to json: ').concat(e.message))}return n().all(o.filter(e=>e instanceof Object&&!(e instanceof Array)).map(e=>e||{}))}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(e){return e||(e=this.constructor.name),e}constructor(e,t={},r=!1){if(!s.Z.isNode(e))throw Error("There is no valid element given.");this.el=e,this.$emitter=new o.Z(this.el),this._pluginName=this._getPluginName(r),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}}},107:(e,t,r)=>{r.d(t,{Z:()=>i});class i{get(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",i=this._createPreparedRequest("GET",e,r);return this._sendRequest(i,null,t)}post(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(t,i);let n=this._createPreparedRequest("POST",e,i);return this._sendRequest(n,t,r)}delete(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(t,i);let n=this._createPreparedRequest("DELETE",e,i);return this._sendRequest(n,t,r)}patch(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(t,i);let n=this._createPreparedRequest("PATCH",e,i);return this._sendRequest(n,t,r)}
1abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(e){this._errorHandlingInternal=e}_registerOnLoaded(e,t){t&&(!0===this._errorHandlingInternal?(e.addEventListener("load",()=>{t(e.responseText,e)}),e.addEventListener("abort",()=>{console.warn("the request to ".concat(e.responseURL," was aborted"))}),e.addEventListener("error",()=>{console.warn("the request to ".concat(e.responseURL," failed with status ").concat(e.status))}),e.addEventListener("timeout",()=>{console.warn("the request to ".concat(e.responseURL," timed out"))})):e.addEventListener("loadend",()=>{t(e.responseText,e)}))}_sendRequest(e,t,r){return this._registerOnLoaded(e,r),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,r){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),r&&this._request.setRequestHeader("Content-type",r),this._request}constructor(){this._request=null,this._errorHandlingInternal=!1}}},373:(e,t,r)=>{r.r(t),r.d(t,{SWAG_CMS_EXTENSIONS_LISTING_EXTENSION:()=>O,default:()=>S});var i=r(568),n=r(107),s=r(266),a=r(49),o=r(940);let l=Object.freeze(new class{replaceFromMarkup(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=e;"string"==typeof i&&(i=this._createMarkupFromString(i)),"string"==typeof t&&(t=[t]),this._replaceSelectors(i,t,r)}replaceElement(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];return("string"==typeof e&&(e=a.Z.querySelectorAll(document,e,r)),"string"==typeof t&&(t=a.Z.querySelectorAll(document,t,r)),e instanceof NodeList&&t instanceof NodeList&&t.length>e.length)?(s.Z.iterate(t,t=>{s.Z.iterate(e,e=>{e.innerHTML&&e.className===t.className&&(t.innerHTML=e.innerHTML)})}),!0):e instanceof NodeList?(s.Z.iterate(e,(e,r)=>{e.innerHTML&&(t[r].innerHTML=e.innerHTML)}),!0):t instanceof NodeList?(s.Z.iterate(t,t=>{e.innerHTML&&(t.innerHTML=e.innerHTML)}),!0):!!t&&!!e&&!!e.innerHTML&&(t.innerHTML=e.innerHTML,!0)}_replaceSelectors(e,t,r){s.Z.iterate(t,t=>{let i=a.Z.querySelectorAll(e,t,r),n=a.Z.querySelectorAll(document,t,r);this.replaceElement(i,n,r)})}_createMarkupFromString(e){return this._domParser.parseFromString(e,"text/html")}constructor(){this._domParser=new DOMParser}});class c{static replaceFromMarkup(e,t,r){l.replaceFromMarkup(e,t,r)}static replaceElement(e,t,r){return l.replaceElement(e,t,r)}}function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e}).apply(this,arguments)}function h(e){return"/"===e.charAt(0)}function d(e,t){for(var r=t,i=r+1,n=e.length;i<n;r+=1,i+=1)e[r]=e[i];e.pop()}let p=function(e,t){void 0===t&&(t="");var r,i=e&&e.split("/")||[],n=t&&t.split("/")||[],s=e&&h(e),a=t&&h(t),o=s||a;if(e&&h(e)?n=i:i.length&&(n.pop(),n=n.concat(i)),!n.length)return"/";if(n.length){var l=n[n.length-1];r="."===l||".."===l||""===l}else r=!1;for(var c=0,u=n.length;u>=0;u--){var p=n[u];"."===p?d(n,u):".."===p?(d(n,u),c++):c&&(d(n,u),c--)}if(!o)for(;c--;c)n.unshift("..");o&&""!==n[0]&&(!n[0]||!h(n[0]))&&n.unshift("");var f=n.join("/");return r&&"/"!==f.substr(-1)&&(f+="/"),f};function f(e,t,r,i){var n,s,a,o,l,c;"string"==typeof e?(a="",o="",-1!==(l=(s=e||"/").indexOf("#"))&&(o=s.substr(l),s=s.substr(0,l)),-1!==(c=s.indexOf("?"))&&(a=s.substr(c),s=s.substr(0,c)),(n={pathname:s,search:"?"===a?"":a,hash:"#"===o?"":o}).state=t):(void 0===(n=u({},e)).pathname&&(n.pathname=""),n.search?"?"!==n.search.charAt(0)&&(n.search="?"+n.search):n.search="",n.hash?"#"!==n.hash.charAt(0)&&(n.hash="#"+n.hash):n.hash="",void 0!==t&&void 0===n.state&&(n.state=t));try{n.pathname=decodeURI(n.pathname)}catch(e){if(e instanceof URIError)throw URIError('Pathname "'+n.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.');throw e}return r&&(n.key=r),i?n.pathname?"/"!==n.pathname.charAt(0)&&(n.pathname=p(n.pathname,i.pathname)):n.pathname=i.pathname:n.pathname||(n.pathname="/"),n}var g=!!("undefined"!=typeof window&&window.document&&window.document.createElement);function m(e,t){t(window.confirm(e))}var y="popstate",b="hashchange";function v(){try{return window.history.state||{}}catch(e){return{}}}var L=r(857),_=r.n(L);let w=Object.freeze(new class{getLocation(){return this._history.location}listen(e){return this._history.listen(e)}unlisten(e){e()}push(e,t,r){this._history.push({pathname:e,search:t,state:r})}replace(e,t,r){this._history.replace({pathname:e,search:t,state:r})}pushParams(e,t){let r=this.getLocation().pathname,i=o.parse(location.search),n=o.stringify(_()(i,e));this.push(r,n,t)}replaceParams(e,t){let r=this.getLocation().pathname,i=o.parse(location.search),n=o.stringify(_()(i,e));this.replace(r,n,t)}getSearch(){return this._history.location.search}constructor(){this._history=function(e){void 0===e&&(e={}),g||function(e,t){if(!e)throw Error("Invariant failed")}(!1);var t,r,i,n,s,a=window.history,o=(s=window.navigator.userAgent,(!(-1!==s.indexOf("Android 2.")||-1!==s.indexOf("Android 4.0"))||-1===s.indexOf("Mobile Safari")||-1!==s.indexOf("Chrome")||-1!==s.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history),l=-1!==window.navigator.userAgent.indexOf("Trident"),c=e,h=c.forceRefresh,d=void 0!==h&&h,p=c.getUserConfirmation,L=void 0===p?m:p,_=c.keyLength,w=void 0===_?6:_,E=e.basename?"/"===(r="/"===(t=e.basename).charAt(0)?t:"/"+t).charAt(r.length-1)?r.slice(0,-1):r:"";function F(e){var t,r,i=e||{},n=i.key,s=i.state,a=window.location,o=a.pathname+a.search+a.hash;return E&&(t=o,r=E,o=0===t.toLowerCase().indexOf(r.toLowerCase())&&-1!=="/?#".indexOf(t.charAt(r.length))?t.substr(r.length):t),f(o,s,n)}function A(){return Math.random().toString(36).substr(2,w)}var O=(i=null,n=[],{setPrompt:function(e){return i=e,function(){i===e&&(i=null)}},confirmTransitionTo:function(e,t,r,n){if(null!=i){var s="function"==typeof i?i(e,t):i;"string"==typeof s?"function"==typeof r?r(s,n):n(!0):n(!1!==s)}else n(!0)},appendListener:function(e){var t=!0;function r(){t&&e.apply(void 0,arguments)}return n.push(r),function(){t=!1,n=n.filter(function(e){return e!==r})}},notifyListeners:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];
1n.forEach(function(e){return e.apply(void 0,t)})}});function S(e){u(H,e),H.length=a.length,O.notifyListeners(H.location,H.action)}function P(e){void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")||R(F(e.state))}function C(){R(F(v()))}var j=!1;function R(e){j?(j=!1,S()):O.confirmTransitionTo(e,"POP",L,function(t){var r,i,n,s;t?S({action:"POP",location:e}):(r=H.location,-1===(i=k.indexOf(r.key))&&(i=0),-1===(n=k.indexOf(e.key))&&(n=0),(s=i-n)&&(j=!0,N(s)))})}var T=F(v()),k=[T.key];function x(e){var t,r,i,n;return E+(t=e.pathname,r=e.search,i=e.hash,n=t||"/",r&&"?"!==r&&(n+="?"===r.charAt(0)?r:"?"+r),i&&"#"!==i&&(n+="#"===i.charAt(0)?i:"#"+i),n)}function N(e){a.go(e)}var q=0;function M(e){1===(q+=e)&&1===e?(window.addEventListener(y,P),l&&window.addEventListener(b,C)):0===q&&(window.removeEventListener(y,P),l&&window.removeEventListener(b,C))}var I=!1,H={length:a.length,action:"POP",location:T,createHref:x,push:function(e,t){var r="PUSH",i=f(e,t,A(),H.location);O.confirmTransitionTo(i,r,L,function(e){if(e){var t=x(i),n=i.key,s=i.state;if(o){if(a.pushState({key:n,state:s},null,t),d)window.location.href=t;else{var l=k.indexOf(H.location.key),c=k.slice(0,l+1);c.push(i.key),k=c,S({action:r,location:i})}}else window.location.href=t}})},replace:function(e,t){var r="REPLACE",i=f(e,t,A(),H.location);O.confirmTransitionTo(i,r,L,function(e){if(e){var t=x(i),n=i.key,s=i.state;if(o){if(a.replaceState({key:n,state:s},null,t),d)window.location.replace(t);else{var l=k.indexOf(H.location.key);-1!==l&&(k[l]=i.key),S({action:r,location:i})}}else window.location.replace(t)}})},go:N,goBack:function(){N(-1)},goForward:function(){N(1)},block:function(e){void 0===e&&(e=!1);var t=O.setPrompt(e);return I||(M(1),I=!0),function(){return I&&(I=!1,M(-1)),t()}},listen:function(e){var t=O.appendListener(e);return M(1),function(){M(-1),t()}}};return H}()}});class E{static getLocation(){return w.getLocation()}static listen(e){w.listen(e)}static unlisten(e){w.unlisten(e)}static push(e,t,r){w.push(e,t,r)}static replace(e,t){w.replace(e,t)}static pushParams(e,t){w.pushParams(e,t)}static replaceParams(e,t){w.replaceParams(e,t)}static getSearch(){return w.getSearch()}}var F=r(610);class A extends i.Z{init(){this._registry=[],this.httpClient=new n.Z,this._urlFilterParams=o.parse(E.getSearch()),this._filterPanel=a.Z.querySelector(document,this.options.filterPanelSelector,!1),this._filterPanelActive=!!this._filterPanel,this._filterPanelActive&&(this._showResetAll=!1,this.activeFilterContainer=a.Z.querySelector(document,this.options.activeFilterContainerSelector),this.ariaLiveContainer=a.Z.querySelector(document,this.options.ariaLiveSelector,!1)),this._cmsProductListingWrapper=a.Z.querySelector(document,this.options.cmsProductListingWrapperSelector,!1),this._cmsProductListingWrapperActive=!!this._cmsProductListingWrapper,this._allFiltersInitializedDebounce=F.Z.debounce(this.sendDisabledFiltersRequest.bind(this),100),this._registerEvents()}refreshRegistry(){let e=this._registry.filter(e=>document.body.contains(e.el));this.init(),this._registry=e,window.PluginManager.initializePlugins()}changeListing(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._buildRequest(e,t),this._filterPanelActive&&this._buildLabels()}registerFilter(e){this._registry.push(e),this._setFilterState(e),this.options.disableEmptyFilter&&this._allFiltersInitializedDebounce()}_setFilterState(e){Object.keys(this._urlFilterParams).length>0&&"function"==typeof e.setValuesFromUrl&&e.setValuesFromUrl(this._urlFilterParams)&&this._filterPanelActive&&(this._showResetAll=!0,this._buildLabels())}deregisterFilter(e){this._registry=this._registry.filter(t=>t!==e)}_fetchValuesOfRegisteredFilters(){let e={};return this._registry.forEach(t=>{let r=t.getValues();Object.keys(r).forEach(t=>{Object.prototype.hasOwnProperty.call(e,t)?Object.values(r[t]).forEach(r=>{e[t].push(r)}):e[t]=r[t]})}),e}_mapFilters(e){let t={};return Object.keys(e).forEach(r=>{let i=e[r];Array.isArray(i)&&(i=i.join("|")),"".concat(i).length&&(t[r]=i)}),t}_buildRequest(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this._fetchValuesOfRegisteredFilters(),i=this._mapFilters(r);this._filterPanelActive&&(this._showResetAll=!!Object.keys(i).length),this.options.params&&Object.keys(this.options.params).forEac
1h(e=>{i[e]=this.options.params[e]}),Object.entries(t).forEach(e=>{let[t,r]=e;i[t]=r});let n=o.stringify(i);this.sendDataRequest(n),delete i.slots,delete i["no-aggregations"],delete i["reduce-aggregations"],delete i["only-aggregations"],n=o.stringify(i),e&&this._updateHistory(n),this.options.scrollTopListingWrapper&&this._scrollTopOfListing()}_scrollTopOfListing(){let e=this._cmsProductListingWrapper.getBoundingClientRect();if(e.top>=0)return;let t=e.top+window.scrollY-this.options.scrollOffset;window.scrollTo({top:t,behavior:"smooth"})}_getDisabledFiltersParamsFromParams(e){let t=Object.assign({},{"only-aggregations":1,"reduce-aggregations":1},e);return delete t.p,delete t.order,delete t["no-aggregations"],t}_updateHistory(e){E.push(E.getLocation().pathname,e,{})}_buildLabels(){let e="";this._registry.forEach(t=>{let r=t.getLabels();r.length&&r.forEach(t=>{e+=this.getLabelTemplate(t)})}),this.activeFilterContainer.innerHTML=e;let t=a.Z.querySelectorAll(this.activeFilterContainer,".".concat(this.options.activeFilterLabelRemoveClass),!1);e.length&&(this._registerLabelEvents(t),this.createResetAllButton())}_registerLabelEvents(e){s.Z.iterate(e,e=>{e.addEventListener("click",()=>this.resetFilter(e))})}createResetAllButton(){this.activeFilterContainer.insertAdjacentHTML("beforeend",this.getResetAllButtonTemplate());let e=a.Z.querySelector(this.activeFilterContainer,this.options.resetAllFilterButtonSelector);e.removeEventListener("click",this.resetAllFilter.bind(this)),e.addEventListener("click",this.resetAllFilter.bind(this)),this._showResetAll||e.remove()}resetFilter(e){this._registry.forEach(t=>{t.reset(e.dataset.id)}),this._buildRequest(),this._buildLabels()}resetAllFilter(){this._registry.forEach(e=>{e.resetAll()}),this._buildRequest(),this._buildLabels()}getLabelTemplate(e){return'\n <span class="'.concat(this.options.activeFilterLabelClass,'">\n ').concat(this.getLabelPreviewTemplate(e),'\n <span aria-hidden="true">').concat(e.label,'</span>\n <button class="').concat(this.options.activeFilterLabelRemoveClass,'"\n data-id="').concat(e.id,'"\n aria-label="').concat(this.options.snippets.removeFilterAriaLabel,": ").concat(e.label,'">\n ×\n </button>\n </span>\n ')}getLabelPreviewTemplate(e){let t=this.options.activeFilterLabelPreviewClass;return e.previewHex?'\n <span class="'.concat(t,'" style="background-color: ').concat(e.previewHex,';"></span>\n '):e.previewImageUrl?'\n <span class="'.concat(t,'" style="background-image: url(\'').concat(e.previewImageUrl,"');\"></span>\n "):""}getResetAllButtonTemplate(){return'\n <button class="'.concat(this.options.resetAllFilterButtonClasses,'" aria-label="').concat(this.options.snippets.resetAllFiltersAriaLabel,'">\n ').concat(this.options.snippets.resetAllButtonText,"\n </button>\n ")}addLoadingIndicatorClass(){this._filterPanel.classList.add(this.options.loadingIndicatorClass)}removeLoadingIndicatorClass(){this._filterPanel.classList.remove(this.options.loadingIndicatorClass)}addLoadingElementLoaderClass(){this._cmsProductListingWrapper.classList.add(this.options.loadingElementLoaderClass)}removeLoadingElementLoaderClass(){this._cmsProductListingWrapper.classList.remove(this.options.loadingElementLoaderClass)}sendDataRequest(e){this._filterPanelActive&&this.addLoadingIndicatorClass(),this._cmsProductListingWrapperActive&&this.addLoadingElementLoaderClass(),this.options.disableEmptyFilter&&this.sendDisabledFiltersRequest(),this.httpClient.get("".concat(this.options.dataUrl,"?").concat(e),e=>{this.renderResponse(e),this._filterPanelActive&&(this.removeLoadingIndicatorClass(),this._updateAriaLive()),this._cmsProductListingWrapperActive&&this.removeLoadingElementLoaderClass()})}sendDisabledFiltersRequest(){let e=this._fetchValuesOfRegisteredFilters(),t=this._mapFilters(e);this.options.params&&Object.keys(this.options.params).forEach(e=>{t[e]=this.options.params[e]}),this._allFiltersInitializedDebounce=()=>{};let r=this._getDisabledFiltersParamsFromParams(t);this.httpClient.get("".concat(this.options.filterUrl,"?").concat(o.stringify(r)),e=>{let t=JSON.parse(e);
1this._registry.forEach(e=>{"function"==typeof e.refreshDisabledState&&e.refreshDisabledState(t,r)})})}renderResponse(e){c.replaceFromMarkup(e,this.options.cmsProductListingSelector,!1),this._registry.forEach(e=>{"function"==typeof e.afterContentChange&&e.afterContentChange()}),window.PluginManager.initializePlugins(),this.$emitter.publish("Listing/afterRenderResponse",{response:e})}_updateAriaLive(){if(!this.options.ariaLiveUpdates||!this.ariaLiveContainer)return;let e=this.el.querySelector(this.options.cmsProductListingResultsSelector);this.ariaLiveContainer.innerHTML=e.dataset.ariaLiveText}_registerEvents(){window.onpopstate=this._onWindowPopstate.bind(this)}_onWindowPopstate(){this.refreshRegistry(),this._registry.forEach(e=>{0===Object.keys(this._urlFilterParams).length&&(this._urlFilterParams.p=1),this._setFilterState(e)}),this.options.disableEmptyFilter&&this._allFiltersInitializedDebounce(),this.changeListing(!1)}}A.options={dataUrl:"",filterUrl:"",params:{},filterPanelSelector:".filter-panel",cmsProductListingSelector:".cms-element-product-listing",cmsProductListingWrapperSelector:".cms-element-product-listing-wrapper",cmsProductListingResultsSelector:".js-listing-wrapper",activeFilterContainerSelector:".filter-panel-active-container",activeFilterLabelClass:"filter-active",activeFilterLabelRemoveClass:"filter-active-remove",activeFilterLabelPreviewClass:"filter-active-preview",resetAllFilterButtonClasses:"filter-reset-all btn btn-sm btn-outline-danger",resetAllFilterButtonSelector:".filter-reset-all",loadingIndicatorClass:"is-loading",loadingElementLoaderClass:"has-element-loader",ariaLiveSelector:".filter-panel-aria-live",ariaLiveUpdates:!0,disableEmptyFilter:!1,snippets:{resetAllButtonText:"Reset all",resetAllFiltersAriaLabel:"Reset all filters",removeFilterAriaLabel:"Remove filter"},scrollTopListingWrapper:!0,scrollOffset:15};let O={EVENT:{RENDER_RESPONSE:"SwagCmsExtensionsListingPluginRenderResponse"}};class S extends A{renderResponse(e){super.renderResponse(e),this.$emitter.publish(O.EVENT.RENDER_RESPONSE)}}}}]);
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.