{
  "version": 3,
  "sources": ["/cdn/shop/t/41/assets/z__jsSidebar.js?country=SA&currency=EUR"],
  "sourcesContent": ["/******/ (() => { // webpackBootstrap\nvar __webpack_exports__ = {};\nwindow.PXUTheme.jsSidebar = {\n  init() {\n    const facetedFilterForm = document.querySelector('[data-faceted-filter-form]');\n\n    if (facetedFilterForm) {\n      facetedFilterForm.addEventListener('change', e => {\n        if (e.target.type === 'number') return;\n        /*\n          We need to ensure search params unrelated to the faceted filtering (eg. sorting or\n          vendors collection) remain in the URL and only the faceted filtering params get updated.\n          In order to do this, instead of submitting the `facetedFilterForm` form, we'll\n          just get the faceted filter params we need from it and add it to the URL ourselves.\n        */\n        const formData = new FormData(facetedFilterForm);\n        const facetedFilterSearchParams = new URLSearchParams(formData);\n        const existingSearchParams = new URLSearchParams(window.location.search);\n        const newSearchParams = new URLSearchParams();\n\n        /*\n          facetedFilterSearchParams.entries() and existingSearchParams.entries() return\n          an iterator, and looping over them using a for-of loop causes an ESLint warning\n          with the current config. Hence, we'll convert them into an array first.\n        */\n        Array.from(facetedFilterSearchParams.entries(), ([key, value]) => {\n          newSearchParams.append(key, value);\n          return null;\n        });\n\n        Array.from(existingSearchParams.entries(), ([key, value]) => {\n          /*\n            Do not set or update key-value pair if key is related to faceted filtering.\n            This is to help prevent unrelated params (eg. sorting) from getting removed.\n          */\n          if (!key.includes('filter.p') && !key.includes('filter.v')) {\n            newSearchParams.append(key, value);\n          }\n          return null;\n        });\n\n        window.location.search = newSearchParams.toString();\n      });\n    }\n\n    const openSidebarBlocks = document.querySelectorAll('[data-sidebar-block__toggle=\"open\"]');\n\n    openSidebarBlocks.forEach(block => {\n      window.PXUTheme.jsSidebar.openSidebarBlock($(block));\n    });\n\n    // eslint-disable-next-line func-names\n    $('[data-has-toggle-option]').on('click', '[data-sidebar-block__toggle=\"closed\"]', function (e) {\n      e.preventDefault();\n      window.PXUTheme.jsSidebar.openSidebarBlock($(this));\n    });\n\n    // eslint-disable-next-line func-names\n    $('[data-has-toggle-option]').on('click', '[data-sidebar-block__toggle=\"open\"]', function (e) {\n      e.preventDefault();\n      window.PXUTheme.jsSidebar.closeSidebarBlock($(this));\n    });\n\n    if ($('[data-product-sidebar]').length) {\n      $('.section--has-sidebar-option').addClass('has-sidebar-enabled');\n      $('.section--has-sidebar-option').removeClass('has-sidebar-disabled');\n    } else {\n      $('.section--has-sidebar-option').removeClass('has-sidebar-enabled');\n      $('.section--has-sidebar-option').addClass('has-sidebar-disabled');\n    }\n  },\n  openSidebarBlock($toggleBtn) {\n    const $parentBlock = $toggleBtn.closest('.sidebar__block');\n\n    $toggleBtn.attr('data-sidebar-block__toggle', 'open');\n\n    $parentBlock.addClass('is-active');\n    $parentBlock.attr('aria-expanded', true);\n    $parentBlock.find('[data-sidebar-block__content--collapsible]').slideDown();\n  },\n  closeSidebarBlock($toggleBtn) {\n    const $parentBlock = $toggleBtn.closest('.sidebar__block');\n\n    $toggleBtn.attr('data-sidebar-block__toggle', 'closed');\n\n    $parentBlock.removeClass('is-active');\n    $parentBlock.attr('aria-expanded', false);\n    $parentBlock.find('[data-sidebar-block__content--collapsible]').slideUp();\n  },\n  unload() {\n    const $toggleBtn = $('[data-sidebar-block__toggle]');\n    $toggleBtn.off();\n  },\n};\n\n/******/ })()\n;"],
  "mappings": "CAAU,IAAM,CAChB,IAAI,oBAAsB,CAAC,EAC3B,OAAO,SAAS,UAAY,CAC1B,MAAO,CACL,MAAM,kBAAoB,SAAS,cAAc,4BAA4B,EAEzE,mBACF,kBAAkB,iBAAiB,SAAU,GAAK,CAChD,GAAI,EAAE,OAAO,OAAS,SAAU,OAOhC,MAAM,SAAW,IAAI,SAAS,iBAAiB,EACzC,0BAA4B,IAAI,gBAAgB,QAAQ,EACxD,qBAAuB,IAAI,gBAAgB,OAAO,SAAS,MAAM,EACjE,gBAAkB,IAAI,gBAO5B,MAAM,KAAK,0BAA0B,QAAQ,EAAG,CAAC,CAAC,IAAK,KAAK,KAC1D,gBAAgB,OAAO,IAAK,K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