PageSourceSearch

https://www.huge.co.jp/cnt_common/js/top.js

js huge.co.jp collected 2026-09-29 16:32:16 UTC 8,544 bytes, 2 lines download raw bytes

1(a=>{const c="is-visible",b=(let=newsSlider=null,()=>{if(newsSlider&&(newsSlider.destroy(),newsSlider=null),document.querySelector(".js-top-news-slider")){(newsSlider=new Splide(".js-top-news-slider",{type:"loop",interval:5e3,arrows:!0,fixedWidth:288,pagination:!1,gap:40,speed:800,breakpoints:{1024:{gap:16,fixedWidth:220}}})).on("overflow",e=>{newsSlider.go(0),newsSlider.options={arrows:e,drag:e,clones:e?void 0:0}}),newsSlider.mount();var e=document.querySelectorAll("._newsLink");!1===newsSlider.n.arrows?e.forEach(e=>e.classList.add("off-splide")):e.forEach(e=>e.classList.remove("off-splide"));const o=document.querySelector(".js-top-news-slider .splide__counter .current");var e=document.querySelector(".js-top-news-slider .splide__counter .total"),t=newsSlider.Components.Slides.getLength(!0);const r=String(t).length;function n(e,t){return String(e).padStart(t,"0")}e.textContent=t,o.textContent=n(newsSlider.index+1,r),newsSlider.on("move",function(e){o.textContent=n(e+1,r)}),a.matchHeight(),d()}}),d=()=>{gsap.registerPlugin(ScrollTrigger);let e=gsap.matchMedia();const t=()=>{ScrollTrigger.getAll().forEach(e=>e.kill(!0)),e.add("(max-width: 1024px)",()=>{ScrollTrigger.create({trigger:".top-contents06",pin:".top-contents06 ._vis",start:"top top",end:"bottom 358px",scrub:!0,invalidateOnRefresh:!0,pinSpacing:!1}),ScrollTrigger.create({trigger:".top-contents01",start:"top bottom",end:"bottom center",scrub:!0,onUpdate:e=>{const n=e.progress;const o=[255,255,255];e=[244,240,234].map((e,t)=>Math.round(e+(o[t]-e)*n));document.body.style.backgroundColor=`rgb(${e.join(",")})`}}),ScrollTrigger.create({trigger:".top-contents05",start:"top center",end:"bottom center",scrub:!0,onUpdate:e=>{const n=e.progress;const o=[244,240,234];e=[255,255,255].map((e,t)=>Math.round(e+(o[t]-e)*n));document.querySelector(".top-contents04").style.backgroundColor=`rgb(${e.join(",")})`,document.querySelector(".top-contents05").style.backgroundColor=`rgb(${e.join(",")})`,document.querySelector(".top-contents06").style.backgroundColor=`rgb(${e.join(",")})`}})}),e.add("(min-width: 1025px)",()=>{ScrollTrigger.create({trigger:".top-contents03",pin:"._leftContent",start:"top top",end:()=>{return"+="+(e=document.querySelector(".top-contents03 ._rightContent"),t=document.querySelector(".top-contents03 ._leftContent ._pin"),e&&t?""+(e.offsetHeight-t.offsetHeight):"340px");var e,t},scrub:!0,invalidateOnRefresh:!0}),ScrollTrigger.create({trigger:".top-contents06",pin:".top-contents06 ._vis",start:"top top",end:()=>{return"bottom "+((e=document.querySelector(".top-contents06 ._vis"))?e.offsetHeight+"px":"358px");var e},scrub:!0,invalidateOnRefresh:!0,pinSpacing:!1}),ScrollTrigger.create({trigger:".top-contents01",start:"top bottom",end:"bottom center",scrub:!0,onUpdate:e=>{const n=e.progress;const o=[255,255,255];e=[244,240,234].map((e,t)=>Math.round(e+(o[t]-e)*n));document.body.style.backgroundColor=`rgb(${e.join(",")})`}}),ScrollTrigger.create({trigger:".top-contents05",start:"top center",end:"bottom center",scrub:!0,onUpdate:e=>{const n=e.progress;const o=[244,240,234];e=[255,255,255].map((e,t)=>Math.round(e+(o[t]-e)*n));document.querySelector(".top-contents04").style.backgroundColor=`rgb(${e.join(",")})`,document.querySelector(".top-contents05").style.backgroundColor=`rgb(${e.join(",")})`,document.querySelector(".top-contents06").style.backgroundColor=`rgb(${e.join(",")})`}})})};t();let n;window.addEventListener("resize",()=>{clearTimeout(n),n=setTimeout(()=>{ScrollTrigger.getAll().forEach(e=>e.kill()),t(),ScrollTrigger.refresh()},1e3)})},p=async e=>{let t;const h=location.pathname.startsWith("/en/");t=h?e&&""!==e?"/ajax/en/a1_lastest_news/list.json?p_category="+e:"/ajax/en/a1_lastest_news/list.json":e&&""!==e?"/ajax/a1_lastest_news/list.json?p_category="+e:"/ajax/a1_lastest_news/list.json";let y=await fetch("/cnt_common/js/html/news-list.html").then(e=>e.text());const w=document.querySelector(".rt_inc_common_news_href")?.getAttribute("href");fetch(t).then(e=>e.json()).then(e=>{var c=e.rt_bn_news_list;if(c.length){e=document.querySelector(".js-top-news-slider");e&&(t=e.querySelector(".splide__list"))&&(t.innerHTML="");let i="";for(let s=0;s<c.length;s++){let e="#",t="_self",n="",o="";var a,d=c[s].cf_n_type,p=c[s].cf_n_window;1===d?(e=w+c[s]._key+".html",t=1===p?"_blank":"_self"):2===d?(a=h?c[s].cf_n_attachment_file_en:c[s].cf_n_attachment_file_jp,e="/news/news_file/file/"+a,t=1===p?"_blank":"_self"):3===d?(a=h?c[s].cf_n_url_en:c[s].cf_n_url_jp,e=a,t=1===p?"_blank":"_self"):5===d&&(e="#",n="pointer-events:none; cursor:default; text-decoration:none;",o="rt_cf_nolink");let r=h?c[s].cf_n_thum_img_en:c[s].cf_n_thum_img_jp;r=(r=r&&!r.startsWith("/news_file/file/")?"/news_file/file/"+r:r)||"/cnt_common/images/thumbnail.webp";
1var p=h?c[s].cf_n_thum_img_alt_en:c[s].cf_n_thum_img_alt_jp,u=h?c[s].cf_n_thum_img_title_en:c[s].cf_n_thum_img_title_jp;let l=c[s].cf_n_date;var _,g=h?c[s].cf_n_title_en:c[s].cf_n_title_jp,m=h?c[s].cf_n_category.cf_nc_name_en:c[s].cf_n_category.cf_nc_name_jp,f=(l&&(f=(_=new Date(l)).getFullYear(),S=String(_.getMonth()+1).padStart(2,"0"),_=String(_.getDate()).padStart(2,"0"),l=f+`.${S}.`+_),"#"===e&&5!==d?"is-disable":""),S=y.replaceAll("{!href!}",e).replaceAll("{!target!}",t).replaceAll("{!style!}",n).replaceAll("{!class!}",o).replaceAll("{!imgSrc!}",r).replaceAll("{!imgAlt!}",p).replaceAll("{!imgTitle!}",u).replaceAll("{!date!}",l).replaceAll("{!category!}",m).replaceAll("{!title!}",g).replaceAll("{!isDisable!}",f);i+=S}e&&e.querySelector(".splide__list")&&(e.querySelector(".splide__list").innerHTML=i,b())}else{var t=document.querySelector(".js-top-news-slider")?.closest("section");t&&(t.style.display="none")}})},e=()=>{{var n=document.querySelectorAll(".js-top-contents");const t=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&e.target.classList.add(c)})},{root:null,rootMargin:"-35% 0px",threshold:0});n.forEach(e=>{t.observe(e)})}{const r=document.querySelector(".top-fixed-bnr"),l=((n=document.querySelector(".top-fixed-bnr ._closeBtn"))&&r&&n.addEventListener("click",e=>{e.preventDefault(),r.classList.add("di_none")}),document.querySelector(".top-fixed-news"));(n=document.querySelector(".top-fixed-news ._closeBtn"))&&l&&n.addEventListener("click",e=>{e.preventDefault(),l.classList.add("di_none")})}{const s=document.querySelectorAll(".js-news-tag");s.length&&s.forEach(t=>{t.addEventListener("click",e=>{e.preventDefault(),s.forEach(e=>{e.classList.remove("is-active")}),t.classList.add("is-active");e=t.querySelector(".rt_cf_nc_code"),e=e?e.textContent.trim():"";p(e)})})}p(),b();{const e=document.querySelector(".loading-screen");e.addEventListener("animationend",()=>{e.style.display="none",document.body.classList.remove("loading-incomplete"),setTimeout(()=>{d()},timeout=1e3)})}{let t=document.querySelector(".top-mainVis .__videoControl");if((n=document.getElementById("top_mv"))&&t){var o=location.pathname.startsWith("/en/")?"Main Visual":"メインビジュアル";n.setAttribute("title",(n.getAttribute("title")||"")+" "+o);const i=new Vimeo.Player(n);let e=!1;i.on("play",()=>{e=!0,t.classList.remove("is-paused")}),i.on("pause",()=>{e=!1,t.classList.add("is-paused")}),t.addEventListener("click",()=>{e?i.pause():i.play()})}}setTimeout(()=>{if(document.querySelector(".js-top-business-slider")){var e=new Splide(".js-top-business-slider",{type:"slide",interval:5e3,arrows:!0,fixedWidth:540,pagination:!1,gap:40,speed:800,padding:{right:100},breakpoints:{1024:{gap:16,fixedWidth:280,padding:{right:20}}}});e.mount();const i=document.querySelector(".js-top-business-slider .splide__counter .current");var t=document.querySelector(".js-top-business-slider .splide__counter .total"),n=e.Components.Slides.getLength(!0);const c=String(n).length;function o(e,t){return String(e).padStart(t,"0")}t.textContent=n,i.textContent=o(e.index+1,c),e.on("move",function(e){i.textContent=o(e+1,c)})}if(document.querySelector(".js-top-auto-slider")){var r=document.querySelector(".js-top-auto-slider .splide__list"),l=r.children.length;if(r&&0!==r.children.length){if(l<12)for(let e=0;e<12-l;e++){var s=r.children[e%l].cloneNode(!0);r.appendChild(s)}r.querySelectorAll(".splide__slide").forEach((e,t)=>{(t+1)%3==0&&e.classList.add("_large")}),new Splide(".js-top-auto-slider",{type:"loop",autoScroll:{speed:1},arrows:!1,autoWidth:!0,pagination:!1,gap:0}).mount(window.splide.Extensions)}}a.matchHeight()},1e3)};a.localDecision()?document.addEventListener("localincludeLoaded",()=>{e()}):e()})(window.FUNCTIONS);
2//# sourceMappingURL=top.js.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.