PageSourceSearch

https://www.sweeek.fr/build/7857.0e323867.js

js sweeek.fr collected 2026-10-04 19:39:55 UTC 7,824 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7857],{7857:function(e,t,n){n.r(t),n.d(t,{default:function(){return S}});var r=n(6599),o=n(7469),i=n(6801);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function c(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m(r.key),r)}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function m(e){var t=function(e,t){if("object"!==a(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===a(t)?t:String(t)}var v,b,g,h={},S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(l,e);var t,n,r,a=f(l);function l(){return u(this,l),a.apply(this,arguments)}return t=l,(n=[{key:"connect",value:function(){var e=this.productMarketplaceIdValue,t=this.productSkuValue,n=this.redPriceCommercialOperationValue;if(null!=e&&null!=t&&!n){var r=this;this.getBannerPromise(e,t).then((function(e){if(r.element.innerHTML=e,""!==r.element.innerHTML){var t,n,o,a,l,u;r.element.classList.contains("d-none")&&r.element.classList.remove("d-none"),r.classNameValue&&(u=r.element.classList).add.apply(u,c(r.classNameValue.split(/\s+/)));var s=document.querySelector(".product-tag-big"),d=null!==(t=document.querySelector(".newprice"))&&void 0!==t?t:document.querySelector(".saveprice"),f=null!==(n=document.querySelector("[data-base-price]"))&&void 0!==n&&n.getAttribute("data-base-price")?+(null===(o=document.querySelector("[data-base-price]"))||void 0===o?void 0:o.getAttribute("data-base-price")):0,p=null!==(a=document.querySelector("[data-special-price]"))&&void 0!==a&&a.getAttribute("data-special-price")?+(null===(l=document.querySelector("[data-special-price]"))||void 0===l?void 0:l.getAttribute("data-special-price")):null,y=null!=p?p:f,m=y;if(!s||!d)return;s.innerText.includes("%")?(y*=(100-parseFloat(s.innerText.replace("%","")))/100,document.querySelector(".saveprice")&&(y=m-y)):(s.innerText.includes("$")||s.innerText.includes("€"))&&(y-=parseFloat(s.innerText.replace("€",""))),y=parseFloat(y.toFixed(2));var v="".concat(i.Utilities.getCurrentLocale()).replace("_","-");
1d.innerText+="".concat(y.toLocaleString(v))}else r.element.classList.add("d-none")}))}}},{key:"getBannerPromise",value:function(e,t){return void 0===h[e]&&(h[e]=new Promise((function(n){new o.Ajax({url:"/product/discounts",method:"GET",format:"html",data:{productMarketplaceId:e,productSku:t},successCallback:function(e){n(e)}})}))),h[e]}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Qr);v=S,b="values",g={productMarketplaceId:Number,productSku:String,redPriceCommercialOperation:Boolean,className:String},(b=m(b))in v?Object.defineProperty(v,b,{value:g,enumerable:!0,configurable:!0,writable:!0}):v[b]=g},6801:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Utilities=void 0,t.Utilities={handleFoldingLinks:function(e){void 0===e&&(e="");var n=document.querySelectorAll("".concat(e," .switch")),r="switch-landmark",o="switch-landmark--rotate",i="folding-list-open";if(n)for(var a=function(e){var a=!1;n[e].addEventListener(t.Utilities.getEventType(),(function(){var t=n[e].nextSibling,c=n[e].querySelector(".".concat(r));(a=!a)?c.classList.contains(o)&&t.classList.contains(i)?(c.classList.remove("switch-landmark--rotate"),t.classList.remove(i),t.style.display="none",a=!a):(n[e].classList.contains(r)&&n[e].classList.add(o),c&&c.classList.add(o),t.style.display="block"):(n[e].classList.contains(r)&&n[e].classList.remove(o),c&&c.classList.contains(o)&&c.classList.remove(o),t.style.display="none")}))},c=0;c<n.length;c++)a(c)},getEventType:function(){var e="click";return window.addEventListener("touchstart",(function t(){e="touch",window.removeEventListener("touchstart",t,!1)}),!1),e},getZoomFactor:function(){return parseFloat(window.getComputedStyle(document.getElementsByTagName("html")[0],null).getPropertyValue("zoom"))||parseFloat(window.getComputedStyle(document.getElementsByTagName("html")[0],null).getPropertyValue("scale"))||1},getY:function(){return Math.round(window.pageYOffset/t.Utilities.getZoomFactor())},getCurrentLocale:function(){return document.documentElement.getAttribute("data-locale")},getCurrentLanguage:function(){return this.getCurrentLocale().substring(0,2)},initOpeners:function(){for(var e=document.querySelectorAll(".opener"),n=function(n){e[n].addEventListener(t.Utilities.getEventType(),(function(){var t=document.querySelector(e[n].getAttribute("data-to-open"));t&&(t.style.display="block")}))},r=0;r<e.length;r++)n(r)},initClosers:function(){for(var e=document.querySelectorAll(".closer"),n=function(n){e[n].addEventListener(t.Utilities.getEventType(),(function(){var t=document.querySelector(e[n].getAttribute("data-to-close"));t&&(t.style.display="none")}))},r=0;r<e.length;r++)n(r)},initOpenersClosers:function(){for(var e=document.querySelectorAll(".opener-closer"),n=function(n){e[n].addEventListener(t.Utilities.getEventType(),(function(){var t=document.querySelector(e[n].getAttribute("data-to-open-close"));t&&(t.style.display&&"none"!==t.style.display?(t.style.display="none",e[n].parentElement.classList.remove("open-active")):(t.style.display="block",e[n].parentElement.classList.add("open-active")))}))},r=0;r<e.length;r++)n(r)}},document.addEventListener("DOMContentLoaded",(function(){t.Utilities.initOpeners(),t.Utilities.initClosers(),t.Utilities.initOpenersClosers()}))}}]);

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.