PageSourceSearch

https://www.nivea.co.jp/dist/NiveaX/modules/CookiePolicy-CookiePolicy.4180dd8c.js

js nivea.co.jp collected 2026-10-02 16:31:36 UTC 4,622 bytes, 2 lines download raw bytes

1"use strict";(self.NiveaXwebpackJsonp=self.NiveaXwebpackJsonp||[]).push([[5820],{62622:(e,o,t)=>{t.d(o,{A:()=>i});const i=function(e,o){var t=365,i="cookie-policy-accepted",c="LegitimateCookiesDisabled",n="PerformanceCookiesDisabled",r="MarketingCookiesDisabled",p=!1,u=function(){var e=window.location.hostname,o=e.split("."),t=o.length;if(t<=1)return e;if(t<=2)return"."+e;var i=o[t-1],c=o[t-2],n="."+c+"."+i;if(("co"===c||"com"===c||"net"===c||"org"==c)&&t>=3)return"."+o[t-3]+n;return n}();function a(e,o,t){var i=new Date;i.setTime(i.getTime()+24*t*60*60*1e3);var c="expires="+i.toUTCString();document.cookie=e+"="+o+"; "+c+";domain="+u+";path=/",u!=window.location.hostname&&l(e)!=o&&(!function(e,o){document.cookie=e+"="+o+";expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/"}(e,o),document.cookie=e+"="+o+"; "+c+";domain="+u+";path=/")}function l(e){for(var o=e+"=",t=document.cookie.split(";"),i=0;i<t.length;i++){for(var c=t[i];" "===c.charAt(0);)c=c.substring(1);if(-1!==c.indexOf(o))return c.substring(o.length,c.length)}return""}function s(){Array.from(document.querySelectorAll(".bdf-cookie-policy-toggle")).forEach(function(e){"1"===l(e.dataset.cookieName)?(e.checked&&(e.checked=!1),d(e,!1)):(e.checked||(e.checked=!0),d(e,!0))})}function d(e,t){o.onCheckboxChanged&&o.onCheckboxChanged(e,t)}var k;k=function(){if(!p){p=!0;var e=l(i),u=""==e,k=o.confirmationRequired&&"1"!==e,h=o.allowDecline;if(u)document.querySelector(".bdf-cookie-policy-first-time").style.display="block",a(i,"0",t),a(c,o.defaultActive,t),a(n,o.defaultActive,t),a(r,"1",t);else{document.querySelector(".bdf-cookie-policy-first-time").style.display="none";var f=l(c);""==l(n)&&""!=f&&a(n,f,t)}document.querySelector(".bdf-cookie-policy-first-time-and-confirmation-required").style.display=u&&k?"block":"none",document.querySelector(".bdf-cookie-policy-confirmation-required").style.display=k?"block":"none",document.querySelector(".bdf-cookie-close").style.display=!k||h?"block":"none",s(),Array.from(document.querySelectorAll(".bdf-cookie-policy-toggle")).forEach(function(e){var o=e.dataset.cookieName;e.addEventListener("change",function(i){var c=i.currentTarget.checked;a(o,c?"0":"1",t),document.dispatchEvent(new CustomEvent("niveax:cookieToggle",{detail:{cookieName:o,enableCookie:c}})),d(e,c)})}),o.confirmationRequired?"1"!=e&&o.openPopup():""==e&&o.openPopup(),o.setPolicyAccepted&&a(i,"1",t),document.querySelectorAll(".bdf-cookie-policy-accept").forEach(function(e){e.addEventListener("click",function(){a(i,"1",t),a(c,"0",t),a(n,"0",t),a(r,"0",t),s()})}),document.querySelectorAll(".bdf-cookie-policy-change").forEach(function(e){e.addEventListener("click",function(){a(i,"1",t)})}),document.querySelectorAll(".bdf-cookie-close").forEach(function(e){e.addEventListener("click",function(){a(i,"1",t)})})}},"interactive"===document.readyState||"complete"===document.readyState?k():document.addEventListener("DOMContentLoaded",k)}},78944:(e,o,t)=>{t.r(o),t.d(o,{default:()=>p});var i=t(62622),c=t(98684),n=t(45956),r=t(17658);class p{constructor(e=!1){this.cookiePopup=document.querySelector(".nx-cookie-policy-popup"),this.cookiePopupContainer=this.cookiePopup.querySelector(".nx-cookie-policy-popup__container"),this.cookiePopupButtonClose=this.cookiePopup.querySelector(".nx-cookie-policy-popup__close"),this.cookiePopupButtonAccept=this.cookiePopup.querySelector(".bdf-cookie-policy-accept"),this.cookiePopupButtonAdapt=this.cookiePopup.querySelector(".bdf-cookie-policy-change"),this.init(e)}init(e){return this.cookiePopup&&!e&&((0,i.A)(null,{openPopup:()=>{this.CookiePopupOpen()},confirmationRequired:"true"===this.cookiePopup.dataset.confirmationRequired,allowDecline:"true"===this.cookiePopup.dataset.allowDecline,defaultActive:"true"==this.cookiePopup.dataset.default?"0":"1"}),this.cookiePopupClose()),this}CookiePopupOpen(){return this.cookiePopup.classList.add("nx-cookie-policy-popup--show"),n.Ay.dispatch((0,r.w0)()),this}getContainerHeight(){return(0,c.UI)(this.cookiePopupContainer)}cookiePopupCloseEvent(){return this.cookiePopup.classList.remove("nx-cookie-policy-popup--show"),this.cookiePo
1pup.style.height="0px",this.cookiePopup.style.top=this.getContainerHeight()?`-${this.getContainerHeight()+20}px`:"",n.Ay.dispatch((0,r.S2)()),this}cookiePopupClose(){[this.cookiePopupButtonClose,this.cookiePopupButtonAccept,this.cookiePopupButtonAdapt].forEach(e=>{e.addEventListener("click",()=>{this.cookiePopupCloseEvent(),document.dispatchEvent(new CustomEvent("niveax:cookieBannerAccept")),window.scrollBy(0,1)})})}}}}]);
2//# sourceMappingURL=/dist/NiveaX/./modules/CookiePolicy-CookiePolicy.4180dd8c.js.7c3d5571.map

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.