PageSourceSearch

https://sulwhasoo.com/ind-script/optimizer_user.php?filename=lZJNj…3e01e08af218220c55dcf85&t=1789957184&user=T

js sulwhasoo.com collected 2026-10-02 15:01:55 UTC 446,315 bytes, 7,133 lines download raw bytes

1!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};(e=function(){var e=0;return function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(t),appendDots:i(t),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('<button type="button" />').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden="hidden",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(t),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(t).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,void 0!==document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(n.hidden="webkitHidden",n.visibilityChange="webkitvisibilitychange"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.instanceUid=e++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}}()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(t<0||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):!0===o?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("data-slick-index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),!0===s.options.rtl&&!1===s.options.vertical&&(e=-e),!1===s.transformsEnabled?!1===s.options.vertical?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):!1===s.cssTransitions?(!0===s.options.rtl&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),!1===s.options.vertical?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),!1===s.options.vertical?o[s.animType]="translate3d("+e+"px, 0px, 0px)":o[s.animType]="translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.getNavTarget=function(){var e=this,t=e.options.asNavFor;return t&&null!==t&&(t=i(t).not(e.$slider)),t},e.prototype.asNavFor=function(e){var t=this.getNavTarget();null!==t&&"object"==typeof t&&t.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},e.prototype.buildArrows=function(){var e=this;!0===e.options.arrows&&(e.$prevArrow=i(e.options.prevArrow).addClass("slick-arrow"),e.$nextArrow=i(e.options.nextArrow).addClass("slick-arrow"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),!0!==e.options.infinite&&e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},e.prototype.buildDots=function(){var e,t,o=this;if(!0===o.options.dots){for(o.$slider.addClass("slick-dotted"),t=i("<ul />").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i("<li />").append(o.options.customPaging.call(this,o,e)));o.$dots=t.appendTo(o.options.appendDots),o.$dots.find("li").first().addClass("slick-active")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr("data-slick-index",e).data("originalStyling",i(t).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?i('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),!0!==e.options.centerMode&&!0!==e.options.swipeToSlide||(e.options.slidesToScroll=1),i("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),!0===e.options.draggable&&e.$list.addClass("draggable")},e.prototype.buildRows=function(){var i,e,t,o,s,n,r,l=this;if(o=document.createDocumentFragment(),n=l.$slider.children(),l.o
1ptions.rows>1){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;i<s;i++){var d=document.createElement("div");for(e=0;e<l.options.rows;e++){var a=document.createElement("div");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&a.appendChild(n.get(c))}d.appendChild(a)}o.appendChild(d)}l.$slider.empty().append(o),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+"%",display:"inline-block"})}},e.prototype.checkResponsive=function(e,t){var o,s,n,r=this,l=!1,d=r.$slider.width(),a=window.innerWidth||i(window).width();if("window"===r.respondTo?n=a:"slider"===r.respondTo?n=d:"min"===r.respondTo&&(n=Math.min(a,d)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){s=null;for(o in r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(!1===r.originalSettings.mobileFirst?n<r.breakpoints[o]&&(s=r.breakpoints[o]):n>r.breakpoints[o]&&(s=r.breakpoints[o]));null!==s?null!==r.activeBreakpoint?(s!==r.activeBreakpoint||t)&&(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||!1===l||r.$slider.trigger("breakpoint",[r,l])}},e.prototype.changeSlide=function(e,t){var o,s,n,r=this,l=i(e.currentTarget);switch(l.is("a")&&e.preventDefault(),l.is("li")||(l=l.closest("li")),n=r.slideCount%r.options.slidesToScroll!=0,o=n?0:(r.slideCount-r.currentSlide)%r.options.slidesToScroll,e.data.message){case"previous":s=0===o?r.options.slidesToScroll:r.options.slidesToShow-o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-s,!1,t);break;case"next":s=0===o?r.options.slidesToScroll:o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+s,!1,t);break;case"index":var d=0===e.data.index?0:e.data.index||l.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(d),!1,t),l.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(i){var e,t;if(e=this.getNavigableIndexes(),t=0,i>e[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}return i},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&(i("li",e.$dots).off("click.slick",e.changeSlide).off("mouseenter.slick",i.proxy(e.interrupt,e,!0)).off("mouseleave.slick",i.proxy(e.interrupt,e,!1)),!0===e.options.accessibility&&e.$dots.off("keydown.slick",e.keyHandler)),e.$slider.off("focus.slick blur.slick"),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow&&e.$prevArrow.off("keydown.slick",e.keyHandler),e.$nextArrow&&e.$nextArrow.off("keydown.slick",e.keyHandler))),e.$list.off("touchstart.slick mousedown.slick",e.swipeHandler),e.$list.off("touchmove.slick mousemove.slick",e.swipeHandler),e.$list.off("touchend.slick mouseup.slick",e.swipeHandler),e.$list.off("touchcancel.slick mouseleave.
1slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),!0===e.options.accessibility&&e.$list.off("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().off("click.slick",e.selectHandler),i(window).off("orientationchange.slick.slick-"+e.instanceUid,e.orientationChange),i(window).off("resize.slick.slick-"+e.instanceUid,e.resize),i("[draggable!=true]",e.$slideTrack).off("dragstart",e.preventDefault),i(window).off("load.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.off("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.cleanUpRows=function(){var i,e=this;e.options.rows>1&&((i=e.$slides.children().children()).removeAttr("style"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},e.prototype.destroy=function(e){var t=this;t.autoPlayClear(),t.touchObject={},t.cleanUpEvents(),i(".slick-cloned",t.$slider).detach(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.$prevArrow.length&&(t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove()),t.$nextArrow&&t.$nextArrow.length&&(t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove()),t.$slides&&(t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){i(this).attr("style",i(this).data("originalStyling"))}),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.detach(),t.$list.detach(),t.$slider.append(t.$slides)),t.cleanUpRows(),t.$slider.removeClass("slick-slider"),t.$slider.removeClass("slick-initialized"),t.$slider.removeClass("slick-dotted"),t.unslicked=!0,e||t.$slider.trigger("destroy",[t])},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]="",!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.focusHandler=function(){var e=this;e.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*",function(t){t.stopImmediatePropagation();var o=i(this);setTimeout(function(){e.options.pauseOnFocus&&(e.focussed=o.is(":focus"),e.autoPlay())},0)})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){return this.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)if(i.slideCount<=i.options.slidesToShow)++o;else for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},e.prototype.getLeft=function(i){var e,t,o,s,n=this,r=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),r=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!=0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,r=(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,r=n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,r=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(n.slideOffset=0,r=0),!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=!1===n.options.vertical?i*n.slideWidth*-1+n.slideOffset:i*t*-1+r,!0===n.options.variableWidth&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===n.options.centerMode&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(n.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){return this.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(!1===e.options.infinite?i=e.slideCount:(t=-1*e.options.slidesToScroll,o=-1*e.options.slidesToScroll,i=2*e.slideCount);t<i;)s.push(t),t=o+e.options.slidesToScroll,o+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,t,o=this;return t=!0===o.options.centerMode?o.slideWidth*Math.floor(o.options.slidesToShow/2):0,!0===o.options.swipeToSlide?(o.$slideTrack.find(".slick-slide").each(function(s,n){if(n.offsetLeft-t+i(n).outerWidth()/2>-1*o.swipeLeft)return e=n,!1}),Math.abs(i(e).attr("data-slick-index")-o.currentSlide)||1):o.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:
1parseInt(i)}},e)},e.prototype.init=function(e){var t=this;i(t.$slider).hasClass("slick-initialized")||(i(t.$slider).addClass("slick-initialized"),t.buildRows(),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.updateArrows(),t.updateDots(),t.checkResponsive(!0),t.focusHandler()),e&&t.$slider.trigger("init",[t]),!0===t.options.accessibility&&t.initADA(),t.options.autoplay&&(t.paused=!1,t.autoPlay())},e.prototype.initADA=function(){var e=this,t=Math.ceil(e.slideCount/e.options.slidesToShow),o=e.getNavigableIndexes().filter(function(i){return i>=0&&i<e.slideCount});e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==e.$dots&&(e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(t){var s=o.indexOf(t);i(this).attr({role:"tabpanel",id:"slick-slide"+e.instanceUid+t,tabindex:-1}),-1!==s&&i(this).attr({"aria-describedby":"slick-slide-control"+e.instanceUid+s})}),e.$dots.attr("role","tablist").find("li").each(function(s){var n=o[s];i(this).attr({role:"presentation"}),i(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+e.instanceUid+s,"aria-controls":"slick-slide"+e.instanceUid+n,"aria-label":s+1+" of "+t,"aria-selected":null,tabindex:"-1"})}).eq(e.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var s=e.currentSlide,n=s+e.options.slidesToShow;s<n;s++)e.$slides.eq(s).attr("tabindex",0);e.activateADA()},e.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide),!0===i.options.accessibility&&(i.$prevArrow.on("keydown.slick",i.keyHandler),i.$nextArrow.on("keydown.slick",i.keyHandler)))},e.prototype.initDotEvents=function(){var e=this;!0===e.options.dots&&(i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),!0===e.options.accessibility&&e.$dots.on("keydown.slick",e.keyHandler)),!0===e.options.dots&&!0===e.options.pauseOnDotsHover&&i("li",e.$dots).on("mouseenter.slick",i.proxy(e.interrupt,e,!0)).on("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.on("mouseleave.slick",i.proxy(e.interrupt,e,!1)))},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"}
1,e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.$list.on("click.slick",e.clickHandler),i(document).on(e.visibilityChange,i.proxy(e.visibility,e)),!0===e.options.accessibility&&e.$list.on("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),i(window).on("orientationchange.slick.slick-"+e.instanceUid,i.proxy(e.orientationChange,e)),i(window).on("resize.slick.slick-"+e.instanceUid,i.proxy(e.resize,e)),i("[draggable!=true]",e.$slideTrack).on("dragstart",e.preventDefault),i(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),i(e.setPosition)},e.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},e.prototype.keyHandler=function(i){var e=this;i.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===i.keyCode&&!0===e.options.accessibility?e.changeSlide({data:{message:!0===e.options.rtl?"next":"previous"}}):39===i.keyCode&&!0===e.options.accessibility&&e.changeSlide({data:{message:!0===e.options.rtl?"previous":"next"}}))},e.prototype.lazyLoad=function(){function e(e){i("img[data-lazy]",e).each(function(){var e=i(this),t=i(this).attr("data-lazy"),o=i(this).attr("data-srcset"),s=i(this).attr("data-sizes")||n.$slider.attr("data-sizes"),r=document.createElement("img");r.onload=function(){e.animate({opacity:0}
vendor: 5,619 bytes, line 1
1,100,function(){o&&(e.attr("srcset",o),s&&e.attr("sizes",s)),e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),n.$slider.trigger("lazyLoaded",[n,e,t])})},r.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),n.$slider.trigger("lazyLoadError",[n,e,t])},r.src=t})}var t,o,s,n=this;if(!0===n.options.centerMode?!0===n.options.infinite?s=(o=n.currentSlide+(n.options.slidesToShow/2+1))+n.options.slidesToShow+2:(o=Math.max(0,n.currentSlide-(n.options.slidesToShow/2+1)),s=n.options.slidesToShow/2+1+2+n.currentSlide):(o=n.options.infinite?n.options.slidesToShow+n.currentSlide:n.currentSlide,s=Math.ceil(o+n.options.slidesToShow),!0===n.options.fade&&(o>0&&o--,s<=n.slideCount&&s++)),t=n.$slider.find(".slick-slide").slice(o,s),"anticipated"===n.options.lazyLoad)for(var r=o-1,l=s,d=n.$slider.find(".slick-slide"),a=0;a<n.options.slidesToScroll;a++)r<0&&(r=n.slideCount-1),t=(t=t.add(d.eq(r))).add(d.eq(l)),r--,l++;e(t),n.slideCount<=n.options.slidesToShow?e(n.$slider.find(".slick-slide")):n.currentSlide>=n.slideCount-n.options.slidesToShow?e(n.$slider.find(".slick-cloned").slice(0,n.options.slidesToShow)):0===n.currentSlide&&e(n.$slider.find(".slick-cloned").slice(-1*n.options.slidesToShow))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},e.prototype.orientationChange=function(){var i=this;i.checkResponsive(),i.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){var i=this;i.autoPlayClear(),i.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},e.prototype.postSlide=function(e){var t=this;t.unslicked||(t.$slider.trigger("afterChange",[t,e]),t.animating=!1,t.slideCount>t.options.slidesToShow&&t.setPosition(),t.swipeLeft=null,t.options.autoplay&&t.autoPlay(),!0===t.options.accessibility&&(t.initADA(),t.options.focusOnChange&&i(t.$slides.get(t.currentSlide)).attr("tabindex",0).focus()))},e.prototype.prev=e.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var t,o,s,n,r,l=this,d=i("img[data-lazy]",l.$slider);d.length?(t=d.first(),o=t.attr("data-lazy"),s=t.attr("data-srcset"),n=t.attr("data-sizes")||l.$slider.attr("data-sizes"),(r=document.createElement("img")).onload=function(){s&&(t.attr("srcset",s),n&&t.attr("sizes",n)),t.attr("src",o).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===l.options.adaptiveHeight&&l.setPosition(),l.$slider.trigger("lazyLoaded",[l,t,o]),l.progressiveLazyLoad()},r.onerror=function(){e<3?setTimeout(function(){l.progressiveLazyLoad(e+1)},500):(t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),l.$slider.trigger("lazyLoadError",[l,t,o]),l.progressiveLazyLoad())},r.src=o):l.$slider.trigger("allImagesLoaded",[l])},e.prototype.refresh=function(e){var t,o,s=this;o=s.slideCount-s.options.slidesToShow,!s.options.infinite&&s.currentSlide>o&&(s.currentSlide=o),s.slideCount<=s.options.slidesToShow&&(s.currentSlide=0),t=s.currentSlide,s.destroy(!0),i.extend(s,s.initials,{currentSlide:t}),s.init(),e||s.changeSlide({data:{message:"index",index:t}},!1)},e.prototype.registerBreakpoints=function(){var e,t,o,s=this,n=s.options.responsive||null;if("array"===i.type(n)&&n.length){s.respondTo=s.options.respondTo||"window";for(e in n)if(o=s.breakpoints.length-1,n.hasOwnProperty(e)){for(t=n[e].breakpoint;o>=0;)s.breakpoints[o]&&s.breakpoints[o]===t&&s.breakpoints.splice(o,1),o--;s.breakpoints.push(t),s.breakpointSettings[t]=n[e].settings}s.breakpoints.sort(function(i,e){return s.options.mobileFirst?i-e:e-i})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.cleanUpSlideEvents(),e.initSlideEvents(),e.checkResponsive(!1,!0),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.setPosition(),e.focusHandler(),e.paused=!e.options.autoplay,e.autoPlay(),e.$slider.trigger("reInit",[e])},e.prototype.resize=function(){var e=this;i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(i,e,t){var o=this;if(i="boolean"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),!0===t?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},e.prototype.setCSS=function(i){var e,t,o=this,s={};
1!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled?o.$slideTrack.css(s):(s={},!1===o.cssTransitions?(s[o.animType]="translate("+e+", "+t+")",o.$slideTrack.css(s)):(s[o.animType]="translate3d("+e+", "+t+", 0px)",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,!0===t.options.rtl?i(s).css({position:"relative",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}
1):i(s).css({position:"relative",left:e,top:0,zIndex:t.options.zIndex-2,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css("height",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(){var e,t,o,s,n,r=this,l=!1;if("object"===i.type(arguments[0])?(o=arguments[0],l=arguments[1],n="multiple"):"string"===i.type(arguments[0])&&(o=arguments[0],s=arguments[1],l=arguments[2],"responsive"===arguments[0]&&"array"===i.type(arguments[1])?n="responsive":void 0!==arguments[1]&&(n="single")),"single"===n)r.options[o]=s;else if("multiple"===n)i.each(o,function(i,e){r.options[i]=e});else if("responsive"===n)for(t in s)if("array"!==i.type(r.options.responsive))r.options.responsive=[s[t]];else{for(e=r.options.responsive.length-1;e>=0;)r.options.responsive[e].breakpoint===s[t].breakpoint&&r.options.responsive.splice(e,1),e--;r.options.responsive.push(s[t])}l&&(r.unload(),r.reinit())},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;if(t=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),n.$slides.eq(i).addClass("slick-current"),!0===n.options.centerMode){var r=n.options.slidesToShow%2==0?1:0;e=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e+r,i+e+1).addClass("slick-active").attr("aria-hidden","false"):(o=n.options.slidesToShow+i,t.slice(o-e+1+r,o+e+2).addClass("slick-active").attr("aria-hidden","false")),0===i?t.eq(t.length-1-n.options.slidesToShow).addClass("slick-center"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass("slick-center")),n.$slides.eq(i).addClass("slick-center")}else i>=0&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):t.length<=n.options.slidesToShow?t.addClass("slick-active").attr("aria-hidden","false"):(s=n.slideCount%n.options.slidesToShow,o=!0===n.options.infinite?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass("slick-active").attr("aria-hidden","false"):t.slice(o,o+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==n.options.lazyLoad&&"anticipated"!==n.options.lazyLoad||n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(!0===s.options.fade&&(s.options.centerMode=!1),!0===s.options.infinite&&!1===s.options.fade&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=!0===s.options.centerMode?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t-s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;e<o+s.slideCount;e+=1)t=e,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t+s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){i(this).attr("id","")})}},e.prototype.interrupt=function(i){var e=this;i||e.autoPlay(),e.interrupted=i},e.prototype.selectHandler=function(e){var t=this,o=i(e.target).is(".slick-slide")?i(e.target):i(e.target).parents(".slick-slide"),s=parseInt(o.attr("data-slick-index"));s||(s=0),t.slideCount<=t.options.slidesToShow?t.slideHandler(s,!1,!0):t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l,d=null,a=this;if(e=e||!1,!(!0===a.animating&&!0===a.options.waitForAnimate||!0===a.options.fade&&a.currentSlide===i))if(!1===e&&a.asNavFor(i),o=i,d=a.getLeft(o),r=a.getLeft(a.currentSlide),a.currentLeft=null===a.swipeLeft?r:a.swipeLeft,!1===a.options.infinite&&!1===a.options.centerMode&&(i<0||i>a.getDotCount()*a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else if(!1===a.options.infinite&&!0===a.options.centerMode&&(i<0||i>a.slideCount-a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else{if(a.options.autoplay&&clearInterval(a.autoPlayTimer),s=o<0?a.slideCount%a.options.slidesToScroll!=0?a.slideCount-a.slideCount%a.options.slidesToScroll:a.slideCount+
1o:o>=a.slideCount?a.slideCount%a.options.slidesToScroll!=0?0:o-a.slideCount:o,a.animating=!0,a.$slider.trigger("beforeChange",[a,a.currentSlide,s]),n=a.currentSlide,a.currentSlide=s,a.setSlideClasses(a.currentSlide),a.options.asNavFor&&(l=(l=a.getNavTarget()).slick("getSlick")).slideCount<=l.options.slidesToShow&&l.setSlideClasses(a.currentSlide),a.updateDots(),a.updateArrows(),!0===a.options.fade)return!0!==t?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight();!0!==t?a.animateSlide(d,function(){a.postSlide(s)}):a.postSlide(s)}},e.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),(o=Math.round(180*t/Math.PI))<0&&(o=360-Math.abs(o)),o<=45&&o>=0?!1===s.options.rtl?"left":"right":o<=360&&o>=315?!1===s.options.rtl?"left":"right":o>=135&&o<=225?!1===s.options.rtl?"right":"left":!0===s.options.verticalSwiping?o>=35&&o<=135?"down":"up":"vertical"},e.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1,!1;if(o.interrupted=!1,o.shouldClick=!(o.touchObject.swipeLength>10),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},e.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n,r,l=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!(!l.dragging||l.scrolling||n&&1!==n.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,l.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),r=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&r>4?(l.scrolling=!0,!1):(!0===l.options.verticalSwiping&&(l.touchObject.swipeLength=r),t=l.swipeDirection(),void 0!==i.originalEvent&&l.touchObject.swipeLength>4&&(l.swiping=!0,i.preventDefault()),s=(!1===l.options.rtl?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),!0===l.options.verticalSwiping&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,l.touchObject.edgeHit=!1,!1===l.options.infinite&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),!1===l.options.vertical?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,!0===l.options.verticalSwiping&&(l.swipeLeft=e+o*s),!0!==l.options.fade&&!1!==l.options.touchMove&&(!0===l.animating?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},e.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return t.touchObject={},!1;void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,t.dragging=!0},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")}
1,e.prototype.unslick=function(i){var e=this;e.$slider.trigger("unslick",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode?(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode&&(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").end(),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active"))},e.prototype.visibility=function(){var i=this;i.options.autoplay&&(document[i.hidden]?i.interrupted=!0:i.interrupted=!1)},i.fn.slick=function(){var i,t,o=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),r=o.length;for(i=0;i<r;i++)if("object"==typeof s||void 0===s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),void 0!==t)return t;return o}});
2document.addEventListener("DOMContentLoaded", function () {
3    /* 상품 정보 저장 */
4    const productInfo = {};
5    const targetMap = {
6        "영문상품명": "eng",
7        "상품요약정보": "summary",
8        "판매가": "price",
9        "해시태그": "hashtags",
10        "피부타입": "skinType",
11        "피부 베네핏": "skinBenefit",
12        "기능성": "skinFunc",
13		"태그 BEST": "tagBest",
14		"태그 NEW": "tagNew",
15		"태그 EXCLUSIVE": "tagEx",
16        "썸네일이미지폴더명": "thumbnail",
17    };
18    const buyLinks = {};
19    const rows = document.querySelectorAll('.infoDetail table tr');
20    rows.forEach(row => {
21        const th = row.querySelector('th span');
22        const td = row.querySelector('td');
23
24        if (th && td) {
25            const label = th.textContent.trim();
26
27            // 매핑 테이블에 존재하는 항목인지 확인
28            if (targetMap[label]) {
29                const key = targetMap[label];
30                // td 안의 텍스트 추출 (가격표의 hidden input 등 불필요한 요소 제외하고 텍스트만)
31                let value = (label === '상품요약정보') 
32                ? td.querySelector("span").innerHTML 
33                : td.innerText.trim();
34                // 결과 객체에 저장
35                productInfo[key] = value;
36            }
37            // 2. '구매링크' 단어가 포함되어 있는지 확인
38            if (label.includes('구매링크')) {
39                const match = label.match(/\(([^)]+)\)/);
40
41                if (match) {
42                    const linkKey = match[1];
43                    const linkValue = td.innerText.trim();
44                    buyLinks[linkKey] = linkValue;
45                }
46            }
47        }
48    });
49    /* 해시태그 기입 */
50    const rawHashtags = productInfo.hashtags; 
51    if(rawHashtags){
52    	const tagList = rawHashtags.split('#')
53        .map(tag => tag.trim())
54        .filter(tag => tag !== "");
55        const hashContainer = document.querySelector('.prd-hash-keyword');
56        tagList.forEach(tag => {
57            const li = document.createElement('li');
58            li.textContent = `#${tag}`;
59            hashContainer.appendChild(li);
60        });
61    }
62    
63    /* 영문명 기입 */
64    const engContainers = document.querySelectorAll('.prd-name .prd-name-en');
65    if(productInfo.eng && engContainers){
66    	engContainers.forEach(function(engCon){
67            engCon.textContent = productInfo.eng;
68        });
69    }
70    /* 요약설명 기입 */
71    const summaryContainer = document.querySelector('.prd-desc');
72    if(summaryContainer) summaryContainer.innerHTML = productInfo.summary;
73	/* 가격 기입 */
74    const rawPrice = productInfo.price;
75    const cleanPrice = rawPrice.replace(/[^0-9,]/g, '');
76    const priceContainer = document.querySelector('.prd-price span');
77    priceContainer.textContent = cleanPrice;
78    /* 피부 기타 정보 */
79    let skinEtcHtml = "";
80    if(productInfo.skinType){ // 1.피부타입
81    	const skinTypeTxt = productInfo.skinType;
82        skinEtcHtml += `
83		<li class="point-item">
84			<div class="point-txt-wrap">
85				<em class="point-tit">피부타입</em>
86				<span class="point-desc">${skinTypeTxt}</span>
87			</div>
88		</li>`;
89    }
90    if(productInfo.skinBenefit){ // 2.피부 베네핏
91    	const skinBenefitTxt = productInfo.skinBenefit;
92        skinEtcHtml += `
93		<li class="point-item">
94			<div class="point-txt-wrap">
95				<em class="point-tit">피부 베네핏</em>
96				<span class="point-desc">${skinBenefitTxt}</span>
97			</div>
98		</li>`;
99    }
100    if(productInfo.skinFunc){ // 3.기능성
101    	const skinFuncTxt = productInfo.skinFunc;
102        skinEtcHtml += `
103		<li class="point-item">
104			<div class="point-txt-wrap">
105				<em class="point-tit">기능성</em>
106				<span class="point-desc">${skinFuncTxt}</span>
107			</div>
108		</li>`;
109    }
110    document.querySelector(".prd-point-list").innerHTML = skinEtcHtml;
111    
112    /* 구매링크 버튼 */
113    if (Object.keys(buyLinks).length > 0) {
114        let linkHtml = "";
115        const linkWrap = document.querySelector(".btn-link-wrap");
116        const popLinkWrap = document.querySelector(".ap2022-popup__body ul");
117        if (Object.keys(buyLinks).length == 1){
118    		const value = Object.values(buyLinks)[0]; 
119            linkHtml = `
120                <li class="store-online">
121                    <a href="${value}" id="sws-go-apmall-link" class="btn-bg-black" title="새창에서 열기" target="_blank" ap-click-area="PDP" ap-click-name="Click-mall" tabindex="0">
122                        <span>구매하러 가기</span>
123                    </a>
124                </li>`;
125            linkWrap.insertAdjacentHTML('afterbegin', linkHtml);
126    	} else {
127        	let optionsHtml = "";
128            for (const [key, value] of Object.entries(buyLinks)) {
129                optionsHtml += `
130                    <li tabindex="-1" class="option-item">
131                        <a class="option-link" href="${value}" target="_blank" title="새창에서 열기" ap-click-area="PDP" ap-click-name="Click-mall" tabindex="0">${key}</a>
132                    </li>`;
133            }
134            linkHtml = `
135                <li class="store-online">
136                    <button type="button" id="sws-go-apmall-link" onclick="prdLink(this)" class="btn-bg-black" aria-expanded="false"><span>구매하러 가기</span></button>
137                    <ul>
138                        ${optionsHtml}
139                    </ul>
140                </li>`;
141            linkWrap.insertAdjacentHTML('afterbegin', linkHtml);
142            popLinkWrap.insertAdjacentHTML('afterbegin', optionsHtml);
143        }
144    }
145	/* 태그(뱃지) */
146    let tagHtml = "";
147    if(productInfo.tagBest){
148		tagHtml += `
149		<em class="badge best"><span>best</span></em>`;
150    }
151	if(productInfo.tagNew){
152		tagHtml += `
153		<em class="badge new"><span>new</span></em>`;
154    }
155	if(productInfo.tagEx){
156		tagHtml += `
157		<em class="badge exclusive"><span>exclusive</span></em>`;
158    }
159	document.querySelector(".badge-wrap").innerHTML = tagHtml;
160    
161    /* 옵션 */
162    if(document.querySelector(".optionWrap .ec-product-radio")){
163		// 1. 용량
164        let optionUl;
165        const optionContainer = document.querySelector(".prd-measure #amount-area");
166		let opts;
167        let optHtml = ""; // 생성을 위한 빈 문자열
168		let defaultOptIdx = 0;
169        setTimeout(function(){
170        	optionUl = document.querySelector(".optionWrap .ec-product-radio");
171			opts = optionUl.querySelectorAll("li");
172            opts.forEach(function(opt,index){
173                const optTxt = opt.querySelector("label").innerText;
174                optHtml += `
175                <span class="measure-item" data-index="${index}">
176                    <button type="button" class="btn-measure">
177                        <span>${optTxt}</span>
178                    </button>
179                </span>`;
180                const titVal = opt.getAttribute('title') || "";
181                const hasPriceTag = /\(.*원.*\)/.test(titVal);
182                if (!hasPriceTag && defaultOptIdx <= 0) defaultOptIdx = index;
183            });
184            optionContainer.innerHTML = optHtml;
185        },300);
186        
187        optionContainer.addEventListener("click", function (e) {
188            const targetLi = e.target.closest(".btn-measure");
189            if (!targetLi.classList.contains("active")) {
190                const optionItems =  optionContainer.querySelectorAll(".measure-item");
191                optionItems.forEach(function(opt){
192                	opt.querySelector(".btn-measure").classList.remove("active");
193                    opt.querySelector(".btn-measure").setAttribute("aria-selected",false);
194                });
195                targetLi.classList.add("active");
196                targetLi.setAttribute("aria-selected",true);
197                // 기존 카페24 옵션버튼 원격선택
198                const targetIdx = targetLi.closest(".measure-item").getAttribute("data-index");
199                optionUl.querySelectorAll("li")[targetIdx].click();
200                // 가격 변동
201                function updatePrice() {
202                    const priceElem = document.querySelector(".totalPrice .total").firstElementChild;
203
204                    // 요소가 아직 로드되지 않았을 경우를 대비한 방어 코드
205                    if (!priceElem) {
206                        setTimeout(updatePrice, 200);
207                        return;
208                    }
209
210                    const cRawPrice = priceElem.innerText;
211                    // 숫자가 아닌 것들을 모두 제거 (콤마까지 제거해서 순수 숫자만 남김)
212                    const cCleanPrice = cRawPrice.replace(/[^0-9]/g, ''); 
213
214                    // 숫자로 변환했을 때 0이거나 빈 문자열인 경우
215                    if (cCleanPrice === "" || parseInt(cCleanPrice) === 0) {
216                        setTimeout(updatePrice, 200);
217                    } else {
218                        // 가격이 제대로 들어왔을 때 실행
219                        priceContainer.textContent = cRawPrice.replace(/[^0-9,]/g, '');
220                    }
221                }
222                // 썸네일 변경
223                function updateThumb() {
224                    if(optionUl.querySelectorAll("li").length <= 1) return;
225                    const idx = String(parseInt(targetIdx) + 1).padStart(2, '0');
226                    const thumbSlides = document.querySelectorAll(".prd-thumb-wrap .sul-slide-item");
227                    const tochange01Img = thumbSlides[0].querySelector(".img-wrap img");
228                    const tochange01Url = `/web/upload/thumbnail/${productInfo.thumbnail}/thumbnail_01_${idx}.jpg`;
229                    tochange01Img.setAttribute("src",tochange01Url);
230                }
231                setTimeout(updatePrice, 200);
232                if(productInfo.thumbnail) setTimeout(updateThumb, 200);
233            }
234        });
235		// 2. 컬러칩
236		let colorUl;
237		const colorContainer = document.querySelector(".color-chip-wrap .color-chip-list");
238		setTimeout(function(){
239            colorUl = document.querySelector(".optionWrap .ec-product-button.ec-product-preview");
240        	if(colorUl){
241                const colors = colorUl.querySelectorAll("li");
242                let colorHtml = ""; // 생성을 위한 빈 문자열
243                let defaultColorIdx = 0;
244                colors.forEach(function(color,index){
245                    const colorAtag = color.querySelector("a");
246                    const colorBg = colorAtag.getAttribute("style");
247                    const colorTxt = colorAtag.querySelector("span").innerText;
248                    colorHtml += `
249                    <li>
250                      <a href="javascript:;" class="color-chip" ap-click-area="Product" ap-click-name="Click - Colorchip" ap-click-data="${productInfo.eng}" style="${colorBg}" data-index="${index}">
251                        <span class="blind">${colorTxt}</span>
252                      </a>
253                    </li>`;
254                });
255                colorContainer.innerHTML = colorHtml;
256                colorContainer.addEventListener("click", function (e) {
257                    const targetLi = e.target.closest(".color-chip-list li");
258                    if (targetLi) {
259                        const allLis = Array.from(targetLi.parentNode.children);
260        				const targetIdx = allLis.indexOf(targetLi);
261                        const targetA = targetLi.querySelector(".color-chip");
262                        if (!targetLi.classList.contains("on")) {
263                            const colorItems =  colorContainer.querySelectorAll(".color-chip-list li");
264                            colorItems.forEach(function(color){
265                                color.classList.remove("on");
266								color.querySelector("a").setAttribute("aria-selected",false);
267                            });
268                            targetLi.classList.add("on");
269                            targetA.setAttribute("aria-selected",true);
270                            // 이름 변경
271                            const changeName = targetA.querySelector("span").innerText;
272                            document.querySelector(".prd-measure.prd-color .measure-item").innerText = changeName;
273                            // 썸네일 변경
274                            function updateThumb() {
275                                if(allLis.length <= 1) return;
276                                const idx = String(parseInt(targetIdx) + 1).padStart(2, '0');
277                                const thumbSlides = document.querySelectorAll(".prd-thumb-wrap .sul-slide-item");
278                                if(thumbSlides[1] && thumbSlides[1].querySelector(".img-wrap img")){
279                                    const tochange02Img = thumbSlides[1].querySelector(".img-wrap img");
280                                    const tochange02Url = `/web/upload/thumbnail/${productInfo.thumbnail}/thumbnail_02_${idx}.jpg`;
281                                    tochange02Img.setAttribute("src",tochange02Url);
282                                }
283                                if(thumbSlides[2] && thumbSlides[2].querySelector(".img-wrap img")){
284                                    const tochange03Img = thumbSlides[2].querySelector(".img-wrap img");
285                                    const tochange03Url = `/web/upload/thumbnail/${productInfo.thumbnail}/thumbnail_03_${idx}.jpg`;
286                                    tochange03Img.setAttribute("src",tochange03Url);
287                                }
288                            }
289                            if(productInfo.thumbnail) updateThumb();
290                        }
291                    }
292                });
293            } else {
294                document.querySelector(".prd-price-wrap").classList.add("color-chip-none");
295            }
296        },300);
297        
298		// load 시 default
299        setTimeout(function(){
300        	if(optionContainer.querySelector(".measure-item .btn-measure")){
301                optionContainer.querySelector(`.measure-item[data-index='${defaultOptIdx}'] .btn-measure`).click();
302            }
303            if(colorContainer.querySelector(".color-chip") && colorUl){
304                const defaultColorSel = colorContainer.querySelector(`.color-chip[data-index='${defaultOptIdx}']`);
305                defaultColorSel.closest(".color-chip-list li").click();
306            }
307        },350);
308    }
309	/* SNS 공유하기 */
310	$('#sns-facebook').click(function (e) {
311		e.preventDefault();
312		var cur_url = encodeURIComponent(window.location.href);
313		var facebookUrl = "https://www.facebook.com/sharer/sharer.php?u=" + cur_url;
314		
315		// 새 탭이 아닌 팝업창으로 띄우기 (옵션)
316		window.open(facebookUrl, "_faceBookWindow", "width=600, height=400, resizable=yes, scrollbars=yes");
317	});
318	$('#sns-twitter').click(function (e) {
319		e.preventDefault();
320		var cur_url = encodeURIComponent(window.location.href);
321		var title = encodeURIComponent($('.prd-name .prd-name-ko').text());
322		var twitterUrl = 'https://twitter.com/intent/tweet?text=' + title + '&url=' + cur_url;
323		
324		window.open(twitterUrl, "_twitterWindow", "width=600, height=300, resizable=yes, scrollbars=yes");
325	});
326});
327
328/* 기존 설화수 스크립트 (pdp-renew.js) */
329var tag = document.createElement("script");
330tag.src = "https://www.youtube.com/iframe_api";
331var firstScriptTag = document.getElementsByTagName('script')[0];
332firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
333var players = [];
334window.onYouTubeIframeAPIReady = function() {
335	var i = 0;
336
337	$(".yt-video-wrap, .vdo_wrap").each(function(index){
338		var id = $(this).find("iframe").attr("id");
339		players.push(new YT.Player(id, {
340			events: {
341				'onReady': onPlayerReady,
342				'onStateChange': onPlayerStateChange
343			}
344		}));
345	});
346};
347
348function onPlayerReady(event){
349}
350function onPlayerStateChange(event){
351}
352document.addEventListener("DOMContentLoaded", function () {
353    // 1. 비디오 영역 체크 및 실행
354    var $videoArea = $(".yt-video-wrap");
355    if($videoArea.length > 0){
356        $videoArea.each(function(index){
357            var _this = $(this).parents('.sul-video-wrap');
358            if(_this.length > 0) {
359                _this.on("click", ".btn-play-video", function(e){
360                    e.preventDefault();
361                    _this.addClass('playing');
362                    // players 배열과 해당 인덱스가 존재하는지 확인
363                    if(typeof players !== 'undefined' && players[index]) {
364                        players[index].playVideo();
365                    }
366                });
367            }
368        });
369        
370        $videoArea.each(function(index){
371            var _this = $(this).parents('.video-wrap');
372            if(_this.length > 0) {
373                _this.on("click", ".vdo_cover_img button", function(e){
374                    e.preventDefault();
375                    _this.addClass('playing');
376                    if(typeof players !== 'undefined' && players[index]) {
377                        players[index].playVideo();
378                    }
379                });
380            }
381        });
382    }
383});
384
385// Video playing (중복 방지 체크)
386var $videoWrap = $('.video-wrap');
387if($videoWrap.length > 0) {
388    $videoWrap.each(function(){
389        var _this = $(this).parents('.sul-video-wrap');
390        if(_this.length > 0) {
391            _this.on('click','.btn-play-video', function(e){
392                _this.addClass('playing');
393            });
394        }
395    });
396}
397
398// 2. Accordion
399var $accordionBtn = $('.btn-accordion-wrap button');
400if($accordionBtn.length > 0) {
401    $accordionBtn.on('click',function (e){
402        e.preventDefault();
403        var $parent = $(this).closest('.btn-accordion-wrap');
404        $parent.toggleClass('active');
405
406        if($parent.hasClass('active')) {
407            $(this).attr('aria-expanded', true);
408            $(this).find('.accordion-tit-js').text('닫기');
409        } else {
410            $(this).attr('aria-expanded', false);
411            $(this).find('.accordion-tit-js').text('열기');
412        }
413    });
414}
415
416// 3. 상단 슬라이드 (Slick)
417var $prdSlider = $('.prd-thumb-wrap .sul-slider');
418var $prdNav = $('.prd-thumb-wrap .sul-slide-img-nav');
419
420if($prdSlider.length > 0) {
421    $prdSlider.slick({
422        dots: true,
423		accessibility: false,
424		customPaging: function(slider, i) {
425			return '<button type="button" data-role="none" role="button" tabindex="0"><span class="blind">
425' + (i + 1) + '번 슬라이드로 이동</span></button>';
426		  },
427        slidesToShow: 1,
428        slidesToScroll: 1,
429        prevArrow: $('.prd-thumb-wrap .sul-slide-btn-prev').length > 0 ? $('.prd-thumb-wrap .sul-slide-btn-prev') : false,
430        nextArrow: $('.prd-thumb-wrap .sul-slide-btn-next').length > 0 ? $('.prd-thumb-wrap .sul-slide-btn-next') : false,
431        infinite: false,
432        asNavFor: $prdNav.length > 0 ? '.prd-thumb-wrap .sul-slide-img-nav' : null
433    });
434	$(document).on('click', '.measure-item button', function() {
435		setTimeout(function(){ $prdSlider.slick('slickGoTo', 0); }, 100);
436	});
437	$('.prd-thumb-wrap .sul-slide-btn-prev').attr('aria-label','이전 슬라이드 이동');
438	$('.prd-thumb-wrap .sul-slide-btn-next').attr('aria-label','다음 슬라이드 이동');
439}
440
441if($prdNav.length > 0) {
442    $prdNav.slick({
443        slidesToShow: 3.552631578947368,
444        slidesToScroll: 1,
445        accessibility: false,
446        asNavFor: $prdSlider.length > 0 ? '.prd-thumb-wrap .sul-slider' : null,
447        arrows: false,
448        infinite: false,
449        focusOnSelect: true,
450        responsive: [{
451            breakpoint: 768,
452            settings: { slidesToShow: 3.6 }
453        }]
454    });
455}
456
457// 5. 함께 쓰면 좋은 제품, 리뷰, 효능 등 (반복되는 슬라이드 체크)
458var $cont = $('.together-cont');
459if ($cont.length > 0) {
460    var slides = 4; // .together-cont의 기본 슬라이드 개수 고정
461    var $slider = $cont.find('.sul-slider');
462    var $prevBtn = $cont.find('.sul-slide-btn-prev');
463    var $nextBtn = $cont.find('.sul-slide-btn-next');
464
465    // 1. 이전/다음 버튼 접근성 텍스트 추가
466    $prevBtn.attr('aria-label', '이전 슬라이드로 이동');
467    $nextBtn.attr('aria-label', '다음 슬라이드로 이동');
468
469    // 2. Slick 초기화 전/후 및 변경 시 tabindex 꼬임 방지 이벤트 바인딩
470    $slider.on('init afterChange', function(event, slick) {
471        // 슬라이드 컨테이너(div) 자체가 포커스 받는 현상 제거
472        $(this).find('.slick-slide').removeAttr('tabindex'); 
473        
474        // a 태그가 화면 밖에서도 Tab으로 접근 가능하도록 Slick이 넣은 tabindex="-1" 제거
475        $(this).find('.slick-slide a').removeAttr('tabindex');
476    });
477
478    $slider.slick({
479        slidesToShow: slides,
480        slidesToScroll: slides,
481        dots: true,
482        dotsClass: "sul-slide-nav",
483        infinite: false,
484        // Slick이 강제로 tabindex를 조작하는 것을 막기 위해 false로 설정
485        accessibility: false, 
486        prevArrow: $prevBtn,
487        nextArrow: $nextBtn,
488        appendDots: $cont.find('.sul-slide-nav-wrap'),
489        customPaging: function(slider, i) {
490            return '<button type="button" aria-label="' + (i + 1) + '번째 슬라이드로 이동">' + (i + 1) + '</button>';
491        },
492        responsive: [
493            {
494                breakpoint: 768,
495                settings: { 
496                    slidesToShow: 2, // 모바일 환경 슬라이드 개수 고정
497                    slidesToScroll: 2 
498                }
499            }
500        ]
501    });
502
503    // 3. 내부 <a> 태그에 포커스가 올 때 슬라이드 이동 처리
504    $slider.on('focusin', '.slick-slide a', function(e) {
505        var $slide = $(this).closest('.slick-slide');
506        var slideIndex = $slide.data('slick-index');
507        
508        // 해당 슬라이드가 현재 화면에 노출된 상태(slick-active)가 아니라면
509        if (!$slide.hasClass('slick-active')) {
510            // 포커스된 a 태그가 있는 슬라이드로 스와이프
511            $slider.slick('slickGoTo', slideIndex, false);
512        }
513    });
514}
515
516// 6. 용량 변경 버튼
517var $btnMeasure = $('.measure-list .btn-measure');
518if($btnMeasure.length > 0) {
519    $btnMeasure.on("click", function(e) {
520        e.preventDefault();
521        $btnMeasure.removeClass("active").attr("aria-selected", false);
522        $(this).addClass("active").attr("aria-selected", true);
523
524        var $dataSpan = $(this).find("span");
525        if($dataSpan.length > 0) {
526            var img = $dataSpan.data("img");
527            var imgAlt = $dataSpan.data("img-alt");
528            var price = $dataSpan.data("price");
529            var url = $dataSpan.data("url");
530
531            $(".prd-thumb-wrap .nav-item, .prd-thumb-wrap .sul-slide-item").eq(0).find("img").attr({"src": img, "alt": imgAlt});
532            
533            var targetIdx = $(e.currentTarget).index(1);
534            if($('.prd-thumb-wrap .sul-slide-list').length > 0) $('.prd-thumb-wrap .sul-slide-list').slick("slickGoTo", targetIdx);
535            if($('.prd-thumb-wrap .sul-slide-img-nav').length > 0) $('.prd-thumb-wrap .sul-slide-img-nav').slick("slickGoTo", targetIdx);
536
537            $('.prd-price-wrap .prd-price span').text(price);
538            $('.store-online a').attr("href", url);
539        }
540    });
541}
542
543// 7. 컬러칩 추가
544var $btnColorChip = $('.color-chip-wrap .color-chip');
545if($btnColorChip.length > 0) {
546    $btnColorChip.on("click", function(e) {
547        e.preventDefault();
548        var $this = $(this);
549        var d = $this.data();
550
551        $btnColorChip.parents('li').removeClass("on");
552        $btnColorChip.attr("aria-selected", false);
553        $this.parent().addClass("on");
554        $this.attr("aria-selected", true);
555
556        $(".prd-thumb-wrap .nav-item, .prd-thumb-wrap .sul-slide-item").eq(1).find("img").attr({"src": d.imgItem1, "alt": d.altItem1});
557        $(".prd-thumb-wrap .nav-item, .prd-thumb-wrap .sul-slide-item").eq(2).find("img").attr({"src": d.imgItem2, "alt": d.altItem2});
558        $('.prd-price-wrap .prd-color .measure-item').text(d.colorName);
559    });
560}
561
562// 8. 리뷰 & 포토 리스트
563var $reviewItem = $('.customer-review-item');
564if($reviewItem.length > 0) {
565    $reviewItem.on('click','.comment-wrap',function(){
566        $(this).addClass('open');
567    });
568}
569
570var $photoList = $('.photo-list');
571if($photoList.length > 0) {
572    $photoList.slick({
573        slidesToShow: 4.277777,
574        arrows: false,
575        infinite:false,
576        focusOnSelect:true,
577        variableWidth: true,
578        swipeToSlide : true,
579        responsive: [{
580            breakpoint: 900,
581            settings: { slidesToShow: 2.12 }
582        },{
583            breakpoint: 341,
584            settings: { slidesToShow: 1.12 }
585        }]
586    });
587}
588
589// 상단 리뷰 버튼 (스크롤 이동)
590var $reviewBtn = $('.review-count a');
591if($reviewBtn.length > 0) {
592    $reviewBtn.on('click', function(e){
593        e.preventDefault();
594		const targetId = $(this).attr("href");
595		const $target = $(targetId).prev('.btn-accordion-wrap');
596		if (!$target.length) return;
597		const targetElement = $target[0];
598		
599		setTimeout(() => {
600			targetElement.focus();
601		}, 10);
602
603		// 2. ResizeObserver 설정
604		let lastOffsetTop = targetElement.offsetTop;
605		const observer = new ResizeObserver(() => {
606			const currentOffsetTop = targetElement.offsetTop + 60;
607			
608			// 타겟의 절대 위치가 변했을 때만 스크롤 보정
609			if (Math.abs(lastOffsetTop - currentOffsetTop) > 1) {
610				window.scrollTo({
611					top: currentOffsetTop,
612					behavior: 'auto'
613				});
614				lastOffsetTop = currentOffsetTop;
615			}
616		});
617
618		// 관찰 시작
619		observer.observe(container);
620
621		// 3. 예외 처리: 너무 오래 관찰하지 않도록 최대 1.5초 후 강제 종료
622		setTimeout(() => {
623			observer.disconnect();
624		}, 1500);
625    });
626}
627
628// 9. 구매버튼 플로팅 (Sticky)
629$(function(){
630    var $buyArea = $(".all-btn-sticky");
631    if($buyArea.length > 0) {
632        var $innerArea = $buyArea.find(".sticky_inner");
633        var $pdpTop = $(".bottom-nav__top > a");
634        var $footer = $(".footer");
635
636        var pdpSticky = function(){
637            var scrollTop = $(window).scrollTop();
638            var winHeight = $(window).height();
639            var docHeight = $(document).height();
640            var buyAreaTop = $buyArea.offset().top;
641
642            if(scrollTop > buyAreaTop){
643                if(scrollTop + winHeight >= docHeight - 10) {
644                    $pdpTop.removeClass("show");
645                    if($innerArea.hasClass("show")){
646                        setTimeout(function(){ $innerArea.removeClass("show"); }, 200);
647                    }
648                } else {
649                    var footerOffset = $footer.length > 0 ? $footer.offset().top : docHeight;
650                    if($innerArea.offset().top < footerOffset){
651                        $pdpTop.addClass("show");
652                        if(!$innerArea.hasClass("show")){
653                            $buyArea.addClass("sticky");
654                            setTimeout(function(){ $innerArea.addClass("show"); }, 200);
655                        }
656                    } else {
657                        $pdpTop.removeClass("show");
658                        setTimeout(function(){ $innerArea.removeClass("show"); }, 200);
659                    }
660                }
661            } else {
662                if($innerArea.hasClass("show") || $buyArea.hasClass("sticky")){
663                    $pdpTop.removeClass("show");
664                    $innerArea.removeClass("show");
665                    setTimeout(function(){ $buyArea.removeClass("sticky"); }, 200);
666                }
667            }
668        };
669
670        $(window).on("scroll", pdpSticky);
671    }
672});
673
674// 10. 비디오 재생 시 텍스트 표시
675var $playVideoBtn = $(".sul-video-wrap .btn-play-video");
676if($playVideoBtn.length > 0) {
677    $playVideoBtn.click(function(){
678        $(this).closest(".sul-video-wrap").find(".text-in-video").show();
679    });
680}
681
682/* 구매링크 버튼 고도화 */
683// [ITO0502-272] 스크롤 시 is-active 상태 해제
684function closePrdLink(){
685    const linkBtn = document.getElementById("sws-go-apmall-link");
686    if (linkBtn && linkBtn.classList.contains("is-active")) {
687        linkBtn.classList.remove("is-active");
688        linkBtn.setAttribute("aria-expanded", "false");
689    }
690}
691function prdLink(e){
692    const stickyInner = e.closest(".sticky_inner");
693    if(!stickyInner.classList.contains("show")){
694    	if(e.classList.contains("is-active")){
695            e.classList.remove("is-active");
696			e.setAttribute("aria-expanded",false);
697        } else {
698            e.classList.add("is-active");
699			e.setAttribute("aria-expanded",true);
700        }
701    } else {
702    	window.modal.open('#mPopup_detail_link', { closeOutClick: true });
703    }
704}
705document.addEventListener('click', function(event) {
706  const targetElement = document.querySelector('#sws-go-apmall-link');
707  const storeOnline = targetElement && targetElement.closest('.store-online');
708  if (targetElement && storeOnline && !storeOnline.contains(event.target)) {
709    closePrdLink();
710  }
711});
712window.addEventListener('scroll', closePrdLink, { passive: true });
713document.addEventListener("DOMContentLoaded", () => {
714    const storeOnlineArea = document.querySelector(".store-online");
715    const linkBtn = document.getElementById("sws-go-apmall-link");
716    if (storeOnlineArea && linkBtn) {
717        storeOnlineArea.addEventListener("focusout", (event) => {
718            if (!storeOnlineArea.contains(event.relatedTarget)) {
719                closePrdLink();
720            }
721        });
722    }
723});
724
725document.addEventListener("DOMContentLoaded", () => {
726	/* 상품상세 컨텐츠 모두 로드 완료 후 노출 */
727    const section = document.querySelector('.detail-info-cont .accordion-cont-inner');
728    if (!section) return;
729
730    const imgs = section.querySelectorAll('img');
731    let loaded = 0;
732
733    const reveal = () => {
734        requestAnimationFrame(() => {
735            requestAnimationFrame(() => {
736                section.style.opacity = '1';
737            });
738        });
739    };
740
741    if (imgs.length === 0) {
742        reveal();
743        return;
744    }
745
746    imgs.forEach(img => {
747        const done = () => {
748            loaded++;
749            if (loaded === imgs.length) {
750                reveal();
751            }
752        };
753
754        if (img.complete && img.naturalHeight !== 0) {
755            done();
756        } else {
757            img.addEventListener('load', done);
758            img.addEventListener('error', done);
759        }
760    });
761	/* 옵션 수량 input */
762	if($('#quantity').length > 0) $('#quantity').attr('aria-label', '구매 수량');
763});
764
765/* 포커스 대상 스크린 위치 */
766let isTabPressed = false;
767
768// 1. 키보드 이벤트를 감지하여 Tab 키 여부 확인
769document.addEventListener('keydown', (e) => {
770    if (e.key === 'Tab') {
771        isTabPressed = true;
772    }
773});
774
775// 키를 떼거나 마우스를 클릭하면 플래그를 해제
776document.addEventListener('keyup', () => { isTabPressed = false; });
777document.addEventListener('mousedown', () => { isTabPressed = false; });
778
779document.addEventListener('focusin', (e) => {
780    const target = e.target;
781    // ✨ 0.1초(100ms) 후에 판단 및 스크롤 실행
782    setTimeout(() => {
783        // [조건 체크 0] Tab 키로 이동한 게 아니라면 무조건 패스
784        if (!isTabPressed) return;
785
786        // [조건 체크 1] 입력 요소 제외
787        const isInput = target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.tagName === 'SELECT';
788        if (isInput) return;
789
790        // [조건 체크 2] 특정 태그만 허용
791        const isClickable = target.tagName === 'A' || target.tagName === 'BUTTON' || target.getAttribute('role') === 'button';
792        if (!isClickable) return;
793
794        // [조건 체크 3] :focus-visible 검증
795        if (window.CSS && CSS.supports('selector(:focus-visible)')) {
796            if (!target.matches(':focus-visible')) return;
797        }
798
799        // --- 위치 계산 및 이동 로직 ---
800        const rect = target.getBoundingClientRect();
801        const viewHeight = window.innerHeight;
802        const targetTop = rect.top;
803
804        const safeZoneTop = viewHeight * 0.3;
805        const safeZoneBottom = viewHeight * 0.7;
806
807        if (targetTop < safeZoneTop || targetTop > safeZoneBottom) {
808            target.scrollIntoView({
809                behavior: 'smooth',
810                block: 'center'
811            });
812        }
813    }, 100);
814});
815
816document.addEventListener('keydown', function(e) {
817  // 웹 접근성 표준 포커스 대상 CSS 선택자
818  const focusableSelector = 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [contenteditable], [tabindex]:not([tabindex="-1"])';
819
820  // 화면에 실제로 보이는(visible) 요소만 필터링하는 함수
821  function getVisibleElements(containerSelector) {
822    const container = document.querySelector(containerSelector);
823    if (!container) return [];
824    
825    return Array.from(container.querySelectorAll(focusableSelector)).filter(el => {
826      // display: none, visibility: hidden, 또는 크기가 0인 요소 제외
827      return !!(el.offsetWidth || el.offsetHeight || el.getClientRects().length) && 
828             window.getComputedStyle(el).visibility !== 'hidden';
829    });
830  }
831
832  const isTab = (e.key === 'Tab' || e.keyCode === 9);
833  if (!isTab) return;
834
835  const activeEl = document.activeElement;
836  const isShift = e.shiftKey;
837
838  // 각 영역별 가시(visible) 포커스 요소 목록 가져오기
839  const pdpEls = getVisibleElements('.renewal-pdp');
840  const stickyEls = getVisibleElements('.sticky_inner.sticky, .sticky_inner.show'); 
841  const footerEls = getVisibleElements('#footer');
842
843  // 1. [Tab] .renewal-pdp 마지막 -> .sticky_inner 첫번째
844  if (!isShift && pdpEls.length && activeEl === pdpEls[pdpEls.length - 1]) {
845    const targetStickyEls = getVisibleElements('.sticky_inner.show');
846    if (targetStickyEls.length) {
847      e.preventDefault();
848      targetStickyEls[0].focus();
849      return;
850    }
851  }
852
853  // 2. [Tab] .sticky_inner.show 마지막 -> #footer 첫번째
854  if (!isShift && stickyEls.length && activeEl === stickyEls[stickyEls.length - 1]) {
855    const stickyInner = document.querySelector('.sticky_inner');
856    if (stickyInner && stickyInner.classList.contains('show')) {
857      if (footerEls.length) {
858        e.preventDefault();
859        footerEls[0].focus();
860        return;
861      }
862    }
863  }
864
865  // 3. [Shift + Tab] #footer 첫번째 -> .sticky_inner에 show 추가 후 마지막 요소로
866  if (isShift && footerEls.length && activeEl === footerEls[0]) {
867    const stickyInner = document.querySelector('.sticky_inner');
868    if (stickyInner) {
869      e.preventDefault();
870      stickyInner.classList.add('show'); // show 클래스 강제 추가
871      
872      // 클래스가 추가된 후 포커스 가능한 요소를 다시 계산
873      setTimeout(() => {
874        const updatedStickyEls = getVisibleElements('.sticky_inner.show');
875        if (updatedStickyEls.length) {
876          updatedStickyEls[updatedStickyEls.length - 1].focus();
877        }
878      }, 0);
879      return;
880    }
881  }
882
883  // 4. [Shift + Tab] .sticky_inner.show 첫번째 -> .renewal-pdp 마지막
884  if (isShift && stickyEls.length && activeEl === stickyEls[0]) {
885    const stickyInner = document.querySelector('.sticky_inner');
886    if (stickyInner && stickyInner.classList.contains('show')) {
887      if (pdpEls.length) {
888        e.preventDefault();
889        pdpEls[pdpEls.length - 1].focus();
890        return;
891      }
892    }
893  }
894});
895
896// 썸네일 alt 부여
897$(function () {
898    function setDetailImgAlt() {
899		const prdName = $(".prd-info-wrap > .prd-name .prd-name-ko").text();
900        $(".prd-thumb-wrap .sul-slide-item .img-wrap img").each(function (index) {
901            $(this).attr("alt", prdName + " 썸네일 " + (index + 1));
902        });
903    }
904    // 최초 1회
905    setDetailImgAlt();
906
907    // 약간 늦게 다시 1회
908    setTimeout(setDetailImgAlt, 300);
909
910    // imgArea 내부 변경될 때마다 다시 적용
911    var target = document.querySelector(".prd-thumb-wrap .sul-slide-wrap");
912    if (!target) return;
913
914    var observer = new MutationObserver(function () {
915        setDetailImgAlt();
916    });
917
918    observer.observe(target, {
919        childList: true,
920        subtree: true,
921        attributes: true,
922        attributeFilter: ["src"]
923    });
924});
925
926/* 탭 형식 변형 202606 */
927document.addEventListener("DOMContentLoaded", function () {
928    var $window = $(window);
929    var $nav = $("#pdp-nav");
930    var $tabs = $("#pdp-tabs");
931
932    var navOffsetTop = $nav.offset().top;
933    var lastActiveId = null;
934
935    // 키보드 포커스 제어를 위한 상태 저장소
936    var pendingFocusData = null;
937
938    // ==========================
939    // 스크롤 이벤트
940    // ==========================
941    function updateActiveTab() {
942        var $tabLinks = $("#pdp-tabs a").filter(":visible");
943        if ($tabLinks.length === 0) return;
944
945        var scrollTop = $window.scrollTop();
946        var windowHeight = $window.height();
947        var docHeight = $(document).height();
948        var winBottom = scrollTop + windowHeight;
949
950        var tabHeight = $tabs.outerHeight() || 68;
951
952        var isSticky = scrollTop >= navOffsetTop;
953        $tabs.toggleClass("is-sticky", isSticky);
954
955        var currentId = null;
956        var $lastTab = $tabLinks.last();
957        var lastId = $lastTab.attr("href");
958
959        var isDocEnd = (winBottom + 5) >= docHeight - $('#footer').height();
960        if (isDocEnd) {
961            currentId = lastId;
962        }
963
964        if (!currentId) {
965            var reversedLinks = $($tabLinks.get().reverse());
966            
967            reversedLinks.each(function () {
968                var targetId = $(this).attr("href");
969                var $sec = $(targetId);
970                
971                if (!$sec.length) return true;
972
973                var $actualTarget = $sec.prev(".btn-accordion-wrap").length ? $sec.prev(".btn-accordion-wrap") : $sec;
974                var top = $actualTarget.offset().top - tabHeight - 10; 
975
976                if (scrollTop >= top) {
977                    currentId = targetId;
978                    return false; 
979                }
980            });
981        }
982
983        if (currentId && currentId !== lastActiveId) {
984            lastActiveId = currentId;
985            $tabLinks.removeClass("tab-link--active");
986            $tabLinks.filter("[href='" + currentId + "']").addClass("tab-link--active");
987        }
988    }
989
990    $window.on("resize", function() {
991        var wasSticky = $tabs.hasClass("is-sticky");
992        if (wasSticky) $tabs.removeClass("is-sticky");
993        navOffsetTop = $nav.offset().top;
994        if (wasSticky) $tabs.addClass("is-sticky");
995    });
996
997    $window.on("scroll load", updateActiveTab);
998
999    // ==========================
1000    // 탭 클릭 이벤트
1001    // ==========================
1002    $("#pdp-tabs").on("click", "a", function (e) {
1003        e.preventDefault();
1004        e.stopPropagation();
1005        e.stopImmediatePropagation();
1006
1007        var $this = $(this);
1008        var targetId = $this.attr("href"); 
1009        var $sec = $(targetId);         
1010
1011        if (!$sec.length) return;
1012
1013        var $actualTarget = $sec.prev(".btn-accordion-wrap").length ? $sec.prev(".btn-accordion-wrap") : $sec;
1014
1015        lastActiveId = targetId;
1016        $("#pdp-tabs a").removeClass("tab-link--active");
1017        $this.addClass("tab-link--active");
1018
1019		syncTabScroll($this);
1020
1021        var tabHeight = $tabs.outerHeight() || 68;
1022        var initialTargetTop = Math.round($actualTarget.offset().top - tabHeight + 3);
1023
1024        // 이미 해당 위치면 취소
1025        if (Math.abs($window.scrollTop() - initialTargetTop) < 5) {
1026            return;
1027        }
1028
1029        $("html, body").stop().animate(
1030            { scrollTop: initialTargetTop },
1031            {
1032                duration: 600,
1033                easing: "swing",
1034                step: function(now, fx) {
1035                    if (fx.prop === "scrollTop") {
1036                        var currentTargetTop = Math.round($actualTarget.offset().top - tabHeight + 3);
1037                        if (Math.abs(fx.end - currentTargetTop) > 5) {
1038                            fx.end = currentTargetTop;
1039                        }
1040                    }
1041                },
1042                complete: function() {
1043                    // [핵심 1] 스크롤 이동이 끝나면 현재 탭의 포커스를 풉니다.
1044                    $this.blur();
1045
1046                    // [핵심 2] 키보드 이벤트를 위해 목적지 정보와 눌렀던 탭을 기억해둡니다.
1047                    pendingFocusData = {
1048                        clickedTab: $this[0],
1049                        targetH2: $actualTarget,
1050                        targetSec: $sec
1051                    };
1052                }
1053            }
1054        );
1055    });
1056
1057    // ==========================
1058    // 키보드 네비게이션 제어 (Tab / Shift + Tab)
1059    // ==========================
1060    $(document).on("keydown", function (e) {
1061        // Tab 키를 눌렀고, 대기 중인 포커스 정보가 있을 때만 개입
1062        if (e.key === "Tab" && pendingFocusData) {
1063            e.preventDefault(); // 브라우저의 기본 Tab 이동을 강제로 막음
1064
1065            if (e.shiftKey) {
1066                // [조건 1] Shift + Tab : 눌렀던 탭 버튼으로 롤백
1067                pendingFocusData.clickedTab.focus({ preventScroll: true });
1068            } else {
1069                // [조건 2] Tab : 이동한 영역(h2 -> div 순서) 내부의 첫 번째 포커스 가능 요소 탐색
1070                var focusSelector = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not
1070([tabindex="-1"])';
1071                
1072                var $firstFocusable = pendingFocusData.targetH2.find(focusSelector).filter(':visible').first();
1073                if (!$firstFocusable.length) {
1074                    $firstFocusable = pendingFocusData.targetSec.find(focusSelector).filter(':visible').first();
1075                }
1076
1077                // 1순위: 영역 내부에 포커스할 요소가 있다면 바로 이동
1078                if ($firstFocusable.length) {
1079                    $firstFocusable[0].focus();
1080					console.log($firstFocusable[0]);
1081                } else {
1082                    // 2순위: 영역 내부에 아무것도 없다면, 문서 전체에서 해당 영역 '이후'에 오는 첫 번째 요소 찾기
1083                    var $allFocusables = $('body').find(focusSelector).filter(':visible');
1084                    var nextFocusable = null;
1085
1086                    $allFocusables.each(function () {
1087                        // compareDocumentPosition은 DOM 트리 상의 위치를 비교하는 네이티브 함수입니다.
1088                        // DOCUMENT_POSITION_FOLLOWING(4) : 현재 반복중인 요소(this)가 targetSec보다 뒤에 위치해 있는지 판별
1089                        if (pendingFocusData.targetSec[0].compareDocumentPosition(this) & Node.DOCUMENT_POSITION_FOLLOWING) {
1090                            nextFocusable = this;
1091                            return false; // 가장 먼저 발견된 '다음 요소'를 찾았으므로 each 루프 즉시 종료
1092                        }
1093                    });
1094
1095                    if (nextFocusable) {
1096                        nextFocusable.focus();
1097                    } else {
1098                        // 3순위 (안전장치): 만약 문서 끝까지 뒤졌는데도 클릭 가능한게 단 하나도 없다면 최후의 수단으로 껍데기에 포커스
1099                        pendingFocusData.targetSec.attr('tabindex', '-1')[0].focus();
1100                    }
1101                }
1102            }
1103            pendingFocusData = null;
1104        } else if (pendingFocusData && e.key !== "Tab" && e.key !== "Shift") {
1105            pendingFocusData = null;
1106        }
1107    });
1108
1109    // 마우스로 화면의 다른 곳을 클릭해도 임시 상태 초기화
1110    $(document).on("mousedown", function () {
1111        if (pendingFocusData) pendingFocusData = null;
1112    });
1113
1114    // 이미지 지연 로드 대응
1115    $(".pdp-detail-inner .pdp-accordion .accordion-cont-wrap img").on("load", function () {
1116        navOffsetTop = $nav.offset().top;
1117        updateActiveTab();
1118    });
1119
1120	// ==========================
1121	// 모바일 환경 탭 가로 스크롤 동기화 함수
1122	// ==========================
1123	function syncTabScroll($activeTab) {
1124		// 화면 넓이가 767px 초과면 실행하지 않음
1125		if ($(window).width() > 767) return; 
1126
1127		var $inner = $(".pdp-tabs-inner");
1128		
1129		// 부모 영역과 활성화된 탭의 브라우저 상 좌표 차이를 구해 상대적인 위치를 알아냅니다.
1130		var relativeLeft = $activeTab.offset().left - $inner.offset().left;
1131		
1132		// 활성화된 탭이 화면(또는 부모 컨테이너)의 중앙에 오도록 스크롤할 위치를 계산합니다.
1133		var targetScrollLeft = $inner.scrollLeft() + relativeLeft - ($inner.width() / 2) + ($activeTab.outerWidth() / 2);
1134
1135		// 가로 스크롤 이동 애니메이션 (300ms)
1136		$inner.stop().animate({ scrollLeft: targetScrollLeft }, 300);
1137	}
1138});
1139document.addEventListener('DOMContentLoaded', function () {
1140    var API_URL = 'https://ap-brand-cafe24-adm-fo.apddev.com/api/fo/api/apsulwhasoo/prod-reviews';
1141
1142    var root = document.getElementById('sect5');
1143    if (!root) return;
1144
1145    var reviewsListEl = root.querySelector('.customer-review-list');
1146    var avgStarEl = root.querySelector('.grade-item .grade-score-wrap .grade-star .star');
1147    var avgNumEl = root.querySelector('.grade-item .grade-num');
1148    var sortSelect = document.getElementById('sort-type');
1149    var moreBtn = root.querySelector('.btn-more-review');
1150    var moreWrap = root.querySelector('.btn-more-review-wrap');
1151    var accordionTit = document.querySelector('#accordion5 .accordion-tit');
1152
1153    if (!reviewsListEl) return;
1154
1155    function getProductNoFromQuery() {
1156        var search = window.location.search || '';
1157        var params = new URLSearchParams(search);
1158        var fromQuery = params.get('product_no') || '';
1159        if (fromQuery) {
1160            return fromQuery;
1161        }
1162        var path = window.location.pathname || '';
1163        var match = path.match(/\/product\/[^/]+\/(\d+)\/category\//);
1164        return match ? match[1] : '';
1165    }
1166
1167    // 한글 및 영문 매칭을 위해 공백 제거 및 소문자화
1168    function normalizeLegacyLabel(v) {
1169        return String(v || '').replace(/\s+/g, '').toLowerCase();
1170    }
1171
1172    // 인코딩 깨짐 복구 및 매칭 단어 정형화
1173    function isLegacyLabel(label) {
1174        var n = normalizeLegacyLabel(label);
1175        if (!n) return false;
1176        return n.indexOf('자체상품코드') !== -1 ||
1177            n.indexOf('상품코드') !== -1 ||
1178            n.indexOf('modelcode') !== -1 ||
1179            n.indexOf('legacy_model_code') !== -1;
1180    }
1181
1182    function normalizeLegacyValue(v) {
1183        var raw = String(v || '').trim();
1184        if (!raw) return '';
1185        if (isLegacyLabel(raw)) {
1186            return '';
1187        }
1188        // 숫자, 영문, 하이픈, 언더바 조합의 코드 매칭 (3자 이상)
1189        var m = raw.match(/[A-Za-z0-9_-]{3,}/);
1190        return m ? m[0] : '';
1191    }
1192
1193    function pickLegacyValueFromTableRow(tr) {
1194        if (!tr) return '';
1195        var th = tr.querySelector('th');
1196        var td = tr.querySelector('td');
1197        if (!th || !td) return '';
1198        
1199        var thText = normalizeLegacyLabel(th.textContent || '');
1200        if (thText.indexOf('자체상품코드') === -1 &&
1201            thText.indexOf('상품코드') === -1 &&
1202            thText.indexOf('modelcode') === -1 &&
1203            thText.indexOf('legacy_model_code') === -1) {
1204            return '';
1205        }
1206        var tdSpan = td.querySelector('span');
1207        var raw = tdSpan ? String(tdSpan.textContent || '').trim() : String(td.textContent || '').trim();
1208        return normalizeLegacyValue(raw);
1209    }
1210
1211    function getLegacyModelCode() {
1212        var tableRows = document.querySelectorAll('.infoDetail table tbody tr, .xans-product-detaildesign table tbody tr, table tbody tr');
1213        for (var t = 0; t < tableRows.length; t++) {
1214            var codeFromTable = pickLegacyValueFromTableRow(tableRows[t]);
1215            if (codeFromTable) return codeFromTable;
1216        }
1217        return '';
1218    }
1219
1220    var onlineProdSn = getProductNoFromQuery();
1221    var legacyModelCode = getLegacyModelCode() || onlineProdSn;
1222
1223    var currentPage = 1;
1224    var totalPages = 1;
1225    var totalCount = 0;
1226    var visibleCount = 0;
1227    var photoOnly = false;
1228    var isLoading = false;
1229
1230    // [보완] 필터 value가 'N'이거나 'new'일 때 최신순으로 판단하는 함수
1231    function getCurrentOrderValue() {
1232        if (!sortSelect) return 'best';
1233        var val = sortSelect.value;
1234        return (val === 'N' || val === 'new') ? 'new' : 'best';
1235    }
1236    
1237    var currentOrder = getCurrentOrderValue();
1238
1239    function maskMemberId(id) {
1240        if (!id || id.length <= 2) return id ? id.charAt(0) + '***' : '***';
1241        return id.substring(0, 2) + '****';
1242    }
1243
1244    function formatDate(dtStr) {
1245        if (!dtStr) return '';
1246        var d = new Date(String(dtStr).replace(/-/g, '/'));
1247        if (isNaN(d.getTime())) return dtStr;
1248        var y = d.getFullYear();
1249        var m = ('0' + (d.getMonth() + 1)).slice(-2);
1250        var day = ('0' + d.getDate()).slice(-2);
1251        return y + '.' + m + '.' + day;
1252    }
1253
1254    function escapeHtml(str) {
1255        return String(str == null ? '' : str)
1256            .replace(/&/g, '&amp;')
1257            .replace(/</g, '&lt;')
1258            .replace(/>/g, '&gt;');
1259    }
1260
1261    function normalizeReviewUrl(url) {
1262        var raw = String(url == null ? '' : url).trim();
1263        if (!raw) return '';
1264        try {
1265            var resolved = new URL(raw, window.location.origin);
1266            if (resolved.protocol === 'http:' || resolved.protocol === 'https:') {
1267                return resolved.href;
1268            }
1269        } catch (e) {}
1270        return '';
1271    }
1272
1273    function scopeToStarClass(scope) {
1274        var n = parseFloat(scope, 10);
1275        if (isNaN(n) || n < 0) n = 0;
1276        var rounded = Math.round(n);
1277        if (rounded < 1) rounded = 1;
1278        if (rounded > 5) rounded = 5;
1279        return 'star' + rounded;
1280    }
1281
1282    function formatCount(n) {
1283        var x = parseInt(n, 10);
1284        if (isNaN(x) || x < 0) return '0';
1285        return String(x).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
1286    }
1287
1288    function updateAccordionTitle(count) {
1289        if (!accordionTit) return;
1290        var c = formatCount(count);
1291        accordionTit.textContent = '리뷰(' + c + ')';
1292		const navReviewTit = document.querySelector('.pdp__nav .pdp__tabs .tab-link[href="#sect5"]');
1293		if(!navReviewTit) return;
1294		navReviewTit.textContent = '리뷰(' + c + ')';
1295    }
1296
1297    function updateReviewCount(count) {                                                                                 
1298        var prdGradeCountEl = document.querySelector('.prd-grade .review-count a');        
1299        if (prdGradeCountEl) {
1300            prdGradeCountEl.textContent = formatCount(count);                                        
1301        }                                                    
1302    }
1303
1304    function updateAverageDisplay(avgScope) {
1305        var avg = parseFloat(avgScope, 10);
1306        if (isNaN(avg)) avg = 0;
1307        var displayScore = (Math.round(avg * 10) / 10) || 0;
1308        if (avgNumEl) {
1309            avgNumEl.textContent = displayScore.toFixed(1) + ' / 5.0';
1310        }
1311        if (avgStarEl) {
1312            avgStarEl.className = 'star ' + scopeToStarClass(avg);
1313        }
1314        var prdGradeStarEl = document.querySelector('.prd-grade .grade-star .star');
1315        if (prdGradeStarEl) {
1316            prdGradeStarEl.className = 'star ' + scopeToStarClass(avg);
1317        }
1318        var prdGradeNumEl = document.querySelector('.prd-grade .grade-num');
1319        if (prdGradeNumEl) {
1320            prdGradeNumEl.textContent = displayScore.toFixed(1) + ' / 5.0';
1321        }
1322    } 
1323
1324    function mergeReviewRowsToList(rows) {
1325        var reviewMap = {};
1326        var orderKeys = [];
1327        if (!Array.isArray(rows)) {
1328            return [];
1329        }
1330        rows.forEach(function (row) {
1331            var rawId = row.review_sn != null ? row.review_sn
1332                : row.prod_review_sn != null ? row.prod_review_sn
1333                : row.id != null ? row.id
1334                : null;
1335            var key = String(rawId != null ? rawId : 'r' + Math.random());
1336            if (!reviewMap[key]) {
1337                orderKeys.push(key);
1338                reviewMap[key] = {
1339                    member_id: row.member_id || '',
1340                    scope: row.rating != null ? row.rating : (row.scope != null ? row.scope : 5),
1341                    date: row.created_at || row.created_dt || row.prod_review_regist_dt || row.date || '',
1342                    content: row.content || row.prod_review_body_text || row.prod_review_title || '',
1343                    photos: []
1344                };
1345            }
1346            if (Array.isArray(row.images) && row.images.length > 0) {
1347                row.images.forEach(function (img) {
1348                    if (!img) return;
1349                    var imgUrl = String(img.thumbnail_url || img.file_url || img.video_thumbnail_img || '').trim();
1350                    if (imgUrl) {
1351                        reviewMap[key].photos.push({
1352                            url: imgUrl,
1353                            alt: img.file_desc || img.img_desc || img.img_alt || '리뷰 이미지'
1354                        });
1355                    }
1356                });
1357            } else {
1358                var imgUrl = String(row.thumbnail_url || row.video_thumbnail_img || row.file_url ||
1359                    row.img_url || row.img_path || row.attach_file_path || row.file_path || row.photo_url || row.image_url || '').trim();
1360                if (imgUrl) {
1361                    reviewMap[key].photos.push({
1362                        url: imgUrl,
1363                        alt: row.file_desc || row.img_desc || row.img_alt || row.photo_alt || row.alt || '리뷰 이미지'
1364                    });
1365                }
1366            }
1367        });
1368        return orderKeys.map(function (k) { return reviewMap[k]; });
1369    }
1370
1371    function buildPhotoSection(photos) {
1372        if (!Array.isArray(photos) || !photos.length) return '';
1373        var inner = '';
1374        photos.forEach(function (p) {
1375            var u = normalizeReviewUrl(p.url);
1376            if (!u) return;
1377            inner += '<div class="photo-item"><img src="' + escapeHtml(u) + '" alt="상품 리뷰 사진 ' + escapeHtml(p.alt || '') + '"></div>';
1378        });
1379        if (!inner) return '';
1380        return '<div class="photo-list-wrap"><div class="photo-list">' + inner + '</div></div>';
1381    }
1382
1383    function stripHtml(html) {
1384        if (!html) return '';
1385        var doc = new DOMParser().parseFromString(html, 'text/html');
1386        return doc.body.textContent || '';
1387    }
1388
1389    function buildReviewLi(r) {
1390        var scope = r.scope != null ? r.scope : 0;
1391        var starClass = scopeToStarClass(scope);
1392        var scoreText = (Math.round(parseFloat(scope, 10) * 10) / 10);
1393        if (isNaN(scoreText)) scoreText = 0;
1394        var bodyText = escapeHtml(stripHtml(r.content) || '');
1395        var memberId = escapeHtml(maskMemberId(r.member_id || ''));
1396        var dateStr = escapeHtml(formatDate(r.date));
1397        var photosHtml = buildPhotoSection(r.photos);
1398
1399        var html = '';
1400        html += '<li class="customer-review-item" data-review-item="1">';
1401        html += '  <div class="grade-wrap">';
1402        html += '    <span class="grade-star"> <span class="star ' + starClass + '"></span></span>';
1403        html += '    <span class="grade-num blind">' + scoreText.toFixed(1) + ' / 5.0</span>';
1404        html += '  </div>';
1405        html += '  <div class="writer-info-wrap">';
1406        html += '    <div class="writer-info"><span class="id">' + memberId + '</span></div>';
1407        html += '    <time>' + dateStr + '</time>';
1408        html += '  </div>';
1409        html += '  <div class="comment-wrap">' + bodyText + '</div>';
1410        html += photosHtml;
1411        html += '</li>';
1412        return html;
1413    }
1414
1415    // [보완] 더보기 버튼 노출 조건 및 남은 개수 표기 로직 안정화
1416    function setMoreButtonState() {
1417        if (!moreBtn) return;
1418        var txtSpan = moreBtn.querySelector('.btn-more-txt');
1419        var remainingCount = Math.max(0, totalCount - visibleCount);
1420        var label = '더보기 (' + formatCount(remainingCount) + ')';
1421        
1422        if (txtSpan) {
1423            txtSpan.innerHTML = '<i></i><span class="ap2022-sr-only">리뷰</span>' + label;
1424        } else {
1425            moreBtn.textContent = label;
1426        }
1427        
1428        if (!moreWrap) return;
1429        
1430        // 더 이상 노출할 페이지가 없거나 결과가 0개면 숨김
1431        if (totalCount === 0 || currentPage >= totalPages || totalPages <= 1) {
1432            moreWrap.style.display = 'none';
1433        } else {
1434            moreWrap.style.display = '';
1435        }
1436        moreBtn.disabled = isLoading || currentPage >= totalPages;
1437    }
1438
1439    function clampWrap(wrap) {
1440        wrap.dataset.expanded = '0';
1441        wrap.style.setProperty('display', '-webkit-box', 'important');
1442        wrap.style.setProperty('-webkit-line-clamp', '3', 'important');
1443        wrap.style.setProperty('-webkit-box-orient', 'vertical', 'important');
1444        wrap.style.setProperty('overflow', 'hidden', 'important');
1445        wrap.style.setProperty('max-height', 'none', 'important');
1446        wrap.style.setProperty('cursor', 'pointer', 'important');
1447        wrap.style.setProperty('pointer-events', 'auto', 'important');
1448    }
1449    
1450    function unclampWrap(wrap) {
1451        wrap.dataset.expanded = '1';
1452        wrap.style.setProperty('display', 'block', 'important');
1453        wrap.style.setProperty('-webkit-line-clamp', 'unset', 'important');
1454        wrap.style.setProperty('-webkit-box-orient', 'horizontal', 'important');
1455        wrap.style.setProperty('overflow', 'visible', 'important');
1456        wrap.style.setProperty('max-height', 'none', 'important');
1457        wrap.style.setProperty('cursor', 'pointer', 'important');
1458        wrap.style.setProperty('pointer-events', 'auto', 'important');
1459    }
1460
1461    function applyReviewClamp() {
1462        if (!reviewsListEl) return;
1463        var wraps = reviewsListEl.querySelectorAll('.comment-wrap');
1464        Array.prototype.forEach.call(wraps, function (wrap) {
1465            clampWrap(wrap);
1466        });
1467    }
1468
1469    reviewsListEl.addEventListener('click', function (e) {
1470        var wrap = e.target && e.target.closest ? e.target.closest('.comment-wrap') : null;
1471        if (!wrap) return;
1472        if (wrap.dataset.expanded === '1') {
1473            clampWrap(wrap);
1474        } else {
1475            unclampWrap(wrap);
1476        }
1477    });
1478
1479    function showEmptyList() {
1480        reviewsListEl.innerHTML = '<li class="customer-review-item"><div class="no-data">등록된 리뷰가 없습니다.</div></li>';
1481        updateAverageDisplay(0);
1482        updateAccordionTitle(0);
1483        updateReviewCount(0);
1484        totalCount = 0;
1485        visibleCount = 0;
1486        totalPages = 1;
1487        currentPage = 1;
1488        setMoreButtonState();
1489    }
1490
1491    function loadReviews(page, append) {
1492        if (isLoading) return;
1493        if (!legacyModelCode) {
1494            showEmptyList();
1495            return;
1496        }
1497
1498        isLoading = true;
1499        if (moreBtn) moreBtn.disabled = true;
1500
1501        var body = {
1502            page: page,
1503            order: currentOrder === 'best' ? 'best' : 'new',
1504            photo_only: photoOnly ? 1 : 0,
1505            legacy_model_code: String(legacyModelCode)
1506        };
1507        var urlParams = new URLSearchParams(body).toString();
1508        var requestUrl = API_URL + (API_URL.indexOf('?') === -1 ? '?' : '&') + urlParams;
1509
1510        fetch(requestUrl, {
1511            method: 'GET',
1512            headers: { 'Accept': 'application/json' }
1513        })
1514            .then(function (res) {
1515                if (!res.ok) throw new Error('Network response was not ok');
1516                return res.json();
1517            })
1518            .then(function (json) {
1519                isLoading = false;
1520
1521                if (!json || json.success === false || !Array.isArray(json.data)) {
1522                    if (!append) showEmptyList();
1523                    setMoreButtonState();
1524                    return;
1525                }
1526
1527                var rows = json.data;
1528                var avgScope = parseFloat(json.avg_scope, 10);
1529                if (isNaN(avgScope)) avgScope = 0;
1530                var tp = json.total_pages != null ? parseInt(json.total_pages, 10) : 1;
1531                totalCount = json.total != null ? parseInt(json.total, 10) : 0;
1532                if (isNaN(totalCount)) totalCount = 0;
1533                totalPages = tp > 0 ? tp : 1;
1534                currentPage = page;
1535
1536                var list = mergeReviewRowsToList(rows);
1537                if (photoOnly) {
1538                    list = list.filter(function (r) { return Array.isArray(r.photos) && r.photos.length > 0; });
1539                }
1540
1541                if (!append) {
1542                    updateAverageDisplay(avgScope);
1543                    updateAccordionTitle(totalCount);
1544                    updateReviewCount(totalCount);
1545                }
1546
1547                var html = '';
1548                for (var i = 0; i < list.length; i++) {
1549                    html += buildReviewLi(list[i]);
1550                }
1551
1552                if (append) {
1553                    if (html) {
1554                        reviewsListEl.insertAdjacentHTML('beforeend', html);
1555                    }
1556                } else {
1557                    if (list.length) {
1558                        reviewsListEl.innerHTML = html;
1559                        $('.all-review-area').show();
1560                    } else {
1561                        reviewsListEl.innerHTML = '';
1562						showEmptyList();
1563                        $('.all-review-area').hide();
1564                        updateAverageDisplay(0);
1565                    }                
1566                }
1567
1568                visibleCount = reviewsListEl.querySelectorAll('li.customer-review-item[data-review-item="1"]').length;
1569
1570                applyReviewClamp();
1571                setMoreButtonState();
1572            })
1573            .catch(function () {
1574                isLoading = false;
1575                if (!append) showEmptyList();
1576                setMoreButtonState();
1577            });
1578    }
1579
1580    // [보완] 정렬 조건 선택 상자 이벤트 연동 확실화
1581    if (sortSelect) {
1582        sortSelect.addEventListener('change', function () {
1583            currentOrder = getCurrentOrderValue(); // 갱신된 value를 안전하게 매핑
1584            loadReviews(1, false); // 조건 변경 시 무조건 1페이지부터 덮어쓰기 호출
1585        });
1586    }
1587
1588    // [보완] 더보기 버튼 연속 클릭 방지 및 예외 방어
1589    if (moreBtn) {
1590        moreBtn.addEventListener('click', function (e) {
1591            e.preventDefault();
1592            if (isLoading || currentPage >= totalPages) return;
1593            loadReviews(currentPage + 1, true); // 다음 페이지 데이터 추가 바인딩
1594        });
1595    }
1596
1597    // 첫 진입 시 최초 1페이지 자동 로드
1598    loadReviews(1, false);
1599});
1600// 스크립트 생성 일시 2026 / 03 / 26 | 작성자 : JMH
1601// 상품 상세 페이지 로드 시 product 이벤트 태깅
1602document.addEventListener('DOMContentLoaded', function () {
1603    window.dataLayer = window.dataLayer || [];
1604
1605    // AP_DATA_BREAD 대기 (header에서 비동기 설정될 수 있음)
1606    function waitForBread(callback, maxRetry = 20, interval = 500) {
1607        let count = 0;
1608        const timer = setInterval(() => {
1609            if (window.AP_DATA_PAGETYPE || count >= maxRetry) {
1610                clearInterval(timer);
1611                callback();
1612            }
1613            count++;
1614        }, interval);
1615    }
1616
1617    waitForBread(function () {
1618        initializeProductInfo();
1619    });
1620
1621    function initializeProductInfo() {
1622        const currencyInfo = CAFE24.SHOP_CURRENCY_INFO;
1623        const shopKey = Object.keys(currencyInfo)[0];
1624        window.AP_ECOMM_CURRENCY = currencyInfo[shopKey]?.aShopCurrencyInfo?.currency_code || 'KRW';
1625
1626        // rel 속성이 있는 표준 카페24 스킨 매칭 우선, 없으면 텍스트 기반 폴백
1627        var prdCodeEl = document.querySelector('li[rel="자체상품코드"] > span')
1628                     || document.querySelector('li[rel="자체상품코드"]')
1629                     || document.querySelector('tr[rel="자체상품코드"] td span')
1630                     || document.querySelector('tr[rel="자체상품코드"] td');
1631        if (prdCodeEl) {
1632            window.AP_PRD_CODE = prdCodeEl.textContent.trim();
1633        } else {
1634            // 폴백: rel 속성 없는 커스텀 스킨 (설화수 등) — <th>자체상품코드</th><td>값</td> 또는 <li><strong>자체상품코드</strong><span>값</span></li>
1635            window.AP_PRD_CODE = (function() {
1636                var rows = document.querySelectorAll('tr');
1637                for (var i = 0; i < rows.length; i++) {
1638                    var th = rows[i].querySelector('th');
1639                    if (th && /자체상품코드/.test(th.textContent)) {
1640                        var td = rows[i].querySelector('td span') || rows[i].querySelector('td');
1641                        if (td) return td.textContent.trim();
1642                    }
1643                }
1644                var lis = document.querySelectorAll('li');
1645                for (var j = 0; j < lis.length; j++) {
1646                    var label = lis[j].querySelector('strong.title, .title, strong');
1647                    if (label && /자체상품코드/.test(label.textContent)) {
1648                        var clone = lis[j].cloneNode(true);
1649                        clone.querySelectorAll('.title, strong').forEach(function(n) { n.remove(); });
1650                        var v = clone.textContent.replace(/\s+/g, ' ').replace(/^:\s*/, '').trim();
1651                        if (v) return v;
1652                    }
1653                }
1654                return undefined;
1655            })();
1656        }
1657
1658        // 한글 상품명만 추출
1659        const domKoEl = document.querySelector('#ga-prd-name')
1660                     || document.querySelector('.prd-name-ko')
1661                     || document.querySelector('.headingArea h2')
1662                     || document.querySelector('.prd-name');
1663        var domName = '';
1664        if (domKoEl) {
1665            var clone = domKoEl.cloneNode(true);
1666            clone.querySelectorAll('.prd-name-en, .prd-eng, .eng, .prd-name-eng, .vol').forEach(function(n) { n.remove(); });
1667            domName = clone.textContent.replace(/&nbsp;/g, ' ').replace(/\s+/g, ' ').trim();
1668        }
1669
1670        var apiName = '';
1671        if (typeof product_name !== 'undefined' && product_name) {
1672            const tmp = document.createElement('textarea');
1673            tmp.innerHTML = product_name;
1674            apiName = tmp.value.replace(/<br\s*\/?>/gi, ' ').replace(/\s+/g, ' ').trim();
1675        }
1676
1677        function isKorean(s) { return /[가-힯]/.test(s); }
1678        function hasEnglish(s) { return /[A-Za-z]{4,}/.test(s); }
1679
1680        var baseName = '';
1681        if (domName && isKorean(domName) && !hasEnglish(domName)) baseName = domName;
1682        else if (apiName && isKorean(apiName) && !hasEnglish(apiName)) baseName = apiName;
1683        else if (apiName) baseName = apiName;
1684        else baseName = domName || '';
1685
1686        var volEl = document.querySelector('li[rel*="용량"] span, li[rel*="중량"] span, li[rel*="규격"] span');
1687        var vol = volEl ? volEl.textContent.replace(/&nbsp;/g, ' ').trim() : '';
1688        if (vol && /\d/.test(vol) && vol.indexOf('용량') === -1 && baseName.indexOf(vol) === -1) {
1689            baseName = baseName + ' ' + vol;
1690        }
1691
1692        window.AP_PRD_NAME = baseName || undefined;
1693        window.AP_PRD_BRAND = 'SULWHASOO';
1694        window.AP_PRD_APGBRCODE = 11117;
1695
1696        var cateParts = [];
1697        var breadEl = document.getElementById('ga-bread');
1698        if (breadEl) {
1699            breadEl.querySelectorAll('li').forEach(function(li) {
1700                var t = li.textContent.trim();
1701                if (t && t !== '홈' && t !== 'Home' && t !== 'home') cateParts.push(t);
1702            });
1703        }
1704        var rawCategory = cateParts.length > 0 ? cateParts.join(' / ') : '';
1705        window.AP_PRD_CATEGORY = (!rawCategory || /^\d+$/.test(rawCategory) || rawCategory.indexOf('전체보기') > -1 || rawCategory.indexOf('전체상품') > -1) ? '전체상품' : rawCategory;
1706
1707        window.AP_PRD_ISTOCK = undefined;
1708
1709        // 가격 추출 (카페24 PDP 표준 셀렉터 다단계 폴백)
1710        // - AP_PRD_PRICE: 판매가 (실제 결제 가격)
1711        // - AP_PRD_PRDPRICE: 소비자가/정가 (없으면 판매가로 fallback)
1712        // - AP_PRD_DISCOUNT: 정가 > 판매가일 때만 계산
1713        var SALE_PRICE_SELECTORS = [
1714            'tr[rel="판매가"] #span_product_price_text',
1715            'tr[rel="판매가"] td span',
1716            'tr[rel="판매가"] td',
1717            'li[rel="판매가"] #span_product_price_text',
1718            'li[rel="판매가"] span',
1719            'li[rel="판매가"]',
1720            '.productCustomPrice #span_product_price_text',
1721            '.productCustomPrice strong',
1722            '#span_product_price_text'
1723        ];
1724        var RETAIL_PRICE_SELECTORS = [
1725            'tr[rel="소비자가"] td span',
1726            'tr[rel="소비자가"] td',
1727            'li[rel="소비자가"] span',
1728            'li[rel="소비자가"]',
1729            '#span_product_consumer_price_text'
1730        ];
1731        function pickPrice(selectors, label) {
1732            for (var i = 0; i < selectors.length; i++) {
1733                var el = document.querySelector(selectors[i]);
1734                if (!el) continue;
1735                var num = (el.textContent || '').replace(/[^0-9]/g, '');
1736                if (num) {
1737                    // console.log('[PDP price] ' + label + ' matched:', selectors[i], '→', num);
1738                    return Number(num);
1739                }
1740            }
1741            return undefined;
1742        }
1743        window.AP_PRD_PRICE = pickPrice(SALE_PRICE_SELECTORS, '판매가');
1744        window.AP_PRD_PRDPRICE = pickPrice(RETAIL_PRICE_SELECTORS, '소비자가') || window.AP_PRD_PRICE;
1745        window.AP_PRD_DISCOUNT = undefined;
1746        if (window.AP_PRD_PRICE != null && window.AP_PRD_PRDPRICE != null && window.AP_PRD_PRDPRICE > window.AP_PRD_PRICE) {
1747            window.AP_PRD_DISCOUNT = window.AP_PRD_PRDPRICE - window.AP_PRD_PRICE;
1748        }
1749
1750        // console.log('[PDP] AP_ECOMM_CURRENCY:', window.AP_ECOMM_CURRENCY);
1751        // console.log('[PDP] AP_PRD_CODE:', window.AP_PRD_CODE);
1752        // console.log('[PDP] AP_PRD_NAME:', window.AP_PRD_NAME);
1753        // console.log('[PDP] AP_PRD_BRAND:', window.AP_PRD_BRAND);
1754        // console.log('[PDP] AP_PRD_CATEGORY:', window.AP_PRD_CATEGORY);
1755        // console.log('[PDP] AP_PRD_APGBRCODE:', window.AP_PRD_APGBRCODE);
1756        // console.log('[PDP] AP_PRD_ISTOCK:', window.AP_PRD_ISTOCK);
1757        // console.log('[PDP] AP_PRD_PRICE:', window.AP_PRD_PRICE);
1758        // console.log('[PDP] AP_PRD_PRDPRICE:', window.AP_PRD_PRDPRICE);
1759        // console.log('[PDP] AP_PRD_DISCOUNT:', window.AP_PRD_DISCOUNT);
1760
1761        // console.log('[PDP] dataLayer push:', {
1762        //     event: 'product',
1763        //     AP_PRD_CODE: window.AP_PRD_CODE,
1764        //     AP_PRD_NAME: window.AP_PRD_NAME,
1765        //     AP_PRD_BRAND: window.AP_PRD_BRAND,
1766        //     AP_PRD_CATEGORY: window.AP_PRD_CATEGORY,
1767        //     AP_PRD_APGBRCODE: window.AP_PRD_APGBRCODE,
1768        //     AP_ECOMM_CURRENCY: window.AP_ECOMM_CURRENCY
1769        // });
1770
1771        window.dataLayer.push({ 'event': 'product' });
1772    }
1773});
1774
1775
1776// ===== PDP 클릭 ap-click 자동 부착 =====
1777window.addEventListener('load', function() {
1778    function attach(el, area, name, data) {
1779        if (!el || el.hasAttribute('ap-click-area')) return;
1780        if (area) el.setAttribute('ap-click-area', area);
1781        if (name) el.setAttribute('ap-click-name', name);
1782        if (data) el.setAttribute('ap-click-data', data);
1783    }
1784    function txt(el) { return el ? (el.textContent || '').replace(/\s+/g, ' ').trim() : ''; }
1785
1786    var prdName = window.AP_PRD_NAME || '';
1787
1788    // 구매하기
1789    document.querySelectorAll('.btnSubmit, .actionBuy, button[onclick*="buyitem"], a[onclick*="buyitem"]').forEach(function(el) {
1790        attach(el, 'Product Detail', 'Click - Buy', prdName || txt(el) || 'BUY');
1791    });
1792
1793    // 장바구니
1794    document.querySelectorAll('.actionCart, button[onclick*="basketitem"], a[onclick*="basketitem"], .btnNormal.actionCart').forEach(function(el) {
1795        attach(el, 'Product Detail', 'Click - Cart', prdName || txt(el) || 'CART');
1796    });
1797
1798    // 위시리스트
1799    document.querySelectorAll('.actionWish, button[onclick*="wishitem"], a[onclick*="wishitem"], .btnNormal[class*="wishlist"]').forEach(function(el) {
1800        attach(el, 'Product Detail', 'Click - Wishlist', prdName || 'WISHLIST');
1801    });
1802
1803    // 옵션 선택 버튼
1804    document.querySelectorAll('.selectButton, .option_push_button').forEach(function(el) {
1805        attach(el, 'Product Detail', 'Click - Option', txt(el) || 'OPTION');
1806    });
1807
1808    // 정기배송
1809    document.querySelectorAll('[class*="btn_regular_delivery"], .regular-delivery a, .regular-delivery button').forEach(function(el) {
1810        attach(el, 'Product Detail', 'Click - Regular Delivery', prdName || txt(el) || 'REGULAR');
1811    });
1812
1813    // 상세 탭 (상품정보/리뷰/Q&A/배송 등)
1814    document.querySelectorAll('.detail_tab a, .detail_tab button, .detail-tab-wrap a, .detail-tab-wrap button, .product-detail-tab a, .product-detail-tab button').forEach(function(el) {
1815        attach(el, 'Product Detail', 'Click - Tab', txt(el) || 'TAB');
1816    });
1817
1818    // 리뷰 더보기 / 리뷰 작성
1819    document.querySelectorAll('.btn-more-review, .btn-more-review-wrap a, .all-review-area a, .all-review-area button, .review a.btnMore').forEach(function(el) {
1820        attach(el, 'Product Detail', 'Click - Review More', txt(el) || 'REVIEW MORE');
1821    });
1822    document.querySelectorAll('.review .btnReview, .review-write a, a[href*="write"]').forEach(function(el) {
1823        if (el.closest('.review, .review__list, .all-review-area')) {
1824            attach(el, 'Product Detail', 'Click - Review Write', txt(el) || 'REVIEW WRITE');
1825        }
1826    });
1827
1828    // 쿠폰 다운로드
1829    document.querySelectorAll('.coupon-area a, .coupon-area button, [class*="coupon"] [class*="down"]').forEach(function(el) {
1830        attach(el, 'Product Detail', 'Click - Coupon', txt(el) || 'COUPON');
1831    });
1832
1833    // SNS 공유
1834    document.querySelectorAll('.share-area a, .product-share a, [class*="share"] a').forEach(function(el) {
1835        var href = el.getAttribute('href') || '';
1836        var sns = '';
1837        if (href.indexOf('facebook') > -1) sns = 'Facebook';
1838        else if (href.indexOf('twitter') > -1 || href.indexOf('x.com') > -1) sns = 'X';
1839        else if (href.indexOf('kakao') > -1) sns = 'Kakao';
1840        else if (href.indexOf('naver') > -1) sns = 'Naver';
1841        else if (href.indexOf('instagram') > -1) sns = 'Instagram';
1842        else sns = txt(el) || 'SHARE';
1843        attach(el, 'Product Detail', 'Click - Share', sns);
1844    });
1845
1846    // 재입고 알림
1847    document.querySelectorAll('[class*="restock"], [class*="sms_restock"]').forEach(function(el) {
1848        if (el.tagName === 'A' || el.tagName === 'BUTTON') {
1849            attach(el, 'Product Detail', 'Click - Restock Alert', prdName || 'RESTOCK');
1850        }
1851    });
1852});
1853
1854function removePagingArea(oTarget)
1855{
1856    if ($(oTarget).length < 1 && (oTarget != '#prdReview' || oTarget != '#prdQna')) return;
1857
1858    if ($(oTarget).css('display') == 'block') {
1859        if (oTarget == '#prdReview') {
1860            var record = $('.xans-record-', '.xans-product-review').first();
1861            if (record.length < 1 || record.is(':not(:visible)')) {
1862                $('.xans-product-reviewpaging').remove();
1863             }
1864         } else if (oTarget == '#prdQnA') {
1865            var record = $('.xans-record-', '.xans-product-qna').first();
1866            if (record.length < 1 || record.is(':not(:visible)')) {
1867                $('.xans-product-qnapaging').remove();
1868            }
1869         }
1870     }
1871}
1872
1873$(function() {
1874
1875    $('#actionCartClone, #actionWishClone, #actionBuyClone, #actionWishSoldoutClone').off().on('click', function() {
1876        try {
1877            var id = $(this).attr('id').replace(/Clone/g, '');
1878            if (typeof(id) !== 'undefined') $('#' + id).trigger('click');
1879            else return false;
1880        } catch(e) {
1881            return false;
1882        }
1883    });
1884
1885    function productDetailOrigin(){
1886        var imgChk = $('#prdDetailContent').find('img').length;
1887        if(imgChk <= 0){
1888            $('#prdDetailBtn').remove();
1889        }
1890    }
1891    productDetailOrigin();
1892
1893    // Add Image
1894    var oTarget = $('.xans-product-mobileimage ul li');
1895    var oAppend = oTarget.first().children('p').clone();
1896
1897    oTarget.slice(1).each(function() {
1898        // $(this).children().wrap(function() {
1899        //     return '<p class="thumbnail">' + $(this).html() + oAppend.html() + '</p>';
1900        // });
1901        this.innerHTML = '<p class="thumbnail">' + oAppend.html() + this.innerHTML + '</p>';
1902        if ($(this).children('p').children('img').length > 1) {
1903            $(this).children('p').children('img').first().remove();
1904        }
1905    });
1906});
1907
1908/** 오우이_JS 210519 **/
1909jQuery(document).ready(function() {
1910
1911	/* 상세 관련상품 */
1912	if (jQuery('.xans-product-relation').val() != undefined) {	//관련상품 모듈 있을떄만 실행(없으면 주문서페이지에서 오류) -정환
1913		var relation_slide = new Swiper('.relation_slide', {
1914			slidesPerView: 4,
1915			spaceBetween: 20,
1916			observer: true,
1917			observeParents: true,
1918			watchOverflow: 'true', // 스와이프가 한개일때 버튼 라인 비활성
1919			speed:700,
1920			keyboard: {
1921			  enabled: true,
1922			  onlyInViewport: true,
1923			},
1924			a11y: {
1925			  enabled: true,
1926			  prevSlideMessage: '이전 슬라이드로 이동',
1927			  nextSlideMessage: '다음 슬라이드로 이동',
1928			  paginationBulletMessage: '{{index}}번째 슬라이드로 이동',
1929			},
1930			navigation: {
1931				nextEl: '.swiper-next-relation',
1932				prevEl: '.swiper-prev-relation',
1933			},
1934			scrollbar: {
1935				el: ".swiper-scrollbar",
1936				hide: false,
1937				draggable: true,
1938			},
1939			autoplay: {
1940				delay: 5000,
1941				disableOnInteraction: false,
1942			},
1943			breakpoints: {
1944				768: {
1945					slidesPerView: 2,
1946					spaceBetween: 10,
1947				},
1948			}
1949		});
1950	}
1951
1952	/* 할인율 없을시 상품명길이 수정 */
1953	setTimeout(function(){
1954		jQuery(".sale_box").each(function(){
1955			jQuery(".xans-product-detail .headingArea").addClass('sale_on');
1956		});
1957	},500)
1958
1959    // 상품상세 탭 이벤트
1960    $('#tabProduct a').click(function(e){
1961        var oTarget = $(this).attr('href');
1962        var domWidth = $(document).width();
1963		var offset = $('.xans-product-additional').offset(); //선택한 태그의 위치를 반환
1964		$('html').animate({scrollTop : offset.top - 60}, 400); // 탭 클릭시 부드럽게 이동
1965		$(this).parent('li').addClass('selected').siblings().removeClass('selected');
1966        if(domWidth < 1024){	// 모바일에서만 실행
1967			$('#tabProduct a').each(function(){
1968				var oSiblings = $(this).attr('href');
1969				if (oTarget != oSiblings) {
1970					$(oSiblings).hide();
1971				} else {
1972					$(oTarget).show();
1973				}
1974			});
1975		}
1976        removePagingArea(oTarget);
1977        if(e) e.preventDefault();
1978    });
1979});
1980/**
1981 * 상품상세 섬네일 롤링
1982 */
1983$(function(){
1984    $.fn.prdImg = function(parm){
1985        var index = 0;
1986        var target = parm.target;
1987        var view = parm.view;
1988        var listWrap = target.find('.xans-product-addimage .inner');
1989        var limit = listWrap.find('> ul > li').length;
1990        var ul = target.find('.xans-product-addimage .inner > ul');
1991        var liFirst = target.find('.xans-product-addimage .inner > ul > li:first-child');
1992        var liWidth = parseInt(liFirst.width());
1993        var liHeight = parseInt(liFirst.height());
1994        var blockWidth = liWidth + parseInt(liFirst.css('marginRight')) + parseInt(liFirst.css('marginLeft'));
1995        var columWidth = blockWidth * view;
1996        var colum = Math.ceil(limit / view);
1997
1998        var roll = {
1999            init : function(){
2000                function struct(){
2001                    var ulWidth = limit * parseInt(blockWidth);
2002                    listWrap.append('<button type="button" class="prev"><i aria-hidden="true" class="icon icoArrowLeft"></i>이전</button>');
2003                    listWrap.append('<button type="button" class="next"><i aria-hidden="true" class="icon icoArrowRight"></i>다음</button>');
2004                    ul.css({'position':'absolute', 'left':0, 'top':0, 'width':ulWidth});
2005                    listWrap.find('> ul > li').each(function(){
2006                        $(this).css({'float':'left'});
2007                    });
2008                    listWrap.css({'position':'relative', 'height':liHeight});
2009
2010                    var prev = listWrap.find('.prev');
2011                    var next = listWrap.find('.next');
2012
2013                    prev.on('click', function(){
2014                        if(index > 0){
2015                            index --;
2016                        }
2017                        roll.slide(index);
2018                    });
2019                    next.on('click', function(){
2020                        if(index < (colum-1) ){
2021                            index ++;
2022                        }
2023                        roll.slide(index);
2024                    });
2025                    if(index == 0){
2026                        prev.hide();
2027                    } else {
2028                        prev.show();
2029                    }
2030                    if(index >= (colum-1)){
2031                        next.hide();
2032                    } else {
2033                        next.show();
2034                    }
2035                }
2036                if(limit > view){
2037                    struct();
2038                }
2039            },
2040            slide : function(index){
2041                var left = '-' + (index * columWidth) +'px';
2042                var prev = listWrap.find('.prev');
2043                var next = listWrap.find('.next');
2044                if(index == 0){
2045                    prev.hide();
2046                } else {
2047                    prev.show();
2048                }
2049                if(index >= (colum-1)){
2050                    next.hide();
2051                } else {
2052                    next.show();
2053                }
2054                ul.stop().animate({'left':left},500);
2055            }
2056        }
2057        roll.init();
2058    };
2059
2060    // 함수호출 : 상품상세 페이지
2061    $.fn.prdImg({
2062        target : $('.xans-product-image'),
2063        view : 5
2064    });
2065
2066    // 함수호출 : 상품확대보기팝업
2067    $.fn.prdImg({
2068        target : $('.xans-product-zoom'),
2069        view : 5
2070    });
2071
2072});
2073/**
2074 * Swiper 4.5.1
2075 * Most modern mobile touch slider and framework with hardware accelerated transitions
2076 * http://www.idangero.us/swiper/
2077 *
2078 * Copyright 2014-2019 Vladimir Kharlampidi
2079 *
2080 * Released under the MIT License
2081 *
2082 * Released on: September 13, 2019
2083 */
2084!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Swiper=t()}(this,function(){"use strict";var f="undefined"==typeof document?{body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},location:{hash:""}}:document,ee="undefined"==typeof window?{document:f,navigator:{userAgent:""},location:{},history:{},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){}}:window,l=function(e){for(var t=0;t<e.length;t+=1)this[t]=e[t];return this.length=e.length,this};function I(e,t){var a=[],i=0;if(e&&!t&&e instanceof l)return e;if(e)if("string"==typeof e){var s,r,n=e.trim();if(0<=n.indexOf("<")&&0<=n.indexOf(">")){var o="div";for(0===n.indexOf("<li")&&(o="ul"),0===n.indexOf("<tr")&&(o="tbody"),0!==n.indexOf("<td")&&0!==n.indexOf("<th")||(o="tr"),0===n.indexOf("<tbody")&&(o="table"),0===n.indexOf("<option")&&(o="select"),(r=f.createElement(o)).innerHTML=n,i=0;i<r.childNodes.length;i+=1)a.push(r.childNodes[i])}else for(s=t||"#"!==e[0]||e.match(/[ .<>:~]/)?(t||f).querySelectorAll(e.trim()):[f.getElementById(e.trim().split("#")[1])],i=0;i<s.length;i+=1)s[i]&&a.push(s[i])}else if(e.nodeType||e===ee||e===f)a.push(e);else if(0<e.length&&e[0].nodeType)for(i=0;i<e.length;i+=1)a.push(e[i]);return new l(a)}function r(e){for(var t=[],a=0;a<e.length;
vendor: 43,198 bytes, line 2084
2084a+=1)-1===t.indexOf(e[a])&&t.push(e[a]);return t}I.fn=l.prototype,I.Class=l,I.Dom7=l;var t={addClass:function(e){if(void 0===e)return this;for(var t=e.split(" "),a=0;a<t.length;a+=1)for(var i=0;i<this.length;i+=1)void 0!==this[i]&&void 0!==this[i].classList&&this[i].classList.add(t[a]);return this},removeClass:function(e){for(var t=e.split(" "),a=0;a<t.length;a+=1)for(var i=0;i<this.length;i+=1)void 0!==this[i]&&void 0!==this[i].classList&&this[i].classList.remove(t[a]);return this},hasClass:function(e){return!!this[0]&&this[0].classList.contains(e)},toggleClass:function(e){for(var t=e.split(" "),a=0;a<t.length;a+=1)for(var i=0;i<this.length;i+=1)void 0!==this[i]&&void 0!==this[i].classList&&this[i].classList.toggle(t[a]);return this},attr:function(e,t){var a=arguments;if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(var i=0;i<this.length;i+=1)if(2===a.length)this[i].setAttribute(e,t);else for(var s in e)this[i][s]=e[s],this[i].setAttribute(s,e[s]);return this},removeAttr:function(e){for(var t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this},data:function(e,t){var a;if(void 0!==t){for(var i=0;i<this.length;i+=1)(a=this[i]).dom7ElementDataStorage||(a.dom7ElementDataStorage={}),a.dom7ElementDataStorage[e]=t;return this}if(a=this[0]){if(a.dom7ElementDataStorage&&e in a.dom7ElementDataStorage)return a.dom7ElementDataStorage[e];var s=a.getAttribute("data-"+e);return s||void 0}},transform:function(e){for(var t=0;t<this.length;t+=1){var a=this[t].style;a.webkitTransform=e,a.transform=e}return this},transition:function(e){"string"!=typeof e&&(e+="ms");for(var t=0;t<this.length;t+=1){var a=this[t].style;a.webkitTransitionDuration=e,a.transitionDuration=e}return this},on:function(){for(var e,t=[],a=arguments.length;a--;)t[a]=arguments[a];var i=t[0],r=t[1],n=t[2],s=t[3];function o(e){var t=e.target;if(t){var a=e.target.dom7EventData||[];if(a.indexOf(e)<0&&a.unshift(e),I(t).is(r))n.apply(t,a);else for(var i=I(t).parents(),s=0;s<i.length;s+=1)I(i[s]).is(r)&&n.apply(i[s],a)}}function l(e){var t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),n.apply(this,t)}"function"==typeof t[1]&&(i=(e=t)[0],n=e[1],s=e[2],r=void 0),s=s||!1;for(var d,p=i.split(" "),c=0;c<this.length;c+=1){var u=this[c];if(r)for(d=0;d<p.length;d+=1){var h=p[d];u.dom7LiveListeners||(u.dom7LiveListeners={}),u.dom7LiveListeners[h]||(u.dom7LiveListeners[h]=[]),u.dom7LiveListeners[h].push({listener:n,proxyListener:o}),u.addEventListener(h,o,s)}else for(d=0;d<p.length;d+=1){var v=p[d];u.dom7Listeners||(u.dom7Listeners={}),u.dom7Listeners[v]||(u.dom7Listeners[v]=[]),u.dom7Listeners[v].push({listener:n,proxyListener:l}),u.addEventListener(v,l,s)}}return this},off:function(){for(var e,t=[],a=arguments.length;a--;)t[a]=arguments[a];var i=t[0],s=t[1],r=t[2],n=t[3];"function"==typeof t[1]&&(i=(e=t)[0],r=e[1],n=e[2],s=void 0),n=n||!1;for(var o=i.split(" "),l=0;l<o.length;l+=1)for(var d=o[l],p=0;p<this.length;p+=1){var c=this[p],u=void 0;if(!s&&c.dom7Listeners?u=c.dom7Listeners[d]:s&&c.dom7LiveListeners&&(u=c.dom7LiveListeners[d]),u&&u.length)for(var h=u.length-1;0<=h;h-=1){var v=u[h];r&&v.listener===r?(c.removeEventListener(d,v.proxyListener,n),u.splice(h,1)):r&&v.listener&&v.listener.dom7proxy&&v.listener.dom7proxy===r?(c.removeEventListener(d,v.proxyListener,n),u.splice(h,1)):r||(c.removeEventListener(d,v.proxyListener,n),u.splice(h,1))}}return this},trigger:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var a=e[0].split(" "),i=e[1],s=0;s<a.length;s+=1)for(var r=a[s],n=0;n<this.length;n+=1){var o=this[n],l=void 0;try{l=new ee.CustomEvent(r,{detail:i,bubbles:!0,cancelable:!0})}catch(e){(l=f.createEvent("Event")).initEvent(r,!0,!0),l.detail=i}o.dom7EventData=e.filter(function(e,t){return 0<t}),o.dispatchEvent(l),o.dom7EventData=[],delete o.dom7EventData}return this},transitionEnd:function(t){var a,i=["webkitTransitionEnd","transitionend"],s=this;function r(e){if(e.target===this)for(t.call(this,e),a=0;a<i.length;a+=1)s.off(i[a],r)}if(t)for(a=0;a<i.length;a+=1)s.on(i[a],r);return this},outerWidth:function(e){if(0<this.length){if(e){var t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(e){if(0<this.length){if(e){var t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},offset:function(){if(0<this.length){var e=this[0],t=e.getBoundingClientRect(),a=f.body,i=e.clientTop||a.clientTop||0,s=e.clientLeft||a.clientLeft||0,r=e===ee?ee.scrollY:e.scrollTop,n=e===ee?ee.scrollX:e.scrollLeft;return{top:t.top+r-i,left:t.left+n-s}}return null},css:function(e,t){var a;if(1===arguments.length){if("string"!=typeof e){for(a=0;a<this.length;a+=1)for(var i in e)this[a].style[i]=e[i];return this}if(this[0])return ee.getComputedStyle(this[0],null).getPropertyValue(e)}if(2!==arguments.length||"string"!=typeof e)return this;for(a=0;a<this.length;a+=1)this[a].style[e]=t;return this},each:function(e){if(!e)return this;for(var t=0;t<this.length;t+=1)if(!1===e.call(this[t],t,this[t]))return this;return this},html:function(e){if(void 0===e)return this[0]?this[0].innerHTML:void 0;for(var t=0;t<this.length;t+=1)this[t].innerHTML=e;return this},text:function(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(var t=0;t<this.length;t+=1)this[t].textContent=e;return this},is:function(e){var t,a,i=this[0];if(!i||void 0===e)return!1;if("string"==typeof e){if(i.matches)return i.matches(e);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(e);if(i.msMatchesSelector)return i.msMatchesSelector(e);for(t=I(e),a=0;a<t.length;a+=1)if(t[a]===i)return!0;return!1}if(e===f)return i===f;if(e===ee)return i===ee;if(e.nodeType||e instanceof l){for(t=e.nodeType?[e]:e,a=0;a<t.length;a+=1)if(t[a]===i)return!0;return!1}return!1},index:function(){var e,t=this[0];if(t){for(e=0;null!==(t=t.previousSibling);)1===t.nodeType&&(e+=1);return e}},eq:function(e){if(void 0===e)return this;var t,a=this.length;return new l(a-1<e?[]:e<0?(t=a+e)<0?[]:[this[t]]:[this[e]])},append:function(){for(var e,t=[],a=arguments.length;a--;)t[a]=arguments[a];for(var i=0;i<t.length;i+=1){e=t[i];for(var s=0;s<this.length;s+=1)if("string"==typeof e){var r=f.createElement("div");for(r.innerHTML=e;r.firstChild;)this[s].appendChild(r.firstChild)}else if(e instanceof l)for(var n=0;n<e.length;n+=1)this[s].appendChild(e[n]);else this[s].appendChild(e)}return this},prepend:function(e){var t,a;for(t=0;t<this.length;t+=1)if("string"==typeof e){var i=f.createElement("div");for(i.innerHTML=e,a=i.childNodes.length-1;0<=a;a-=1)this[t].insertBefore(i.childNodes[a],this[t].childNodes[0])}else if(e instanceof l)for(a=0;a<e.length;a+=1)this[t].insertBefore(e[a],this[t].childNodes[0]);else this[t].insertBefore(e,this[t].childNodes[0]);return this},next:function(e){return 0<this.length?e?this[0].nextElementSibling&&I(this[0].nextElementSibling).is(e)?new l([this[0].nextElementSibling]):new l([]):this[0].nextElementSibling?new l([this[0].nextElementSibling]):new l([]):new l([])},nextAll:function(e){var t=[],a=this[0];if(!a)return new l([]);for(;a.nextElementSibling;){var i=a.nextElementSibling;e?I(i).is(e)&&t.push(i):t.push(i),a=i}return new l(t)},prev:function(e){if(0<this.length){var t=this[0];return e?t.previousElementSibling&&I(t.previousElementSibling).is(e)?new l([t.previousElementSibling]):new l([]):t.previousElementSibling?new l([t.previousElementSibling]):new l([])}return new l([])},prevAll:function(e){var t=[],a=this[0];if(!a)return new l([]);for(;a.previousElementSibling;){var i=a.previousElementSibling;e?I(i).is(e)&&t.push(i):t.push(i),a=i}return new l(t)},parent:function(e){for(var t=[],a=0;a<this.length;a+=1)null!==this[a].parentNode&&(e?I(this[a].parentNode).is(e)&&t.push(this[a].parentNode):t.push(this[a].parentNode));return I(r(t))},parents:function(e){for(var t=[],a=0;a<this.length;a+=1)for(var i=this[a].parentNode;i;)e?I(i).is(e)&&t.push(i):t.push(i),i=i.parentNode;return I(r(t))},closest:function(e){var t=this;return void 0===e?new l([]):(t.is(e)||(t=t.parents(e).eq(0)),t)},find:function(e){for(var t=[],a=0;a<this.length;a+=1)for(var i=this[a].querySelectorAll(e),s=0;s<i.length;s+=1)t.push(i[s]);return new l(t)},children:function(e){for(var t=[],a=0;a<this.length;a+=1)for(var i=this[a].childNodes,s=0;s<i.length;s+=1)e?1===i[s].nodeType&&I(i[s]).is(e)&&t.push(i[s]):1===i[s].nodeType&&t.push(i[s]);return new l(r(t))},remove:function(){for(var e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this},add:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var a,i;for(a=0;a<e.length;a+=1){var s=I(e[a]);for(i=0;i<s.length;i+=1)this[this.length]=s[i],this.length+=1}return this},styles:function(){return this[0]?ee.getComputedStyle(this[0],null):{}}};Object.keys(t).forEach(function(e){I.fn[e]=I.fn[e]||t[e]});function e(e){void 0===e&&(e={});var t=this;t.params=e,t.eventsListeners={},t.params&&t.params.on&&Object.keys(t.params.on).forEach(function(e){t.on(e,t.params.on[e])})}var a,i,s,n,te={deleteProps:function(e){var t=e;Object.keys(t).forEach(function(e){try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}})},nextTick:function(e,t){return void 0===t&&(t=0),setTimeout(e,t)},now:function(){return Date.now()},getTranslate:function(e,t){var a,i,s;void 0===t&&(t="x");var r=ee.getComputedStyle(e,null);return ee.WebKitCSSMatrix?(6<(i=r.transform||r.webkitTransform).split(",").length&&(i=i.split(", ").map(function(e){return e.replace(",",".")}).join(", ")),s=new ee.WebKitCSSMatrix("none"===i?"":i)):a=(s=r.MozTransform||r.OTransform||r.MsTransform||r.msTransform||r.transform||r.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===t&&(i=ee.WebKitCSSMatrix?s.m41:16===a.length?parseFloat(a[12]):parseFloat(a[4])),"y"===t&&(i=ee.WebKitCSSMatrix?s.m42:16===a.length?parseFloat(a[13]):parseFloat(a[5])),i||0},parseUrlQuery:function(e){var t,a,i,s,r={},n=e||ee.location.href;if("string"==typeof n&&n.length)for(s=(a=(n=-1<n.indexOf("?")?n.replace(/\S*\?/,""):"").split("&").filter(function(e){return""!==e})).length,t=0;t<s;t+=1)i=a[t].replace(/#\S+/g,"").split("="),r[decodeURIComponent(i[0])]=void 0===i[1]?void 0:decodeURIComponent(i[1])||"";return r},isObject:function(e){return"object"==typeof e&&null!==e&&e.constructor&&e.constructor===Object},extend:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var a=Object(e[0]),i=1;i<e.length;i+=1){var s=e[i];if(null!=s)for(var r=Object.keys(Object(s)),n=0,o=r.length;n<o;n+=1){var l=r[n],d=Object.getOwnPropertyDescriptor(s,l);void 0!==d&&d.enumerable&&(te.isObject(a[l])&&te.isObject(s[l])?te.extend(a[l],s[l]):!te.isObject(a[l])&&te.isObject(s[l])?(a[l]={},te.extend(a[l],s[l])):a[l]=s[l])}}return a}},ae=(s=f.createElement("div"),{touch:ee.Modernizr&&!0===ee.Modernizr.touch||!!(0<ee.navigator.maxTouchPoints||"ontouchstart"in ee||ee.DocumentTouch&&f instanceof ee.DocumentTouch),pointerEvents:!!(ee.navigator.pointerEnabled||ee.PointerEvent||"maxTouchPoints"in ee.navigator&&0<ee.navigator.maxTouchPoints),prefixedPointerEvents:!!ee.navigator.msPointerEnabled,transition:(i=s.style,"transition"in i||"webkitTransition"in i||"MozTransition"in i),transforms3d:ee.Modernizr&&!0===ee.Modernizr.csstransforms3d||(a=s.style,"webkitPerspective"in a||"MozPerspective"in a||"OPerspective"in a||"MsPerspective"in a||"perspective"in a),flexbox:function(){for(var e=s.style,t="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "),a=0;a<t.length;a+=1)if(t[a]in e)return!0;return!1}(),observer:"MutationObserver"in ee||"WebkitMutationObserver"in ee,passiveListener:function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});ee.addEventListener("testPassiveListener",null,t)}catch(e){}return e}(),gestures:"ongesturestart"in ee}),ie={isIE:!!ee.navigator.userAgent.match(/Trident/g)||!!ee.navigator.userAgent.match(/MSIE/g),isEdge:!!ee.navigator.userAgent.match(/Edge/g),isSafari:(n=ee.navigator.userAgent.toLowerCase(),0<=n.indexOf("safari")&&n.indexOf("chrome")<0&&n.indexOf("android")<0),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(ee.navigator.userAgent)},o={components:{configurable:!0}};e.prototype.on=function(e,t,a){var i=this;if("function"!=typeof t)return i;var s=a?"unshift":"push";return e.split(" ").forEach(function(e){i.eventsListeners[e]||(i.eventsListeners[e]=[]),i.eventsListeners[e][s](t)}),i},e.prototype.once=function(a,i,e){var s=this;if("function"!=typeof i)return s;function r(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];i.apply(s,e),s.off(a,r),r.f7proxy&&delete r.f7proxy}return r.f7proxy=i,s.on(a,r,e)},e.prototype.off=function(e,i){var s=this;return s.eventsListeners&&e.split(" ").forEach(function(a){void 0===i?s.eventsListeners[a]=[]:s.eventsListeners[a]&&s.eventsListeners[a].length&&s.eventsListeners[a].forEach(function(e,t){(e===i||e.f7proxy&&e.f7proxy===i)&&s.eventsListeners[a].splice(t,1)})}),s},e.prototype.emit=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var a,i,s,r=this;return r.eventsListeners&&(s="string"==typeof e[0]||Array.isArray(e[0])?(a=e[0],i=e.slice(1,e.length),r):(a=e[0].events,i=e[0].data,e[0].context||r),(Array.isArray(a)?a:a.split(" ")).forEach(function(e){if(r.eventsListeners&&r.eventsListeners[e]){var t=[];r.eventsListeners[e].forEach(function(e){t.push(e)}),t.forEach(function(e){e.apply(s,i)})}})),r},e.prototype.useModulesParams=function(a){var i=this;i.modules&&Object.keys(i.modules).forEach(function(e){var t=i.modules[e];t.params&&te.extend(a,t.params)})},e.prototype.useModules=function(i){void 0===i&&(i={});var s=this;s.modules&&Object.keys(s.modules).forEach(function(e){var a=s.modules[e],t=i[e]||{};a.instance&&Object.keys(a.instance).forEach(function(e){var t=a.instance[e];s[e]="function"==typeof t?t.bind(s):t}),a.on&&s.on&&Object.keys(a.on).forEach(function(e){s.on(e,a.on[e])}),a.create&&a.create.bind(s)(t)})},o.components.set=function(e){this.use&&this.use(e)},e.installModule=function(t){for(var e=[],a=arguments.length-1;0<a--;)e[a]=arguments[a+1];var i=this;i.prototype.modules||(i.prototype.modules={});var s=t.name||Object.keys(i.prototype.modules).length+"_"+te.now();return(i.prototype.modules[s]=t).proto&&Object.keys(t.proto).forEach(function(e){i.prototype[e]=t.proto[e]}),t.static&&Object.keys(t.static).forEach(function(e){i[e]=t.static[e]}),t.install&&t.install.apply(i,e),i},e.use=function(e){for(var t=[],a=arguments.length-1;0<a--;)t[a]=arguments[a+1];var i=this;return Array.isArray(e)?(e.forEach(function(e){return i.installModule(e)}),i):i.installModule.apply(i,[e].concat(t))},Object.defineProperties(e,o);var d={updateSize:function(){var e,t,a=this,i=a.$el;e=void 0!==a.params.width?a.params.width:i[0].clientWidth,t=void 0!==a.params.height?a.params.height:i[0].clientHeight,0===e&&a.isHorizontal()||0===t&&a.isVertical()||(e=e-parseInt(i.css("padding-left"),10)-parseInt(i.css("padding-right"),10),t=t-parseInt(i.css("padding-top"),10)-parseInt(i.css("padding-bottom"),10),te.extend(a,{width:e,height:t,size:a.isHorizontal()?e:t}))},updateSlides:function(){var e=this,t=e.params,a=e.$wrapperEl,i=e.size,s=e.rtlTranslate,r=e.wrongRTL,n=e.virtual&&t.virtual.enabled,o=n?e.virtual.slides.length:e.slides.length,l=a.children("."+e.params.slideClass),d=n?e.virtual.slides.length:l.length,p=[],c=[],u=[],h=t.slidesOffsetBefore;"function"==typeof h&&(h=t.slidesOffsetBefore.call(e));var v=t.slidesOffsetAfter;"function"==typeof v&&(v=t.slidesOffsetAfter.call(e));var f=e.snapGrid.length,m=e.snapGrid.length,g=t.spaceBetween,b=-h,w=0,y=0;if(void 0!==i){var x,T;"string"==typeof g&&0<=g.indexOf("%")&&(g=parseFloat(g.replace("%",""))/100*i),e.virtualSize=-g,s?l.css({marginLeft:"",marginTop:""}):l.css({marginRight:"",marginBottom:""}),1<t.slidesPerColumn&&(x=Math.floor(d/t.slidesPerColumn)===d/e.params.slidesPerColumn?d:Math.ceil(d/t.slidesPerColumn)*t.slidesPerColumn,"auto"!==t.slidesPerView&&"row"===t.slidesPerColumnFill&&(x=Math.max(x,t.slidesPerView*t.slidesPerColumn)));for(var E,S=t.slidesPerColumn,C=x/S,M=Math.floor(d/t.slidesPerColumn),P=0;P<d;P+=1){T=0;var k=l.eq(P);if(1<t.slidesPerColumn){var z=void 0,$=void 0,I=void 0;if("column"===t.slidesPerColumnFill||"row"===t.slidesPerColumnFill&&1<t.slidesPerGroup){if("column"===t.slidesPerColumnFill)I=P-($=Math.floor(P/S))*S,(M<$||$===M&&I===S-1)&&S<=(I+=1)&&(I=0,$+=1);else{var L=Math.floor(P/t.slidesPerGroup);$=P-(I=Math.floor(P/t.slidesPerView)-L*t.slidesPerColumn)*t.slidesPerView-L*t.slidesPerView}z=$+I*x/S,k.css({"-webkit-box-ordinal-group":z,"-moz-box-ordinal-group":z,"-ms-flex-order":z,"-webkit-order":z,order:z})}else $=P-(I=Math.floor(P/C))*C;k.css("margin-"+(e.isHorizontal()?"top":"left"),0!==I&&t.spaceBetween&&t.spaceBetween+"px").attr("data-swiper-column",$).attr("data-swiper-row",I)}if("none"!==k.css("display")){if("auto"===t.slidesPerView){var D=ee.getComputedStyle(k[0],null),O=k[0].style.transform,A=k[0].style.webkitTransform;if(O&&(k[0].style.transform="none"),A&&(k[0].style.webkitTransform="none"),t.roundLengths)T=e.isHorizontal()?k.outerWidth(!0):k.outerHeight(!0);else if(e.isHorizontal()){var H=parseFloat(D.getPropertyValue("width")),G=parseFloat(D.getPropertyValue("padding-left")),N=parseFloat(D.getPropertyValue("padding-right")),B=parseFloat(D.getPropertyValue("margin-left")),X=parseFloat(D.getPropertyValue("margin-right")),V=D.getPropertyValue("box-sizing");T=V&&"border-box"===V&&!ie.isIE?H+B+X:H+G+N+B+X}else{var Y=parseFloat(D.getPropertyValue("height")),F=parseFloat(D.getPropertyValue("padding-top")),R=parseFloat(D.getPropertyValue("padding-bottom")),q=parseFloat(D.getPropertyValue("margin-top")),W=parseFloat(D.getPropertyValue("margin-bottom")),j=D.getPropertyValue("box-sizing");T=j&&"border-box"===j&&!ie.isIE?Y+q+W:Y+F+R+q+W}O&&(k[0].style.transform=O),A&&(k[0].style.webkitTransform=A),t.roundLengths&&(T=Math.floor(T))}else T=(i-(t.slidesPerView-1)*g)/t.slidesPerView,t.roundLengths&&(T=Math.floor(T)),l[P]&&(e.isHorizontal()?l[P].style.width=T+"px":l[P].style.height=T+"px");l[P]&&(l[P].swiperSlideSize=T),u.push(T),t.centeredSlides?(b=b+T/2+w/2+g,0===w&&0!==P&&(b=b-i/2-g),0===P&&(b=b-i/2-g),Math.abs(b)<.001&&(b=0),t.roundLengths&&(b=Math.floor(b)),y%t.slidesPerGroup==0&&p.push(b),c.push(b)):(t.roundLengths&&(b=Math.floor(b)),y%t.slidesPerGroup==0&&p.push(b),c.push(b),b=b+T+g),e.virtualSize+=T+g,w=T,y+=1}}if(e.virtualSize=Math.max(e.virtualSize,i)+v,s&&r&&("slide"===t.effect||"coverflow"===t.effect)&&a.css({width:e.virtualSize+t.spaceBetween+"px"}),ae.flexbox&&!t.setWrapperSize||(e.isHorizontal()?a.css({width:e.virtualSize+t.spaceBetween+"px"}):a.css({height:e.virtualSize+t.spaceBetween+"px"})),1<t.slidesPerColumn&&(e.virtualSize=(T+t.spaceBetween)*x,e.virtualSize=Math.ceil(e.virtualSize/t.slidesPerColumn)-t.spaceBetween,e.isHorizontal()?a.css({width:e.virtualSize+t.spaceBetween+"px"}):a.css({height:e.virtualSize+t.spaceBetween+"px"}),t.centeredSlides)){E=[];for(var U=0;U<p.length;U+=1){var K=p[U];t.roundLengths&&(K=Math.floor(K)),p[U]<e.virtualSize+p[0]&&E.push(K)}p=E}if(!t.centeredSlides){E=[];for(var _=0;_<p.length;_+=1){var Z=p[_];t.roundLengths&&(Z=Math.floor(Z)),p[_]<=e.virtualSize-i&&E.push(Z)}p=E,1<Math.floor(e.virtualSize-i)-Math.floor(p[p.length-1])&&p.push(e.virtualSize-i)}if(0===p.length&&(p=[0]),0!==t.spaceBetween&&(e.isHorizontal()?s?l.css({marginLeft:g+"px"}):l.css({marginRight:g+"px"}):l.css({marginBottom:g+"px"})),t.centerInsufficientSlides){var Q=0;if(u.forEach(function(e){Q+=e+(t.spaceBetween?t.spaceBetween:0)}),(Q-=t.spaceBetween)<i){var J=(i-Q)/2;p.forEach(function(e,t){p[t]=e-J}),c.forEach(function(e,t){c[t]=e+J})}}te.extend(e,{slides:l,snapGrid:p,slidesGrid:c,slidesSizesGrid:u}),d!==o&&e.emit("slidesLengthChange"),p.length!==f&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),c.length!==m&&e.emit("slidesGridLengthChange"),(t.watchSlidesProgress||t.watchSlidesVisibility)&&e.updateSlidesOffset()}},updateAutoHeight:function(e){var t,a=this,i=[],s=0;if("number"==typeof e?a.setTransition(e):!0===e&&a.setTransition(a.params.speed),"auto"!==a.params.slidesPerView&&1<a.params.slidesPerView)for(t=0;t<Math.ceil(a.params.slidesPerView);t+=1){var r=a.activeIndex+t;if(r>a.slides.length)break;i.push(a.slides.eq(r)[0])}else i.push(a.slides.eq(a.activeIndex)[0]);for(t=0;t<i.length;t+=1)if(void 0!==i[t]){var n=i[t].offsetHeight;s=s<n?n:s}s&&a.$wrapperEl.css("height",s+"px")},updateSlidesOffset:function(){for(var e=this.slides,t=0;t<e.length;t+=1)e[t].swiperSlideOffset=this.isHorizontal()?e[t].offsetLeft:e[t].offsetTop},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);var t=this,a=t.params,i=t.slides,s=t.rtlTranslate;if(0!==i.length){void 0===i[0].swiperSlideOffset&&t.updateSlidesOffset();var r=-e;s&&(r=e),i.removeClass(a.slideVisibleClass),t.visibleSlidesIndexes=[],t.visibleSlides=[];for(var n=0;n<i.length;n+=1){var o=i[n],l=(r+(a.centeredSlides?t.minTranslate():0)-o.swiperSlideOffset)/(o.swiperSlideSize+a.spaceBetween);if(a.watchSlidesVisibility){var d=-(r-o.swiperSlideOffset),p=d+t.slidesSizesGrid[n];(0<=d&&d<t.size-1||1<p&&p<=t.size||d<=0&&p>=t.size)&&(t.visibleSlides.push(o),t.visibleSlidesIndexes.push(n),i.eq(n).addClass(a.slideVisibleClass))}o.progress=s?-l:l}t.visibleSlides=I(t.visibleSlides)}},updateProgress:function(e){void 0===e&&(e=this&&this.translate||0);var t=this,a=t.params,i=t.maxTranslate()-t.minTranslate(),s=t.progress,r=t.isBeginning,n=t.isEnd,o=r,l=n;n=0==i?r=!(s=0):(r=(s=(e-t.minTranslate())/i)<=0,1<=s),te.extend(t,{progress:s,isBeginning:r,isEnd:n}),(a.watchSlidesProgress||a.watchSlidesVisibility)&&t.updateSlidesProgress(e),r&&!o&&t.emit("reachBeginning toEdge"),n&&!l&&t.emit("reachEnd toEdge"),(o&&!r||l&&!n)&&t.emit("fromEdge"),t.emit("progress",s)},updateSlidesClasses:function(){var e,t=this,a=t.slides,i=t.params,s=t.$wrapperEl,r=t.activeIndex,n=t.realIndex,o=t.virtual&&i.virtual.enabled;a.removeClass(i.slideActiveClass+" "+i.slideNextClass+" "+i.slidePrevClass+" "+i.slideDuplicateActiveClass+" "+i.slideDuplicateNextClass+" "+i.slideDuplicatePrevClass),(e=o?t.$wrapperEl.find("."+i.slideClass+'[data-swiper-slide-index="'+r+'"]'):a.eq(r)).addClass(i.slideActiveClass),i.loop&&(e.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+n+'"]').addClass(i.slideDuplicateActiveClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+n+'"]').addClass(i.slideDuplicateActiveClass));var l=e.nextAll("."+i.slideClass).eq(0).addClass(i.slideNextClass);i.loop&&0===l.length&&(l=a.eq(0)).addClass(i.slideNextClass);var d=e.prevAll("."+i.slideClass).eq(0).addClass(i.slidePrevClass);i.loop&&0===d.length&&(d=a.eq(-1)).addClass(i.slidePrevClass),i.loop&&(l.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass),d.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+d.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+d.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass))},updateActiveIndex:function(e){var t,a=this,i=a.rtlTranslate?a.translate:-a.translate,s=a.slidesGrid,r=a.snapGrid,n=a.params,o=a.activeIndex,l=a.realIndex,d=a.snapIndex,p=e;if(void 0===p){for(var c=0;c<s.length;c+=1)void 0!==s[c+1]?i>=s[c]&&i<s[c+1]-(s[c+1]-s[c])/2?p=c:i>=s[c]&&i<s[c+1]&&(p=c+1):i>=s[c]&&(p=c);n.normalizeSlideIndex&&(p<0||void 0===p)&&(p=0)}if((t=0<=r.indexOf(i)?r.indexOf(i):Math.floor(p/n.slidesPerGroup))>=r.length&&(t=r.length-1),p!==o){var u=parseInt(a.slides.eq(p).attr("data-swiper-slide-index")||p,10);te.extend(a,{snapIndex:t,realIndex:u,previousIndex:o,activeIndex:p}),a.emit("activeIndexChange"),a.emit("snapIndexChange"),l!==u&&a.emit("realIndexChange"),(a.initialized||a.runCallbacksOnInit)&&a.emit("slideChange")}else t!==d&&(a.snapIndex=t,a.emit("snapIndexChange"))},updateClickedSlide:function(e){var t=this,a=t.params,i=I(e.target).closest("."+a.slideClass)[0],s=!1;if(i)for(var r=0;r<t.slides.length;r+=1)t.slides[r]===i&&(s=!0);if(!i||!s)return t.clickedSlide=void 0,void(t.clickedIndex=void 0);t.clickedSlide=i,t.virtual&&t.params.virtual.enabled?t.clickedIndex=parseInt(I(i).attr("data-swiper-slide-index"),10):t.clickedIndex=I(i).index(),a.slideToClickedSlide&&void 0!==t.clickedIndex&&t.clickedIndex!==t.activeIndex&&t.slideToClickedSlide()}};var p={getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");var t=this.params,a=this.rtlTranslate,i=this.translate,s=this.$wrapperEl;if(t.virtualTranslate)return a?-i:i;var r=te.getTranslate(s[0],e);return a&&(r=-r),r||0},setTranslate:function(e,t){var a=this,i=a.rtlTranslate,s=a.params,r=a.$wrapperEl,n=a.progress,o=0,l=0;a.isHorizontal()?o=i?-e:e:l=e,s.roundLengths&&(o=Math.floor(o),l=Math.floor(l)),s.virtualTranslate||(ae.transforms3d?r.transform("translate3d("+o+"px, "+l+"px, 0px)"):r.transform("translate("+o+"px, "+l+"px)")),a.previousTranslate=a.translate,a.translate=a.isHorizontal()?o:l;var d=a.maxTranslate()-a.minTranslate();(0==d?0:(e-a.minTranslate())/d)!==n&&a.updateProgress(e),a.emit("setTranslate",a.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]}};var c={setTransition:function(e,t){this.$wrapperEl.transition(e),this.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);var a=this,i=a.activeIndex,s=a.params,r=a.previousIndex;s.autoHeight&&a.updateAutoHeight();var n=t;if(n=n||(r<i?"next":i<r?"prev":"reset"),a.emit("transitionStart"),e&&i!==r){if("reset"===n)return void a.emit("slideResetTransitionStart");a.emit("slideChangeTransitionStart"),"next"===n?a.emit("slideNextTransitionStart"):a.emit("slidePrevTransitionStart")}},transitionEnd:function(e,t){void 0===e&&(e=!0);var a=this,i=a.activeIndex,s=a.previousIndex;a.animating=!1,a.setTransition(0);var r=t;if(r=r||(s<i?"next":i<s?"prev":"reset"),a.emit("transitionEnd"),e&&i!==s){if("reset"===r)return void a.emit("slideResetTransitionEnd");a.emit("slideChangeTransitionEnd"),"next"===r?a.emit("slideNextTransitionEnd"):a.emit("slidePrevTransitionEnd")}}};var u={slideTo:function(e,t,a,i){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===a&&(a=!0);var s=this,r=e;r<0&&(r=0);var n=s.params,o=s.snapGrid,l=s.slidesGrid,d=s.previousIndex,p=s.activeIndex,c=s.rtlTranslate;if(s.animating&&n.preventInteractionOnTransition)return!1;var u=Math.floor(r/n.slidesPerGroup);u>=o.length&&(u=o.length-1),(p||n.initialSlide||0)===(d||0)&&a&&s.emit("beforeSlideChangeStart");var h,v=-o[u];if(s.updateProgress(v),n.normalizeSlideIndex)for(var f=0;f<l.length;f+=1)-Math.floor(100*v)>=Math.floor(100*l[f])&&(r=f);if(s.initialized&&r!==p){if(!s.allowSlideNext&&v<s.translate&&v<s.minTranslate())return!1;if(!s.allowSlidePrev&&v>s.translate&&v>s.maxTranslate()&&(p||0)!==r)return!1}return h=p<r?"next":r<p?"prev":"reset",c&&-v===s.translate||!c&&v===s.translate?(s.updateActiveIndex(r),n.autoHeight&&s.updateAutoHeight(),s.updateSlidesClasses(),"slide"!==n.effect&&s.setTranslate(v),"reset"!==h&&(s.transitionStart(a,h),s.transitionEnd(a,h)),!1):(0!==t&&ae.transition?(s.setTransition(t),s.setTranslate(v),s.updateActiveIndex(r),s.updateSlidesClasses(),s.emit("beforeTransitionStart",t,i),s.transitionStart(a,h),s.animating||(s.animating=!0,s.onSlideToWrapperTransitionEnd||(s.onSlideToWrapperTransitionEnd=function(e){s&&!s.destroyed&&e.target===this&&(s.$wrapperEl[0].removeEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.$wrapperEl[0].removeEventListener("webkitTransitionEnd",s.onSlideToWrapperTransitionEnd),s.onSlideToWrapperTransitionEnd=null,delete s.onSlideToWrapperTransitionEnd,s.transitionEnd(a,h))}),s.$wrapperEl[0].addEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.$wrapperEl[0].addEventListener("webkitTransitionEnd",s.onSlideToWrapperTransitionEnd))):(s.setTransition(0),s.setTranslate(v),s.updateActiveIndex(r),s.updateSlidesClasses(),s.emit("beforeTransitionStart",t,i),s.transitionStart(a,h),s.transitionEnd(a,h)),!0)},slideToLoop:function(e,t,a,i){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===a&&(a=!0);var s=e;return this.params.loop&&(s+=this.loopedSlides),this.slideTo(s,t,a,i)},slideNext:function(e,t,a){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var i=this,s=i.params,r=i.animating;return s.loop?!r&&(i.loopFix(),i._clientLeft=i.$wrapperEl[0].clientLeft,i.slideTo(i.activeIndex+s.slidesPerGroup,e,t,a)):i.slideTo(i.activeIndex+s.slidesPerGroup,e,t,a)},slidePrev:function(e,t,a){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var i=this,s=i.params,r=i.animating,n=i.snapGrid,o=i.slidesGrid,l=i.rtlTranslate;if(s.loop){if(r)return!1;i.loopFix(),i._clientLeft=i.$wrapperEl[0].clientLeft}function d(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}var p,c=d(l?i.translate:-i.translate),u=n.map(function(e){return d(e)}),h=(o.map(function(e){return d(e)}),n[u.indexOf(c)],n[u.indexOf(c)-1]);return void 0!==h&&(p=o.indexOf(h))<0&&(p=i.activeIndex-1),i.slideTo(p,e,t,a)},slideReset:function(e,t,a){return void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),this.slideTo(this.activeIndex,e,t,a)},slideToClosest:function(e,t,a){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var i=this,s=i.activeIndex,r=Math.floor(s/i.params.slidesPerGroup);if(r<i.snapGrid.length-1){var n=i.rtlTranslate?i.translate:-i.translate,o=i.snapGrid[r];(i.snapGrid[r+1]-o)/2<n-o&&(s=i.params.slidesPerGroup)}return i.slideTo(s,e,t,a)},slideToClickedSlide:function(){var e,t=this,a=t.params,i=t.$wrapperEl,s="auto"===a.slidesPerView?t.slidesPerViewDynamic():a.slidesPerView,r=t.clickedIndex;if(a.loop){if(t.animating)return;e=parseInt(I(t.clickedSlide).attr("data-swiper-slide-index"),10),a.centeredSlides?r<t.loopedSlides-s/2||r>t.slides.length-t.loopedSlides+s/2?(t.loopFix(),r=i.children("."+a.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+a.slideDuplicateClass+")").eq(0).index(),te.nextTick(function(){t.slideTo(r)})):t.slideTo(r):r>t.slides.length-s?(t.loopFix(),r=i.children("."+a.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+a.slideDuplicateClass+")").eq(0).index(),te.nextTick(function(){t.slideTo(r)})):t.slideTo(r)}else t.slideTo(r)}};var h={loopCreate:function(){var i=this,e=i.params,t=i.$wrapperEl;t.children("."+e.slideClass+"."+e.slideDuplicateClass).remove();var s=t.children("."+e.slideClass);if(e.loopFillGroupWithBlank){var a=e.slidesPerGroup-s.length%e.slidesPerGroup;if(a!==e.slidesPerGroup){for(var r=0;r<a;r+=1){var n=I(f.createElement("div")).addClass(e.slideClass+" "+e.slideBlankClass);t.append(n)}s=t.children("."+e.slideClass)}}"auto"!==e.slidesPerView||e.loopedSlides||(e.loopedSlides=s.length),i.loopedSlides=parseInt(e.loopedSlides||e.slidesPerView,10),i.loopedSlides+=e.loopAdditionalSlides,i.loopedSlides>s.length&&(i.loopedSlides=s.length);var o=[],l=[];s.each(function(e,t){var a=I(t);e<i.loopedSlides&&l.push(t),e<s.length&&e>=s.length-i.loopedSlides&&o.push(t),a.attr("data-swiper-slide-index",e)});for(var d=0;d<l.length;d+=1)t.append(I(l[d].cloneNode(!0)).addClass(e.slideDuplicateClass));for(var p=o.length-1;0<=p;p-=1)t.prepend(I(o[p].cloneNode(!0)).addClass(e.slideDuplicateClass))},loopFix:function(){var e,t=this,a=t.params,i=t.activeIndex,s=t.slides,r=t.loopedSlides,n=t.allowSlidePrev,o=t.allowSlideNext,l=t.snapGrid,d=t.rtlTranslate;t.allowSlidePrev=!0,t.allowSlideNext=!0;var p=-l[i]-t.getTranslate();if(i<r)e=s.length-3*r+i,e+=r,t.slideTo(e,0,!1,!0)&&0!=p&&t.setTranslate((d?-t.translate:t.translate)-p);else if("auto"===a.slidesPerView&&2*r<=i||i>=s.length-r){e=-s.length+i+r,e+=r,t.slideTo(e,0,!1,!0)&&0!=p&&t.setTranslate((d?-t.translate:t.translate)-p)}t.allowSlidePrev=n,t.allowSlideNext=o},loopDestroy:function(){var e=this.$wrapperEl,t=this.params,a=this.slides;e.children("."+t.slideClass+"."+t.slideDuplicateClass+",."+t.slideClass+"."+t.slideBlankClass).remove(),a.removeAttr("data-swiper-slide-index")}};var v={setGrabCursor:function(e){if(!(ae.touch||!this.params.simulateTouch||this.params.watchOverflow&&this.isLocked)){var t=this.el;t.style.cursor="move",t.style.cursor=e?"-webkit-grabbing":"-webkit-grab",t.style.cursor=e?"-moz-grabbin":"-moz-grab",t.style.cursor=e?"grabbing":"grab"}},unsetGrabCursor:function(){ae.touch||this.params.watchOverflow&&this.isLocked||(this.el.style.cursor="")}};var m={appendSlide:function(e){var t=this,a=t.$wrapperEl,i=t.params;if(i.loop&&t.loopDestroy(),"object"==typeof e&&"length"in e)for(var s=0;s<e.length;s+=1)e[s]&&a.append(e[s]);else a.append(e);i.loop&&t.loopCreate(),i.observer&&ae.observer||t.update()},prependSlide:function(e){var t=this,a=t.params,i=t.$wrapperEl,s=t.activeIndex;a.loop&&t.loopDestroy();var r=s+1;if("object"==typeof e&&"length"in e){for(var n=0;n<e.length;n+=1)e[n]&&i.prepend(e[n]);r=s+e.length}else i.prepend(e);a.loop&&t.loopCreate(),a.observer&&ae.observer||t.update(),t.slideTo(r,0,!1)},addSlide:function(e,t){var a=this,i=a.$wrapperEl,s=a.params,r=a.activeIndex;s.loop&&(r-=a.loopedSlides,a.loopDestroy(),a.slides=i.children("."+s.slideClass));var n=a.slides.length;if(e<=0)a.prependSlide(t);else if(n<=e)a.appendSlide(t);else{for(var o=e<r?r+1:r,l=[],d=n-1;e<=d;d-=1){var p=a.slides.eq(d);p.remove(),l.unshift(p)}if("object"==typeof t&&"length"in t){for(var c=0;c<t.length;c+=1)t[c]&&i.append(t[c]);o=e<r?r+t.length:r}else i.append(t);for(var u=0;u<l.length;u+=1)i.append(l[u]);s.loop&&a.loopCreate(),s.observer&&ae.observer||a.update(),s.loop?a.slideTo(o+a.loopedSlides,0,!1):a.slideTo(o,0,!1)}},removeSlide:function(e){var t=this,a=t.params,i=t.$wrapperEl,s=t.activeIndex;a.loop&&(s-=t.loopedSlides,t.loopDestroy(),t.slides=i.children("."+a.slideClass));var r,n=s;if("object"==typeof e&&"length"in e){for(var o=0;o<e.length;o+=1)r=e[o],t.slides[r]&&t.slides.eq(r).remove(),r<n&&(n-=1);n=Math.max(n,0)}else r=e,t.slides[r]&&t.slides.eq(r).remove(),r<n&&(n-=1),n=Math.max(n,0);a.loop&&t.loopCreate(),a.observer&&ae.observer||t.update(),a.loop?t.slideTo(n+t.loopedSlides,0,!1):t.slideTo(n,0,!1)},removeAllSlides:function(){for(var e=[],t=0;t<this.slides.length;t+=1)e.push(t);this.removeSlide(e)}},g=function(){var e=ee.navigator.userAgent,t={ios:!1,android:!1,androidChrome:!1,desktop:!1,windows:!1,iphone:!1,ipod:!1,ipad:!1,cordova:ee.cordova||ee.phonegap,phonegap:ee.cordova||ee.phonegap},a=e.match(/(Windows Phone);?[\s\/]+([\d.]+)?/),i=e.match(/(Android);?[\s\/]+([\d.]+)?/),s=e.match(/(iPad).*OS\s([\d_]+)/),r=e.match(/(iPod)(.*OS\s([\d_]+))?/),n=!s&&e.match(/(iPhone\sOS|iOS)\s([\d_]+)/);if(a&&(t.os="windows",t.osVersion=a[2],t.windows=!0),i&&!a&&(t.os="android",t.osVersion=i[2],t.android=!0,t.androidChrome=0<=e.toLowerCase().indexOf("chrome")),(s||n||r)&&(t.os="ios",t.ios=!0),n&&!r&&(t.osVersion=n[2].replace(/_/g,"."),t.iphone=!0),s&&(t.osVersion=s[2].replace(/_/g,"."),t.ipad=!0),r&&(t.osVersion=r[3]?r[3].replace(/_/g,"."):null,t.iphone=!0),t.ios&&t.osVersion&&0<=e.indexOf("Version/")&&"10"===t.osVersion.split(".")[0]&&(t.osVersion=e.toLowerCase().split("version/")[1].split(" ")[0]),t.desktop=!(t.os||t.android||t.webView),t.webView=(n||s||r)&&e.match(/.*AppleWebKit(?!.*Safari)/i),t.os&&"ios"===t.os){var o=t.osVersion.split("."),l=f.querySelector('meta[name="viewport"]');t.minimalUi=!t.webView&&(r||n)&&(1*o[0]==7?1<=1*o[1]:7<1*o[0])&&l&&0<=l.getAttribute("content").indexOf("minimal-ui")}return t.pixelRatio=ee.devicePixelRatio||1,t}();function b(){var e=this,t=e.params,a=e.el;if(!a||0!==a.offsetWidth){t.breakpoints&&e.setBreakpoint();var i=e.allowSlideNext,s=e.allowSlidePrev,r=e.snapGrid;if(e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),t.freeMode){var n=Math.min(Math.max(e.translate,e.maxTranslate()),e.minTranslate());e.setTranslate(n),e.updateActiveIndex(),e.updateSlidesClasses(),t.autoHeight&&e.updateAutoHeight()}else e.updateSlidesClasses(),("auto"===t.slidesPerView||1<t.slidesPerView)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0);e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.run(),e.allowSlidePrev=s,e.allowSlideNext=i,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}}var w={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,preventInteractionOnTransition:!1,edgeSwipeDetection:!1,edgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsInverse:!1,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!1,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!0,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0},y={update:d,translate:p,transition:c,slide:u,loop:h,grabCursor:v,manipulation:m,events:{attachEvents:function(){var e=this,t=e.params,a=e.touchEvents,i=e.el,s=e.wrapperEl;e.onTouchStart=function(e){var t=this,a=t.touchEventsData,i=t.params,s=t.touches;if(!t.animating||!i.preventInteractionOnTransition){var r=e;if(r.originalEvent&&(r=r.originalEvent),a.isTouchEvent="touchstart"===r.type,(a.isTouchEvent||!("which"in r)||3!==r.which)&&!(!a.isTouchEvent&&"button"in r&&0<r.button||a.isTouched&&a.isMoved))if(i.noSwiping&&I(r.target).closest(i.noSwipingSelector?i.noSwipingSelector:"."+i.noSwipingClass)[0])t.allowClick=!0;else if(!i.swipeHandler||I(r).closest(i.swipeHandler)[0]){s.currentX="touchstart"===r.type?r.targetTouches[0].pageX:r.pageX,s.currentY="touchstart"===r.type?r.targetTouches[0].pageY:r.pageY;var n=s.currentX,o=s.currentY,l=i.edgeSwipeDetection||i.iOSEdgeSwipeDetection,d=i.edgeSwipeThreshold||i.iOSEdgeSwipeThreshold;if(!l||!(n<=d||n>=ee.screen.width-d)){if(te.extend(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=n,s.startY=o,a.touchStartTime=te.now(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,0<i.threshold&&(a.allowThresholdMove=!1),"touchstart"!==r.type){var p=!0;I(r.target).is(a.formElements)&&(p=!1),f.activeElement&&I(f.activeElement).is(a.formElements)&&f.activeElement!==r.target&&f.activeElement.blur();var c=p&&t.allowTouchMove&&i.touchStartPreventDefault;(i.touchStartForcePreventDefault||c)&&r.preventDefault()}t.emit("touchStart",r)}}}}.bind(e),e.onTouchMove=function(e){var t=this,a=t.touchEventsData,i=t.params,s=t.touches,r=t.rtlTranslate,n=e;if(n.originalEvent&&(n=n.originalEvent),a.isTouched){if(!a.isTouchEvent||"mousemove"!==n.type){var o="touchmove"===n.type?n.targetTouches[0].pageX:n.pageX,l="touchmove"===n.type?n.targetTouches[0].pageY:n.pageY;if(n.preventedByNestedSwiper)return s.startX=o,void(s.startY=l);if(!t.allowTouchMove)return t.allowClick=!1,void(a.isTouched&&(te.extend(s,{startX:o,startY:l,currentX:o,currentY:l}),a.touchStartTime=te.now()));if(a.isTouchEvent&&i.touchReleaseOnEdges&&!i.loop)if(t.isVertical()){if(l<s.startY&&t.translate<=t.maxTranslate()||l>s.startY&&t.translate>=t.minTranslate())return a.isTouched=!1,void(a.isMoved=!1)}else if(o<s.startX&&t.translate<=t.maxTranslate()||o>s.startX&&t.translate>=t.minTranslate())return;if(a.isTouchEvent&&f.activeElement&&n.target===f.activeElement&&I(n.target).is(a.formElements))return a.isMoved=!0,void(t.allowClick=!1);if(a.allowTouchCallbacks&&t.emit("touchMove",n),!(n.targetTouches&&1<n.targetTouches.length)){s.currentX=o,s.currentY=l;var d=s.currentX-s.startX,p=s.currentY-s.startY;if(!(t.params.threshold&&Math.sqrt(Math.pow(d,2)+Math.pow(p,2))<t.params.threshold)){var c;if(void 0===a.isScrolling)t.isHorizontal()&&s.currentY===s.startY||t.isVertical()&&s.currentX===s.startX?a.isScrolling=!1:25<=d*d+p*p&&(c=180*Math.atan2(Math.abs(p),Math.abs(d))/Math.PI,a.isScrolling=t.isHorizontal()?c>i.touchAngle:90-c>i.touchAngle);if(a.isScrolling&&t.emit("touchMoveOpposite",n),void 0===a.startMoving&&(s.currentX===s.startX&&s.currentY===s.startY||(a.startMoving=!0)),a.isScrolling)a.isTouched=!1;else if(a.startMoving){t.allowClick=!1,n.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&n.stopPropagation(),a.isMoved||(i.loop&&t.loopFix(),a.startTranslate=t.getTranslate(),t.setTransition(0),t.animating&&t.$wrapperEl.trigger("webkitTransitionEnd transitionend"),a.allowMomentumBounce=!1,!i.grabCursor||!0!==t.allowSlideNext&&!0!==t.allowSlidePrev||t.setGrabCursor(!0),t.emit("sliderFirstMove",n)),t.emit("sliderMove",n),a.isMoved=!0;var u=t.isHorizontal()?d:p;s.diff=u,u*=i.touchRatio,r&&(u=-u),t.swipeDirection=0<u?"prev":"next",a.currentTranslate=u+a.startTranslate;var h=!0,v=i.resistanceRatio;if(i.touchReleaseOnEdges&&(v=0),0<u&&a.currentTranslate>t.minTranslate()?(h=!1,i.resistance&&(a.currentTranslate=t.minTranslate()-1+Math.pow(-t.minTranslate()+a.startTranslate+u,v))):u<0&&a.currentTranslate<t.maxTranslate()&&(h=!1,i.resistance&&(a.currentTranslate=t.maxTranslate()+1-Math.pow(t.maxTranslate()-a.startTranslate-u,v))),h&&(n.preventedByNestedSwiper=!0),!t.allowSlideNext&&"next"===t.swipeDirection&&a.currentTranslate<a.startTranslate&&(a.currentTranslate=a.startTranslate),!t.allowSlidePrev&&"prev"===t.swipeDirection&&a.currentTranslate>a.startTranslate&&(a.currentTranslate=a.startTranslate),0<i.threshold){if(!(Math.abs(u
vendor: 5,426 bytes, line 2084
2084)>i.threshold||a.allowThresholdMove))return void(a.currentTranslate=a.startTranslate);if(!a.allowThresholdMove)return a.allowThresholdMove=!0,s.startX=s.currentX,s.startY=s.currentY,a.currentTranslate=a.startTranslate,void(s.diff=t.isHorizontal()?s.currentX-s.startX:s.currentY-s.startY)}i.followFinger&&((i.freeMode||i.watchSlidesProgress||i.watchSlidesVisibility)&&(t.updateActiveIndex(),t.updateSlidesClasses()),i.freeMode&&(0===a.velocities.length&&a.velocities.push({position:s[t.isHorizontal()?"startX":"startY"],time:a.touchStartTime}),a.velocities.push({position:s[t.isHorizontal()?"currentX":"currentY"],time:te.now()})),t.updateProgress(a.currentTranslate),t.setTranslate(a.currentTranslate))}}}}}else a.startMoving&&a.isScrolling&&t.emit("touchMoveOpposite",n)}.bind(e),e.onTouchEnd=function(e){var t=this,a=t.touchEventsData,i=t.params,s=t.touches,r=t.rtlTranslate,n=t.$wrapperEl,o=t.slidesGrid,l=t.snapGrid,d=e;if(d.originalEvent&&(d=d.originalEvent),a.allowTouchCallbacks&&t.emit("touchEnd",d),a.allowTouchCallbacks=!1,!a.isTouched)return a.isMoved&&i.grabCursor&&t.setGrabCursor(!1),a.isMoved=!1,void(a.startMoving=!1);i.grabCursor&&a.isMoved&&a.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);var p,c=te.now(),u=c-a.touchStartTime;if(t.allowClick&&(t.updateClickedSlide(d),t.emit("tap",d),u<300&&300<c-a.lastClickTime&&(a.clickTimeout&&clearTimeout(a.clickTimeout),a.clickTimeout=te.nextTick(function(){t&&!t.destroyed&&t.emit("click",d)},300)),u<300&&c-a.lastClickTime<300&&(a.clickTimeout&&clearTimeout(a.clickTimeout),t.emit("doubleTap",d))),a.lastClickTime=te.now(),te.nextTick(function(){t.destroyed||(t.allowClick=!0)}),!a.isTouched||!a.isMoved||!t.swipeDirection||0===s.diff||a.currentTranslate===a.startTranslate)return a.isTouched=!1,a.isMoved=!1,void(a.startMoving=!1);if(a.isTouched=!1,a.isMoved=!1,a.startMoving=!1,p=i.followFinger?r?t.translate:-t.translate:-a.currentTranslate,i.freeMode){if(p<-t.minTranslate())return void t.slideTo(t.activeIndex);if(p>-t.maxTranslate())return void(t.slides.length<l.length?t.slideTo(l.length-1):t.slideTo(t.slides.length-1));if(i.freeModeMomentum){if(1<a.velocities.length){var h=a.velocities.pop(),v=a.velocities.pop(),f=h.position-v.position,m=h.time-v.time;t.velocity=f/m,t.velocity/=2,Math.abs(t.velocity)<i.freeModeMinimumVelocity&&(t.velocity=0),(150<m||300<te.now()-h.time)&&(t.velocity=0)}else t.velocity=0;t.velocity*=i.freeModeMomentumVelocityRatio,a.velocities.length=0;var g=1e3*i.freeModeMomentumRatio,b=t.velocity*g,w=t.translate+b;r&&(w=-w);var y,x,T=!1,E=20*Math.abs(t.velocity)*i.freeModeMomentumBounceRatio;if(w<t.maxTranslate())i.freeModeMomentumBounce?(w+t.maxTranslate()<-E&&(w=t.maxTranslate()-E),y=t.maxTranslate(),T=!0,a.allowMomentumBounce=!0):w=t.maxTranslate(),i.loop&&i.centeredSlides&&(x=!0);else if(w>t.minTranslate())i.freeModeMomentumBounce?(w-t.minTranslate()>E&&(w=t.minTranslate()+E),y=t.minTranslate(),T=!0,a.allowMomentumBounce=!0):w=t.minTranslate(),i.loop&&i.centeredSlides&&(x=!0);else if(i.freeModeSticky){for(var S,C=0;C<l.length;C+=1)if(l[C]>-w){S=C;break}w=-(w=Math.abs(l[S]-w)<Math.abs(l[S-1]-w)||"next"===t.swipeDirection?l[S]:l[S-1])}if(x&&t.once("transitionEnd",function(){t.loopFix()}),0!==t.velocity)g=r?Math.abs((-w-t.translate)/t.velocity):Math.abs((w-t.translate)/t.velocity);else if(i.freeModeSticky)return void t.slideToClosest();i.freeModeMomentumBounce&&T?(t.updateProgress(y),t.setTransition(g),t.setTranslate(w),t.transitionStart(!0,t.swipeDirection),t.animating=!0,n.transitionEnd(function(){t&&!t.destroyed&&a.allowMomentumBounce&&(t.emit("momentumBounce"),t.setTransition(i.speed),t.setTranslate(y),n.transitionEnd(function(){t&&!t.destroyed&&t.transitionEnd()}))})):t.velocity?(t.updateProgress(w),t.setTransition(g),t.setTranslate(w),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,n.transitionEnd(function(){t&&!t.destroyed&&t.transitionEnd()}))):t.updateProgress(w),t.updateActiveIndex(),t.updateSlidesClasses()}else if(i.freeModeSticky)return void t.slideToClosest();(!i.freeModeMomentum||u>=i.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}else{for(var M=0,P=t.slidesSizesGrid[0],k=0;k<o.length;k+=i.slidesPerGroup)void 0!==o[k+i.slidesPerGroup]?p>=o[k]&&p<o[k+i.slidesPerGroup]&&(P=o[(M=k)+i.slidesPerGroup]-o[k]):p>=o[k]&&(M=k,P=o[o.length-1]-o[o.length-2]);var z=(p-o[M])/P;if(u>i.longSwipesMs){if(!i.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(z>=i.longSwipesRatio?t.slideTo(M+i.slidesPerGroup):t.slideTo(M)),"prev"===t.swipeDirection&&(z>1-i.longSwipesRatio?t.slideTo(M+i.slidesPerGroup):t.slideTo(M))}else{if(!i.shortSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&t.slideTo(M+i.slidesPerGroup),"prev"===t.swipeDirection&&t.slideTo(M)}}}.bind(e),e.onClick=function(e){this.allowClick||(this.params.preventClicks&&e.preventDefault(),this.params.preventClicksPropagation&&this.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}.bind(e);var r="container"===t.touchEventsTarget?i:s,n=!!t.nested;if(ae.touch||!ae.pointerEvents&&!ae.prefixedPointerEvents){if(ae.touch){var o=!("touchstart"!==a.start||!ae.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};r.addEventListener(a.start,e.onTouchStart,o),r.addEventListener(a.move,e.onTouchMove,ae.passiveListener?{passive:!1,capture:n}:n),r.addEventListener(a.end,e.onTouchEnd,o)
vendor: 5,404 bytes, line 2084
2084}(t.simulateTouch&&!g.ios&&!g.android||t.simulateTouch&&!ae.touch&&g.ios)&&(r.addEventListener("mousedown",e.onTouchStart,!1),f.addEventListener("mousemove",e.onTouchMove,n),f.addEventListener("mouseup",e.onTouchEnd,!1))}else r.addEventListener(a.start,e.onTouchStart,!1),f.addEventListener(a.move,e.onTouchMove,n),f.addEventListener(a.end,e.onTouchEnd,!1);(t.preventClicks||t.preventClicksPropagation)&&r.addEventListener("click",e.onClick,!0),e.on(g.ios||g.android?"resize orientationchange observerUpdate":"resize observerUpdate",b,!0)},detachEvents:function(){var e=this,t=e.params,a=e.touchEvents,i=e.el,s=e.wrapperEl,r="container"===t.touchEventsTarget?i:s,n=!!t.nested;if(ae.touch||!ae.pointerEvents&&!ae.prefixedPointerEvents){if(ae.touch){var o=!("onTouchStart"!==a.start||!ae.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};r.removeEventListener(a.start,e.onTouchStart,o),r.removeEventListener(a.move,e.onTouchMove,n),r.removeEventListener(a.end,e.onTouchEnd,o)}(t.simulateTouch&&!g.ios&&!g.android||t.simulateTouch&&!ae.touch&&g.ios)&&(r.removeEventListener("mousedown",e.onTouchStart,!1),f.removeEventListener("mousemove",e.onTouchMove,n),f.removeEventListener("mouseup",e.onTouchEnd,!1))}else r.removeEventListener(a.start,e.onTouchStart,!1),f.removeEventListener(a.move,e.onTouchMove,n),f.removeEventListener(a.end,e.onTouchEnd,!1);(t.preventClicks||t.preventClicksPropagation)&&r.removeEventListener("click",e.onClick,!0),e.off(g.ios||g.android?"resize orientationchange observerUpdate":"resize observerUpdate",b)}},breakpoints:{setBreakpoint:function(){var e=this,t=e.activeIndex,a=e.initialized,i=e.loopedSlides;void 0===i&&(i=0);var s=e.params,r=s.breakpoints;if(r&&(!r||0!==Object.keys(r).length)){var n=e.getBreakpoint(r);if(n&&e.currentBreakpoint!==n){var o=n in r?r[n]:void 0;o&&["slidesPerView","spaceBetween","slidesPerGroup"].forEach(function(e){var t=o[e];void 0!==t&&(o[e]="slidesPerView"!==e||"AUTO"!==t&&"auto"!==t?"slidesPerView"===e?parseFloat(t):parseInt(t,10):"auto")});var l=o||e.originalParams,d=l.direction&&l.direction!==s.direction,p=s.loop&&(l.slidesPerView!==s.slidesPerView||d);d&&a&&e.changeDirection(),te.extend(e.params,l),te.extend(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),e.currentBreakpoint=n,p&&a&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-i+e.loopedSlides,0,!1)),e.emit("breakpoint",l)}}},getBreakpoint:function(e){if(e){var t=!1,a=[];Object.keys(e).forEach(function(e){a.push(e)}),a.sort(function(e,t){return parseInt(e,10)-parseInt(t,10)});for(var i=0;i<a.length;i+=1){var s=a[i];this.params.breakpointsInverse?s<=ee.innerWidth&&(t=s):s>=ee.innerWidth&&!t&&(t=s)}return t||"max"}}},checkOverflow:{checkOverflow:function(){var e=this,t=e.isLocked;e.isLocked=1===e.snapGrid.length,e.allowSlideNext=!e.isLocked,e.allowSlidePrev=!e.isLocked,t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock"),t&&t!==e.isLocked&&(e.isEnd=!1,e.navigation.update())}},classes:{addClasses:function(){var t=this.classNames,a=this.params,e=this.rtl,i=this.$el,s=[];s.push("initialized"),s.push(a.direction),a.freeMode&&s.push("free-mode"),ae.flexbox||s.push("no-flexbox"),a.autoHeight&&s.push("autoheight"),e&&s.push("rtl"),1<a.slidesPerColumn&&s.push("multirow"),g.android&&s.push("android"),g.ios&&s.push("ios"),(ie.isIE||ie.isEdge)&&(ae.pointerEvents||ae.prefixedPointerEvents)&&s.push("wp8-"+a.direction),s.forEach(function(e){t.push(a.containerModifierClass+e)}),i.addClass(t.join(" "))},removeClasses:function(){var e=this.$el,t=this.classNames;e.removeClass(t.join(" "))}},images:{loadImage:function(e,t,a,i,s,r){var n;function o(){r&&r()}e.complete&&s?o():t?((n=new ee.Image).onload=o,n.onerror=o,i&&(n.sizes=i),a&&(n.srcset=a),t&&(n.src=t)):o()},preloadImages:function(){var e=this;function t(){null!=e&&e&&!e.destroyed&&(void 0!==e.imagesLoaded&&(e.imagesLoaded+=1),e.imagesLoaded===e.imagesToLoad.length&&(e.params.updateOnImagesReady&&e.update(),e.emit("imagesReady")))}e.imagesToLoad=e.$el.find("img");for(var a=0;a<e.imagesToLoad.length;a+=1){var i=e.imagesToLoad[a];e.loadImage(i,i.currentSrc||i.getAttribute("src"),i.srcset||i.getAttribute("srcset"),i.sizes||i.getAttribute("sizes"),!0,t)}}}},x={},T=function(u){function h(){for(var e,t,s,a=[],i=arguments.length;i--;)a[i]=arguments[i];s=(s=1===a.length&&a[0].constructor&&a[0].constructor===Object?a[0]:(t=(e=a)[0],e[1]))||{},s=te.extend({},s),t&&!s.el&&(s.el=t),u.call(this,s),Object.keys(y).forEach(function(t){Object.keys(y[t]).forEach(function(e){h.prototype[e]||(h.prototype[e]=y[t][e])})});var r=this;void 0===r.modules&&(r.modules={}),Object.keys(r.modules).forEach(function(e){var t=r.modules[e];if(t.params){var a=Object.keys(t.params)[0],i=t.params[a];if("object"!=typeof i||null===i)return;if(!(a in s&&"enabled"in i))return;!0===s[a]&&(s[a]={enabled:!0}),"object"!=typeof s[a]||"enabled"in s[a]||(s[a].enabled=!0),s[a]||(s[a]={enabled:!1})}});var n=te.extend({},w);r.useModulesParams(n),r.params=te.extend({},n,x,s),r.originalParams=te.extend({},r.params),r.passedParams=te.extend({},s);var o=(r.$=I)(r.params.el);if(t=o[0]){if(1<o.length){var l=[];return o.each(function(e,t){var a=te.extend({},s,{el:t});l.push(new h(a))}),l}t.swiper=r,o.data("swiper",r);var d,p,c=o.children("."+r.params.wrapperClass);return te.extend(r,{$el:o,el:t,$wrapperEl:c,wrapperEl:c[0],classNames:[],slides:I
vendor: 4,684 bytes, line 2084
2084(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function(){return"horizontal"===r.params.direction},isVertical:function(){return"vertical"===r.params.direction},rtl:"rtl"===t.dir.toLowerCase()||"rtl"===o.css("direction"),rtlTranslate:"horizontal"===r.params.direction&&("rtl"===t.dir.toLowerCase()||"rtl"===o.css("direction")),wrongRTL:"-webkit-box"===c.css("display"),activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:r.params.allowSlideNext,allowSlidePrev:r.params.allowSlidePrev,touchEvents:(d=["touchstart","touchmove","touchend"],p=["mousedown","mousemove","mouseup"],ae.pointerEvents?p=["pointerdown","pointermove","pointerup"]:ae.prefixedPointerEvents&&(p=["MSPointerDown","MSPointerMove","MSPointerUp"]),r.touchEventsTouch={start:d[0],move:d[1],end:d[2]},r.touchEventsDesktop={start:p[0],move:p[1],end:p[2]},ae.touch||!r.params.simulateTouch?r.touchEventsTouch:r.touchEventsDesktop),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,formElements:"input, select, option, textarea, button, video",lastClickTime:te.now(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:r.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),r.useModules(),r.params.init&&r.init(),r}}u&&(h.__proto__=u);var e={extendedDefaults:{configurable:!0},defaults:{configurable:!0},Class:{configurable:!0},$:{configurable:!0}};return((h.prototype=Object.create(u&&u.prototype)).constructor=h).prototype.slidesPerViewDynamic=function(){var e=this,t=e.params,a=e.slides,i=e.slidesGrid,s=e.size,r=e.activeIndex,n=1;if(t.centeredSlides){for(var o,l=a[r].swiperSlideSize,d=r+1;d<a.length;d+=1)a[d]&&!o&&(n+=1,s<(l+=a[d].swiperSlideSize)&&(o=!0));for(var p=r-1;0<=p;p-=1)a[p]&&!o&&(n+=1,s<(l+=a[p].swiperSlideSize)&&(o=!0))}else for(var c=r+1;c<a.length;c+=1)i[c]-i[r]<s&&(n+=1);return n},h.prototype.update=function(){var a=this;if(a&&!a.destroyed){var e=a.snapGrid,t=a.params;t.breakpoints&&a.setBreakpoint(),a.updateSize(),a.updateSlides(),a.updateProgress(),a.updateSlidesClasses(),a.params.freeMode?(i(),a.params.autoHeight&&a.updateAutoHeight()):(("auto"===a.params.slidesPerView||1<a.params.slidesPerView)&&a.isEnd&&!a.params.centeredSlides?a.slideTo(a.slides.length-1,0,!1,!0):a.slideTo(a.activeIndex,0,!1,!0))||i(),t.watchOverflow&&e!==a.snapGrid&&a.checkOverflow(),a.emit("update")}function i(){var e=a.rtlTranslate?-1*a.translate:a.translate,t=Math.min(Math.max(e,a.maxTranslate()),a.minTranslate());a.setTranslate(t),a.updateActiveIndex(),a.updateSlidesClasses()}},h.prototype.changeDirection=function(a,e){void 0===e&&(e=!0);var t=this,i=t.params.direction;return(a=a||("horizontal"===i?"vertical":"horizontal"))===i||"horizontal"!==a&&"vertical"!==a||(t.$el.removeClass(""+t.params.containerModifierClass+i+" wp8-"+i).addClass(""+t.params.containerModifierClass+a),(ie.isIE||ie.isEdge)&&(ae.pointerEvents||ae.prefixedPointerEvents)&&t.$el.addClass(t.params.containerModifierClass+"wp8-"+a),t.params.direction=a,t.slides.each(function(e,t){"vertical"===a?t.style.width="":t.style.height=""}),t.emit("changeDirection"),e&&t.update()),t},h.prototype.init=function(){var e=this;e.initialized||(e.emit("beforeInit"),e.params.breakpoints&&e.setBreakpoint(),e.addClasses(),e.params.loop&&e.loopCreate(),e.updateSize(),e.updateSlides(),e.params.watchOverflow&&e.checkOverflow(),e.params.grabCursor&&e.setGrabCursor(),e.params.preloadImages&&e.preloadImages(),e.params.loop?e.slideTo(e.params.initialSlide+e.loopedSlides,0,e.params.runCallbacksOnInit):e.slideTo(e.params.initialSlide,0,e.params.runCallbacksOnInit),e.attachEvents(),e.initialized=!0,e.emit("init"))},h.prototype.destroy=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);var a=this,i=a.params,s=a.$el,r=a.$wrapperEl,n=a.slides;return void 0===a.params||a.destroyed||(a.emit("beforeDestroy"),a.initialized=!1,a.detachEvents(),i.loop&&a.loopDestroy(),t&&(a.removeClasses(),s.removeAttr("style"),r.removeAttr("style"),n&&n.length&&n.removeClass([i.slideVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index").removeAttr("data-swiper-column").removeAttr("data-swiper-row")),a.emit("destroy"),Object.keys(a.eventsListeners).forEach(function(e){a.off(e)}),!1!==e&&(a.$el[0].swiper=null,a.$el.data("swiper",null),te.deleteProps(a)),a.destroyed=!0),null},h.extendDefaults=function(e){te.extend(
vendor: 15,102 bytes, line 2084
2084x,e)},e.extendedDefaults.get=function(){return x},e.defaults.get=function(){return w},e.Class.get=function(){return u},e.$.get=function(){return I},Object.defineProperties(h,e),h}(e),E={name:"device",proto:{device:g},static:{device:g}},S={name:"support",proto:{support:ae},static:{support:ae}},C={name:"browser",proto:{browser:ie},static:{browser:ie}},M={name:"resize",create:function(){var e=this;te.extend(e,{resize:{resizeHandler:function(){e&&!e.destroyed&&e.initialized&&(e.emit("beforeResize"),e.emit("resize"))},orientationChangeHandler:function(){e&&!e.destroyed&&e.initialized&&e.emit("orientationchange")}}})},on:{init:function(){ee.addEventListener("resize",this.resize.resizeHandler),ee.addEventListener("orientationchange",this.resize.orientationChangeHandler)},destroy:function(){ee.removeEventListener("resize",this.resize.resizeHandler),ee.removeEventListener("orientationchange",this.resize.orientationChangeHandler)}}},P={func:ee.MutationObserver||ee.WebkitMutationObserver,attach:function(e,t){void 0===t&&(t={});var a=this,i=new P.func(function(e){if(1!==e.length){var t=function(){a.emit("observerUpdate",e[0])};ee.requestAnimationFrame?ee.requestAnimationFrame(t):ee.setTimeout(t,0)}else a.emit("observerUpdate",e[0])});i.observe(e,{attributes:void 0===t.attributes||t.attributes,childList:void 0===t.childList||t.childList,characterData:void 0===t.characterData||t.characterData}),a.observer.observers.push(i)},init:function(){var e=this;if(ae.observer&&e.params.observer){if(e.params.observeParents)for(var t=e.$el.parents(),a=0;a<t.length;a+=1)e.observer.attach(t[a]);e.observer.attach(e.$el[0],{childList:e.params.observeSlideChildren}),e.observer.attach(e.$wrapperEl[0],{attributes:!1})}},destroy:function(){this.observer.observers.forEach(function(e){e.disconnect()}),this.observer.observers=[]}},k={name:"observer",params:{observer:!1,observeParents:!1,observeSlideChildren:!1},create:function(){te.extend(this,{observer:{init:P.init.bind(this),attach:P.attach.bind(this),destroy:P.destroy.bind(this),observers:[]}})},on:{init:function(){this.observer.init()},destroy:function(){this.observer.destroy()}}},z={update:function(e){var t=this,a=t.params,i=a.slidesPerView,s=a.slidesPerGroup,r=a.centeredSlides,n=t.params.virtual,o=n.addSlidesBefore,l=n.addSlidesAfter,d=t.virtual,p=d.from,c=d.to,u=d.slides,h=d.slidesGrid,v=d.renderSlide,f=d.offset;t.updateActiveIndex();var m,g,b,w=t.activeIndex||0;m=t.rtlTranslate?"right":t.isHorizontal()?"left":"top",b=r?(g=Math.floor(i/2)+s+o,Math.floor(i/2)+s+l):(g=i+(s-1)+o,s+l);var y=Math.max((w||0)-b,0),x=Math.min((w||0)+g,u.length-1),T=(t.slidesGrid[y]||0)-(t.slidesGrid[0]||0);function E(){t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.lazy&&t.params.lazy.enabled&&t.lazy.load()}if(te.extend(t.virtual,{from:y,to:x,offset:T,slidesGrid:t.slidesGrid}),p===y&&c===x&&!e)return t.slidesGrid!==h&&T!==f&&t.slides.css(m,T+"px"),void t.updateProgress();if(t.params.virtual.renderExternal)return t.params.virtual.renderExternal.call(t,{offset:T,from:y,to:x,slides:function(){for(var e=[],t=y;t<=x;t+=1)e.push(u[t]);return e}()}),void E();var S=[],C=[];if(e)t.$wrapperEl.find("."+t.params.slideClass).remove();else for(var M=p;M<=c;M+=1)(M<y||x<M)&&t.$wrapperEl.find("."+t.params.slideClass+'[data-swiper-slide-index="'+M+'"]').remove();for(var P=0;P<u.length;P+=1)y<=P&&P<=x&&(void 0===c||e?C.push(P):(c<P&&C.push(P),P<p&&S.push(P)));C.forEach(function(e){t.$wrapperEl.append(v(u[e],e))}),S.sort(function(e,t){return t-e}).forEach(function(e){t.$wrapperEl.prepend(v(u[e],e))}),t.$wrapperEl.children(".swiper-slide").css(m,T+"px"),E()},renderSlide:function(e,t){var a=this,i=a.params.virtual;if(i.cache&&a.virtual.cache[t])return a.virtual.cache[t];var s=i.renderSlide?I(i.renderSlide.call(a,e,t)):I('<div class="'+a.params.slideClass+'" data-swiper-slide-index="'+t+'">'+e+"</div>");return s.attr("data-swiper-slide-index")||s.attr("data-swiper-slide-index",t),i.cache&&(a.virtual.cache[t]=s),s},appendSlide:function(e){if("object"==typeof e&&"length"in e)for(var t=0;t<e.length;t+=1)e[t]&&this.virtual.slides.push(e[t]);else this.virtual.slides.push(e);this.virtual.update(!0)},prependSlide:function(e){var t=this,a=t.activeIndex,i=a+1,s=1;if(Array.isArray(e)){for(var r=0;r<e.length;r+=1)e[r]&&t.virtual.slides.unshift(e[r]);i=a+e.length,s=e.length}else t.virtual.slides.unshift(e);if(t.params.virtual.cache){var n=t.virtual.cache,o={};Object.keys(n).forEach(function(e){o[parseInt(e,10)+s]=n[e]}),t.virtual.cache=o}t.virtual.update(!0),t.slideTo(i,0)},removeSlide:function(e){var t=this;if(null!=e){var a=t.activeIndex;if(Array.isArray(e))for(var i=e.length-1;0<=i;i-=1)t.virtual.slides.splice(e[i],1),t.params.virtual.cache&&delete t.virtual.cache[e[i]],e[i]<a&&(a-=1),a=Math.max(a,0);else t.virtual.slides.splice(e,1),t.params.virtual.cache&&delete t.virtual.cache[e],e<a&&(a-=1),a=Math.max(a,0);t.virtual.update(!0),t.slideTo(a,0)}},removeAllSlides:function(){var e=this;e.virtual.slides=[],e.params.virtual.cache&&(e.virtual.cache={}),e.virtual.update(!0),e.slideTo(0,0)}},$={name:"virtual",params:{virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,addSlidesBefore:0,addSlidesAfter:0}},create:function(){var e=this;te.extend(e,{virtual:{update:z.update.bind(e),appendSlide:z.appendSlide.bind(e),prependSlide:z.prependSlide.bind(e),removeSlide:z.removeSlide.bind(e),removeAllSlides:z.removeAllSlides.bind(e),renderSlide:z.renderSlide.bind(e),slides:e.params.virtual.slides,cache:{}}})},on:{beforeInit:function(){var e=this;if(e.params.virtual.enabled){e.classNames.push(e.params.containerModifierClass+"virtual");var t={watchSlidesProgress:!0};te.extend(e.params,t),te.extend(e.originalParams,t),e.params.initialSlide||e.virtual.update()}},setTranslate:function(){this.params.virtual.enabled&&this.virtual.update()}}},L={handle:function(e){var t=this,a=t.rtlTranslate,i=e;i.originalEvent&&(i=i.originalEvent);var s=i.keyCode||i.charCode;if(!t.allowSlideNext&&(t.isHorizontal()&&39===s||t.isVertical()&&40===s||34===s))return!1;if(!t.allowSlidePrev&&(t.isHorizontal()&&37===s||t.isVertical()&&38===s||33===s))return!1;if(!(i.shiftKey||i.altKey||i.ctrlKey||i.metaKey||f.activeElement&&f.activeElement.nodeName&&("input"===f.activeElement.nodeName.toLowerCase()||"textarea"===f.activeElement.nodeName.toLowerCase()))){if(t.params.keyboard.onlyInViewport&&(33===s||34===s||37===s||39===s||38===s||40===s)){var r=!1;if(0<t.$el.parents("."+t.params.slideClass).length&&0===t.$el.parents("."+t.params.slideActiveClass).length)return;var n=ee.innerWidth,o=ee.innerHeight,l=t.$el.offset();a&&(l.left-=t.$el[0].scrollLeft);for(var d=[[l.left,l.top],[l.left+t.width,l.top],[l.left,l.top+t.height],[l.left+t.width,l.top+t.height]],p=0;p<d.length;p+=1){var c=d[p];0<=c[0]&&c[0]<=n&&0<=c[1]&&c[1]<=o&&(r=!0)}if(!r)return}t.isHorizontal()?(33!==s&&34!==s&&37!==s&&39!==s||(i.preventDefault?i.preventDefault():i.returnValue=!1),(34!==s&&39!==s||a)&&(33!==s&&37!==s||!a)||t.slideNext(),(33!==s&&37!==s||a)&&(34!==s&&39!==s||!a)||t.slidePrev()):(33!==s&&34!==s&&38!==s&&40!==s||(i.preventDefault?i.preventDefault():i.returnValue=!1),34!==s&&40!==s||t.slideNext(),33!==s&&38!==s||t.slidePrev()),t.emit("keyPress",s)}},enable:function(){this.keyboard.enabled||(I(f).on("keydown",this.keyboard.handle),this.keyboard.enabled=!0)},disable:function(){this.keyboard.enabled&&(I(f).off("keydown",this.keyboard.handle),this.keyboard.enabled=!1)}},D={name:"keyboard",params:{keyboard:{enabled:!1,onlyInViewport:!0}},create:function(){te.extend(this,{keyboard:{enabled:!1,enable:L.enable.bind(this),disable:L.disable.bind(this),handle:L.handle.bind(this)}})},on:{init:function(){this.params.keyboard.enabled&&this.keyboard.enable()},destroy:function(){this.keyboard.enabled&&this.keyboard.disable()}}};var O={lastScrollTime:te.now(),event:-1<ee.navigator.userAgent.indexOf("firefox")?"DOMMouseScroll":function(){var e="onwheel",t=e in f;if(!t){var a=f.createElement("div");a.setAttribute(e,"return;"),t="function"==typeof a[e]}return!t&&f.implementation&&f.implementation.hasFeature&&!0!==f.implementation.hasFeature("","")&&(t=f.implementation.hasFeature("Events.wheel","3.0")),t}()?"wheel":"mousewheel",normalize:function(e){var t=0,a=0,i=0,s=0;return"detail"in e&&(a=e.detail),"wheelDelta"in e&&(a=-e.wheelDelta/120),"wheelDeltaY"in e&&(a=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=a,a=0),i=10*t,s=10*a,"deltaY"in e&&(s=e.deltaY),"deltaX"in e&&(i=e.deltaX),(i||s)&&e.deltaMode&&(1===e.deltaMode?(i*=40,s*=40):(i*=800,s*=800)),i&&!t&&(t=i<1?-1:1),s&&!a&&(a=s<1?-1:1),{spinX:t,spinY:a,pixelX:i,pixelY:s}},handleMouseEnter:function(){this.mouseEntered=!0},handleMouseLeave:function(){this.mouseEntered=!1},handle:function(e){var t=e,a=this,i=a.params.mousewheel;if(!a.mouseEntered&&!i.releaseOnEdges)return!0;t.originalEvent&&(t=t.originalEvent);var s=0,r=a.rtlTranslate?-1:1,n=O.normalize(t);if(i.forceToAxis)if(a.isHorizontal()){if(!(Math.abs(n.pixelX)>Math.abs(n.pixelY)))return!0;s=n.pixelX*r}else{if(!(Math.abs(n.pixelY)>Math.abs(n.pixelX)))return!0;s=n.pixelY}else s=Math.abs(n.pixelX)>Math.abs(n.pixelY)?-n.pixelX*r:-n.pixelY;if(0===s)return!0;if(i.invert&&(s=-s),a.params.freeMode){a.params.loop&&a.loopFix();var o=a.getTranslate()+s*i.sensitivity,l=a.isBeginning,d=a.isEnd;if(o>=a.minTranslate()&&(o=a.minTranslate()),o<=a.maxTranslate()&&(o=a.maxTranslate()),a.setTransition(0),a.setTranslate(o),a.updateProgress(),a.updateActiveIndex(),a.updateSlidesClasses(),(!l&&a.isBeginning||!d&&a.isEnd)&&a.updateSlidesClasses(),a.params.freeModeSticky&&(clearTimeout(a.mousewheel.timeout),a.mousewheel.timeout=te.nextTick(function(){a.slideToClosest()},300)),a.emit("scroll",t),a.params.autoplay&&a.params.autoplayDisableOnInteraction&&a.autoplay.stop(),o===a.minTranslate()||o===a.maxTranslate())return!0}else{if(60<te.now()-a.mousewheel.lastScrollTime)if(s<0)if(a.isEnd&&!a.params.loop||a.animating){if(i.releaseOnEdges)return!0}else a.slideNext(),a.emit("scroll",t);else if(a.isBeginning&&!a.params.loop||a.animating){if(i.releaseOnEdges)return!0}else a.slidePrev(),a.emit("scroll",t);a.mousewheel.lastScrollTime=(new ee.Date).getTime()}return t.preventDefault?t.preventDefault():t.returnValue=!1,!1},enable:function(){var e=this;if(!O.event)return!1;if(e.mousewheel.enabled)return!1;var t=e.$el;return"container"!==e.params.mousewheel.eventsTarged&&(t=I(e.params.mousewheel.eventsTarged)),t.on("mouseenter",e.mousewheel.handleMouseEnter),t.on("mouseleave",e.mousewheel.handleMouseLeave),t.on(O.event,e.mousewheel.handle),e.mousewheel.enabled=!0},disable:function(){var e=this;if(!O.event)return!1;if(!e.mousewheel.enabled)return!1;var t=e.$el;return"container"!==e.params.mousewheel.eventsTarged&&(t=I(e.params.mousewheel.eventsTarged)),t.off(O.event,e.mousewheel.handle),!(e.mousewheel.enabled=!1)}},A={update:function(){var e=this,t=e.params.navigation;if(!e.params.loop){var a=e.navigation,i=a.$nextEl,s=a.$prevEl;s&&0<s.length&&(e.isBeginning?s.addClass(t.disabledClass):s.removeClass(t.disabledClass),s[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](t.lockClass)),i&&0<i.length&&(e.isEnd?i.addClass(t.disabledClass):i.removeClass(t.disabledClass),i[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](t.lockClass))}},onPrevClick:function(e){e.preventDefault(),this.isBeginning&&!this.params.loop||this.slidePrev()},onNextClick:function(e){e.preventDefault(),this.isEnd&&!this.params.loop||this.slideNext()},init:function(){var e,t,a=this,i=a.params.navigation;(i.nextEl||i.prevEl)&&(i.nextEl&&(e=I(i.nextEl),a.params.uniqueNavElements&&"string"==typeof i.nextEl&&1<e.length&&1===a.$el.find(i.nextEl).length&&(e=a.$el.find(i.nextEl))),i.prevEl&&(t=I(i.prevEl),a.params.uniqueNavElements&&"string"==typeof i.prevEl&&1<t.length&&1===a.$el.find(i.prevEl).length&&(t=a.$el.find(i.prevEl))),e&&0<e.length&&e.on("click",a.navigation.onNextClick),t&&0<t.length&&t.on("click",a.navigation.onPrevClick),te.extend(a.navigation,{$nextEl:e,nextEl:e&&e[0],$prevEl:t,prevEl:t&&t[0]}))},destroy:function(){var e=this,t=e.navigation,a=t.$nextEl,i=t.$prevEl;a&&a.length&&(a.off("click",e.navigation.onNextClick),a.removeClass(e.params.navigation.disabledClass)),i&&i.length&&(i.off("click",e.navigation.onPrevClick),i.removeClass(e.params.navigation.disabledClass))}},H={update:function(){var e=this,t=e.rtl,s=e.params.pagination;if(s.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var r,a=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,i=e.pagination.$el,n=e.params.loop?Math.ceil((a-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?((r=Math.ceil((e.activeIndex-e.loopedSlides)/e.params.slidesPerGroup))>a-1-2*e.loopedSlides&&(r-=a-2*e.loopedSlides),n-1<r&&(r-=n),r<0&&"bullets"!==e.params.paginationType&&(r=n+r)):r=void 0!==e.snapIndex?e.snapIndex:e.activeIndex||0,"bullets"===s.type&&e.pagination.bullets&&0<e.pagination.bullets.length){var o,l,d,p=e.pagination.bullets;if(s.dynamicBullets&&(e.pagination.bulletSize=p.eq(0)[e.isHorizontal()?"outerWidth":"outerHeight"](!0),i.css(e.isHorizontal()?"width":"height",e.pagination.bulletSize*(s.dynamicMainBullets+4)+"px"),1<s.dynamicMainBullets&&void 0!==e.previousIndex&&(e.pagination.dynamicBulletIndex+=r-e.previousIndex,e.pagination.dynamicBulletIndex>s.dynamicMainBullets-1?e.pagination.dynamicBulletIndex=s.dynamicMainBullets-1:e.pagination.dynamicBulletIndex<0&&(e.pagination.dynamicBulletIndex=0)),o=r-e.pagination.dynamicBulletIndex,d=((l=o+(Math.min(p.length,s.dynamicMainBullets)-1))+o)/2),p.removeClass(s.bulletActiveClass+" "+s.bulletActiveClass+"-next "+s.bulletActiveClass+"-next-next "+s.bulletActiveClass+"-prev "+s.bulletActiveClass+"-prev-prev "+s.bulletActiveClass+"-main"),1<i.length)p.each(function(e,t){var a=I(t),i=a.index();i===r&&a.addClass(s.bulletActiveClass),s.dynamicBullets&&(o<=i&&i<=l&&a.addClass(s.bulletActiveClass+"-main"),i===o&&a.prev().addClass(s.bulletActiveClass+"-prev").prev().addClass(s.bulletActiveClass+"-prev-prev"),i===l&&a.next().addClass(s.bulletActiveClass+"-next").next().addClass(s.bulletActiveClass+"-next-next"))});else if(p.eq(r).addClass(s.bulletActiveClass),s.dynamicBullets){for(var c=p.eq(o),u=p.eq(l),h=o;h<=l;h+=1)p.eq(h).addClass(s.bulletActiveClass+"-main");c.prev().addClass(s.bulletActiveClass+"-prev").prev().addClass(s.bulletActiveClass+"-prev-prev"),u.next().addClass(s.bulletActiveClass+"-next").next().addClass(s.bulletActiveClass+"-next-next")}if(s.dynamicBullets){var v=Math.min(p.length,s.dynamicMainBullets+4),f=(e.pagination.bulletSize*v-e.pagination.bulletSize)/2-d*e.pagination.bulletSize,m=t?"right":"left";p.css(e.isHorizontal()?m:"top",f+"px")}}if("fraction"===s.type&&(i.find("."+s.currentClass).text(s.formatFractionCurrent(r+1)),i.find("."+s.totalClass).text(s.formatFractionTotal(n))),"progressbar"===s.type){var g;g=s.progressbarOpposite?e.isHorizontal()?"vertical":"horizontal":e.isHorizontal()?"horizontal":"vertical";var b=(r+1)/n,w=1,y=1;"horizontal"===g?w=b:y=b,i.find("."+s.progressbarFillClass).transform("translate3d(0,
20840,0) scaleX("+w+") scaleY("+y+")").transition(e.params.speed)}"custom"===s.type&&s.renderCustom?(i.html(s.renderCustom(e,r+1,n)),e.emit("paginationRender",e,i[0])):e.emit("paginationUpdate",e,i[0]),i[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](s.lockClass)}},render:function(){var e=this,t=e.params.pagination;if(t.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var a=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,i=e.pagination.$el,s="";if("bullets"===t.type){for(var r=e.params.loop?Math.ceil((a-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length,n=0;n<r;n+=1)t.renderBullet?s+=t.renderBullet.call(e,n,t.bulletClass):s+="<"+t.bulletElement+' class="'+t.bulletClass+'"></'+t.bulletElement+">";i.html(s),e.pagination.bullets=i.find("."+t.bulletClass)}"fraction"===t.type&&(s=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):'<span class="'+t.currentClass+'"></span> / <span class="'+t.totalClass+'"></span>',i.html(s)),"progressbar"===t.type&&(s=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):'<span class="'+t.progressbarFillClass+'"></span>',i.html(s)),"custom"!==t.type&&e.emit("paginationRender",e.pagination.$el[0])}},init:function(){var a=this,e=a.params.pagination;if(e.el){var t=I(e.el);0!==t.length&&(a.params.uniqueNavElements&&"string"==typeof e.el&&1<t.length&&1===a.$el.find(e.el).length&&(t=a.$el.find(e.el)),"bullets"===e.type&&e.clickable&&t.addClass(e.clickableClass),t.addClass(e.modifierClass+e.type),"bullets"===e.type&&e.dynamicBullets&&(t.addClass(""+e.modifierClass+e.type+"-dynamic"),a.pagination.dynamicBulletIndex=0,e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&t.addClass(e.progressbarOppositeClass),e.clickable&&t.on("click","."+e.bulletClass,function(e){e.preventDefault();var t=I(this).index()*a.params.slidesPerGroup;a.params.loop&&(t+=a.loopedSlides),a.slideTo(t)}),te.extend(a.pagination,{$el:t,el:t[0]}))}},destroy:function(){var e=this,t=e.params.pagination;if(t.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var a=e.pagination.$el;a.removeClass(t.hiddenClass),a.removeClass(t.modifierClass+t.type),e.pagination.bullets&&e.pagination.bullets.removeClass(t.bulletActiveClass),t.clickable&&a.off("click","."+t.bulletClass)}}},G={setTranslate:function(){var e=this;if(e.params.scrollbar.el&&e.scrollbar.el){var t=e.scrollbar,a=e.rtlTranslate,i=e.progress,s=t.dragSize,r=t.trackSize,n=t.$dragEl,o=t.$el,l=e.params.scrollbar,d=s,p=(r-s)*i;a?0<(p=-p)?(d=s-p,p=0):r<-p+s&&(d=r+p):p<0?(d=s+p,p=0):r<p+s&&(d=r-p),e.isHorizontal()?(ae.transforms3d?n.transform("translate3d("+p+"px, 0, 0)"):n.transform("translateX("+p+"px)"),n[0].style.width=d+"px"):(ae.transforms3d?n.transform("translate3d(0px, "+p+"px, 0)"):n.transform("translateY("+p+"px)"),n[0].style.height=d+"px"),l.hide&&(clearTimeout(e.scrollbar.timeout),o[0].style.opacity=1,e.scrollbar.timeout=setTimeout(function(){o[0].style.opacity=0,o.transition(400)},1e3))}},setTransition:function(e){this.params.scrollbar.el&&this.scrollbar.el&&this.scrollbar.$dragEl.transition(e)},updateSize:function(){var e=this;if(e.params.scrollbar.el&&e.scrollbar.el){var t=e.scrollbar,a=t.$dragEl,i=t.$el;a[0].style.width="",a[0].style.height="";var s,r=e.isHorizontal()?i[0].offsetWidth:i[0].offsetHeight,n=e.size/e.virtualSize,o=n*(r/e.size);s="auto"===e.params.scrollbar.dragSize?r*n:parseInt(e.params.scrollbar.dragSize,10),e.isHorizontal()?a[0].style.width=s+"px":a[0].style.height=s+"px",i[0].style.display=1<=n?"none":"",e.params.scrollbar.hide&&(i[0].style.opacity=0),te.extend(t,{trackSize:r,divider:n,moveDivider:o,dragSize:s}),t.$el[e.params.watchOverflow&&e.isLocked?"addClass":"removeClass"](e.params.scrollbar.lockClass)}},getPointerPosition:function(e){return this.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX||e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY||e.clientY},setDragPosition:function(e){var t,a=this,i=a.scrollbar,s=a.rtlTranslate,r=i.$el,n=i.dragSize,o=i.trackSize,l=i.dragStartPos;t=(i.getPointerPosition(e)-r.offset()[a.isHorizontal()?"left":"top"]-(null!==l?l:n/2))/(o-n),t=Math.max(Math.min(t,1),0),s&&(t=1-t);var d=a.minTranslate()+(a.maxTranslate()-a.minTranslate())*t;a.updateProgress(d),a.setTranslate(d),a.updateActiveIndex(),a.updateSlidesClasses()}
vendor: 9,991 bytes, line 2084
2084,onDragStart:function(e){var t=this,a=t.params.scrollbar,i=t.scrollbar,s=t.$wrapperEl,r=i.$el,n=i.$dragEl;t.scrollbar.isTouched=!0,t.scrollbar.dragStartPos=e.target===n[0]||e.target===n?i.getPointerPosition(e)-e.target.getBoundingClientRect()[t.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),s.transition(100),n.transition(100),i.setDragPosition(e),clearTimeout(t.scrollbar.dragTimeout),r.transition(0),a.hide&&r.css("opacity",1),t.emit("scrollbarDragStart",e)},onDragMove:function(e){var t=this.scrollbar,a=this.$wrapperEl,i=t.$el,s=t.$dragEl;this.scrollbar.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,t.setDragPosition(e),a.transition(0),i.transition(0),s.transition(0),this.emit("scrollbarDragMove",e))},onDragEnd:function(e){var t=this,a=t.params.scrollbar,i=t.scrollbar.$el;t.scrollbar.isTouched&&(t.scrollbar.isTouched=!1,a.hide&&(clearTimeout(t.scrollbar.dragTimeout),t.scrollbar.dragTimeout=te.nextTick(function(){i.css("opacity",0),i.transition(400)},1e3)),t.emit("scrollbarDragEnd",e),a.snapOnRelease&&t.slideToClosest())},enableDraggable:function(){var e=this;if(e.params.scrollbar.el){var t=e.scrollbar,a=e.touchEventsTouch,i=e.touchEventsDesktop,s=e.params,r=t.$el[0],n=!(!ae.passiveListener||!s.passiveListeners)&&{passive:!1,capture:!1},o=!(!ae.passiveListener||!s.passiveListeners)&&{passive:!0,capture:!1};ae.touch?(r.addEventListener(a.start,e.scrollbar.onDragStart,n),r.addEventListener(a.move,e.scrollbar.onDragMove,n),r.addEventListener(a.end,e.scrollbar.onDragEnd,o)):(r.addEventListener(i.start,e.scrollbar.onDragStart,n),f.addEventListener(i.move,e.scrollbar.onDragMove,n),f.addEventListener(i.end,e.scrollbar.onDragEnd,o))}},disableDraggable:function(){var e=this;if(e.params.scrollbar.el){var t=e.scrollbar,a=e.touchEventsTouch,i=e.touchEventsDesktop,s=e.params,r=t.$el[0],n=!(!ae.passiveListener||!s.passiveListeners)&&{passive:!1,capture:!1},o=!(!ae.passiveListener||!s.passiveListeners)&&{passive:!0,capture:!1};ae.touch?(r.removeEventListener(a.start,e.scrollbar.onDragStart,n),r.removeEventListener(a.move,e.scrollbar.onDragMove,n),r.removeEventListener(a.end,e.scrollbar.onDragEnd,o)):(r.removeEventListener(i.start,e.scrollbar.onDragStart,n),f.removeEventListener(i.move,e.scrollbar.onDragMove,n),f.removeEventListener(i.end,e.scrollbar.onDragEnd,o))}},init:function(){var e=this;if(e.params.scrollbar.el){var t=e.scrollbar,a=e.$el,i=e.params.scrollbar,s=I(i.el);e.params.uniqueNavElements&&"string"==typeof i.el&&1<s.length&&1===a.find(i.el).length&&(s=a.find(i.el));var r=s.find("."+e.params.scrollbar.dragClass);0===r.length&&(r=I('<div class="'+e.params.scrollbar.dragClass+'"></div>'),s.append(r)),te.extend(t,{$el:s,el:s[0],$dragEl:r,dragEl:r[0]}),i.draggable&&t.enableDraggable()}},destroy:function(){this.scrollbar.disableDraggable()}},N={setTransform:function(e,t){var a=this.rtl,i=I(e),s=a?-1:1,r=i.attr("data-swiper-parallax")||"0",n=i.attr("data-swiper-parallax-x"),o=i.attr("data-swiper-parallax-y"),l=i.attr("data-swiper-parallax-scale"),d=i.attr("data-swiper-parallax-opacity");if(n||o?(n=n||"0",o=o||"0"):this.isHorizontal()?(n=r,o="0"):(o=r,n="0"),n=0<=n.indexOf("%")?parseInt(n,10)*t*s+"%":n*t*s+"px",o=0<=o.indexOf("%")?parseInt(o,10)*t+"%":o*t+"px",null!=d){var p=d-(d-1)*(1-Math.abs(t));i[0].style.opacity=p}if(null==l)i.transform("translate3d("+n+", "+o+", 0px)");else{var c=l-(l-1)*(1-Math.abs(t));i.transform("translate3d("+n+", "+o+", 0px) scale("+c+")")}},setTranslate:function(){var i=this,e=i.$el,t=i.slides,s=i.progress,r=i.snapGrid;e.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(function(e,t){i.parallax.setTransform(t,s)}),t.each(function(e,t){var a=t.progress;1<i.params.slidesPerGroup&&"auto"!==i.params.slidesPerView&&(a+=Math.ceil(e/2)-s*(r.length-1)),a=Math.min(Math.max(a,-1),1),I(t).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(function(e,t){i.parallax.setTransform(t,a)})})},setTransition:function(s){void 0===s&&(s=this.params.speed);this.$el.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each(function(e,t){var a=I(t),i=parseInt(a.attr("data-swiper-parallax-duration"),10)||s;0===s&&(i=0),a.transition(i)})}},B={getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var t=e.targetTouches[0].pageX,a=e.targetTouches[0].pageY,i=e.targetTouches[1].pageX,s=e.targetTouches[1].pageY;return Math.sqrt(Math.pow(i-t,2)+Math.pow(s-a,2))},onGestureStart:function(e){var t=this,a=t.params.zoom,i=t.zoom,s=i.gesture;if(i.fakeGestureTouched=!1,i.fakeGestureMoved=!1,!ae.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;i.fakeGestureTouched=!0,s.scaleStart=B.getDistanceBetweenTouches(e)}s.$slideEl&&s.$slideEl.length||(s.$slideEl=I(e.target).closest(".swiper-slide"),0===s.$slideEl.length&&(s.$slideEl=t.slides.eq(t.activeIndex)),s.$imageEl=s.$slideEl.find("img, svg, canvas"),s.$imageWrapEl=s.$imageEl.parent("."+a.containerClass),s.maxRatio=s.$imageWrapEl.attr("data-swiper-zoom")||a.maxRatio,0!==s.$imageWrapEl.length)?(s.$imageEl.transition(0),t.zoom.isScaling=!0):s.$imageEl=void 0},onGestureChange:function(e){var t=this.params.zoom,a=this.zoom,i=a.gesture;if(!ae.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;a.fakeGestureMoved=!0,i.scaleMove=B.getDistanceBetweenTouches(e)}i.$imageEl&&0!==i.$imageEl.length&&(a.scale=ae.gestures?e.scale*a.currentScale:i.scaleMove/i.scaleStart*a.currentScale,a.scale>i.maxRatio&&(a.scale=i.maxRatio-1+Math.pow(a.scale-i.maxRatio+1,.5)),a.scale<t.minRatio&&(a.scale=t.minRatio+1-Math.pow(t.minRatio-a.scale+1,.5)),i.$imageEl.transform("translate3d(0,0,0) scale("+a.scale+")"))},onGestureEnd:function(e){var t=this.params.zoom,a=this.zoom,i=a.gesture;if(!ae.gestures){if(!a.fakeGestureTouched||!a.fakeGestureMoved)return;if("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2&&!g.android)return;a.fakeGestureTouched=!1,a.fakeGestureMoved=!1}i.$imageEl&&0!==i.$imageEl.length&&(a.scale=Math.max(Math.min(a.scale,i.maxRatio),t.minRatio),i.$imageEl.transition(this.params.speed).transform("translate3d(0,0,0) scale("+a.scale+")"),a.currentScale=a.scale,a.isScaling=!1,1===a.scale&&(i.$slideEl=void 0))},onTouchStart:function(e){var t=this.zoom,a=t.gesture,i=t.image;a.$imageEl&&0!==a.$imageEl.length&&(i.isTouched||(g.android&&e.preventDefault(),i.isTouched=!0,i.touchesStart.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,i.touchesStart.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY))},onTouchMove:function(e){var t=this,a=t.zoom,i=a.gesture,s=a.image,r=a.velocity;if(i.$imageEl&&0!==i.$imageEl.length&&(t.allowClick=!1,s.isTouched&&i.$slideEl)){s.isMoved||(s.width=i.$imageEl[0].offsetWidth,s.height=i.$imageEl[0].offsetHeight,s.startX=te.getTranslate(i.$imageWrapEl[0],"x")||0,s.startY=te.getTranslate(i.$imageWrapEl[0],"y")||0,i.slideWidth=i.$slideEl[0].offsetWidth,i.slideHeight=i.$slideEl[0].offsetHeight,i.$imageWrapEl.transition(0),t.rtl&&(s.startX=-s.startX,s.startY=-s.startY));var n=s.width*a.scale,o=s.height*a.scale;if(!(n<i.slideWidth&&o<i.slideHeight)){if(s.minX=Math.min(i.slideWidth/2-n/2,0),s.maxX=-s.minX,s.minY=Math.min(i.slideHeight/2-o/2,0),s.maxY=-s.minY,s.touchesCurrent.x="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,s.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!s.isMoved&&!a.isScaling){if(t.isHorizontal()&&(Math.floor(s.minX)===Math.floor(s.startX)&&s.touchesCurrent.x<s.touchesStart.x||Math.floor(s.maxX)===Math.floor(s.startX)&&s.touchesCurrent.x>s.touchesStart.x))return void(s.isTouched=!1);if(!t.isHorizontal()&&(Math.floor(s.minY)===Math.floor(s.startY)&&s.touchesCurrent.y<s.touchesStart.y||Math.floor(s.maxY)===Math.floor(s.startY)&&s.touchesCurrent.y>s.touchesStart.y))return void(s.isTouched=!1)}e.preventDefault(),e.stopPropagation(),s.isMoved=!0,s.currentX=s.touchesCurrent.x-s.touchesStart.x+s.startX,s.currentY=s.touchesCurrent.y-s.touchesStart.y+s.startY,s.currentX<s.minX&&(s.currentX=s.minX+1-Math.pow(s.minX-s.currentX+1,.8)),s.currentX>s.maxX&&(s.currentX=s.maxX-1+Math.pow(s.currentX-s.maxX+1,.8)),s.currentY<s.minY&&(s.currentY=s.minY+1-Math.pow(s.minY-s.currentY+1,.8)),s.currentY>s.maxY&&(s.currentY=s.maxY-1+Math.pow(s.currentY-s.maxY+1,.8)),r.prevPositionX||(r.prevPositionX=s.touchesCurrent.x),r.prevPositionY||(r.prevPositionY=s.touchesCurrent.y),r.prevTime||(r.prevTime=Date.now()),r.x=(s.touchesCurrent.x-r.prevPositionX)/(Date.now()-r.prevTime)/2,r.y=(s.touchesCurrent.y-r.prevPositionY)/(Date.now()-r.prevTime)/2,Math.abs(s.touchesCurrent.x-r.prevPositionX)<2&&(r.x=0),Math.abs(s.touchesCurrent.y-r.prevPositionY)<2&&(r.y=0),r.prevPositionX=s.touchesCurrent.x,r.prevPositionY=s.touchesCurrent.y,r.prevTime=Date.now(),i.$imageWrapEl.transform("translate3d("+s.currentX+"px, "+s.currentY+"px,0)")}}},onTouchEnd:function(){var e=this.zoom,t=e.gesture,a=e.image,i=e.velocity;if(t.$imageEl&&0!==t.$imageEl.length){if(!a.isTouched||!a.isMoved)return a.isTouched=!1,void(a.isMoved=!1);a.isTouched=!1,a.isMoved=!1;var s=300,r=300,n=i.x*s,o=a.currentX+n,l=i.y*r,d=a.currentY+l;0!==i.x&&(s=Math.abs((o-a.currentX)/i.x)),0!==i.y&&(r=Math.abs((d-a.currentY)/i.y));var p=Math.max(s,r);a.currentX=o,a.currentY=d;var c=a.width*e.scale,u=a.height*e.scale;a.minX=Math.min(t.slideWidth/2-c/2,0),a.maxX=-a.minX,a.minY=Math.min(t.slideHeight/2-u/2,0),a.maxY=-a.minY,a.currentX=Math.max(Math.min(a.currentX,a.maxX),a.minX),a.currentY=Math.max(Math.min(a.currentY,a.maxY),a.minY),t.$imageWrapEl.transition(p).transform("translate3d("+a.currentX+"px, "+a.currentY+"px,0)")}},onTransitionEnd:function(){var e=this.zoom,t=e.gesture;t.$slideEl&&this.previousIndex!==this.activeIndex&&(t.$imageEl.transform("translate3d(0,
20840,0) scale(1)"),t.$imageWrapEl.transform("translate3d(0,0,0)"),e.scale=1,e.currentScale=1,t.$slideEl=void 0,t.$imageEl=void 0,t.$imageWrapEl=void 0)},toggle:function(e){var t=this.zoom;t.scale&&1!==t.scale?t.out():t.in(e)},in:function(e){var t,a,i,s,r,n,o,l,d,p,c,u,h,v,f,m,g=this,b=g.zoom,w=g.params.zoom,y=b.gesture,x=b.image;y.$slideEl||(y.$slideEl=g.clickedSlide?I(g.clickedSlide):g.slides.eq(g.activeIndex),y.$imageEl=y.$slideEl.find("img, svg, canvas"),y.$imageWrapEl=y.$imageEl.parent("."+w.containerClass)),y.$imageEl&&0!==y.$imageEl.length&&(y.$slideEl.addClass(""+w.zoomedSlideClass),a=void 0===x.touchesStart.x&&e?(t="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,"touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(t=x.touchesStart.x,x.touchesStart.y),b.scale=y.$imageWrapEl.attr("data-swiper-zoom")||w.maxRatio,b.currentScale=y.$imageWrapEl.attr("data-swiper-zoom")||w.maxRatio,e?(f=y.$slideEl[0].offsetWidth,m=y.$slideEl[0].offsetHeight,i=y.$slideEl.offset().left+f/2-t,s=y.$slideEl.offset().top+m/2-a,o=y.$imageEl[0].offsetWidth,l=y.$imageEl[0].offsetHeight,d=o*b.scale,p=l*b.scale,h=-(c=Math.min(f/2-d/2,0)),v=-(u=Math.min(m/2-p/2,0)),(r=i*b.scale)<c&&(r=c),h<r&&(r=h),(n=s*b.scale)<u&&(n=u),v<n&&(n=v)):n=r=0,y.$imageWrapEl.transition(300).transform("translate3d("+r+"px, "+n+"px,0)"),y.$imageEl.transition(300).transform("translate3d(0,0,0) scale("+b.scale+")"))},out:function(){var e=this,t=e.zoom,a=e.params.zoom,i=t.gesture;i.$slideEl||(i.$slideEl=e.clickedSlide?I(e.clickedSlide):e.slides.eq(e.activeIndex),i.$imageEl=i.$slideEl.find("img, svg, canvas"),i.$imageWrapEl=i.$imageEl.parent("."+a.containerClass)),i.$imageEl&&0!==i.$imageEl.length&&(t.scale=1,t.currentScale=1,i.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),i.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"),i.$slideEl.removeClass(""+a.zoomedSlideClass),i.$slideEl=void 0)},enable:function(){var e=this,t=e.zoom;if(!t.enabled){t.enabled=!0;var a=!("touchstart"!==e.touchEvents.start||!ae.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1};ae.gestures?(e.$wrapperEl.on("gesturestart",".swiper-slide",t.onGestureStart,a),e.$wrapperEl.on("gesturechange",".swiper-slide",t.onGestureChange,a),e.$wrapperEl.on("gestureend",".swiper-slide",t.onGestureEnd,a)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.on(e.touchEvents.start,".swiper-slide",t.onGestureStart,a),e.$wrapperEl.on(e.touchEvents.move,".swiper-slide",t.onGestureChange,a),e.$wrapperEl.on(e.touchEvents.end,".swiper-slide",t.onGestureEnd,a)),e.$wrapperEl.on(e.touchEvents.move,"."+e.params.zoom.containerClass,t.onTouchMove)}},disable:function(){var e=this,t=e.zoom;if(t.enabled){e.zoom.enabled=!1;var a=!("touchstart"!==e.touchEvents.start||!ae.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1};ae.gestures?(e.$wrapperEl.off("gesturestart",".swiper-slide",t.onGestureStart,a),e.$wrapperEl.off("gesturechange",".swiper-slide",t.onGestureChange,a),e.$wrapperEl.off("gestureend",".swiper-slide",t.onGestureEnd,a)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.off(e.touchEvents.start,".swiper-slide",t.onGestureStart,a),e.$wrapperEl.off(e.touchEvents.move,".swiper-slide",t.onGestureChange,a),e.$wrapperEl.off(e.touchEvents.end,".swiper-slide",t.onGestureEnd,a)),e.$wrapperEl.off(e.touchEvents.move,"."+e.params.zoom.containerClass,t.onTouchMove)}}},X={loadInSlide:function(e,l){void 0===l&&(l=!0);var d=this,p=d.params.lazy;if(void 0!==e&&0!==d.slides.length){var c=d.virtual&&d.params.virtual.enabled?d.$wrapperEl.children("."+d.params.slideClass+'[data-swiper-slide-index="'+e+'"]'):d.slides.eq(e),t=c.find("."+p.elementClass+":not(."+p.loadedClass+"):not(."+p.loadingClass+")");!c.hasClass(p.elementClass)||c.hasClass(p.loadedClass)||c.hasClass(p.loadingClass)||(t=t.add(c[0])),0!==t.length&&t.each(function(e,t){var i=I(t);i.addClass(p.loadingClass);var s=i.attr("data-background"),r=i.attr("data-src"),n=i.attr("data-srcset"),o=i.attr("data-sizes");d.loadImage(i[0],r||s,n,o,!1,function(){if(null!=d&&d&&(!d||d.params)&&!d.destroyed){if(s?(i.css("background-image",'url("'+s+'")'),i.removeAttr("data-background")):(n&&(i.attr("srcset",n
vendor: 5,170 bytes, line 2084
2084),i.removeAttr("data-srcset")),o&&(i.attr("sizes",o),i.removeAttr("data-sizes")),r&&(i.attr("src",r),i.removeAttr("data-src"))),i.addClass(p.loadedClass).removeClass(p.loadingClass),c.find("."+p.preloaderClass).remove(),d.params.loop&&l){var e=c.attr("data-swiper-slide-index");if(c.hasClass(d.params.slideDuplicateClass)){var t=d.$wrapperEl.children('[data-swiper-slide-index="'+e+'"]:not(.'+d.params.slideDuplicateClass+")");d.lazy.loadInSlide(t.index(),!1)}else{var a=d.$wrapperEl.children("."+d.params.slideDuplicateClass+'[data-swiper-slide-index="'+e+'"]');d.lazy.loadInSlide(a.index(),!1)}}d.emit("lazyImageReady",c[0],i[0])}}),d.emit("lazyImageLoad",c[0],i[0])})}},load:function(){var i=this,t=i.$wrapperEl,a=i.params,s=i.slides,e=i.activeIndex,r=i.virtual&&a.virtual.enabled,n=a.lazy,o=a.slidesPerView;function l(e){if(r){if(t.children("."+a.slideClass+'[data-swiper-slide-index="'+e+'"]').length)return!0}else if(s[e])return!0;return!1}function d(e){return r?I(e).attr("data-swiper-slide-index"):I(e).index()}if("auto"===o&&(o=0),i.lazy.initialImageLoaded||(i.lazy.initialImageLoaded=!0),i.params.watchSlidesVisibility)t.children("."+a.slideVisibleClass).each(function(e,t){var a=r?I(t).attr("data-swiper-slide-index"):I(t).index();i.lazy.loadInSlide(a)});else if(1<o)for(var p=e;p<e+o;p+=1)l(p)&&i.lazy.loadInSlide(p);else i.lazy.loadInSlide(e);if(n.loadPrevNext)if(1<o||n.loadPrevNextAmount&&1<n.loadPrevNextAmount){for(var c=n.loadPrevNextAmount,u=o,h=Math.min(e+u+Math.max(c,u),s.length),v=Math.max(e-Math.max(u,c),0),f=e+o;f<h;f+=1)l(f)&&i.lazy.loadInSlide(f);for(var m=v;m<e;m+=1)l(m)&&i.lazy.loadInSlide(m)}else{var g=t.children("."+a.slideNextClass);0<g.length&&i.lazy.loadInSlide(d(g));var b=t.children("."+a.slidePrevClass);0<b.length&&i.lazy.loadInSlide(d(b))}}},V={LinearSpline:function(e,t){var a,i,s,r,n,o=function(e,t){for(i=-1,a=e.length;1<a-i;)e[s=a+i>>1]<=t?i=s:a=s;return a};return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(n=o(this.x,e),r=n-1,(e-this.x[r])*(this.y[n]-this.y[r])/(this.x[n]-this.x[r])+this.y[r]):0},this},getInterpolateFunction:function(e){var t=this;t.controller.spline||(t.controller.spline=t.params.loop?new V.LinearSpline(t.slidesGrid,e.slidesGrid):new V.LinearSpline(t.snapGrid,e.snapGrid))},setTranslate:function(e,t){var a,i,s=this,r=s.controller.control;function n(e){var t=s.rtlTranslate?-s.translate:s.translate;"slide"===s.params.controller.by&&(s.controller.getInterpolateFunction(e),i=-s.controller.spline.interpolate(-t)),i&&"container"!==s.params.controller.by||(a=(e.maxTranslate()-e.minTranslate())/(s.maxTranslate()-s.minTranslate()),i=(t-s.minTranslate())*a+e.minTranslate()),s.params.controller.inverse&&(i=e.maxTranslate()-i),e.updateProgress(i),e.setTranslate(i,s),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(r))for(var o=0;o<r.length;o+=1)r[o]!==t&&r[o]instanceof T&&n(r[o]);else r instanceof T&&t!==r&&n(r)},setTransition:function(t,e){var a,i=this,s=i.controller.control;function r(e){e.setTransition(t,i),0!==t&&(e.transitionStart(),e.params.autoHeight&&te.nextTick(function(){e.updateAutoHeight()}),e.$wrapperEl.transitionEnd(function(){s&&(e.params.loop&&"slide"===i.params.controller.by&&e.loopFix(),e.transitionEnd())}))}if(Array.isArray(s))for(a=0;a<s.length;a+=1)s[a]!==e&&s[a]instanceof T&&r(s[a]);else s instanceof T&&e!==s&&r(s)}},Y={makeElFocusable:function(e){return e.attr("tabIndex","0"),e},addElRole:function(e,t){return e.attr("role",t),e},addElLabel:function(e,t){return e.attr("aria-label",t),e},disableEl:function(e){return e.attr("aria-disabled",!0),e},enableEl:function(e){return e.attr("aria-disabled",!1),e},onEnterKey:function(e){var t=this,a=t.params.a11y;if(13===e.keyCode){var i=I(e.target);t.navigation&&t.navigation.$nextEl&&i.is(t.navigation.$nextEl)&&(t.isEnd&&!t.params.loop||t.slideNext(),t.isEnd?t.a11y.notify(a.lastSlideMessage):t.a11y.notify(a.nextSlideMessage)),t.navigation&&t.navigation.$prevEl&&i.is(t.navigation.$prevEl)&&(t.isBeginning&&!t.params.loop||t.slidePrev(),t.isBeginning?t.a11y.notify(a.firstSlideMessage):t.a11y.notify(a.prevSlideMessage)),t.pagination&&i.is("."+t.params.pagination.bulletClass)&&i[0].click()}},notify:function(e){var t=this.a11y.liveRegion;0!==t.length&&(t.html(""),t.html(e))},updateNavigation:function(){var e=this;if(!e.params.loop){var t=e.navigation,a=t.$nextEl,i=t.$prevEl;i&&0<i.length&&(e.isBeginning?e.a11y.disableEl(i):e.a11y.enableEl(i)),a&&0<a.length&&(e.isEnd?e.a11y.disableEl(a):e.a11y.enableEl(a))}},updatePagination:function(){var i=this,s=i.params.a11y;i.pagination&&i.params.pagination.clickable&&i.pagination.bullets&&i.pagination.bullets.length&&i.pagination.bullets.each(function(e,t){var a=I(t);i.a11y.makeElFocusable(a),i.a11y.addElRole(a,"button"),i.a11y.addElLabel(a,s.paginationBulletMessage.replace(/{{index}}/,a.index()+1))})},init:function(){var e=this;e.$el.append(e.a11y.liveRegion);var t,a,i=e.params.a11y;e.navigation&&e.navigation.$nextEl&&(t=e.navigation.$nextEl),e.navigation&&e.navigation.$prevEl&&(a=e.navigation.$prevEl),t&&(e.a11y.makeElFocusable(t),e.a11y.addElRole(t,"button"),e.a11y.addElLabel(t,i.nextSlideMessage),t.on("key
2084down",e.a11y.onEnterKey)),a&&(e.a11y.makeElFocusable(a),e.a11y.addElRole(a,"button"),e.a11y.addElLabel(a,i.prevSlideMessage),a.on("keydown",e.a11y.onEnterKey)),e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.$el.on("keydown","."+e.params.pagination.bulletClass,e.a11y.onEnterKey)},destroy:function(){var e,t,a=this;a.a11y.liveRegion&&0<a.a11y.liveRegion.length&&a.a11y.liveRegion.remove(),a.navigation&&a.navigation.$nextEl&&(e=a.navigation.$nextEl),a.navigation&&a.navigation.$prevEl&&(t=a.navigation.$prevEl),e&&e.off("keydown",a.a11y.onEnterKey),t&&t.off("keydown",a.a11y.onEnterKey),a.pagination&&a.params.pagination.clickable&&a.pagination.bullets&&a.pagination.bullets.length&&a.pagination.$el.off("keydown","."+a.params.pagination.bulletClass,a.a11y.onEnterKey)}},F={init:function(){var e=this;if(e.params.history){if(!ee.history||!ee.history.pushState)return e.params.history.enabled=!1,void(e.params.hashNavigation.enabled=!0);var t=e.history;t.initialized=!0,t.paths=F.getPathValues(),(t.paths.key||t.paths.value)&&(t.scrollToSlide(0,t.paths.value,e.params.runCallbacksOnInit),e.params.history.replaceState||ee.addEventListener("popstate",e.history.setHistoryPopState))}},destroy:function(){this.params.history.replaceState||ee.removeEventListener("popstate",this.history.setHistoryPopState)},setHistoryPopState:function(){this.history.paths=F.getPathValues(),this.history.scrollToSlide(this.params.speed,this.history.paths.value,!1)},getPathValues:function(){var e=ee.location.pathname.slice(1).split("/").filter(function(e){return""!==e}),t=e.length;return{key:e[t-2],value:e[t-1]}},setHistory:function(e,t){if(this.history.initialized&&this.params.history.enabled){var a=this.slides.eq(t),i=F.slugify(a.attr("data-history"));ee.location.pathname.includes(e)||(i=e+"/"+i);var s=ee.history.state;s&&s.value===i||(this.params.history.replaceState?ee.history.replaceState({value:i},null,i):ee.history.pushState({value:i},null,i))}},slugify:function(e){return e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},scrollToSlide:function(e,t,a){var i=this;if(t)for(var s=0,r=i.slides.length;s<r;s+=1){var n=i.slides.eq(s);if(F.slugify(n.attr("data-history"))===t&&!n.hasClass(i.params.slideDuplicateClass)){var o=n.index();i.slideTo(o,e,a)}}else i.slideTo(0,e,a)}},R={onHashCange:function(){var e=this,t=f.location.hash.replace("#","");if(t!==e.slides.eq(e.activeIndex).attr("data-hash")){var a=e.$wrapperEl.children("."+e.params.slideClass+'[data-hash="'+t+'"]').index();if(void 0===a)return;e.slideTo(a)}},setHash:function(){var e=this;if(e.hashNavigation.initialized&&e.params.hashNavigation.enabled)if(e.params.hashNavigation.replaceState&&ee.history&&ee.history.replaceState)ee.history.replaceState(null,null,"#"+e.slides.eq(e.activeIndex).attr("data-hash")||"");else{var t=e.slides.eq(e.activeIndex),a=t.attr("data-hash")||t.attr("data-history");f.location.hash=a||""}},init:function(){var e=this;if(!(!e.params.hashNavigation.enabled||e.params.history&&e.params.history.enabled)){e.hashNavigation.initialized=!0;var t=f.location.hash.replace("#","");if(t)for(var a=0,i=e.slides.length;a<i;a+=1){var s=e.slides.eq(a);if((s.attr("data-hash")||s.attr("data-history"))===t&&!s.hasClass(e.params.slideDuplicateClass)){var r=s.index();e.slideTo(r,0,e.params.runCallbacksOnInit,!0)}}e.params.hashNavigation.watchState&&I(ee).on("hashchange",e.hashNavigation.onHashCange)}},destroy:function(){this.params.hashNavigation.watchState&&I(ee).off("hashchange",this.hashNavigation.onHashCange)}},q={run:function(){var e=this,t=e.slides.eq(e.activeIndex),a=e.params.autoplay.delay;t.attr("data-swiper-autoplay")&&(a=t.attr("data-swiper-autoplay")||e.params.autoplay.delay),clearTimeout(e.autoplay.timeout),e.autoplay.timeout=te.nextTick(function(){e.params.autoplay.reverseDirection?e.params.loop?(e.loopFix(),e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.isBeginning?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(e.slides.length-1,e.params.speed,!0,
vendor: 20,833 bytes, line 2084
2084!0),e.emit("autoplay")):(e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.params.loop?(e.loopFix(),e.slideNext(e.params.speed,!0,!0),e.emit("autoplay")):e.isEnd?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(0,e.params.speed,!0,!0),e.emit("autoplay")):(e.slideNext(e.params.speed,!0,!0),e.emit("autoplay"))},a)},start:function(){var e=this;return void 0===e.autoplay.timeout&&(!e.autoplay.running&&(e.autoplay.running=!0,e.emit("autoplayStart"),e.autoplay.run(),!0))},stop:function(){var e=this;return!!e.autoplay.running&&(void 0!==e.autoplay.timeout&&(e.autoplay.timeout&&(clearTimeout(e.autoplay.timeout),e.autoplay.timeout=void 0),e.autoplay.running=!1,e.emit("autoplayStop"),!0))},pause:function(e){var t=this;t.autoplay.running&&(t.autoplay.paused||(t.autoplay.timeout&&clearTimeout(t.autoplay.timeout),t.autoplay.paused=!0,0!==e&&t.params.autoplay.waitForTransition?(t.$wrapperEl[0].addEventListener("transitionend",t.autoplay.onTransitionEnd),t.$wrapperEl[0].addEventListener("webkitTransitionEnd",t.autoplay.onTransitionEnd)):(t.autoplay.paused=!1,t.autoplay.run())))}},W={setTranslate:function(){for(var e=this,t=e.slides,a=0;a<t.length;a+=1){var i=e.slides.eq(a),s=-i[0].swiperSlideOffset;e.params.virtualTranslate||(s-=e.translate);var r=0;e.isHorizontal()||(r=s,s=0);var n=e.params.fadeEffect.crossFade?Math.max(1-Math.abs(i[0].progress),0):1+Math.min(Math.max(i[0].progress,-1),0);i.css({opacity:n}).transform("translate3d("+s+"px, "+r+"px, 0px)")}},setTransition:function(e){var a=this,t=a.slides,i=a.$wrapperEl;if(t.transition(e),a.params.virtualTranslate&&0!==e){var s=!1;t.transitionEnd(function(){if(!s&&a&&!a.destroyed){s=!0,a.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],t=0;t<e.length;t+=1)i.trigger(e[t])}})}}},j={setTranslate:function(){var e,t=this,a=t.$el,i=t.$wrapperEl,s=t.slides,r=t.width,n=t.height,o=t.rtlTranslate,l=t.size,d=t.params.cubeEffect,p=t.isHorizontal(),c=t.virtual&&t.params.virtual.enabled,u=0;d.shadow&&(p?(0===(e=i.find(".swiper-cube-shadow")).length&&(e=I('<div class="swiper-cube-shadow"></div>'),i.append(e)),e.css({height:r+"px"})):0===(e=a.find(".swiper-cube-shadow")).length&&(e=I('<div class="swiper-cube-shadow"></div>'),a.append(e)));for(var h=0;h<s.length;h+=1){var v=s.eq(h),f=h;c&&(f=parseInt(v.attr("data-swiper-slide-index"),10));var m=90*f,g=Math.floor(m/360);o&&(m=-m,g=Math.floor(-m/360));var b=Math.max(Math.min(v[0].progress,1),-1),w=0,y=0,x=0;f%4==0?(w=4*-g*l,x=0):(f-1)%4==0?(w=0,x=4*-g*l):(f-2)%4==0?(w=l+4*g*l,x=l):(f-3)%4==0&&(w=-l,x=3*l+4*l*g),o&&(w=-w),p||(y=w,w=0);var T="rotateX("+(p?0:-m)+"deg) rotateY("+(p?m:0)+"deg) translate3d("+w+"px, "+y+"px, "+x+"px)";if(b<=1&&-1<b&&(u=90*f+90*b,o&&(u=90*-f-90*b)),v.transform(T),d.slideShadows){var E=p?v.find(".swiper-slide-shadow-left"):v.find(".swiper-slide-shadow-top"),S=p?v.find(".swiper-slide-shadow-right"):v.find(".swiper-slide-shadow-bottom");0===E.length&&(E=I('<div class="swiper-slide-shadow-'+(p?"left":"top")+'"></div>'),v.append(E)),0===S.length&&(S=I('<div class="swiper-slide-shadow-'+(p?"right":"bottom")+'"></div>'),v.append(S)),E.length&&(E[0].style.opacity=Math.max(-b,0)),S.length&&(S[0].style.opacity=Math.max(b,0))}}if(i.css({"-webkit-transform-origin":"50% 50% -"+l/2+"px","-moz-transform-origin":"50% 50% -"+l/2+"px","-ms-transform-origin":"50% 50% -"+l/2+"px","transform-origin":"50% 50% -"+l/2+"px"}),d.shadow)if(p)e.transform("translate3d(0px, "+(r/2+d.shadowOffset)+"px, "+-r/2+"px) rotateX(90deg) rotateZ(0deg) scale("+d.shadowScale+")");else{var C=Math.abs(u)-90*Math.floor(Math.abs(u)/90),M=1.5-(Math.sin(2*C*Math.PI/360)/2+Math.cos(2*C*Math.PI/360)/2),P=d.shadowScale,k=d.shadowScale/M,z=d.shadowOffset;e.transform("scale3d("+P+", 1, "+k+") translate3d(0px, "+(n/2+z)+"px, "+-n/2/k+"px) rotateX(-90deg)")}var $=ie.isSafari||ie.isUiWebView?-l/2:0;i.transform("translate3d(0px,0,"+$+"px) rotateX("+(t.isHorizontal()?0:u)+"deg) rotateY("+(t.isHorizontal()?-u:0)+"deg)")},setTransition:function(e){var t=this.$el;this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),this.params.cubeEffect.shadow&&!this.isHorizontal()&&t.find(".swiper-cube-shadow").transition(e)}},U={setTranslate:function(){for(var e=this,t=e.slides,a=e.rtlTranslate,i=0;i<t.length;i+=1){var s=t.eq(i),r=s[0].progress;e.params.flipEffect.limitRotation&&(r=Math.max(Math.min(s[0].progress,1),-1));var n=-180*r,o=0,l=-s[0].swiperSlideOffset,d=0;if(e.isHorizontal()?a&&(n=-n):(d=l,o=-n,n=l=0),s[0].style.zIndex=-Math.abs(Math.round(r))+t.length,e.params.flipEffect.slideShadows){var p=e.isHorizontal()?s.find(".swiper-slide-shadow-left"):s.find(".swiper-slide-shadow-top"),c=e.isHorizontal()?s.find(".swiper-slide-shadow-right"):s.find(".swiper-slide-shadow-bottom");0===p.length&&(p=I('<div class="swiper-slide-shadow-'+(e.isHorizontal()?"left":"top")+'"></div>'),s.append(p)),0===c.length&&(c=I('<div class="swiper-slide-shadow-'+(e.isHorizontal()?"right":"bottom")+'"></div>'),s.append(c)),p.length&&(p[0].style.opacity=Math.max(-r,0)),c.length&&(c[0].style.opacity=Math.max(r,0))}s.transform("translate3d("+l+"px, "+d+"px, 0px) rotateX("+o+"deg) rotateY("+n+"deg)")}},setTransition:function(e){var a=this,t=a.slides,i=a.activeIndex,s=a.$wrapperEl;if(t.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),a.params.virtualTranslate&&0!==e){var r=!1;t.eq(i).transitionEnd(function(){if(!r&&a&&!a.destroyed){r=!0,a.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],t=0;t<e.length;t+=1)s.trigger(e[t])}})}}},K={setTranslate:function(){for(var e=this,t=e.width,a=e.height,i=e.slides,s=e.$wrapperEl,r=e.slidesSizesGrid,n=e.params.coverflowEffect,o=e.isHorizontal(),l=e.translate,d=o?t/2-l:a/2-l,p=o?n.rotate:-n.rotate,c=n.depth,u=0,h=i.length;u<h;u+=1){var v=i.eq(u),f=r[u],m=(d-v[0].swiperSlideOffset-f/2)/f*n.modifier,g=o?p*m:0,b=o?0:p*m,w=-c*Math.abs(m),y=o?0:n.stretch*m,x=o?n.stretch*m:0;Math.abs(x)<.001&&(x=0),Math.abs(y)<.001&&(y=0),Math.abs(w)<.001&&(w=0),Math.abs(g)<.001&&(g=0),Math.abs(b)<.001&&(b=0);var T="translate3d("+x+"px,"+y+"px,"+w+"px)  rotateX("+b+"deg) rotateY("+g+"deg)";if(v.transform(T),v[0].style.zIndex=1-Math.abs(Math.round(m)),n.slideShadows){var E=o?v.find(".swiper-slide-shadow-left"):v.find(".swiper-slide-shadow-top"),S=o?v.find(".swiper-slide-shadow-right"):v.find(".swiper-slide-shadow-bottom");0===E.length&&(E=I('<div class="swiper-slide-shadow-'+(o?"left":"top")+'"></div>'),v.append(E)),0===S.length&&(S=I('<div class="swiper-slide-shadow-'+(o?"right":"bottom")+'"></div>'),v.append(S)),E.length&&(E[0].style.opacity=0<m?m:0),S.length&&(S[0].style.opacity=0<-m?-m:0)}}(ae.pointerEvents||ae.prefixedPointerEvents)&&(s[0].style.perspectiveOrigin=d+"px 50%")},setTransition:function(e){this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}},_={init:function(){var e=this,t=e.params.thumbs,a=e.constructor;t.swiper instanceof a?(e.thumbs.swiper=t.swiper,te.extend(e.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),te.extend(e.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1})):te.isObject(t.swiper)&&(e.thumbs.swiper=new a(te.extend({},t.swiper,{watchSlidesVisibility:!0,watchSlidesProgress:!0,slideToClickedSlide:!1})),e.thumbs.swiperCreated=!0),e.thumbs.swiper.$el.addClass(e.params.thumbs.thumbsContainerClass),e.thumbs.swiper.on("tap",e.thumbs.onThumbClick)},onThumbClick:function(){var e=this,t=e.thumbs.swiper;if(t){var a=t.clickedIndex,i=t.clickedSlide;if(!(i&&I(i).hasClass(e.params.thumbs.slideThumbActiveClass)||null==a)){var s;if(s=t.params.loop?parseInt(I(t.clickedSlide).attr("data-swiper-slide-index"),10):a,e.params.loop){var r=e.activeIndex;e.slides.eq(r).hasClass(e.params.slideDuplicateClass)&&(e.loopFix(),e._clientLeft=e.$wrapperEl[0].clientLeft,r=e.activeIndex);var n=e.slides.eq(r).prevAll('[data-swiper-slide-index="'+s+'"]').eq(0).index(),o=e.slides.eq(r).nextAll('[data-swiper-slide-index="'+s+'"]').eq(0).index();s=void 0===n?o:void 0===o?n:o-r<r-n?o:n}e.slideTo(s)}}},update:function(e){var t=this,a=t.thumbs.swiper;if(a){var i="auto"===a.params.slidesPerView?a.slidesPerViewDynamic():a.params.slidesPerView;if(t.realIndex!==a.realIndex){var s,r=a.activeIndex;if(a.params.loop){a.slides.eq(r).hasClass(a.params.slideDuplicateClass)&&(a.loopFix(),a._clientLeft=a.$wrapperEl[0].clientLeft,r=a.activeIndex);var n=a.slides.eq(r).prevAll('[data-swiper-slide-index="'+t.realIndex+'"]').eq(0).index(),o=a.slides.eq(r).nextAll('[data-swiper-slide-index="'+t.realIndex+'"]').eq(0).index();s=void 0===n?o:void 0===o?n:o-r==r-n?r:o-r<r-n?o:n}else s=t.realIndex;a.visibleSlidesIndexes&&a.visibleSlidesIndexes.indexOf(s)<0&&(a.params.centeredSlides?s=r<s?s-Math.floor(i/2)+1:s+Math.floor(i/2)-1:r<s&&(s=s-i+1),a.slideTo(s,e?0:void 0))}var l=1,d=t.params.thumbs.slideThumbActiveClass;if(1<t.params.slidesPerView&&!t.params.centeredSlides&&(l=t.params.slidesPerView),a.slides.removeClass(d),a.params.loop||a.params.virtual)for(var p=0;p<l;p+=1)a.$wrapperEl.children('[data-swiper-slide-index="'+(t.realIndex+p)+'"]').addClass(d);else for(var c=0;c<l;c+=1)a.slides.eq(t.realIndex+c).addClass(d)}}},Z=[E,S,C,M,k,$,D,{name:"mousewheel",params:{mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarged:"container"}},create:function(){var e=this;te.extend(e,{mousewheel:{enabled:!1,enable:O.enable.bind(e),disable:O.disable.bind(e),handle:O.handle.bind(e),handleMouseEnter:O.handleMouseEnter.bind(e),handleMouseLeave:O.handleMouseLeave.bind(e),lastScrollTime:te.now()}})},on:{init:function(){this.params.mousewheel.enabled&&this.mousewheel.enable()},destroy:function(){this.mousewheel.enabled&&this.mousewheel.disable()}}},{name:"navigation",params:{navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock"}},create:function(){var e=this;te.extend(e,{navigation:{init:A.init.bind(e),update:A.update.bind(e),destroy:A.destroy.bind(e),onNextClick:A.onNextClick.bind(e),onPrevClick:A.onPrevClick.bind(e)}})},on:{init:function(){this.navigation.init(),this.navigation.update()},toEdge:function(){this.navigation.update()},fromEdge:function(){this.navigation.update()},destroy:function(){this.navigation.destroy()},click:function(e){var t,a=this,i=a.navigation,s=i.$nextEl,r=i.$prevEl;!a.params.navigation.hideOnClick||I(e.target).is(r)||I(e.target).is(s)||(s?t=s.hasClass(a.params.navigation.hiddenClass):r&&(t=r.hasClass(a.params.navigation.hiddenClass)),!0===t?a.emit("navigationShow",a):a.emit("navigationHide",a),s&&s.toggleClass(a.params.navigation.hiddenClass),r&&r.toggleClass(a.params.navigation.hiddenClass))}}},{name:"pagination",params:{pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:function(e){return e},formatFractionTotal:function(e){return e},bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",modifierClass:"swiper-pagination-",currentClass:"swiper-pagination-current",totalClass:"swiper-pagination-total",hiddenClass:"swiper-pagination-hidden",progressbarFillClass:"swiper-pagination-progressbar-fill",progressbarOppositeClass:"swiper-pagination-progressbar-opposite",clickableClass:"swiper-pagination-clickable",lockClass:"swiper-pagination-lock"}},create:function(){var e=this;te.extend(e,{pagination:{init:H.init.bind(e),render:H.render.bind(e),update:H.update.bind(e),destroy:H.destroy.bind(e),dynamicBulletIndex:0}})},on:{init:function(){this.pagination.init(),this.pagination.render(),this.pagination.update()},activeIndexChange:function(){this.params.loop?this.pagination.update():void 0===this.snapIndex&&this.pagination.update()},snapIndexChange:function(){this.params.loop||this.pagination.update()},slidesLengthChange:function(){this.params.loop&&(this.pagination.render(),this.pagination.update())},snapGridLengthChange:function(){this.params.loop||(this.pagination.render(),this.pagination.update())},destroy:function(){this.pagination.destroy()},click:function(e){var t=this;t.params.pagination.el&&t.params.pagination.hideOnClick&&0<t.pagination.$el.length&&!I(e.target).hasClass(t.params.pagination.bulletClass)&&(!0===t.pagination.$el.hasClass(t.params.pagination.hiddenClass)?t.emit("paginationShow",t):t.emit("paginationHide",t),t.pagination.$el.toggleClass(t.params.pagination.hiddenClass))}}},{name:"scrollbar",params:{scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag"}},create:function(){var e=this;te.extend(e,{scrollbar:{init:G.init.bind(e),destroy:G.destroy.bind(e),updateSize:G.updateSize.bind(e),setTranslate:G.setTranslate.bind(e),setTransition:G.setTransition.bind(e),enableDraggable:G.enableDraggable.bind(e),disableDraggable:G.disableDraggable.bind(e),setDragPosition:G.setDragPosition.bind(e),getPointerPosition:G.getPointerPosition.bind(e),onDragStart:G.onDragStart.bind(e),onDragMove:G.onDragMove.bind(e),onDragEnd:G.onDragEnd.bind(e),isTouched:!1,timeout:null,dragTimeout:null}})},on:{init:function(){this.scrollbar.init(),this.scrollbar.updateSize(),this.scrollbar.setTranslate()},update:function(){this.scrollbar.updateSize()},resize:function(){this.scrollbar.updateSize()},observerUpdate:function(){this.scrollbar.updateSize()},setTranslate:function(){this.scrollbar.setTranslate()},setTransition:function(e){this.scrollbar.setTransition(e)},destroy:function(){this.scrollbar.destroy()}}},{name:"parallax",params:{parallax:{enabled:!1}},create:function(){te.extend(this,{parallax:{setTransform:N.setTransform.bind(this),setTranslate:N.setTranslate.bind(this),setTransition:N.setTransition.bind(this)}})},on:{beforeInit:function(){this.params.parallax.enabled&&(this.params.watchSlidesProgress=!0,this.originalParams.watchSlidesProgress=!0)},init:function(){this.params.parallax.enabled&&this.parallax.setTranslate()},setTranslate:function(){this.params.parallax.enabled&&this.parallax.setTranslate()},setTransition:function(e){this.params.parallax.enabled&&this.parallax.setTransition(e)}}},{name:"zoom",params:{zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}},create:function(){var i=this,t={enabled:!1,scale:1,currentScale:1,isScaling:!1,gesture:{$slideEl:void 0,slideWidth:void 0,slideHeight:void 0,$imageEl:void 0,$imageWrapEl:void 0,maxRatio:3},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0}};"onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out".split(" ").forEach(function(e){t[e]=B[e].bind(i)}),te.extend(i,{zoom:t});var s=1;Object.defineProperty(i.zoom,"scale",{get:function(){return s},set:function(e){if(s!==e){var t=i.zoom.gesture.$imageEl?i.zoom.gesture.$imageEl[0]:void 0,a=i.zoom.gesture.$slideEl?i.zoom.gesture.$slideEl[0]:void 0;i.emit("zoomChange",e,t,a)}s=e}})},on:{init:function(){this.params.zoom.enabled&&this.zoom.enable()},destroy:function(){this.zoom.disable()},touchStart:function(e){this.zoom.enabled&&this.zoom.onTouchStart(e)},touchEnd:function(e){this.zoom.enabled&&this.zoom.onTouchEnd(e)},doubleTap:function(e){this.params.zoom.enabled&&this.zoom.enabled&&this.params.zoom.toggle&&this.zoom.toggle(e)},transitionEnd:function(){this.zoom.enabled&&this.params.zoom.enabled&&this.zoom.onTransitionEnd()}}},{name:"lazy",params:{lazy:{enabled:!1,loadPrevNext:!1,loadPrevNextAmount:1,loadOnTransitionStart:!1,elementClass:"swiper-lazy",loadingClass:"swiper-lazy-loading",loadedClass:"swiper-lazy-loaded",preloaderClass:"swiper-lazy-preloader"}},create:function(){te.extend(this,{lazy:{initialImageLoaded:!1,load:X.load.bind(this),loadInSlide:X.loadInSlide.bind(this)}})},on:{beforeInit:function(){this.params.lazy.enabled&&this.params.preloadImages&&(this.params.preloadImages=!1)},init:function(){this.params.lazy.enabled&&!this.params.loop&&0===this.params.initialSlide&&this.lazy.load()},scroll:function(){this.params.freeMode&&!this.params.freeModeSticky&&this.lazy.load()},resize:function(){this.params.lazy.enabled&&this.lazy.load()},scrollbarDragMove:function(){this.params.lazy.enabled&&this.lazy.load()},transitionStart:function(){var e=this;e.params.lazy.enabled&&(!e.params.lazy.loadOnTransitionStart&&(e.params.lazy.loadOnTransitionStart||e.lazy.initialImageLoaded)||e.lazy.load())},transitionEnd:function(){this.params.lazy.enabled&&!this.params.lazy.loadOnTransitionStart&&this.lazy.load()}}},{name:"controller",params:{controller:{control:void 0,inverse:!1,by:"slide"}},create:function(){var e=this;te.extend(e,{controller:{control:e.params.controller.control,getInterpolateFunction:V.getInterpolateFunction.bind(e),setTranslate:V.setTranslate.bind(e),setTransition:V.setTransition.bind(e)}})},on:{update:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void 0,delete this.controller.spline)},resize:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void 0,delete this.controller.spline)},observerUpdate:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void 0,delete this.controller.spline)},setTranslate:function(e,t){this.controller.control&&this.controller.setTranslate(e,t)},setTransition:function(e,t){this.controller.control&&this.controller.setTransition(e,t)}}},{name:"a11y",params:{a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}"}},create:function(){var t=this;te.extend(t,{a11y:{liveRegion:I('<span class="'+t.params.a11y.notificationClass+'" aria-live="assertive" aria-atomic="true"></span>')}}),Object.keys(Y).forEach(function(e){t.a11y[e]=Y[e].bind(t)})},on:{init:function(){this.params.a11y.enabled&&(this.a11y.init(),this.a11y.updateNavigation())},toEdge:function(){this.params.a11y.enabled&&this.a11y.updateNavigation()},fromEdge:function(){this.params.a11y.enabled&&this.a11y.updateNavigation()},paginationUpdate:function(){this.params.a11y.enabled&&this.a11y.updatePagination()},destroy:function(){this.params.a11y.enabled&&this.a11y.destroy()}}},{name:"history",params:{history:{enabled:!1,replaceState:!1,key:"slides"}},create:function(){var e=this;te.extend(e,{history:{init:F.init.bind(e),setHistory:F.setHistory.bind(e),setHistoryPopState:F.setHistoryPopState.bind(e),scrollToSlide:F.scrollToSlide.bind(e),destroy:F.destroy.bind(e)}})},on:{init:function(){this.params.history.enabled&&this.history.init()},destroy:function(){this.params.history.enabled&&this.history.destroy()},transitionEnd:function(){this.history.initialized&&this.history.setHistory(this.params.history.key,this.activeIndex)}}},{name:"hash-navigation",params:{hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}},create:function(){var e=this;te.extend(e,{hashNavigation:{initialized:!1,init:R.init.bind(e),destroy:R.destroy.bind(e),setHash:R.setHash.bind(e),onHashCange:R.onHashCange.bind(e)}})},on:{init:function(){this.params.hashNavigation.enabled&&this.hashNavigation.init()},destroy:function(){this.params.hashNavigation.enabled&&this.hashNavigation.destroy()},transitionEnd:function(){this.hashNavigation.initialized&&this.hashNavigation.setHash()}}},{name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1}},create:function(){var t=this;te.extend(t,{autoplay:{running:!1,paused:!1,run:q.run.bind(t),start:q.start.bind(t),stop:q.stop.bind(t),pause:q.pause.bind(t),onTransitionEnd:function(e){t&&!t.destroyed&&t.$wrapperEl&&e.target===this&&(t.$wrapperEl[0].removeEventListener("transitionend",t.autoplay.onTransitionEnd),t.$wrapperEl[0].removeEventListener("webkitTransitionEnd",t.autoplay.onTransitionEnd),t.autoplay.paused=!1,t.autoplay.running?t.autoplay.run():t.autoplay.stop())}}})},on:{init:function(){this.params.autoplay.enabled&&this.autoplay.start()},beforeTransitionStart:function(e,t){this.autoplay.running&&(t||!this.params.autoplay.disableOnInteraction?this.autoplay.pause(e):this.autoplay.stop())},s
2084liderFirstMove:function(){this.autoplay.running&&(this.params.autoplay.disableOnInteraction?this.autoplay.stop():this.autoplay.pause())},destroy:function(){this.autoplay.running&&this.autoplay.stop()}}},{name:"effect-fade",params:{fadeEffect:{crossFade:!1}},create:function(){te.extend(this,{fadeEffect:{setTranslate:W.setTranslate.bind(this),setTransition:W.setTransition.bind(this)}})},on:{beforeInit:function(){var e=this;if("fade"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"fade");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};te.extend(e.params,t),te.extend(e.originalParams,t)}},setTranslate:function(){"fade"===this.params.effect&&this.fadeEffect.setTranslate()},setTransition:function(e){"fade"===this.params.effect&&this.fadeEffect.setTransition(e)}}},{name:"effect-cube",params:{cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}},create:function(){te.extend(this,{cubeEffect:{setTranslate:j.setTranslate.bind(this),setTransition:j.setTransition.bind(this)}})},on:{beforeInit:function(){var e=this;if("cube"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"cube"),e.classNames.push(e.params.containerModifierClass+"3d");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0};te.extend(e.params,t),te.extend(e.originalParams,t)}},setTranslate:function(){"cube"===this.params.effect&&this.cubeEffect.setTranslate()},setTransition:function(e){"cube"===this.params.effect&&this.cubeEffect.setTransition(e)}}},{name:"effect-flip",params:{flipEffect:{slideShadows:!0,limitRotation:!0}},create:function(){te.extend(this,{flipEffect:{setTranslate:U.setTranslate.bind(this),setTransition:U.setTransition.bind(this)}})},on:{beforeInit:function(){var e=this;if("flip"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"flip"),e.classNames.push(e.params.containerModifierClass+"3d");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};te.extend(e.params,t),te.extend(e.originalParams,t)}},setTranslate:function(){"flip"===this.params.effect&&this.flipEffect.setTranslate()},setTransition:function(e){"flip"===this.params.effect&&this.flipEffect.setTransition(e)}}},{name:"effect-coverflow",params:{coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0}},create:function(){te.extend(this,{coverflowEffect:{setTranslate:K.setTranslate.bind(this),setTransition:K.setTransition.bind(this)}})},on:{beforeInit:function(){var e=this;"coverflow"===e.params.effect&&(e.classNames.push(e.params.containerModifierClass+"coverflow"),e.classNames.push(e.params.containerModifierClass+"3d"),e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)},setTranslate:function(){"coverflow"===this.params.effect&&this.coverflowEffect.setTranslate()},setTransition:function(e){"coverflow"===this.params.effect&&this.coverflowEffect.setTransition(e)}}},{name:"thumbs",params:{thumbs:{swiper:null,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-container-thumbs"}},create:function(){te.extend(this,{thumbs:{swiper:null,init:_.init.bind(this),update:_.update.bind(this),onThumbClick:_.onThumbClick.bind(this)}})},on:{beforeInit:function(){var e=this.params.thumbs;e&&e.swiper&&(this.thumbs.init(),this.thumbs.update(!0))},slideChange:function(){this.thumbs.swiper&&this.thumbs.update()},update:function(){this.thumbs.swiper&&this.thumbs.update()},resize:function(){this.thumbs.swiper&&this.thumbs.update()},observerUpdate:function(){this.thumbs.swiper&&this.thumbs.update()},setTransition:function(e){var t=this.thumbs.swiper;t&&t.setTransition(e)},beforeDestroy:function(){var e=this.thumbs.swiper;e&&this.thumbs.swiperCreated&&e&&e.destroy()}}}];return void 0===T.use&&(T.use=T.Class.use,T.installModule=T.Class.installModule),T.use(Z),T});
2085
2086// 210812 서정환수정
2087EC$(function($) {
2088    var filter = "win16|win32|win64|mac|macintel";
2089    var device = "pc";
2090    if (navigator.platform) {
2091        if (filter.indexOf(navigator.platform.toLowerCase()) < 0) {
2092			device = "mobile";
2093		}
2094    }
2095
2096    /**
2097     * 상품상세, 상품 확대보기(팝업) - 소비자가 할인표시 */
2098    var oPriceInfoEl = $('#ec-product-price-info');
2099    if (oPriceInfoEl.length > 0) {
2100        var salePriceEl = $('#span_product_price_text');
2101        percentageCul(oPriceInfoEl, salePriceEl);
2102    }
2103
2104    /**
2105    * 상품목록/메인진열 - 소비자가 할인표시*/
2106	function sale_percent() {
2107		var mainEl = $("#contents");
2108		if (mainEl.length > 0) {
2109		  var productListEl = $('.xans-product-listmain, .xans-product-listrecommend, .xans-product-listnew, .xans-product-listnormal, .xans-search-result');
2110			for (var i = 0; i < productListEl.length; i++) {
2111				var prdListEl = productListEl.eq(i).find('.prdList > li');
2112				for (var j = 0; j < prdListEl.length; j++) {
2113					var priceEl = prdListEl.eq(j).find('.description'),
2114						salePriceEl = priceEl.parent().find('.thumbnail');
2115					if (device == "mobile") {
2116						salePriceEl = priceEl.parent().find('.thumbnail');
2117					}
2118					percentageCul(priceEl, salePriceEl);
2119
2120				}
2121			}
2122		}
2123	}
2124
2125    function percentageCul(target, salePriceEl) {
2126		// 1. 값 가져오기
2127		var rawCustom = target.attr('ec-data-custom') || "";
2128		var rawPrice = target.attr('ec-data-price') || "";
2129
2130		// 2. 숫자로 변환 (데이터가 없으면 0)
2131		var iCustomPrice = parseInt(rawCustom.replace(/[^0-9]/g, ""), 10) || 0;
2132		var iPrice = parseInt(rawPrice.replace(/[^0-9]/g, ""), 10) || 0;
2133
2134        var sDisplayAmount = 'p', // p:할인율, w:할인금액
2135            iOfftoFixed = 0, // 할인율 소수점자릿수
2136            sSaleText = '',
2137            regexp = /B(?=(d{3})+(?!d))/g;
2138
2139        if (iCustomPrice > 0 && iPrice > 0 && iPrice != iCustomPrice) {
2140            if (sDisplayAmount == 'p') {
2141                sSaleText = (((iCustomPrice - iPrice) / iCustomPrice) * 100).toFixed(iOfftoFixed) + '%';
2142            } else if (sDisplayAmount == 'w') {
2143                sSaleText = parseInt(iCustomPrice - iPrice).toString().replace(regexp, ',') + '원 OFF';
2144            }
2145            salePriceEl.append("<div class='sale_box'>" + sSaleText + "</div>");
2146        }
2147    }
2148
2149	/* 상품 할인율 실행 */
2150	setTimeout(function(){
2151		sale_percent();
2152	}, 300);
2153
2154	/* [더보기] 버튼 클릭시 상품로딩되고 0.6초후 재계산 - 서정환 */
2155	jQuery(".btnMore").click( function( ){
2156		setTimeout(function(){
2157			sale_percent();
2158		}, 600);
2159	});
2160});
2161/**
2162 * hasClass
2163 */
2164function hasClass(element, className){
2165    return (' ' + element.className + ' ').indexOf(' ' + className+ ' ') > -1;
2166};
2167
2168/**
2169 *  toggle
2170 */
2171function toggleClassAll(element, handler, className){
2172    var _handler = document.querySelector(handler);
2173    document.querySelectorAll(handler).forEach(function(item){
2174        item.addEventListener('click', function(){
2175            var _element = item.parentNode;
2176            if ( hasClass( _element, className ) ) {
2177                _element.classList.remove( className );
2178            } else {
2179                _element.classList.add( className );
2180            }
2181        })
2182    })
2183};
2184
2185/**
2186 *  findElements
2187 */
2188function findElements(element, findElement){
2189    var resultElements = [];
2190    document.querySelectorAll(element).forEach(function(item){
2191        var findElementList = item.querySelectorAll(findElement);
2192        findElementList = Array.prototype.slice.call(findElementList);
2193        resultElements = resultElements.concat(findElementList);
2194    })
2195    return resultElements;
2196};
2197
2198/**
2199 *  setAttributeAl
2200 */
2201function setAttributeAll(elements, name, value){
2202    elements.forEach(function(item){
2203        item.setAttribute(name, value);
2204    })
2205};
2206
2207/**
2208 *  tooltip
2209 */
2210function setTooltipEvent(){
2211    var input = findElements('.eTooltip', 'input');
2212    input.forEach(function(item){
2213        item.addEventListener('focusin', function(event){
2214            var targetName = returnTargetName(event.target);
2215            targetName.nextElementSibling.style.display = 'block'
2216        });
2217        item.addEventListener('focusout', function(event){
2218            var targetName = returnTargetName(event.target);
2219            targetName.nextElementSibling.style.display = 'none'
2220        });
2221    });
2222}
2223
2224/**
2225 *  tooltip input focus
2226 */
2227function returnTargetName(_this){
2228    var ePlacename = _this.parentElement.getAttribute("class");
2229    var targetName;
2230    if(ePlacename == "ePlaceholder"){ //ePlaceholder supported
2231        targetName = _this.parentElement;
2232    }else{
2233        targetName = _this;
2234    }
2235    return targetName;
2236}
2237
2238/**
2239 * window load
2240 */
2241window.addEventListener('load', function(){
2242    if (document.querySelector('.eTooltip')){
2243        setAttributeAll(findElements('.eTooltip', '.btnClose'),'tabIndex','-1');
2244        setTooltipEvent();
2245    }
2246    if (document.querySelector('div.eToggle')){
2247        toggleClassAll(false, 'div.eToggle .title', 'selected');
2248    }
2249});
2250window.addEventListener('load', function(){
2251	bottomNav();
2252    handleNav();
2253    searchLayer();
2254});
2255
2256function toggleClass(element, handler, className){
2257	var _handler = document.querySelector(handler);
2258	var _element = document.querySelector(element);
2259
2260    _handler.addEventListener('click', function(){
2261        if ( _element.classList.contains(className) ) {
2262            _element.classList.remove( className );
2263        } else {
2264            _element.classList.add( className );
2265        }
2266    });
2267}
2268
2269function handleNav() {
2270    var btnNavs = document.querySelectorAll('.eNavFold');
2271    var btnClose = document.querySelector('#aside .btnClose');
2272    var dimmed = document.querySelector('#layoutDimmed');
2273    var elements = document.getElementsByClassName("test");
2274    btnNavs.forEach( function(btnNav) {
2275        btnNav.addEventListener('click', function(){
2276            document.body.classList.add('expand');
2277        });
2278    });
2279    btnClose.addEventListener('click', function(){
2280        document.body.classList.remove('expand');
2281    });
2282    handleDimmed(dimmed, document.body, 'expand');
2283}
2284
2285
2286function searchLayer() {
2287    var btnSearchs = document.querySelectorAll('.eSearch');
2288    var btnClose = document.querySelector('.xans-layout-searchheader .btnClose');
2289	var btnClose2 = document.querySelector('.misc-close-search');
2290    btnSearchs.forEach( function(btnSearch) {
2291        btnSearch.addEventListener('click', function(){
2292            document.body.classList.add('searchExpand');
2293            var input = document.querySelector('#keyword');
2294            input.setAttribute("placeholder","검색어를 입력해주세요");
2295            //input.focus();
2296        });
2297    });
2298    btnClose.addEventListener('click', function(){
2299        document.body.classList.remove('searchExpand');
2300    });
2301    var dimmed = document.querySelector('#layoutDimmed');
2302    handleDimmed(dimmed, document.body, 'searchExpand');
2303}
2304
2305function handleDimmed(target, element, className){
2306    target.addEventListener('click', function(){
2307        element.classList.remove(className);
2308    });
2309}
2310
2311function bottomScroll(){
2312    var lastScrollTop = 0;
2313    var delta = 5;
2314    var fixBox = document.querySelector('.bottom-nav__top');
2315    var fixBoxHeight = fixBox.offsetHeight;
2316    var didScroll;
2317
2318    window.onscroll = function(e) {
2319        didScroll = true;
2320    };
2321
2322    setInterval(function(){
2323        if(didScroll){
2324            hasScrolled();
2325            didScroll = false;
2326        }
2327    }, 250);
2328
2329    function hasScrolled(){
2330        var nowScrollTop = window.scrollY;
2331        if(Math.abs(lastScrollTop - nowScrollTop) <= delta){
2332            return;
2333        }
2334        if(nowScrollTop > lastScrollTop && nowScrollTop > fixBoxHeight){
2335            //Scroll down
2336            var scrollTop = window.scrollTop();
2337            var innerHeight = window.innerHeight();
2338            var scrollHeight = $('body').prop('scrollHeight');
2339            if (scrollTop + innerHeight >= scrollHeight) {
2340                fixBox.classList.add('bottom-nav--hide');
2341                return true;
2342            }
2343        }else{
2344            if(nowScrollTop + window.innerHeight < document.body.offsetHeight){
2345                //Scroll up
2346                fixBox.classList.remove('bottom-nav--hide');
2347            }
2348        }
2349        lastScrollTop = nowScrollTop;
2350    }
2351}
2352
2353function bottomNav(){
2354    var lastScrollTop = 0;
2355    var btnTop = document.querySelector('.bottom-nav__top');
2356    var footer = document.querySelector('.footer'); // 푸터 요소 선택
2357    var fixedButton = document.getElementById("orderFixArea");
2358    var defaultBottom = 0;
2359    
2360    if(fixedButton){
2361        document.body.classList.add("button--fixed");
2362    };
2363
2364	window.addEventListener("scroll", function(){
2365		var scroll = window.pageYOffset || document.documentElement.scrollTop;
2366        var nav = document.querySelector('.bottom-nav');
2367        var windowHeight = window.innerHeight;
2368        var windowWidth = window.innerWidth;
2369        var docHeight = document.documentElement.scrollHeight;
2370        var footerHeight = footer ? footer.offsetHeight : 0;
2371        
2372		if (scroll > lastScrollTop){
2373			nav.classList.add('bottom-nav--hide');
2374		} else {
2375			nav.classList.remove('bottom-nav--hide');
2376		}
2377		// scroll bottom
2378		if(scroll === document.body.scrollHeight - document.documentElement.offsetHeight){
2379			nav.classList.remove('bottom-nav--hide');
2380		}
2381        // 모바일일때 top 버튼 위치 조정
2382        if (windowWidth < 1024 && scroll + windowHeight >= docHeight - footerHeight) {
2383            btnTop.style.bottom = (footerHeight + defaultBottom - 40 - 15) + "px";
2384        } else {
2385            // 최하단이 아닐 때: 기본 위치로 복구
2386            btnTop.style.bottom = defaultBottom + "px";
2387        }
2388		lastScrollTop = scroll <= 0 ? 0 : scroll;
2389
2390        // top button
2391        var currentScrollPercentage = getCurrentScrollPercentage();
2392        if(currentScrollPercentage > 15 && scroll > document.querySelector('#header').offsetHeight){
2393        	btnTop.classList.add('bottom-nav__top--show');
2394        } else {
2395			btnTop.classList.remove('bottom-nav__top--show');
2396        }
2397	});
2398
2399    btnTop.addEventListener('click', function(e){
2400        e.preventDefault();
2401        window.scrollTo({
2402          top: 0,
2403          behavior: 'smooth'
2404        });
2405    });
2406}
2407
2408function getOffset(element){
2409    if (!element.getClientRects().length)
2410    {
2411      return { top: 0, left: 0 };
2412    }
2413
2414    var rect = element.getBoundingClientRect();
2415    var win = element.ownerDocument.defaultView;
2416    return (
2417    {
2418      top: rect.top + win.pageYOffset,
2419      left: rect.left + win.pageXOffset
2420    });
2421}
2422
2423function getQuickPosition(){
2424	var role = document.querySelector("meta[name='path_role']").getAttribute('content');
2425	if (role === "MAIN") {
2426		return getMainQuickPosition();
2427	} else {
2428		return getSubQuickPosition();
2429	}
2430}
2431
2432function getMainQuickPosition(){
2433	var quickMenu = document.querySelector('#quick');
2434	var collection = document.querySelector('.collection');
2435	var snsItem = document.querySelector('.snsItem');
2436
2437	var mainTopSpace = 115;
2438	var mainFooterSpace = 34;
2439
2440	var top = collection.offsetTop + collection.clientHeight + mainTopSpace;
2441    var footTop = getOffset(snsItem).top + mainFooterSpace;
2442	var maxY = footTop - quickMenu.offsetHeight;
2443
2444	return [top, maxY]
2445}
2446
2447function getSubQuickPosition(){
2448	var quickMenu = document.querySelector('#quick');
2449	var footer = document.querySelector("#footer");
2450
2451	var footerSpace = 60;
2452	var top = 284;
2453    var footTop = getOffset(footer).top;
2454	var maxY = footTop - quickMenu.offsetHeight - footerSpace;
2455
2456	return [top, maxY]
2457}
2458
2459function setQuickScrollEvent(y, quick){
2460	var header = document.querySelector('#header');
2461	var position = getQuickPosition();
2462	var scrollY = y;
2463	if (scrollY >= position[0] - header.offsetHeight){
2464		if (scrollY < position[1]) {
2465			quick.classList.add('fixed');
2466			quick.removeAttribute('style');
2467        } else {
2468			quick.classList.remove('fixed');
2469			quick.style.position = 'absolute';
2470			quick.style.top = position[1] + 'px';
2471        }
2472	} else {
2473		quick.style.top = position[0] + 'px';
2474        quick.classList.remove('fixed');
2475    }
2476}
2477
2478function quickGoTop(){
2479    var btnTop = document.querySelector('#quick .pageTop');
2480	btnTop.addEventListener('click', function(){
2481        window.scrollTo({
2482          top: 0,
2483          behavior: 'smooth'
2484        });
2485    });
2486}
2487
2488function getCurrentScrollPercentage(){
2489	return (window.scrollY + window.innerHeight) / document.body.clientHeight * 100
2490}
2491
2492
2493jQuery(document).ready(function() {
2494	/* 검색페이지 정렬 텍스트 변경 */
2495	jQuery("#order_by").each(function(){
2496		jQuery('option:first-child', this).text('- 정렬방식 -');
2497	});
2498
2499	/* 하단 에스크로 사용하면 출력 */
2500	jQuery("#footer .inner .bt_escrow").each(function(){
2501		var bt_escrow = jQuery(this).attr("data-ez-escrow");
2502		if ( !bt_escrow == '' ) {
2503			var bt_escrow_name = jQuery("a img[data-ez-escrow-id="+ bt_escrow +"]", this).addClass('on');
2504			jQuery(this).css('display','flex');
2505		}
2506	});
2507
2508	/* 로그인페이지 SNS 사용하면 출력 */
2509	jQuery(".xans-member-login .login__sns .wrap_sns_log a").each(function(){
2510		var wrap_sns_log = jQuery(this).hasClass('displaynone');
2511		if( wrap_sns_log == false){
2512			jQuery(".xans-member-login .login__sns").css('display','block');
2513		}
2514	});
2515
2516	/* 기획전 레이아웃변경에 따른 타겟고정위치 변경 */
2517	var header_height = document.getElementById("header").scrollHeight;
2518	jQuery('.xans-project-list h3 span').css('top',-header_height+30);
2519
2520	/* 모바일에서 쇼핑큐레이션 */
2521	jQuery('#shoppQbtn').click(function(){
2522		if (jQuery("#searchContent.xans-product-searchdata").is(":hidden")) {
2523			jQuery('#searchContent.xans-product-searchdata').slideDown('normal');
2524			jQuery(this).text('상세검색 닫기');
2525			jQuery(this).css('margin-top','0');
2526		} else {
2527			jQuery('#searchContent.xans-product-searchdata').slideUp('normal');
2528			jQuery(this).text('상세검색');
2529		}
2530	});
2531
2532	/* 모바일에서 쇼핑큐레이션 없을시 버튼 숨김 */
2533	jQuery("#searchContent").each(function(){
2534		var prdCount_count = jQuery("#ec-searchdata-area", this).length;
2535		if ( prdCount_count == '0' ) {
2536			jQuery('#shoppQbtn').hide();
2537		}
2538	});
2539
2540	/* 마이페이지 나의게시글 없을때 메시지 표시 */
2541	jQuery(".xans-myshop-boardpackage").each(function(){
2542		var boardlist = jQuery(".xans-myshop-boardlist table", this).length;
2543		if ( boardlist == '0' ) {
2544			jQuery('.myshop_boardlist_empty').css('display','flex');
2545		}
2546	});
2547
2548	/* 더보기 클릭시 */
2549	jQuery('.btnMore').click(function(){
2550		setTimeout(function(){
2551			ifmore();
2552		},600)
2553	});
2554	setTimeout(function(){
2555		ifmore();
2556	},300)
2557
2558	/* 상단 카테고리 변경 감지 */
2559	top_category(); // 상단카테고리
2560	observeTopCategory(); // 상단카테고리 변경 감지
2561});
2562
2563/* 상단 카테고리 변경 감지 */
2564function observeTopCategory(){
2565	var targetNode = jQuery('#header .xans-layout-category > ul')[0];
2566
2567	// MutationObserver 인스턴스 생성
2568	var observer = new MutationObserver(function(mutationsList, observer) {
2569			// 변경 감지된 경우 상단카테고리 실행
2570			top_category();
2571	});
2572
2573	// 상단 카테고리가 있는 경우 변경 감지
2574	if (targetNode) {
2575			observer.observe(targetNode, { childList: true, subtree: true });
2576	}
2577}
2578
2579/* 상단 카테고리 */
2580function top_category(){
2581	/* 상단카테고리 */
2582	jQuery('#header .top_category li').on('focusin mouseenter', function() {
2583		// 마우스가 들어오거나 내부 요소에 포커스가 갈 때 메뉴 열기
2584		jQuery(this).addClass('on');
2585	});
2586
2587	jQuery('#header .top_category li').on('focusout mouseleave', function(e) {
2588		var $this = jQuery(this);
2589		
2590		// 핵심 로직: 0.01초 뒤에 체크하여 포커스가 현재 li 밖에 있는지 확인
2591		setTimeout(function() {
2592			// 현재 포커스된 요소(activeElement)가 클릭한 li 내부에 포함되어 있지 않다면
2593			if ($this.has(document.activeElement).length === 0) {
2594				$this.removeClass('on');
2595			}
2596		}, 10); 
2597	});
2598
2599	/* 상단카테고리 중분류체크 */
2600	jQuery('#header .top_category ul.sub_cate01 li').each(function() {
2601		if (jQuery(this).children('ul').length == 0) {
2602			jQuery(this).addClass('noChild');
2603		}
2604	});
2605}
2606
2607/* 최상단배너 쿠키 스크립트 - 서정환 */
2608function setCookiem(cookie_name, cookie_value, expire_date) {
2609    var today = new Date();
2610    var expire = new Date();
2611    expire.setTime(today.getTime() + 3600000 * 24 * expire_date);
2612    cookies = cookie_name + '=' + cookie_value + '; path=/;';
2613    if (expire_date != 0) cookies += 'expires=' + expire.toGMTString();
2614    document.cookie = cookies;
2615}
2616
2617function delCookiem(cookie_name) {
2618	var _today = new Date();
2619	var value = '';
2620	_today.setDate(_today.getDate() - 1);
2621	document.cookie = cookie_name + "=" + value + '; path=/;' + "; expires=" + _today.toGMTString();
2622}
2623
2624function getCookiem(name) {
2625    lims = document.cookie;
2626    var index = lims.indexOf(name + "=");
2627    if (index == -1) {
2628        return null;
2629    }
2630    index = lims.indexOf("=", index) + 1; // first character
2631    var endstr = lims.indexOf(';', index);
2632    if (endstr == -1) {
2633        endstr = lims.length; // last character
2634    }
2635    return unescape(lims.substring(index, endstr));
2636}
2637
2638/* 더보기 클릭시 */
2639function ifmore(){
2640	/* 상품 썸네일 관심상품 출력 & 숨김 */
2641	setTimeout(function(){
2642		jQuery('.ec-base-product .prdList .icon__box .wish').each(function(){
2643			var isstatus = jQuery(this).children('img').attr('icon_status');
2644			if ( isstatus == 'on' ) {
2645				jQuery(this).addClass('on');
2646			}
2647		});
2648		jQuery('.ec-base-product .prdList .icon__box .wish').click(function(){
2649			var isstatus = jQuery(this).children('img').attr('icon_status');
2650			if ( isstatus == 'off' ) {
2651				jQuery(this).addClass('on');
2652			} else {
2653				jQuery(this).removeClass('on');
2654			}
2655		});
2656	},200)
2657	jQuery('.ec-base-product .prdList > li').each(function(){
2658		/* 상품진열 장바구니 사용안할시 숨김 */
2659		if (jQuery(".icon__box .cart > .ec-admin-icon", this).length == 1) {
2660		} else {
2661			jQuery('.icon__box .cart', this).hide();
2662		}
2663		/* 상품진열 옵션미리보기 사용안할시 숨김 */
2664		if (jQuery(".icon__box .option > a", this).length == 1) {
2665		} else {
2666			jQuery('.icon__box .option', this).hide();
2667		}
2668		/* 상품진열 관심상품 사용안할시 숨김 */
2669		if (jQuery(".icon__box .wish > .ec-product-listwishicon", this).length == 1) {
2670		} else {
2671			jQuery('.icon__box .wish', this).hide();
2672		}
2673	});
2674}
2675//window popup script
2676function winPop(url) {
2677    window.open(url, "popup", "width=300,height=300,left=10,top=10,resizable=no,scrollbars=no");
2678}
2679/**
2680 * document.location.href split
2681 * return array Param
2682 */
2683function getQueryString(sKey)
2684{
2685    var sQueryString = document.location.search.substring(1);
2686    var aParam       = {};
2687
2688    if (sQueryString) {
2689        var aFields = sQueryString.split("&");
2690        var aField  = [];
2691        for(var i=0; i<aFields.length; i++){
2692            aField = aFields[i].split('=');
2693            aParam[aField[0]] = aField[1];            
2694        }
2695    }
2696
2697    aParam.page = aParam.page ? aParam.page : 1;
2698    return sKey ? aParam[sKey] : aParam;
2699};
2700
2701/**
2702  *  구매버튼
2703*/
2704var globalBuyBtnScrollFunc = function() {
2705    // 구매버튼 관련변수
2706    var sFixId = $('#orderFixItem').length > 0  ? 'orderFixItem' : 'fixedActionButton',
2707        $area = $('#orderFixArea'),
2708        $item = $('#' + sFixId + '').not($area);
2709
2710    $(window).scroll(function(){
2711        try {
2712             // 구매버튼 관련변수
2713            var iCurrentHeightPos = $(this).scrollTop() + $(this).height(),
2714                iButtonHeightPos = $item.offset().top;
2715
2716            if (iCurrentHeightPos > iButtonHeightPos || iButtonHeightPos < $(this).scrollTop() + $item.height()) {
2717                if (iButtonHeightPos < $(this).scrollTop() - $item.height()) {
2718                    $area.fadeIn('fast');
2719                } else {
2720                    $area.hide();
2721                }
2722            } else {
2723                $area.fadeIn('fast');
2724            }
2725        } catch(e) { }
2726    });
2727};
2728
2729$(function(){
2730    // tab
2731    $.eTab = function(ul) {
2732        $(ul).find('a').on('click', function() {
2733            var _li = $(this).parent('li').addClass('selected').siblings().removeClass('selected'),
2734                _target = $(this).attr('href'),
2735                _siblings = '.' + $(_target).attr('class');
2736            $(_target).show().siblings(_siblings).hide();
2737            return false
2738        });
2739    }
2740    if ( window.call_eTab ) {
2741        call_eTab();
2742    };
2743    globalBuyBtnScrollFunc();
2744});
2745window.Modernizr=function(au,at,ar){function R(b){ak.cssText=b}function Q(d,c){return R(ag.join(d+";")+(c||""))}function P(d,c){return typeof d===c}function O(d,c){return !!~(""+d).indexOf(c)}function N(f,c){for(var h in f){var g=f[h];if(!O(g,"-")&&ak[g]!==ar){return c=="pfx"?g:!0}}return !1}function M(g,c,j){for(var i in g){var h=c[g[i]];if(h!==ar){return j===!1?g[i]:P(h,"function")?h.bind(j||c):h}}return !1}function L(g,f,j){var i=g.charAt(0).toUpperCase()+g.slice(1),h=(g+" "+ae.join(i+" ")+i).split(" ");return P(f,"string")||P(f,"undefined")?N(h,f):(h=(g+" "+ad.join(i+" ")+i).split(" "),M(h,f,j))}var aq="2.8.3",ap={},ao=!0,an=at.documentElement,am="modernizr",al=at.createElement(am),ak=al.style,aj,ai=":)",ah={}.toString,ag=" -webkit- -moz- -o- -ms- ".split(" "),af="Webkit Moz O ms",ae=af.split(" "),ad=af.toLowerCase().split(" "),ac={},ab={},aa={},Z=[],Y=Z.slice,X,W=function(v,u,t,s){var r,q,p,o,h=at.createElement("div"),g=at.body,b=g||at.createElement("body");if(parseInt(t,10)){while(t--){p=at.createElement("div"),p.id=s?s[t]:am+(t+1),h.appendChild(p)}}return r=["&#173;",'<style id="s',am,'">',v,"</style>"].join(""),h.id=am,(g?h:b).innerHTML+=r,b.appendChild(h),g||(b.style.background="",b.style.overflow="hidden",o=an.style.overflow,an.style.overflow="hidden",an.appendChild(b)),q=u(h,v),g?h.parentNode.removeChild(h):(b.parentNode.removeChild(b),an.style.overflow=o),!!q},V=function(a){var f=au.matchMedia||au.msMatchMedia;if(f){return f(a)&&f(a).matches||!1}var e;return W("@media "+a+" { #"+am+" { position: absolute; } }",function(c){e=(au.getComputedStyle?getComputedStyle(c,null):c.currentStyle)["position"]=="absolute"}),e},U=function(){function c(h,g){g=g||at.createElement(b[h]||"div"),h="on"+h;var a=h in g;return a||(g.setAttribute||(g=at.createElement("div")),g.setAttribute&&g.removeAttribute&&(g.setAttribute(h,""),a=P(g[h],"function"),P(g[h],"undefined")||(g[h]=ar),g.removeAttribute(h))),g=null,a}var b={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return c}(),T={}.hasOwnProperty,S;!P(T,"undefined")&&!P(T.call,"undefined")?S=function(d,c){return T.call(d,c)}:S=function(d,c){return c in d&&P(d.constructor.prototype[c],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(a){var h=this;if(typeof h!="function"){throw new TypeError}
vendor: 6,204 bytes, line 2745
2745var g=Y.call(arguments,1),f=function(){if(this instanceof f){var b=function(){};b.prototype=h.prototype;var d=new b,c=h.apply(d,g.concat(Y.call(arguments)));return Object(c)===c?c:d}return h.apply(a,g.concat(Y.call(arguments)))};return f}),ac.touch=function(){var a;return"ontouchstart" in au||au.DocumentTouch&&at instanceof DocumentTouch?a=!0:W(["@media (",ag.join("touch-enabled),("),am,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(b){a=b.offsetTop===9}),a},ac.rgba=function(){return R("background-color:rgba(150,255,150,.5)"),O(ak.backgroundColor,"rgba")},ac.backgroundsize=function(){return L("backgroundSize")},ac.borderradius=function(){return L("borderRadius")},ac.boxshadow=function(){return L("boxShadow")},ac.opacity=function(){return Q("opacity:.55"),/^0.55$/.test(ak.opacity)},ac.cssanimations=function(){return L("animationName")},ac.cssgradients=function(){var e="background-image:",d="gradient(linear,left top,right bottom,from(#9f9),to(white));",f="linear-gradient(left top,#9f9, white);";return R((e+"-webkit- ".split(" ").join(d+e)+ag.join(f+e)).slice(0,-e.length)),O(ak.backgroundImage,"gradient")},ac.csstransforms=function(){return !!L("transform")},ac.csstransforms3d=function(){var b=!!L("perspective");return b&&"webkitPerspective" in an.style&&W("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(a,d){b=a.offsetLeft===9&&a.offsetHeight===3}),b},ac.csstransitions=function(){return L("transition")},ac.generatedcontent=function(){var b;return W(["#",am,"{font:0/0 a}#",am,':after{content:"',ai,'";visibility:hidden;font:3px/1 a}'].join(""),function(a){b=a.offsetHeight>=3}),b},ac.video=function(){var b=at.createElement("video"),f=!1;try{if(f=!!b.canPlayType){f=new Boolean(f),f.ogg=b.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),f.h264=b.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),f.webm=b.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}}catch(e){}return f};for(var K in ac){S(ac,K)&&(X=K.toLowerCase(),ap[X]=ac[K](),Z.push((ap[X]?"":"no-")+X))}return ap.addTest=function(e,c){if(typeof e=="object"){for(var f in e){S(e,f)&&ap.addTest(f,e[f])}}else{e=e.toLowerCase();if(ap[e]!==ar){return ap}c=typeof c=="function"?c():c,typeof ao!="undefined"&&ao&&(an.className+=" "+(c?"":"no-")+e),ap[e]=c}return ap},R(""),al=aj=null,function(aw,av){function A(f,e){var h=f.createElement("p"),g=f.getElementsByTagName("head")[0]||f.documentElement;return h.innerHTML="x<style>"+e+"</style>",g.insertBefore(h.lastChild,g.firstChild)}function z(){var b=t.elements;return typeof b=="string"?b.split(" "):b}function y(d){var c=C[d[E]];return c||(c={},D++,d[E]=D,C[D]=c),c}function x(b,h,f){h||(h=av);if(B){return h.createElement(b)}f||(f=y(h));var e;return f.cache[b]?e=f.cache[b].cloneNode():G.test(b)?e=(f.cache[b]=f.createElem(b)).cloneNode():e=f.createElem(b),e.canHaveChildren&&!H.test(b)&&!e.tagUrn?f.frag.appendChild(e):e}function w(b,l){b||(b=av);if(B){return b.createDocumentFragment()}l=l||y(b);var k=l.frag.cloneNode(),j=0,i=z(),h=i.length;for(;j<h;j++){k.createElement(i[j])}return k}function v(d,c){c.cache||(c.cache={},c.createElem=d.createElement,c.createFrag=d.createDocumentFragment,c.frag=c.createFrag()),d.createElement=function(a){return t.shivMethods?x(a,d,c):c.createElem(a)},d.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+z().join().replace(/[\w\-]+/g,function(b){return c.createElem(b),c.frag.createElement(b),'c("'+b+'")'})+");return n}")(t,c.frag)}function u(b){b||(b=av);var d=y(b);return t.shivCSS&&!F&&!d.hasCSS&&(d.hasCSS=!!A(b,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),B||v(b,d),b}var J="3.7.0",I=aw.html5||{},H=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,G=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,F,E="_html5shiv",D=0,C={},B;(function(){try{var b=av.createElement("a");b.innerHTML="<xyz></xyz>",F="hidden" in b,B=b.childNodes.length==1||function(){av.createElement("a");var c=av.createDocumentFragment();return typeof c.cloneNode=="undefined"||typeof c.createDocumentFragment=="undefined"||typeof c.createElement=="undefined"}()}catch(d){F=!0,B=!0}})();var t={elements:I.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:J,shivCSS:I.shivCSS!==!1,supportsUnknownElements:B,shivMethods:I.shivMethods!==!1,type:"default",shivDocument:u,createElement:x,createDocumentFragment:w};aw.html5=t,u(av)}(this,at),ap._version=aq,ap._prefixes=ag,ap._domPrefixes=ad,ap._cssomPrefixes=ae,ap.mq=V,ap.hasEvent=U,ap.testProp=function(b){return N([b])},ap.testAllProps=L,ap.testStyles=W,an.className=an.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(ao?" js "+Z.join(" "):""),ap}(this,this.document),function(ad,ac,ab){function aa(b){return"[object Function]"==P.call(b)}function Z(b){return"string"==typeof b}function Y(){}function X(b){return !b||"loaded"==b||"complete"==b||"uninitialized"==b}function W(){var b=O.shift();M=1,b?b.t?R(function(){("c"==b.t?L.injectCss:L.injectJs)(b.s,0,b.a,b.x,b.e,1)},0):(b(),W()):M=0}function V(w,v,t,s,q,p,n){function m(a){if(!g&&X(h.readyState)&&(x.r=g=1,!M&&W(),h.onload=h.onreadystatechange=null,a)){"img"!=w&&R(function(){I.removeChild(h)},50);for(var c in D[v]){D[v].hasOwnProperty(c)&&D[v][c].onload()}}}var n=n||L.errorTimeout,h=ac.createElement(w),g=0,b=0,x={t:t,s:v,e:q,a:p,x:n};1===D[v]&&(b=1,D[v]=[]),"object"==w?h.data=v:(h.src=v,h.type=w),h.width=h.height="0",h.onerror=h.onload=h.onreadystatechange=function(){m.call(this,b)},O.splice(s,0,x),"img"!=w&&(b||2===D[v]?(I.insertBefore(h,J?null:Q),R(m,n)):D[v].push(h))}function U(g,e,j,i,h){return M=0,e=e||"j",Z(g)?V("c"==e?G:H,g,e,this.i++,j,i,h):(O.splice(this.i++,0,g),1==O.length&&W()),this}function T(){var b=L;return b.loader={load:U,i:0},b}var S=ac.documentElement,R=ad.setTimeout,Q=ac.getElementsByTagName("script")[0],P={}
2745.toString,O=[],M=0,K="MozAppearance" in S.style,J=K&&!!ac.createRange().compareNode,I=J?S:Q.parentNode,S=ad.opera&&"[object Opera]"==P.call(ad.opera),S=!!ac.attachEvent&&!S,H=K?"object":S?"script":"img",G=S?"script":H,F=Array.isArray||function(b){return"[object Array]"==P.call(b)},E=[],D={},C={timeout:function(d,c){return c.length&&(d.timeout=c[0]),d}},N,L;L=function(e){function c(i){var i=i.split("!"),h=E.length,q=i.pop(),p=i.length,q={url:q,origUrl:q,prefixes:i},o,l,j;for(l=0;l<p;l++){j=i[l].split("="),(o=C[j.shift()])&&(q=o(q,j))}for(l=0;l<h;l++){q=E[l](q)}return q}function n(b,s,r,q,p){var o=c(b),l=o.autoCallback;o.url.split(".").pop().split("?").shift(),o.bypass||(s&&(s=aa(s)?s:s[b]||s[q]||s[b.split("/").pop().split("?")[0]]),o.instead?o.instead(b,s,r,q,p):(D[o.url]?o.noexec=!0:D[o.url]=1,r.load(o.url,o.forceCSS||!o.forceJS&&"css"==o.url.split(".").pop().split("?").shift()?"c":ab,o.noexec,o.attrs,o.timeout),(aa(s)||aa(l))&&r.load(function(){T(),s&&s(o.origUrl,p,q),l&&l(o.origUrl,p,q),D[o.url]=2})))}function m(w,v){function u(b,h){if(b){if(Z(b)){h||(r=function(){var i=[].slice.call(arguments);q.apply(this,i),p()}),n(b,r,v,0,t)}else{if(Object(b)===b){for(g in o=function(){var a=0,i;for(i in b){b.hasOwnProperty(i)&&a++}return a}(),b){b.hasOwnProperty(g)&&(!h&&!--o&&(aa(r)?r=function(){var i=[].slice.call(arguments);q.apply(this,i),p()}:r[g]=function(i){return function(){var a=[].slice.call(arguments);i&&i.apply(this,a),p()}}(q[g])),n(b[g],r,v,g,t))}}}}else{!h&&p()}}var t=!!w.test,s=w.load||w.both,r=w.callback||Y,q=r,p=w.complete||Y,o,g;u(t?w.yep:w.nope,!!s),s&&u(s)}var k,f,d=this.yepnope.loader;if(Z(e)){n(e,0,d,0)}else{if(F(e)){for(k=0;k<e.length;k++){f=e[k],Z(f)?n(f,0,d,0):F(f)?L(f):Object(f)===f&&m(f,d)}}else{Object(e)===e&&m(e,d)}}},L.addPrefix=function(d,c){C[d]=c},L.addFilter=function(b){E.push(b)},L.errorTimeout=10000,null==ac.readyState&&ac.addEventListener&&(ac.readyState="loading",ac.addEventListener("DOMContentLoaded",N=function(){ac.removeEventListener("DOMContentLoaded",N,0),ac.readyState="complete"},0)),ad.yepnope=T(),ad.yepnope.executeStack=W,ad.yepnope.injectJs=function(r,q,p,n,m,h){var g=ac.createElement("script"),f,b,n=n||L.errorTimeout;g.src=r;for(b in p){g.setAttribute(b,p[b])}q=h?W:q||Y,g.onreadystatechange=g.onload=function(){!f&&X(g.readyState)&&(f=1,q(),g.onload=g.onreadystatechange=null)},R(function(){f||(f=1,q(1))},n),m?g.onload():Q.parentNode.insertBefore(g,Q)},ad.yepnope.injectCss=function(b,n,m,l,k,h){var l=ac.createElement("link"),f,n=h?W:n||Y;l.href=b,l.rel="stylesheet",l.type="text/css";for(f in m){l.setAttribute(f,m[f])}k||(Q.parentNode.insertBefore(l,Q),R(n,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))},Modernizr.addTest("boxsizing",function(){return Modernizr.testAllProps("boxSizing")&&(document.documentMode===undefined||document.documentMode>7)}),Modernizr.addTest("mediaqueries",Modernizr.mq("only all")),Modernizr.addTest("ie8compat",function(){return !window.addEventListener&&document.documentMode&&document.documentMode===7});
2746'use strict';
2747
2748var PopupManager = {
2749    storageKey: 'hidePopup_',
2750    getToday: function() {
2751        return new Date().toISOString().split('T')[0];
2752    },
2753    // 오늘 다시 보지 않기 저장
2754    save: function(popupId) {
2755        localStorage.setItem(this.storageKey + popupId, this.getToday());
2756    },
2757    // 오늘 다시 보지 않기 여부 확인
2758    isHidden: function(popupId) {
2759        return localStorage.getItem(this.storageKey + popupId) === this.getToday();
2760    }
2761};
2762
2763var _typeof =
2764  typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'
2765    ? function (obj) {
2766        return typeof obj;
2767      }
2768    : function (obj) {
2769        return obj && typeof Symbol === 'function' && obj.constructor === Symbol ? 'symbol' : typeof obj;
2770      };
2771
2772/* popup layer */
2773var AP2022Modal = function AP2022Modal(params) {
2774  /* find */
2775  if (!Array.prototype.find) {
2776    Object.defineProperty(Array.prototype, 'find', {
2777      value: function value(predicate) {
2778        // 1. Let O be ? ToObject(this value).
2779        if (this == null) {
2780          throw new TypeError('"this" is null or not defined');
2781        }
2782
2783        var o = Object(this);
2784
2785        // 2. Let len be ? ToLength(? Get(O, "length")).
2786        var len = o.length >>> 0;
2787
2788        // 3. If IsCallable(predicate) is false, throw a TypeError exception.
2789        if (typeof predicate !== 'function') {
2790          throw new TypeError('predicate must be a function');
2791        }
2792
2793        // 4. If thisArg was supplied, let T be thisArg; else let T be undefined.
2794        var thisArg = arguments[1];
2795
2796        // 5. Let k be 0.
2797        var k = 0;
2798
2799        // 6. Repeat, while k < len
2800        while (k < len) {
2801          // a. Let Pk be ! ToString(k).
2802          // b. Let kValue be ? Get(O, Pk).
2803          // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)).
2804          // d. If testResult is true, return kValue.
2805          var kValue = o[k];
2806          if (predicate.call(thisArg, kValue, k, o)) {
2807            return kValue;
2808          }
2809          // e. Increase k by 1.
2810          k++;
2811        }
2812
2813        // 7. Return undefined.
2814        return undefined;
2815      },
2816      configurable: true,
2817      writable: true
2818    });
2819  }
2820
2821  /* closest */
2822  if (!Element.prototype.matches) {
2823    Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
2824  }
2825
2826  if (!Element.prototype.closest) {
2827    Element.prototype.closest = function (s) {
2828      var el = this;
2829
2830      do {
2831        if (Element.prototype.matches.call(el, s)) return el;
2832        el = el.parentElement || el.parentNode;
2833      } while (el !== null && el.nodeType === 1);
2834      return null;
2835    };
2836  }
2837
2838  var _this = this;
2839  var defaults = {
2840    layerRootSelectorName: '.ap2022-popup',
2841    popupInnerSelectorName: '.ap2022-popup__inner',
2842    popupScrollSelectorName: '.ap2022-popup__scrollable', // 221230 추가
2843    readyClass: 'is-ready',
2844    activeClass: 'is-active',
2845    closeOutClick: false,
2846    on: {
2847      layerOpenStart: null,
2848      layerOpenEnd: null,
2849      layerCloseStart: null,
2850      layerCloseEnd: null
2851    }
2852  };
2853
2854  _this.activeLayerList = [];
2855  _this.lastFocusElement = null;
2856  _this.tabPressTimer = null;
2857
2858  params = params || {};
2859
2860  for (var prop in defaults) {
2861    if (prop in params && _typeof(params[prop]) === 'object') {
2862      for (var subProp in defaults[prop]) {
2863        if (!(subProp in params[prop])) {
2864          params[prop][subProp] = defaults[prop][subProp];
2865        }
2866      }
2867    } else if (!(prop in params)) {
2868      params[prop] = defaults[prop];
2869    }
2870  }
2871  _this.params = params;
2872
2873  _this.isElement = function (x) {
2874    return x instanceof HTMLElement;
2875  };
2876
2877  _this.clickElements = function () {
2878    return ['[tabindex]', 'a', 'button', 'input', 'select', 'details', 'textarea'];
2879  };
2880
2881  _this.isActiveLayer = function (layer) {
2882    _this.activeLayerList.find(function (obj) {
2883      if (obj.element === layer) {
2884        return true;
2885      } else {
2886        return false;
2887      }
2888    });
2889  };
2890
2891  _this.findActiveLayerIndex = function (layer) {
2892	  for (var i = 0; i < _this.activeLayerList.length; i++) {
2893		if (_this.activeLayerList[i].element === layer) {
2894		  return i;
2895		}
2896	  }
2897	  return -1; // 찾지 못하면 -1 반환
2898	};
2899
2900  _this.whichTransitionEvent = function () {
2901    var el = document.createElement('div');
2902    var transitions = {
2903      transition: 'transitionend',
2904      OTransition: 'oTransitionEnd',
2905      MozTransition: 'transitionend',
2906      WebkitTransition: 'webkitTransitionEnd'
2907    };
2908
2909    for (var t in transitions) {
2910      if (el.style[t] !== undefined) {
2911        return transitions[t];
2912      }
2913    }
2914  };
2915
2916  // 221230 추가
2917  _this.hasScroll = function(scrollElement) {
2918    if (scrollElement.scrollHeight > scrollElement.clientHeight) {
2919      scrollElement.setAttribute('tabindex', 0);
2920    }
2921  }
2922
2923  document.addEventListener('keydown', function (event) {
2924    // 1. 현재 화면에 실제로 '보이는'(.ap2022-popup 중 display가 none이 아닌) 모든 팝업 수집
2925    var allVisiblePopups = Array.prototype.slice.call(document.querySelectorAll('.ap2022-popup')).filter(function(el) {
2926        return window.getComputedStyle(el).display !== 'none';
2927    });
2928
2929    if (allVisiblePopups.length > 0) {
2930        var keyCode = event.keyCode || event.which;
2931        var isTabPressed = !event.shiftKey && keyCode === 9;
2932        var isShiftTabPressed = event.shiftKey && keyCode === 9;
2933        var isEscPressed = event.key === 'Escape' || event.key === 'Esc' || keyCode === 27;
2934
2935        // 2. 화면상 가장 마지막에 있는(DOM 트리 하단 = 사용자 눈에 가장 위) 팝업 선택
2936        var activeLayer = allVisiblePopups[allVisiblePopups.length - 1];
2937        
2938        // 3. 포커스 요소 찾기 (문자열 join 필수)
2939        var focusableSelectors = _this.clickElements().join(',');
2940        var tabElements = activeLayer.querySelectorAll(focusableSelectors);
2941
2942        // ESC 처리
2943        if (isEscPressed) {
2944            event.preventDefault();
2945            _this.close(activeLayer);
2946            return;
2947        }
2948
2949        if (tabElements.length === 0) return;
2950
2951        var firstTabElement = tabElements[0];
2952        var lastTabElement = tabElements[tabElements.length - 1];
2953
2954        // 4. 포커스 가두기
2955        if (isTabPressed) {
2956            if (document.activeElement === lastTabElement) {
2957                event.preventDefault();
2958                firstTabElement.focus();
2959            }
2960        } else if (isShiftTabPressed) {
2961            if (document.activeElement === firstTabElement) {
2962                event.preventDefault();
2963                lastTabElement.focus();
2964            }
2965        }
2966    }
2967});
2968
2969  document.addEventListener('click', function (event) {
2970    if (_this.activeLayerList.length > 0) {
2971      if (event.target.closest(_this.params.layerRootSelectorName) && !event.target.closest(_this.params.popupInnerSelectorName)) {
2972        (function () {
2973          var activeLayer = _this.activeLayerList[_this.activeLayerList.length - 1].element;
2974          var param = _this.activeLayerList[_this.activeLayerList.length - 1].params;
2975          if (param.closeOutClick) {
2976            _this.activeLayerList.find(function (obj) {
2977              if (obj.element === activeLayer) {
2978                _this.closeActiveLayer(activeLayer);
2979              }
2980            });
2981          }
2982        })();
2983      }
2984    }
2985	// [추가] data-modal-event 버튼 클릭 처리
2986	var closeBtn = event.target.closest('[data-modal-event="close"]');
2987	if (closeBtn) {
2988		event.preventDefault();
2989		var layer = closeBtn.closest(_this.params.layerRootSelectorName);
2990		if (layer) {
2991		  _this.close(layer);
2992		}
2993	}
2994  });
2995};
2996
2997AP2022Modal.prototype.open = function (selector, params) {
2998  var _this = this;
2999  var layer = null;
3000  if (!_this.isElement(selector)) {
3001    layer = document.querySelector(selector);
3002  } else {
3003    layer = selector;
3004  }
3005
3006  var currentFocus = document.activeElement;
3007  if (currentFocus && currentFocus !== document.body && currentFocus.tagName !== 'BODY') {
3008    _this.lastFocusElement = currentFocus;
3009  } else {
3010    _this.lastFocusElement = null; 
3011  }
3012
3013  params = params || {};
3014  for (var prop in _this.params) {
3015    if (prop in params && _typeof(params[prop]) === 'object') {
3016      for (var subProp in _this.params[prop]) {
3017        if (!(subProp in params[prop])) {
3018          params[prop][subProp] = _this.params[prop][subProp];
3019        }
3020      }
3021    } else if (!(prop in params)) {
3022      params[prop] = _this.params[prop];
3023    }
3024  }
3025  _this.params = params;
3026
3027  if (layer || layer.classList.contains(layerRootSelectorName)) {
3028    _this.activeLayerList.push({
3029      element: layer,
3030      params: params
3031    });
3032
3033    if (_this.params.on.layerOpenStart && typeof _this.params.on.layerOpenStart === 'function') {
3034      _this.params.on.layerOpenStart();
3035    }
3036
3037    new Promise(function (resolve) {
3038      layer.style.display = '';
3039      resolve();
3040    }).then(function () {
3041      new Promise(function (resolve) {
3042        layer.classList.add(_this.params.readyClass);
3043        resolve();
3044      }).then(function () {
3045        layer.classList.add(_this.params.activeClass);
3046        layer.querySelector(_this.params.popupInnerSelectorName).tabIndex = 0;
3047
3048        var tabElements = layer.querySelectorAll(_this.clickElements());
3049        if (tabElements.length > 0) {
3050			var firstTabElement = tabElements[0];
3051			firstTabElement.focus(); // 여기서 처음 켜질 때 포커스를 잡아줍니다.
3052		}
3053        
3054        if (_this.params.on.layerOpenEnd && typeof _this.params.on.layerOpenEnd === 'function') {
3055          _this.params.on.layerOpenEnd();
3056        }
3057
3058        // 221230 추가 - 스크롤바 있을 경우 tabindex 추가
3059        var scrollElement = layer.querySelector(_this.params.popupScrollSelectorName);
3060        if (scrollElement) {
3061          _this.hasScroll(scrollElement);
3062
3063          var childImgs = scrollElement.querySelectorAll('img');
3064          if (childImgs.length > 0) {
3065            childImgs.forEach(function(img) {
3066              // console.log(img.complete);
3067              if (!img.complete) {
3068                img.addEventListener('load', function() {
3069                  if (this.complete && this.naturalHeight) {
3070                    _this.hasScroll(scrollElement);
3071                  }
3072                })
3073              }
3074            });
3075          }
3076        }
3077      });
3078    });
3079  }
3080};
3081
3082AP2022Modal.prototype.close = function (selector) {
3083  var _this = this;
3084  
3085  var layer = null;
3086  if (!_this.isElement(selector)) {
3087    layer = document.querySelector(selector);
3088  } else {
3089    layer = selector;
3090  }
3091  if (layer || layer.classList.contains(_this.params.layerRootSelectorName)) {
3092    (function () {
3093      
3094      var closeEvent = function closeEvent() {
3095		// 1. 오늘 하루 보지 않기 체크박스 저장
3096		var checkbox = layer.querySelector('input[type="checkbox"][name^="onlyToday"]');
3097		if (checkbox && checkbox.checked) {
3098			PopupManager.save(layer.id);
3099		}
3100
3101		// 2. 클래스 제거 및 활성 리스트에서 삭제
3102		layer.classList.remove(_this.params.readyClass);
3103		var idx = _this.findActiveLayerIndex(layer);
3104		if (idx > -1) {
3105			_this.activeLayerList.splice(idx, 1);
3106		}
3107
3108		// 3. 포커스 복구 로직
3109		if (_this.activeLayerList.length > 0) {
3110			// 상황 A: 뒤에 다른 팝업이 남아있는 경우
3111			var activeLayer = _this.activeLayerList[_this.activeLayerList.length - 1].element;
3112			var tabElements = activeLayer.querySelectorAll(_this.clickElements().join(','));
3113			if (tabElements.length > 0) {
3114				tabElements[0].focus();
3115			}
3116		} else {
3117			console.log(_this.lastFocusElement);
3118			// 상황 B: 마지막 팝업이 닫힌 경우
3119			if (_this.lastFocusElement) {
3120				// 버튼 클릭으로 열렸던 경우: 원래 버튼으로 복구
3121				_this.lastFocusElement.focus();
3122				_this.lastFocusElement = null;
3123			} else {
3124				window.scrollTo(0, 0);
3125				document.body.setAttribute('tabindex', '-1');
3126				document.body.focus();
3127			}
3128		}
3129
3130		// 4. 팝업 숨김 및 콜백 실행
3131		layer.style.display = 'none';
3132		if (_this.params.on.layerCloseEnd && typeof _this.params.on.layerCloseEnd === 'function') {
3133			_this.params.on.layerCloseEnd();
3134		}
3135	};
3136
3137      var style = getComputedStyle(layer);
3138
3139      new Promise(function (resolve) {
3140        layer.classList.remove(_this.params.activeClass);
3141        if (_this.params.on.layerCloseStart && typeof _this.params.on.layerCloseStart === 'function') {
3142          _this.params.on.layerCloseStart();
3143        }
3144
3145        resolve();
3146      }).then(function () {
3147        if(_this.closeTimer) {
3148          clearTimeout(_this.closeTimer);
3149          _this.closeTimer = null;
3150        }
3151        
3152        if (style.transition !== 'all 0s ease 0s') {
3153          const transitionDuration = style.transitionDuration.split('s')[0] * 1000;
3154          _this.closeTimer = setTimeout(function() {
3155            closeEvent();
3156          }, transitionDuration);
3157          //layer.addEventListener(_this.whichTransitionEvent(), closeEvent, {once: true});
3158        } else {
3159          closeEvent();
3160        }
3161      });
3162    })();
3163  }
3164};
3165
3166AP2022Modal.prototype.closeActiveLayer = function (selector) {
3167  var _this = this;
3168  var lastActiveLayer = _this.activeLayerList[_this.activeLayerList.length - 1].element;
3169
3170  if (selector) {
3171    if (lastActiveLayer === selector) {
3172      _this.close(lastActiveLayer);
3173    }
3174  } else {
3175    _this.close(lastActiveLayer);
3176  }
3177};
3178function instantiateModal() {
3179    var modals = document.querySelectorAll('[data-ap2022-modal]');
3180    if (modals.length) {
3181        window.modal = new AP2022Modal();
3182        
3183        modals.forEach(function(popup) {
3184            // 오늘 하루 보지 않기 체크
3185            if (popup.id && PopupManager.isHidden(popup.id)) {
3186                popup.style.display = 'none';
3187                popup.classList.remove('is-active');
3188                return;
3189            }
3190
3191            if (popup.classList.contains('is-active')) {
3192                window.modal.open(popup);
3193            }
3194        });
3195    }
3196}
3197
3198if (typeof document !== 'undefined') {
3199  if (document.readyState === 'loading') {
3200    document.addEventListener('DOMContentLoaded', instantiateModal);
3201  } else {
3202    instantiateModal();
3203  }
3204}
3205var SWS = window.SWS || {};
3206$(function(){
3207    SWS.$win = $(window);
3208})
3209var swfobject = function() {
3210    var aq = "undefined",
3211        aD = "object",
3212        ab = "Shockwave Flash",
3213        X = "ShockwaveFlash.ShockwaveFlash",
3214        aE = "application/x-shockwave-flash",
3215        ac = "SWFObjectExprInst",
3216        ax = "onreadystatechange",
3217        af = window,
3218        aL = document,
3219        aB = navigator,
3220        aa = false,
3221        Z = [aN],
3222        aG = [],
3223        ag = [],
3224        al = [],
3225        aJ, ad, ap, at, ak = false,
3226        aU = false,
3227        aH, an, aI = true,
3228        ah = function() {
3229            var a = typeof aL.getElementById != aq && typeof aL.getElementsByTagName != aq && typeof aL.createElement != aq,
3230                e = aB.userAgent.toLowerCase(),
3231                c = aB.platform.toLowerCase(),
3232                i = c ? /win/.test(c) : /win/.test(e),
3233                k = c ? /mac/.test(c) : /mac/.test(e),
3234                h = /webkit/.test(e) ? parseFloat(e.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false,
3235                d = !+"\v1",
3236                g = [0, 0, 0],
3237                l = null;
3238            if (typeof aB.plugins != aq && typeof aB.plugins[ab] == aD) {
3239                l = aB.plugins[ab].description;
3240                if (l && !(typeof aB.mimeTypes != aq && aB.mimeTypes[aE] && !aB.mimeTypes[aE].enabledPlugin)) {
3241                    aa = true;
3242                    d = false;
3243                    l = l.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
3244                    g[0] = parseInt(l.replace(/^(.*)\..*$/, "$1"), 10);
3245                    g[1] = parseInt(l.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
3246                    g[2] = /[a-zA-Z]/.test(l) ? parseInt(l.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0
3247                }
3248            } else {
3249                if (typeof af.ActiveXObject != aq) {
3250                    try {
3251                        var j = new ActiveXObject(X);
3252                        if (j) {
3253                            l = j.GetVariable("$version");
3254                            if (l) {
3255                                d = true;
3256                                l = l.split(" ")[1].split(",");
3257                                g = [parseInt(l[0], 10), parseInt(l[1], 10), parseInt(l[2], 10)]
3258                            }
3259                        }
3260                    } catch (b) {}
3261                }
3262            }
3263            return {
3264                w3: a,
3265                pv: g,
3266                wk: h,
3267                ie: d,
3268                win: i,
3269                mac: k
3270            }
3271        }(),
3272        aK = function() {
3273            if (!ah.w3) {
3274                return
3275            }
3276            if ((typeof aL.readyState != aq && aL.readyState == "complete") || (typeof aL.readyState == aq && (aL.getElementsByTagName("body")[0] || aL.body))) {
3277                aP()
3278            }
3279            if (!ak) {
3280                if (typeof aL.addEventListener != aq) {
3281                    aL.addEventListener("DOMContentLoaded", aP, false)
3282                }
3283                if (ah.ie && ah.win) {
3284                    aL.attachEvent(ax, function() {
3285                        if (aL.readyState == "complete") {
3286                            aL.detachEvent(ax, arguments.callee);
3287                            aP()
3288                        }
3289                    });
3290                    if (af == top) {
3291                        (function() {
3292                            if (ak) {
3293                                return
3294                            }
3295                            try {
3296                                aL.documentElement.doScroll("left")
3297                            } catch (a) {
3298                                setTimeout(arguments.callee, 0);
3299                                return
3300                            }
3301                            aP()
3302                        })()
3303                    }
3304                }
3305                if (ah.wk) {
3306                    (function() {
3307                        if (ak) {
3308                            return
3309                        }
3310                        if (!/loaded|complete/.test(aL.readyState)) {
3311                            setTimeout(arguments.callee, 0);
3312                            return
3313                        }
3314                        aP()
3315                    })()
3316                }
3317                aC(aP)
3318            }
3319        }();
3320
3321    function aP() {
3322        if (ak) {
3323            return
3324        }
3325        try {
3326            var b = aL.getElementsByTagName("body")[0].appendChild(ar("span"));
3327            b.parentNode.removeChild(b)
3328        } catch (a) {
3329            return
3330        }
3331        ak = true;
3332        var d = Z.length;
3333        for (var c = 0; c < d; c++) {
3334            Z[c]()
3335        }
3336    }
3337
3338    function aj(a) {
3339        if (ak) {
3340            a()
3341        } else {
3342            Z[Z.length] = a
3343        }
3344    }
3345
3346    function aC(a) {
3347        if (typeof af.addEventListener != aq) {
3348            af.addEventListener("load", a, false)
3349        } else {
3350            if (typeof aL.addEventListener != aq) {
3351                aL.addEventListener("load", a, false)
3352            } else {
3353                if (typeof af.attachEvent != aq) {
3354                    aM(af, "onload", a)
3355                } else {
3356                    if (typeof af.onload == "function") {
3357                        var b = af.onload;
3358                        af.onload = function() {
3359                            b();
3360                            a()
3361                        }
3362                    } else {
3363                        af.onload = a
3364                    }
3365                }
3366            }
3367        }
3368    }
3369
3370    function aN() {
3371        if (aa) {
3372            Y()
3373        } else {
3374            am()
3375        }
3376    }
3377
3378    function Y() {
3379        var d = aL.getElementsByTagName("body")[0];
3380        var b = ar(aD);
3381        b.setAttribute("type", aE);
3382        var a = d.appendChild(b);
3383        if (a) {
3384            var c = 0;
3385            (function() {
3386                if (typeof a.GetVariable != aq) {
3387                    var e = a.GetVariable("$version");
3388                    if (e) {
3389                        e = e.split(" ")[1].split(",");
3390                        ah.pv = [parseInt(e[0], 10), parseInt(e[1], 10), parseInt(e[2], 10)]
3391                    }
3392                } else {
3393                    if (c < 10) {
3394                        c++;
3395                        setTimeout(arguments.callee, 10);
3396                        return
3397                    }
3398                }
3399                d.removeChild(b);
3400                a = null;
3401                am()
3402            })()
3403        } else {
3404            am()
3405        }
3406    }
3407
3408    function am() {
3409        var h = aG.length;
3410        if (h > 0) {
3411            for (var i = 0; i < h; i++) {
3412                var c = aG[i].id;
3413                var m = aG[i].callbackFn;
3414                var a = {
3415                    success: false,
3416                    id: c
3417                };
3418                if (ah.pv[0] > 0) {
3419                    var j = aS(c);
3420                    if (j) {
3421                        if (ao(aG[i].swfVersion) && !(ah.wk && ah.wk < 312)) {
3422                            ay(c, true);
3423                            if (m) {
3424                                a.success = true;
3425                                a.ref = av(c);
3426                                m(a)
3427                            }
3428                        } else {
3429                            if (aG[i].expressInstall && au()) {
3430                                var e = {};
3431                                e.data = aG[i].expressInstall;
3432                                e.width = j.getAttribute("width") || "0";
3433                                e.height = j.getAttribute("height") || "0";
3434                                if (j.getAttribute("class")) {
3435                                    e.styleclass = j.getAttribute("class")
3436                                }
3437                                if (j.getAttribute("align")) {
3438                                    e.align = j.getAttribute("align")
3439                                }
3440                                var g = {};
3441                                var d = j.getElementsByTagName("param");
3442                                var l = d.length;
3443                                for (var k = 0; k < l; k++) {
3444                                    if (d[k].getAttribute("name").toLowerCase() != "movie") {
3445                                        g[d[k].getAttribute("name")] = d[k].getAttribute("value")
3446                                    }
3447                                }
3448                                ae(e, g, c, m)
3449                            } else {
3450                                aF(j);
3451                                if (m) {
3452                                    m(a)
3453                                }
3454                            }
3455                        }
3456                    }
3457                } else {
3458                    ay(c, true);
3459                    if (m) {
3460                        var b = av(c);
3461                        if (b && typeof b.SetVariable != aq) {
3462                            a.success = true;
3463                            a.ref = b
3464                        }
3465                        m(a)
3466                    }
3467                }
3468            }
3469        }
3470    }
3471
3472    function av(b) {
3473        var d = null;
3474        var c = aS(b);
3475        if (c && c.nodeName == "OBJECT") {
3476            if (typeof c.SetVariable != aq) {
3477                d = c
3478            } else {
3479                var a = c.getElementsByTagName(aD)[0];
3480                if (a) {
3481                    d = a
3482                }
3483            }
3484        }
3485        return d
3486    }
3487
3488    function au() {
3489        return !aU && ao("6.0.65") && (ah.win || ah.mac) && !(ah.wk && ah.wk < 312)
3490    }
3491
3492    function ae(g, d, i, e) {
3493        aU = true;
3494        ap = e || null;
3495        at = {
3496            success: false,
3497            id: i
3498        };
3499        var a = aS(i);
3500        if (a) {
3501            if (a.nodeName == "OBJECT") {
3502                aJ = aO(a);
3503                ad = null
3504            } else {
3505                aJ = a;
3506                ad = i
3507            }
3508            g.id = ac;
3509            if (typeof g.width == aq || (!/%$/.test(g.width) && parseInt(g.width, 10) < 310)) {
3510                g.width = "310"
3511            }
3512            if (typeof g.height == aq || (!/%$/.test(g.height) && parseInt(g.height, 10) < 137)) {
3513                g.height = "137"
3514            }
3515            aL.title = aL.title.slice(0, 47) + " - Flash Player Installation";
3516            var b = ah.ie && ah.win ? "ActiveX" : "PlugIn",
3517                c = "MMredirectURL=" + af.location.toString().replace(/&/g, "%26") + "&MMplayerType=" + b + "&MMdoctitle=" + aL.title;
3518            if (typeof d.flashvars != aq) {
3519                d.flashvars += "&" + c
3520            } else {
3521                d.flashvars = c
3522            }
3523            if (ah.ie && ah.win && a.readyState != 4) {
3524                var h = ar("div");
3525                i += "SWFObjectNew";
3526                h.setAttribute("id", i);
3527                a.parentNode.insertBefore(h, a);
3528                a.style.display = "none";
3529                (function() {
3530                    if (a.readyState == 4) {
3531                        a.parentNode.removeChild(a)
3532                    } else {
3533                        setTimeout(arguments.callee, 10)
3534                    }
3535                })()
3536            }
3537            aA(g, d, i)
3538        }
3539    }
3540
3541    function aF(a) {
3542        if (ah.ie && ah.win && a.readyState != 4) {
3543            var b = ar("div");
3544            a.parentNode.insertBefore(b, a);
3545            b.parentNode.replaceChild(aO(a), b);
3546            a.style.display = "none";
3547            (function() {
3548                if (a.readyState == 4) {
3549                    a.parentNode.removeChild(a)
3550                } else {
3551                    setTimeout(arguments.callee, 10)
3552                }
3553            })()
3554        } else {
3555            a.parentNode.replaceChild(aO(a), a)
3556        }
3557    }
3558
3559    function aO(b) {
3560        var d = ar("div");
3561        if (ah.win && ah.ie) {
3562            d.innerHTML = b.innerHTML
3563        } else {
3564            var e = b.getElementsByTagName(aD)[0];
3565            if (e) {
3566                var a = e.childNodes;
3567                if (a) {
3568                    var g = a.length;
3569                    for (var c = 0; c < g; c++) {
3570                        if (!(a[c].nodeType == 1 && a[c].nodeName == "PARAM") && !(a[c].nodeType == 8)) {
3571                            d.appendChild(a[c].cloneNode(true))
3572                        }
3573                    }
3574                }
3575            }
3576        }
3577        return d
3578    }
3579
3580    function aA(e, h, c) {
3581        var d, a = aS(c);
3582        if (ah.wk && ah.wk < 312) {
3583            return d
3584        }
3585        if (a) {
3586            if (typeof e.id == aq) {
3587                e.id = c
3588            }
3589            if (ah.ie && ah.win) {
3590                var g = "";
3591                for (var j in e) {
3592                    if (e[j] != Object.prototype[j]) {
3593                        if (j.toLowerCase() == "data") {
3594                            h.movie = e[j]
3595                        } else {
3596                            if (j.toLowerCase() == "styleclass") {
3597                                g += ' class="' + e[j] + '"'
3598                            } else {
3599                                if (j.toLowerCase() != "classid") {
3600                                    g += " " + j + '="' + e[j] + '"'
3601                                }
3602                            }
3603                        }
3604                    }
3605                }
3606                var i = "";
3607                for (var k in h) {
3608                    if (h[k] != Object.prototype[k]) {
3609                        i += '<param name="' + k + '" value="' + h[k] + '" />'
3610                    }
3611                }
3612                a.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + g + ">" + i + "</object>";
3613                ag[ag.length] = e.id;
3614                d = aS(e.id)
3615            } else {
3616                var b = ar(aD);
3617                b.setAttribute("type", aE);
3618                for (var l in e) {
3619                    if (e[l] != Object.prototype[l]) {
3620                        if (l.toLowerCase() == "styleclass") {
3621                            b.setAttribute("class", e[l])
3622                        } else {
3623                            if (l.toLowerCase() != "classid") {
3624                                b.setAttribute(l, e[l])
3625                            }
3626                        }
3627                    }
3628                }
3629                for (var m in h) {
3630                    if (h[m] != Object.prototype[m] && m.toLowerCase() != "movie") {
3631                        aQ(b, m, h[m])
3632                    }
3633                }
3634                a.parentNode.replaceChild(b, a);
3635                d = b
3636            }
3637        }
3638        return d
3639    }
3640
3641    function aQ(b, d, c) {
3642        var a = ar("param");
3643        a.setAttribute("name", d);
3644        a.setAttribute("value", c);
3645        b.appendChild(a)
3646    }
3647
3648    function aw(a) {
3649        var b = aS(a);
3650        if (b && b.nodeName == "OBJECT") {
3651            if (ah.ie && ah.win) {
3652                b.style.display = "none";
3653                (function() {
3654                    if (b.readyState == 4) {
3655                        aT(a)
3656                    } else {
3657                        setTimeout(arguments.callee, 10)
3658                    }
3659                })()
3660            } else {
3661                b.parentNode.removeChild(b)
3662            }
3663        }
3664    }
3665
3666    function aT(a) {
3667        var b = aS(a);
3668        if (b) {
3669            for (var c in b) {
3670                if (typeof b[c] == "function") {
3671                    b[c] = null
3672                }
3673            }
3674            b.parentNode.removeChild(b)
3675        }
3676    }
3677
3678    function aS(a) {
3679        var c = null;
3680        try {
3681            c = aL.getElementById(a)
3682        } catch (b) {}
3683        return c
3684    }
3685
3686    function ar(a) {
3687        return aL.createElement(a)
3688    }
3689
3690    function aM(a, c, b) {
3691        a.attachEvent(c, b);
3692        al[al.length] = [a, c, b]
3693    }
3694
3695    function ao(a) {
3696        var b = ah.pv,
3697            c = a.split(".");
3698        c[0] = parseInt(c[0], 10);
3699        c[1] = parseInt(c[1], 10) || 0;
3700        c[2] = parseInt(c[2], 10) || 0;
3701        return (b[0] > c[0] || (b[0] == c[0] && b[1] > c[1]) || (b[0] == c[0] && b[1] == c[1] && b[2] >= c[2])) ? true : false
3702    }
3703
3704    function az(b, g, a, c) {
3705        if (ah.ie && ah.mac) {
3706            return
3707        }
3708        var e = aL.getElementsByTagName("head")[0];
3709        if (!e) {
3710            return
3711        }
3712        var h = (a && typeof a == "string") ? a : "screen";
3713        if (c) {
3714            aH = null;
3715            an = null
3716        }
3717        if (!aH || an != h) {
3718            var d = ar("style");
3719            d.setAttribute("type", "text/css");
3720            d.setAttribute("media", h);
3721            aH = e.appendChild(d);
3722            if (ah.ie && ah.win && typeof aL.styleSheets != aq && aL.styleSheets.length > 0) {
3723                aH = aL.styleSheets[aL.styleSheets.length - 1]
3724            }
3725            an = h
3726        }
3727        if (ah.ie && ah.win) {
3728            if (aH && typeof aH.addRule == aD) {
3729                aH.addRule(b, g)
3730            }
3731        } else {
3732            if (aH && typeof aL.createTextNode != aq) {
3733                aH.appendChild(aL.createTextNode(b + " {" + g + "}"))
3734            }
3735        }
3736    }
3737
3738    function ay(a, c) {
3739        if (!aI) {
3740            return
3741        }
3742        var b = c ? "visible" : "hidden";
3743        if (ak && aS(a)) {
3744            aS(a).style.visibility = b
3745        } else {
3746            az("#" + a, "visibility:" + b)
3747        }
3748    }
3749
3750    function ai(b) {
3751        var a = /[\\\"<>\.;]/;
3752        var c = a.exec(b) != null;
3753        return c && typeof encodeURIComponent != aq ? encodeURIComponent(b) : b
3754    }
3755    var aR = function() {
3756        if (ah.ie && ah.win) {
3757            window.attachEvent("onunload", function() {
3758                var a = al.length;
3759                for (var b = 0; b < a; b++) {
3760                    al[b][0].detachEvent(al[b][1], al[b][2])
3761                }
3762                var d = ag.length;
3763                for (var c = 0; c < d; c++) {
3764                    aw(ag[c])
3765                }
3766                for (var e in ah) {
3767                    ah[e] = null
3768                }
3769                ah = null;
3770                for (var g in swfobject) {
3771                    swfobject[g] = null
3772                }
3773                swfobject = null
3774            })
3775        }
3776    }();
3777    return {
3778        registerObject: function(a, e, c, b) {
3779            if (ah.w3 && a && e) {
3780                var d = {};
3781                d.id = a;
3782                d.swfVersion = e;
3783                d.expressInstall = c;
3784                d.callbackFn = b;
3785                aG[aG.length] = d;
3786                ay(a, false)
3787            } else {
3788                if (b) {
3789                    b({
3790                        success: false,
3791                        id: a
3792                    })
3793                }
3794            }
3795        },
3796        getObjectById: function(a) {
3797            if (ah.w3) {
3798                return av(a)
3799            }
3800        },
3801        embedSWF: function(l, e, i, g, c, a, b, j, h, k) {
3802            var d = {
3803                success: false,
3804                id: e
3805            };
3806            if (ah.w3 && !(ah.wk && ah.wk < 312) && l && e && i && g && c) {
3807                ay(e, false);
3808                aj(function() {
3809                    i += "";
3810                    g += "";
3811                    var r = {};
3812                    if (h && typeof h === aD) {
3813                        for (var p in h) {
3814                            r[p] = h[p]
3815                        }
3816                    }
3817                    r.data = l;
3818                    r.width = i;
3819                    r.height = g;
3820                    var o = {};
3821                    if (j && typeof j === aD) {
3822                        for (var q in j) {
3823                            o[q] = j[q]
3824                        }
3825                    }
3826                    if (b && typeof b === aD) {
3827                        for (var m in b) {
3828                            if (typeof o.flashvars != aq) {
3829                                o.flashvars += "&" + m + "=" + b[m]
3830                            } else {
3831                                o.flashvars = m + "=" + b[m]
3832                            }
3833                        }
3834                    }
3835                    if (ao(c)) {
3836                        var n = aA(r, o, e);
3837                        if (r.id == e) {
3838                            ay(e, true)
3839                        }
3840                        d.success = true;
3841                        d.ref = n
3842                    } else {
3843                        if (a && au()) {
3844                            r.data = a;
3845                            ae(r, o, e, k);
3846                            return
3847                        } else {
3848                            ay(e, true)
3849                        }
3850                    }
3851                    if (k) {
3852                        k(d)
3853                    }
3854                })
3855            } else {
3856                if (k) {
3857                    k(d)
3858                }
3859            }
3860        },
3861        switchOffAutoHideShow: function() {
3862            aI = false
3863        },
3864        ua: ah,
3865        getFlashPlayerVersion: function() {
3866            return {
3867                major: ah.pv[0],
3868                minor: ah.pv[1],
3869                release: ah.pv[2]
3870            }
3871        },
3872        hasFlashPlayerVersion: ao,
3873        createSWF: function(a, b, c) {
3874            if (ah.w3) {
3875                return aA(a, b, c)
3876            } else {
3877                return undefined
3878            }
3879        },
3880        showExpressInstall: function(b, a, d, c) {
3881            if (ah.w3 && au()) {
3882                ae(b, a, d, c)
3883            }
3884        },
3885        removeSWF: function(a) {
3886            if (ah.w3) {
3887                aw(a)
3888            }
3889        },
3890        createCSS: function(b, a, c, d) {
3891            if (ah.w3) {
3892                az(b, a, c, d)
3893            }
3894        },
3895        addDomLoadEvent: aj,
3896        addLoadEvent: aC,
3897        getQueryParamValue: function(b) {
3898            var a = aL.location.search || aL.location.hash;
3899            if (a) {
3900                if (/\?/.test(a)) {
3901                    a = a.split("?")[1]
3902                }
3903                if (b == null) {
3904                    return ai(a)
3905                }
3906                var c = a.split("&");
3907                for (var d = 0; d < c.length; d++) {
3908                    if (c[d].substring(0, c[d].indexOf("=")) == b) {
3909                        return ai(c[d].substring((c[d].indexOf("=") + 1)))
3910                    }
3911                }
3912            }
3913            return ""
3914        },
3915        expressInstallCallback: function() {
3916            if (aU) {
3917                var a = aS(ac);
3918                if (a && aJ) {
3919                    a.parentNode.replaceChild(aJ, a);
3920                    if (ad) {
3921                        ay(ad, true);
3922                        if (ah.ie && ah.win) {
3923                            aJ.style.display = "block"
3924                        }
3925                    }
3926                    if (ap) {
3927                        ap(at)
3928                    }
3929                }
3930                aU = false
3931            }
3932        }
3933    }
3934}();
3935(function(b) {
3936    var a = {};
3937    b.fn.ytchromeless = function(d) {
3938        var c = {
3939            videoWidth: "640",
3940            videoHeight: "360",
3941            videoIdBase: "ytplayer",
3942            autoplay: false,
3943            mute: false,
3944            start: 0,
3945            end: 0,
3946            loop: false,
3947            params: {
3948                allowScriptAccess: "always",
3949                wmode: "transparent"
3950            },
3951            onReady: undefined,
3952            onStateChange: undefined
3953        };
3954        return this.each(function(k) {
3955            var j = b.extend({}, c, d),
3956                l = b(this),
3957                g = l.attr("href"),
3958                m = l.attr("id") || j.videoIdBase + k,
3959                n = g.substr(31),
3960                h = l.wrap('<div class="video-player"></div>').parent(),
3961                r = b('<div class="video"></div>').prependTo(h).attr("id", m),
3962                q, e = false,
3963                p = false;
3964            onYouTubePlayerReady = function(i) {
3965                console.log("[ytchromeless] ready", i);
3966                q.cueVideoById(n);
3967                if (j.mute) {
3968                    q.mute()
3969                }
3970                if (j.autoplay) {
3971                    q.playVideo()
3972                }
3973                setInterval(function() {
3974                    var o = q.getPlayerState(),
3975                        s = q.getCurrentTime();
3976                    if (o !== e) {
3977                        log("[ytchromeless] state changed", o);
3978                        e = o;
3979                        if (!p && e === 1 && j.start > 0) {
3980                            log("[ytchromeless] start from", j.start + "s");
3981                            q.seekTo(j.start, true);
3982                            p = true
3983                        }
3984                        if (j.loop && e === 0) {
3985                            log("[ytchromeless] video ended. restart to", j.start + "s");
3986                            q.seekTo(j.start, true)
3987                        }
3988                        if (typeof j.onStateChange === "function") {
3989                            j.onStateChange(e)
3990                        }
3991                    }
3992                    if (j.end > 0 && j.end > j.start && j.end <= s) {
3993                        if (j.loop) {
3994                            log("[ytchromeless] restart to", j.start + "s");
3995                            q.seekTo(j.start, true)
3996                        } else {
3997                            log("[ytchromeless] stop video at end point");
3998                            q.stopVideo()
3999                        }
4000                    }
4001                }, 100)
4002            };
4003            h.init = function() {
4004                swfobject.embedSWF("http://www.youtube.com/apiplayer?version=3&enablejsapi=1&playerapiid=" + m, m, j.videoWidth, j.videoHeight, "8", null, null, j.params, {
4005                    id: m
4006                }, function() {
4007                    q = document.getElementById(m);
4008                    if (typeof j.onReady === "function") {
4009                        j.onReady(q)
4010                    }
4011                });
4012                l.hide()
4013            };
4014            h.init()
4015        })
4016    }
4017})(jQuery);
4018
4019// 2023 접근성 공통 UI
4020const AP2022A11Y = (function() {
4021    const _hasScroll = function(scrollElement) {
4022      if (scrollElement.scrollHeight > scrollElement.clientHeight) {
4023        scrollElement.setAttribute('tabindex', 0);
4024      } else {
4025        scrollElement.removeAttribute('tabindex');
4026      }
4027    }
4028  
4029    const _getScrollHeight = function(scrollElement) {
4030      const computedStyles = window.getComputedStyle(scrollElement);
4031      return (computedStyles.maxHeight !== 'none') ? computedStyles.maxHeight : computedStyles.height;
4032    }
4033  
4034    // 동영상 자막영역 UI
4035    const setVideoScript = {
4036      show: function(params) {
4037        const _this = this;
4038        const defaults = {
4039          rootClass: 'ap2022-video-script-box',
4040          textAreaClass: 'ap2022-video-script-box__text'
4041        }
4042  
4043        params = params || {};
4044        for (const prop in defaults) {
4045          params[prop] = (prop in params) ? params[prop] : defaults[prop];
4046        }
4047  
4048        const videoScriptElement = document.querySelectorAll('.'.concat(params.rootClass));
4049  
4050        if (videoScriptElement.length > 0) {
4051          videoScriptElement.forEach(function(item) {
4052            const textElement = item.querySelector('.'.concat(params.textAreaClass));
4053            if (textElement) {
4054              _hasScroll(textElement);
4055              window.addEventListener('resize', function() {
4056                _hasScroll(textElement);
4057              });
4058            }
4059          });
4060        }
4061      },
4062      toggle: function(params) {
4063        const _this = this;
4064        const defaults = {
4065          rootClass: 'ap2022-video-script-box',
4066          textAreaClass: 'ap2022-video-script-box__text',
4067          headerClass: 'ap2022-video-script-box__header',
4068          toggleClass: 'ap2022-video-script-box__toggle',
4069          buttonClass: 'ap2022-video-script-box__button',
4070          activeClass: 'is-active',
4071          activeDescription: '닫기',
4072          inactiveDescription: '열기',
4073          buttonLabel: '자막'
4074        }
4075  
4076        params = params || {};
4077        for (const prop in defaults) {
4078          params[prop] = (prop in params) ? params[prop] : defaults[prop];
4079        }
4080        
4081        const videoScriptElement = document.querySelectorAll('.'.concat(params.rootClass));
4082        const buttonContent = '<span>' + params.buttonLabel + '</span><i></i>';
4083        const buttonHTML = '<button type="button" class="' + params.buttonClass + '" title="' + params.inactiveDescription + '">' + buttonContent + '</button>';
4084  
4085        if (videoScriptElement.length > 0) {
4086          videoScriptElement.forEach(function(item) {
4087            const textElement = item.querySelector('.'.concat(params.textAreaClass));
4088            if (textElement) {
4089              // toggle UI 를 위한 HTML 생성
4090              const headerElement = document.createElement('div');
4091              headerElement.className = params.headerClass;
4092              headerElement.innerHTML = buttonHTML;
4093              item.insertBefore(headerElement, item.firstChild);
4094  
4095              const textElementWrapper = document.createElement('div');
4096              textElementWrapper.className = params.toggleClass;
4097              textElement.parentNode.insertBefore(textElementWrapper, textElement);
4098              textElementWrapper.appendChild(textElement);
4099              textElementWrapper.style.display = 'none';
4100              textElementWrapper.style.maxHeight = '0px';
4101  
4102              // toggle 버튼 이벤트 추가
4103              item.addEventListener('click', function(e) {
4104                const buttonElement = e.target.closest('.'.concat(params.buttonClass));
4105                if (buttonElement) {
4106                  if (!item.classList.contains(params.activeClass)) {
4107                    item.classList.add(params.activeClass);
4108                    buttonElement.setAttribute('title', params.activeDescription);
4109                    textElementWrapper.style.display = '';
4110                    textElementWrapper.style.maxHeight = _getScrollHeight(textElement);
4111                    _hasScroll(textElement);
4112                  } else {
4113                    item.classList.remove(params.activeClass);
4114                    buttonElement.setAttribute('title', params.inactiveDescription);
4115                    textElementWrapper.style.maxHeight = '0px';
4116  
4117                    if (window.getComputedStyle(textElementWrapper).transitionDuration === '0s') {
4118                      textElementWrapper.style.display = 'none';
4119                      _hasScroll(textElement);
4120                    } else {
4121                      textElementWrapper.addEventListener('transitionend', function() {
4122                        if (!item.classList.contains(params.activeClass) && textElementWrapper.style.display === '') {
4123                          textElementWrapper.style.display = 'none';
4124                          _hasScroll(textElement);
4125                        }
4126                      });
4127                    }
4128                  }
4129                }
4130              });
4131  
4132              window.addEventListener('resize', function() {
4133                if (textElementWrapper.style.display !== 'none') {
4134                  textElementWrapper.style.maxHeight = _getScrollHeight(textElement);
4135                  _hasScroll(textElement);
4136                }
4137              });
4138            }
4139          });
4140        }
4141      }
4142    }
4143  
4144    return {
4145      setVideoScript: setVideoScript
4146    }
4147  })();
4148
4149
4150// toggleLayer에서 참조하는 adNormalClose 속성 초기화
4151SWS.adNormalClose = SWS.adNormalClose || {
4152    search: false,
4153    sideNav: false
4154};
4155
4156/* 2. toggleLayer jQuery 플러그인 */
4157(function($) {
4158    var $window = $(window);
4159    var defaults = {
4160        side: false,
4161        autoFocus: true,
4162        toggleByClass: false,
4163        activeClass: "is-active",
4164        closeBtnClass: "close-layer",
4165        isopen: false,
4166        onOpen: function($btn, $target) {},
4167        onClose: function($btn, $target) {}
4168    };
4169
4170    $.fn.toggleLayer = function(options) {
4171        if (this.length === 0) return this;
4172        if (this.length > 1) {
4173            this.each(function() {
4174                $(this).toggleLayer(options);
4175            });
4176            return this;
4177        }
4178
4179        var plugin = {};
4180        var $btn = this;
4181        var selector = $btn.selector || "";
4182
4183        var init = function() {
4184            plugin.settings = $.extend({}, defaults, options);
4185            plugin.targetId = $btn.attr("href");
4186            plugin.$target = $(plugin.targetId);
4187            plugin.$close = plugin.$target.find("." + plugin.settings.closeBtnClass);
4188            
4189            // 초기 상태 설정
4190            $btn.data("target", {
4191                isopen: plugin.settings.isopen
4192            });
4193
4194            // 타겟이 이미 보이는 경우 (top-search 제외하고 닫기 처리)
4195            if (plugin.$target.is(":visible")) {
4196                if (plugin.$target.attr("id") !== "top-search") close();
4197            }
4198
4199            // 버튼 클릭 이벤트
4200            $btn.on("click", function(e) {
4201                // SWS 객체 의존성 부분
4202                if (SWS.adNormalClose.search) {
4203                    $btn.data("target", {
4204                        isopen: !plugin.settings.isopen
4205                    });
4206                } else {
4207                    $btn.data("target", {
4208                        isopen: plugin.settings.isopen
4209                    });
4210                }
4211
4212                if ($btn.data("target").isopen) {
4213                    close();
4214                } else {
4215                    open();
4216                }
4217                e.stopPropagation();
4218                e.preventDefault();
4219            });
4220
4221            // 닫기 버튼 클릭 이벤트
4222            plugin.$close.on("click", function(e) {
4223                close();
4224                e.stopPropagation();
4225                e.preventDefault();
4226            });
4227
4228            // 타겟 내부 클릭 시 닫히지 않도록 전파 중단
4229            plugin.$target.on("click", function(e) {
4230                e.stopPropagation();
4231            });
4232
4233            // 외부(body) 클릭 시 닫기
4234            $("body").on("click", function() {
4235                if ($btn.data("target").isopen) {
4236                    close();
4237                }
4238            });
4239
4240            // 리사이즈 이벤트
4241            $window.on("resize", function() {
4242                plugin.settings.side = ($btn.data("layerOption") == undefined) ? false : $btn.data("layerOption");
4243                // Modernizr 의존성 (터치가 아닌 환경에서 리사이즈 시 닫기)
4244                if (typeof Modernizr !== 'undefined' && !Modernizr.touch && plugin.$target.is(":visible")) {
4245                    close();
4246                }
4247            });
4248            
4249            // 초기화 시 타겟 속성 설정 (outline 제거 등)
4250            setupTarget();
4251        };
4252
4253        var setupTarget = function() {
4254            plugin.$target.css({
4255                outline: "0 none"
4256            }).attr({
4257                tabindex: "0"
4258            });
4259            if (plugin.$target.attr("hidden") !== "hidden") {
4260                plugin.$target.attr("tabindex", "0");
4261            } else {
4262                plugin.$target.attr("tabindex", "-1");
4263                plugin.$target.find("a, input, button, select, textarea").attr("tabindex", "-1");
4264            }
4265        };
4266
4267        var close = function() {
4268            if (plugin.settings.activeClass !== "") {
4269                plugin.$target.removeClass(plugin.settings.activeClass);
4270            }
4271            if (plugin.visible) {
4272                plugin.$target.hide();
4273            } else {
4274                plugin.settings.onClose($btn, plugin.$target);
4275            }
4276            if (!plugin.settings.toggleByClass) {
4277                plugin.$target.hide();
4278            }
4279            $btn.removeClass("toggle-on");
4280            $btn.data("target").isopen = false;
4281            plugin.settings.isopen = false;
4282			$btn.attr("aria-expanded",false);
4283            $btn.focus();
4284            
4285            // 중첩된 토글이 있다면 닫기
4286            if (selector && plugin.$target.find(selector).hasClass("toggle-on")) {
4287                plugin.$target.find(selector).trigger("click");
4288            }
4289            
4290            plugin.$target.attr("tabindex", "-1");
4291            plugin.$target.find("a, input, button, select, textarea").attr("tabindex", "-1");
4292        };
4293
4294        var open = function() {
4295            var $focusTarget = plugin.$target;
4296            
4297            // 위치 설정 (side 옵션이 있을 경우)
4298            if (plugin.settings.side !== false) {
4299                var pos = $btn.offset();
4300                var sidePos = (plugin.settings.side == "left") ? pos.left : (pos.left + $btn.outerWidth());
4301                
4302                if (plugin.settings.side == "left") {
4303                    plugin.$target.css({
4304                        top: pos.top,
4305                        left: sidePos - plugin.$target.outerWidth()
4306                    });
4307                } else if (plugin.settings.side == "right") {
4308                    plugin.$target.css({
4309                        top: pos.top,
4310                        right: ($(window).width() - sidePos) - plugin.$target.outerWidth()
4311                    });
4312                }
4313            }
4314            
4315            if (plugin.visible) {
4316                plugin.$target.show();
4317            } else {
4318                plugin.settings.onOpen($btn, plugin.$target);
4319            }
4320            
4321            if (!plugin.settings.toggleByClass) {
4322                plugin.$target.show();
4323            }
4324            if (plugin.settings.activeClass !== "") {
4325                plugin.$target.addClass(plugin.settings.activeClass);
4326            }
4327            
4328            // 오토 포커스
4329            if (plugin.$target.find("input").length && plugin.settings.autoFocus) {
4330                $focusTarget = plugin.$target.find("input").eq(0);
4331            }
4332            $focusTarget.focus();
4333            
4334            $btn.addClass("toggle-on");
4335            $btn.data("target").isopen = true;
4336            plugin.settings.isopen = true;
4337            $btn.attr("aria-expanded",true);
4338            plugin.$target.attr("tabindex", "0");
4339            plugin.$target.find("a, input, button, select, textarea").removeAttr("tabindex");
4340        };
4341
4342        // 외부에서 제어 가능하도록 메서드 노출
4343        $btn.openTarget = open;
4344        $btn.closeTarget = close;
4345        
4346        init();
4347        
4348        return this;
4349    };
4350})(jQuery);
4351// 아코디언
4352(function(a) {
4353    a.fn.accordion = function(b) {
4354        var b = a.extend({
4355            easing: "easeOutQuint",
4356            speed: 400,
4357            titleSelector: ".q",
4358            contSelector: ".a",
4359            collapsible: false,
4360            callback: function() {},
4361            onOpen: function(c) {}
4362        }, b);
4363        return this.each(function() {
4364            var g = a(this),
4365                d = g.find(b.titleSelector),
4366                e = g.find(b.contSelector),
4367                j = d.parent(),
4368                i = g.filter(".on");
4369
4370            // 💡 [핵심 추가] .q 안에 button이나 a 태그가 있으면 거기로 타겟을 좁혀주는 함수
4371            var setAria = function(target, state) {
4372                var btn = target.find("button, a, [role='button']");
4373                (btn.length ? btn : target).attr("aria-expanded", state);
4374            };
4375
4376            var h = function() {
4377                var k = d.outerHeight();
4378
4379                // 1. 초기 렌더링 시 전체 닫힘 처리
4380                setAria(d, "false");
4381
4382                d.on("click keypress", function(l) {
4383                    if (l.type == "click" || l.which == 13) {
4384                        c(a(this).parent())
4385                    }
4386                });
4387                if (!b.collapsible) {
4388                    if (i.length > 0) {
4389                        c(i.eq(0))
4390                    }
4391                } else {
4392                    i.removeClass("on")
4393                }
4394                
4395                // 2. 초기 열려있는(.on) 요소만 상태 업데이트
4396                setAria(j.filter(".on").find(b.titleSelector), "true");
4397                j.not(".on").find(b.contSelector).hide()
4398            };
4399            var c = function(k) {
4400                var l = k.hasClass("on");
4401                j.removeClass("on");
4402                
4403                // 3. 슬라이드 동작 시 전체 리셋
4404                setAria(d, "false");
4405
4406                e.stop(true, true).slideUp({
4407                    duration: b.speed,
4408                    easing: b.easing,
4409                    complete: function() {
4410                        b.callback();
4411                        e.css("zoom", 1)
4412                    }
4413                });
4414                if (l) {
4415                    return
4416                }
4417                
4418                // 4. 선택된 타겟만 true 업데이트
4419                k.addClass("on");
4420                setAria(k.find(b.titleSelector), "true");
4421                
4422                k.find(b.contSelector).stop(true, true).slideDown({
4423                    duration: b.speed,
4424                    easing: b.easing,
4425                    complete: function() {
4426                        b.callback();
4427                        b.onOpen(k)
4428                    }
4429                })
4430            };
4431            h()
4432        })
4433    };
4434    a.fn.accordion1 = function(b) {
4435        var b = a.extend({
4436            easing: "ease",
4437            speed: 400,
4438            titleSelector: ".q",
4439            contSelector: ".a",
4440            collapsible: false,
4441            callback: function() {},
4442            onOpen: function(c) {}
4443        }, b);
4444        return this.each(function() {
4445            var g = a(this),
4446                d = g.find(b.titleSelector),
4447                e = g.find(b.contSelector),
4448                j = d.closest("section"),
4449                i = g.filter(".on");
4450
4451            // 💡 accordion1 에도 동일한 헬퍼 함수 적용
4452            var setAria = function(target, state) {
4453                var btn = target.find("button, a, [role='button']");
4454                (btn.length ? btn : target).attr("aria-expanded", state);
4455            };
4456
4457            var h = function() {
4458                var k = d.outerHeight();
4459
4460                setAria(d, "false");
4461
4462                d.on("click", function(l) {
4463                    if (l.type == "click" || l.which == 13) {
4464                        c(a(this).closest("section"))
4465                    }
4466                });
4467                if (!b.collapsible) {
4468                    if (i.length > 0) {
4469                        c(i.eq(0))
4470                    }
4471                } else {
4472                    i.removeClass("on")
4473                }
4474                
4475                setAria(j.filter(".on").find(b.titleSelector), "true");
4476                j.not(".on").find(b.contSelector).hide()
4477            };
4478            var c = function(k) {
4479                var l = k.hasClass("on");
4480                j.removeClass("on");
4481                
4482                setAria(d, "false");
4483
4484                e.stop(true, true).slideUp({
4485                    duration: b.speed,
4486                    complete: function() {
4487                        b.callback();
4488                        e.css("zoom", 1)
4489                    }
4490                });
4491                if (l) {
4492                    return
4493                }
4494                
4495                k.addClass("on");
4496                setAria(k.find(b.titleSelector), "true");
4497                
4498                k.find(b.contSelector).stop(true, true).slideDown({
4499                    duration: b.speed,
4500                    complete: function() {
4501                        b.callback();
4502                        b.onOpen(k)
4503                    }
4504                })
4505            };
4506            h()
4507        })
4508    }
4509})(jQuery);
4510
4511$(function() {
4512    //nav();
4513    selectbox();
4514    //scrollToTop();
4515    var c = $(".toggle-layer").toggleLayer();
4516    // $(".break-word, .product-name, .detail-concept h2, .detail-content h3, .archive-print-header .h, .archive-name, .archive-section .h").each(function(h, j) {
4517    //     var g = $(j),
4518    //         e;
4519    //     if ($.browser.webkit) {
4520    //         e = new SplitText(g);
4521    //         g.find(">span").css("white-space", "nowrap")
4522    //     } else {
4523    //         g.css({
4524    //             "word-break": "keep-all",
4525    //             "word-wrap": "break-word"
4526    //         })
4527    //     }
4528    // });
4529    //$("#legacy-browser").on("click", "button.legacy-browser-close", function() {
4530    //    $(this).parent().slideUp(200, function() {
4531    //        $(this).remove()
4532    //    })
4533    //});
4534    $(function() {
4535        $(".sch-close").click(function() {
4536            SWS.schClickEvent = true;
4537            if (SWS.schClickEvent) {
4538                $(".misc-links").show();
4539                $(".search-container").hide();
4540                //SWS.$body.removeClass("is-open-search");
4541                $("#top-search").attr("tabindex", "-1");
4542                $("#top-search").find("a, input, button, select, textarea").attr("tabindex", "-1");
4543            };
4544            $('.inner-top-search').one('transitionend webkitTransitionEnd oTransitionEnd otransitionend', function(){
4545                SWS.schClickEvent = false;
4546            });
4547                
4548        });
4549        $(".search-delete").click(function() {
4550            $(".search-box #q").val('');
4551            $(this).attr('hidden', 'true');
4552            $(".search-box #q").focus();
4553        });
4554    $(".footer-toggle-button").on("click", function() {
4555            if ($(this).attr('aria-expanded') === 'false') {
4556                $(this).attr('aria-expanded', 'true');
4557                $(".mo-footer-wrap").slideDown(250);
4558				$('html, body').animate({ scrollTop: $(document).height() }, 250);
4559            } else {
4560                $(this).attr('aria-expanded', 'false');
4561                $(".mo-footer-wrap").slideUp(250);
4562            }
4563            $(this).toggleClass("is-open");
4564        });
4565    });
4566    let isPC = (window.innerWidth < 1024) ? false : true;
4567    window.addEventListener('resize', () => {
4568        let resizePC = (window.innerWidth < 1024) ? false : true;
4569        if(isPC !== resizePC){
4570            document.querySelector(".footer-toggle-button").setAttribute('aria-expanded', 'false');
4571            document.querySelector(".mo-footer-wrap").style.display = '';
4572            isPC = resizePC;
4573        }
4574    });
4575    var a = $(".misc-links");
4576    var d = $("#open-search").toggleLayer({
4577        autoFocus: false,
4578        toggleByClass: true,
4579        isopen: false,
4580        onOpen: function(g, e) {
4581            a.hide();
4582            e.show();
4583            if (SWS.adNormalClose.search) SWS.adNormalClose.search = false;
4584            if (!$("#sidenav-open").is(":visible")) {
4585                //SWS.$body.addClass("is-open-search");
4586                var targetBtnBlur, targetBtnKeyDown, targetBtnShiftKey;
4587                $(".sch-close").on("keydown blur", function(e) {
4588                    if (!SWS.schClickEvent) {
4589                        keyboardFocus(e, "tab", "#top-search", "search", "is-open-search");
4590                    }
4591                });
4592            } else {
4593                SWS.$body.addClass("is-open-search");
4594                e.find("input").focus();
4595                bodyScrollLock.disableBodyScroll(SWS.$body);
4596                var targetBtnBlur, targetBtnKeyDown, targetBtnShiftKey;
4597                $(".search-box .submit").on("keydown blur", function(e) {
4598                    keyboardFocus(e, "tab", "#top-search", "search", "is-open-search")
4599                });
4600            }
4601            e.on("click.toggleClose", function() {
4602                d.closeTarget()
4603            });
4604            e.find(".search-box").on("click", function(h) {
4605                h.stopPropagation()
4606            });
4607            $("#top-search").removeAttr('hidden');
4608            $(".search-box #q").on("change keyup paste", function() {
4609                var currentVal = $(this).val();
4610                if (currentVal.length > 0) {
4611                    $(".search-delete").removeAttr('hidden');
4612                } else {
4613                    $(".search-delete").attr('hidden', 'true');
4614                }
4615            });
4616        },
4617        onClose: function(g, e) {
4618            if (!$("#sidenav-open").is(":visible")) {
4619                bodyScrollLock.clearAllBodyScrollLocks();
4620            } else {
4621                a.show();
4622                e.hide();
4623                g.focus();
4624                if (!SWS.$body.hasClass("is-open-sidenav")) bodyScrollLock.clearAllBodyScrollLocks();
4625            };
4626            SWS.$body.removeClass("is-open-search");
4627            e.off("click.toggleClose");
4628            $("#top-search").attr('hidden', 'true');
4629        }
4630    });
4631    $("#store-guide-link").toggleLayer({
4632        autoFocus: false,
4633        toggleByClass: true,
4634        onOpen: function(g, e) {
4635            e.show();
4636            TweenMax.to(g, 0.4, {
4637                autoAlpha: 0.5,
4638                ease: Power2.easeInOut,
4639                onComplete: function() {}
4640            })
4641        },
4642        onClose: function(g, e) {
4643            e.hide();
4644            g.focus();
4645            TweenMax.to(g, 0.4, {
4646                autoAlpha: 1,
4647                ease: Power2.easeInOut,
4648                onComplete: function() {}
4649            })
4650        }
4651    });
4652    if (Modernizr.mediaqueries) {
4653        var languageMobileInitComplate = false;
4654        function languageMobileInit() {
4655            $("#language-list").clone().attr("id", "language-list-footer").appendTo($("#sulwhasoo-languages"));
4656            return languageMobileInitComplate = true;
4657        }
4658        languageMobileInit();
4659        var targetBtnBlur, targetBtnKeyDown, targetBtnShiftKey;
4660        function languageKeyBoardTab(e, keyType) {
4661            // 언어 선택 팝업 키보드 접근성 대응 코드
4662            e.type === "blur" ? targetBtnBlur = true : targetBtnBlur = false;
4663            if (e.type === "keydown") {
4664                targetBtnKeyDown = true;
4665                e.shiftKey ? targetBtnShiftKey = true : targetBtnShiftKey = false;
4666            }
4667            if (keyType === "tab" && targetBtnBlur && targetBtnKeyDown && !targetBtnShiftKey) {
4668                languageBtn.removeClass("toggle-on");
4669                languageBtn.attr("aria-expanded", "false");
4670                languageBtn.focus();
4671                SWS.languageCloseClickEvent = false;
4672            } else if (keyType === "shiftTab" && targetBtnBlur && targetBtnKeyDown && targetBtnShiftKey) {
4673                languageBtn.removeClass("toggle-on");
4674                languageBtn.attr("aria-expanded", "false");
4675                languageBtn.focus();
4676                SWS.languageCloseClickEvent = false;
4677            }
4678        }
4679        var languageBtn = $("#toggle-languages");
4680        if (languageMobileInitComplate) {
4681            var languageListBtns = $("#language-list-footer > li > a");
4682            var languageListLastBtn = languageListBtns.length - 1;
4683            languageBtn.click(function() {
4684                $(this).addClass("toggle-on");
4685                languageBtn.attr("aria-expanded", "true");
4686            });
4687            $(languageListBtns[languageListLastBtn]).on("keydown blur", function(e) {
4688                languageKeyBoardTab(e, "tab");
4689            });
4690        }
4691        $(".languages .close-layer-languages").click(function() {
4692            SWS.languageCloseClickEvent = true;
4693            if (SWS.languageCloseClickEvent) {
4694                languageBtn.removeClass("toggle-on");
4695                languageBtn.attr("aria-expanded", "false");
4696            }
4697        });
4698        $(".languages .close-layer-languages").on("keydown blur", function(e) {
4699            if (!SWS.languageCloseClickEvent) languageKeyBoardTab(e, "shiftTab");
4700        });
4701    }
4702    $("#language-list").on("click", "a", function() {
4703        c.closeTarget()
4704    })
4705    /* header ë°°ê²½ */
4706    $('#header.renew2022-header .inner .top_nav_box .top_category > ul > li:has(.sub_cate01)').on('mouseover focusin',function(){
4707        $('#header.renew2022-header .inner .top_nav_box .top_category').addClass('open');
4708    })
4709    $('#header.renew2022-header .inner .top_nav_box .top_category > ul > li:not(:has(.sub_cate01))').on('mouseover focusin',function(){
4710        $('#header.renew2022-header .inner .top_nav_box .top_category').removeClass('open');
4711    })
4712    $('#header.renew2022-header .inner .top_nav_box .top_category').on('mouseleave focusout',function(){
4713        $('#header.renew2022-header .inner .top_nav_box .top_category').removeClass('open');
4714    })
4715    
4716	// 커스텀 셀렉트
4717	function selectbox() {
4718		var c = $("div.selectbox"),
4719			a = c.find(".selectbox-option"),
4720			d = $(document);
4721		c.not(".is-disabled").each(function() {
4722			var v = $(this),
4723				e = v.find(">.selector"),
4724				y = v.find(".selector-text"),
4725				g = v.find(">.selectbox-option"),
4726				l = g.find(">li"),
4727				h, r = "",
4728				i = (l.find("a").length > 0) ? true : false,
4729				m, s = false,
4730				u = l.length;
4731			t();
4732
4733			function t() {
4734				var w;
4735				if (v.data("is-setup")) {
4736					return
4737				}
4738				w = 0;
4739				h = (i) ? l.find(">a") : l;
4740				x();
4741				j();
4742				if (i) {
4743					g.on("click", "a", function(A) {
4744						q(this)
4745					});
4746					g.on("keydown", "a", function(C) {
4747						if (C.keyCode == 38) {
4748							C.preventDefault();
4749						} else if (C.keyCode == 40) {
4750							C.preventDefault();
4751						}
4752					});
4753					g.on("keyup", "a", function(C) {
4754						var B = $(this),
4755							A = B.data("index");
4756						if (C.keyCode == 27) {
4757							k();
4758							n(C)
4759						} else {
4760							if (C.keyCode == 38) {
4761								if (A - 1 >= 0) {
4762									h.eq(A - 1).focus()
4763								}
4764							} else {
4765								if (C.keyCode == 40) {
4766									if (A + 1 <= u - 1) {
4767										h.eq(A + 1).focus()
4768									}
4769								}
4770							}
4771						}
4772					});
4773					g.on("focus", "a", function(A) {
4774						$(this).parent().addClass("is-active")
4775					});
4776					g.on("blur", "a", function(A) {
4777						$(this).parent().removeClass("is-active")
4778					})
4779				} else {
4780					g.on("click", "li", function(A) {
4781						q(this);
4782						A.stopPropagation()
4783					});
4784					v.delegate("li", "keydown", function(C) {
4785						if (C.keyCode == 38) {
4786							C.preventDefault();
4787						} else if (C.keyCode == 40) {
4788							C.preventDefault();
4789						}
4790					});
4791					v.delegate("li", "keyup", function(C) {
4792						var B = $(this),
4793							A = B.data("index");
4794						if (C.keyCode == 13) {
4795							$(this).trigger("click")
4796						} else {
4797							var prevLength = B.prevAll("li:not([style*='display: none'])").length;
4798							var nextLength = B.nextAll("li:not([style*='display: none'])").length;
4799
4800							if (C.keyCode == 27) {
4801								k();
4802								n(C)
4803							} else {
4804								if (C.keyCode == 38) {
4805									var prevIdx = B.prevAll("li:not([style*='display: none'])").eq(0).data("index");
4806									h.eq(prevIdx).focus();
4807								} else {
4808									if (C.keyCode == 40) {
4809										if(nextLength > 0){
4810											var nextIdx = B.nextAll("li:not([style*='display: none'])").eq(0).data("index");
4811											h.eq(nextIdx).focus();
4812										}
4813									}
4814								}
4815							}
4816						}
4817					});
4818					g.on("focus", "li", function(A) {
4819						$(this).addClass("is-active")
4820					});
4821					g.on("blur", "li", function(A) {
4822						$(this).removeClass("is-active")
4823					})
4824				}
4825				e.on("click keyup", function(A) {
4826					// 수정됨: tabindex 기준 대신 data-index 값 기준으로 초기화 여부 판단 (일부 li에 tabindex가 안 들어갈 수 있으므로)
4827					if ($(this).next("ul").find("li").data("index") == undefined) {
4828						if (i) {
4829							h.each(function(B, C) {
4830								$(C).data("index", B)
4831							})
4832						} else {
4833							h.each(function(B, C) {
4834								var $li = $(C);
4835								// 수정됨: a 또는 button이 포함되어 있지 않을 때만 tabindex 적용
4836								if ($li.find("a, button").length === 0) {
4837									$li.attr("tabindex", 0);
4838								}
4839								$li.data("index", B);
4840								$li.find("input[type=radio]").attr("tabindex", -1);
4841							})
4842						}
4843						u = h.length
4844					}
4845					if (A.type == "click" || A.keyCode == 13) {
4846						if (v.data("is-open")) {
4847							p();
4848						} else {
4849							o();
4850							
4851							var $currentEl;
4852							if (!i) {
4853								$currentEl = h.has("input:checked"); 
4854							} else {
4855								var currentText = e.find(">span").text(); 
4856								$currentEl = h.filter(function() {
4857									var itemText = $(this).find(".select-item").length > 0 ? $(this).find(".select-item").text() : $(this).text();
4858									return $.trim(itemText) === $.trim(currentText);
4859								});
4860							}
4861
4862							if ($currentEl.length > 0 && $currentEl.css("display") !== "none") {
4863								$currentEl.focus(); 
4864							} else {
4865								h.not('[style*="display: none"]').eq(0).focus(); 
4866							}
4867						}
4868						A.preventDefault();
4869					}
4870				});
4871				e.on("focus", z);
4872				v.on("click", function(A) {
4873					A.stopPropagation()
4874				});
4875
4876				function z() {
4877					var A = new Array(38, 40);
4878					d.on("keyup.blockArrow", "li", function(C) {
4879						var B = C.which;
4880						if ($.inArray(B, A) > -1) {
4881							C.preventDefault();
4882							return false
4883						}
4884					})
4885				}
4886				v.on("click", function(A) {
4887					A.stopPropagation()
4888				});
4889				if (!i && g.has(".is-current")) {
4890					w = $(window).scrollTop();
4891					g.find(".is-current").click();
4892					$("html, body").scrollTop(w);
4893					e.blur()
4894				}
4895				if (i && v.has(".is-current").length > 0) {
4896					g.find(".is-current").addClass("is-active");
4897					y.text(g.find(".is-current").text())
4898				}
4899				v.data("is-setup", true);
4900				v.on("focusout", function(e) {
4901					setTimeout(function() {
4902						if (!v.has(document.activeElement).length && !v.is(document.activeElement)) {
4903							p(); 
4904						}
4905					}, 10); 
4906				});
4907			}
4908
4909			function q(A) {
4910				var z = $(A),
4911					w = (z.find(".select-item").length > 0) ? true : false;
4912				if (w) {
4913					r = z.find(".select-item").html();
4914					e.find(">span").html(r)
4915				} else {
4916					r = z.text();
4917					e.find(">span").text(r)
4918				}
4919				if (!i) {
4920					g.find("input").prop("checked", false);
4921					z.find("input").prop("checked", true).trigger("change")
4922				}
4923				k()
4924			}
4925
4926			function x() {
4927				v.data("is-open", false);
4928				e.attr("tabindex", 0);
4929				if (!i) {
4930					// 수정됨: a, button 존재 여부에 따라 tabindex 분기 처리
4931					h.each(function(z, B) {
4932						var $li = $(B);
4933						if ($li.find("a, button").length === 0) {
4934							$li.attr("tabindex", 0);
4935						}
4936					});
4937
4938					h.find("input[type=radio]").attr("tabindex", "-1").each(function(z, B) {
4939						var A = $(B),
4940							w, C;
4941						if (A.attr("id") && A.attr("id") !== "") {
4942							return
4943						}
4944						w = A.parent("label") || A.siblings("label");
4945						C = A.attr("name") + (z + 1);
4946						A.attr("id", C);
4947						if (w.length) {
4948							w.attr("for", C)
4949						}
4950					})
4951				}
4952				h.each(function(w, z) {
4953					$(z).data("index", w)
4954				})
4955			}
4956
4957			function j() {
4958				if (!v.attr("style") || v.attr("style").indexOf("width") == -1 || v.width() !== "100%") {
4959					var z = l.children().width() + 0,
4960						w = e.outerWidth() + 0;
4961					if (w < z) {
4962						v.width(z)
4963					}
4964				}
4965				g.css("visibility", "visible").hide()
4966			}
4967
4968			function o() {
4969				if (v.data("is-open")) {
4970					return
4971				}
4972				b();
4973				v.addClass("is-active").css("zIndex", 1000).data("is-open", true).attr("aria-expanded", true);
4974				g.show()
4975			}
4976
4977			function p() {
4978				g.hide();
4979				d.off("keyup.blockArrow");
4980				v.removeClass("is-active").css("zIndex", 1).data("is-open", false).attr("aria-expanded", false)
4981			}
4982
4983			function k() {
4984				p();
4985				e.focus()
4986			}
4987
4988			function n(w) {
4989				if (w.preventDefault) {
4990					w.preventDefault();
4991					w.stopPropagation()
4992				} else {
4993					w.returnValue = false
4994				}
4995			}
4996		});
4997		d.on("click", b);
4998
4999		function b() {
5000			c.removeClass("is-active").css("zIndex", "auto").data("is-open", false).attr("aria-expanded", false);
5001			a.hide()
5002		}
5003	}
5004});
5005// ë§µ
5006function initMap(c, h, i, l) {
5007    var c = (c) ? c : "map-canvas000",
5008        h = (h) ? h : 0,
5009        i = (i) ? i : 0;
5010    var k = [{
5011        stylers: []
5012    }, {
5013        featureType: "road",
5014        elementType: "geometry",
5015        stylers: [{
5016            saturation: 0
5017        }, {
5018            visibility: "simplified"
5019        }]
5020    }, {
5021        featureType: "road",
5022        elementType: "labels",
5023        stylers: [{
5024            visibility: "off"
5025        }]
5026    }];
5027    var j = new google.maps.StyledMapType(k, {
5028        name: "Styled Map"
5029    });
5030    var g = new google.maps.LatLng(h, i);
5031    var d = {
5032        zoom: 16,
5033        center: g,
5034        mapTypeControlOptions: {
5035            mapTypeIds: [google.maps.MapTypeId.ROADMAP, "map_style"]
5036        },
5037        restriction: {
5038            latLngBounds: {
5039                east: 131.21123750988733,
5040                south: 33.12651372124617,
5041                north: 38.658064296236525,
5042                west: 124.45464596903972
5043            },
5044            strictBounds: false
5045        },
5046    };
5047    var b = new google.maps.Map(document.getElementById(c), d);
5048    var e = l;
5049    var a = new google.maps.Marker({
5050        position: g,
5051        map: b,
5052        icon: e
5053    });
5054    b.mapTypes.set("map_style", j);
5055    b.setMapTypeId("map_style");
5056    google.maps.event.addListener(b, 'idle', () => {
5057        const iframes = document.querySelectorAll('.map-canvas iframe');
5058        for (let i = 0; i < iframes.length; i++) {
5059            iframes[i].title = "내용 없음";
5060        }
5061    });
5062}
5063// 스플릿텍스트
5064function SplitText(b, a) {
5065    this.$input = b;
5066    this.bunches = [];
5067    if (a) {
5068        this.o = a
5069    } else {
5070        this.o = {
5071            type: "words",
5072        }
5073    }
5074    this.dataText = (this.o.type == "chars") ? this.$input.text() : this.$input.html();
5075    this.dataText = $.trim(this.dataText);
5076    if (this.o.bunchClass != undefined) {
5077        this.bunchClass = this.o.bunchClass
5078    }
5079    this.init()
5080}
5081SplitText.prototype = {
5082    split: function() {
5083        var a = 0;
5084        if (this.o.type == "chars") {
5085            this.arrText = this.dataText.split("")
5086        } else {
5087            this.arrText = this.dataText.replace(/\t|\n/gi, "").split(" ")
5088        }
5089        return this.arrText
5090    },
5091    append: function() {
5092        var b = 0,
5093            a = "";
5094        for (; b < this.arrText.length; b++) {
5095            if (this.arrText[b] == " ") {
5096                this.arrText[b] = "&nbsp;"
5097            }
5098            if (this.arrText[b].indexOf("<br>") == 0) {
5099                a += "<br><span>" + this.arrText[b].replace("<br>", "") + "</span>"
5100            } else {
5101                a += "<span>" + this.arrText[b] + "</span>"
5102            }
5103            if (this.o.type == "words") {
5104                a += " "
5105            }
5106        }
5107        this.$input.text("");
5108        $(a).appendTo(this.$input)
5109    },
5110    init: function() {
5111        var a = [];
5112        this.split();
5113        this.append();
5114        this.$input.find(">span").addClass(this.bunchClass).each(function(b, c) {
5115            a[b] = c
5116        });
5117        return this.bunches = a
5118    }
5119};
5120
5121
5122document.addEventListener("DOMContentLoaded", function () {
5123	/* url 체크로 header 메뉴 active 표시 */
5124    const currentPath = window.location.pathname;
5125	if(currentPath === '/' || currentPath.includes('/int/en')) return;
5126	let $this;
5127    if (currentPath.includes('/category')) { //제품&리스트
5128        const link = document.querySelector('#header .top_category > ul >li > a[href*="/category"]');
5129		link.classList.add('active');
5130		if(currentPath.includes('/26/')){
5131			// 1. 스킨케어 (26)
5132			const moLinks = document.querySelectorAll('#aside.w-cafe24 #slide_add_category a[href*="/26/"]');
5133			if(moLinks) {
5134				moLinks.forEach(function(moLink){
5135					moLink.classList.add('is-current');
5136				});
5137			}
5138		} else if(currentPath.includes('/27/')){
5139			// 2. 메이크업 (27)
5140			const moLink = document.querySelector('#aside.w-cafe24 #slide_add_category a[href*="/27/"]');
5141			if(moLink) moLink.classList.add('is-current');
5142		} else if(currentPath.includes('/28/')){
5143			// 3. 남성 (28)
5144			const moLink = document.querySelector('#aside.w-cafe24 #slide_add_category a[href*="/28/"]');
5145			if(moLink) moLink.classList.add('is-current');
5146		}
5147		$this = $('#aside #slide_add_category > li > a[href*="/category/"]');
5148    } else if (currentPath.includes('/first-care-activating')) { //윤조
5149		const link = document.querySelector('#header .top_category > ul >li > a[href*="first-care-activating"]');
5150		if (link) link.classList.add('active');
5151    } else if (currentPath.includes('/concentrated-ginseng-rejuvenating')) { //자음생
5152		const link = document.querySelector('#header .top_category > ul >li > a[href*="concentrated-ginseng-rejuvenating"]');
5153		if (link) link.classList.add('active');
5154    } else if (currentPath.includes('/gift')) { //기프트
5155		const link = document.querySelector('#header .top_category > ul >li > a[href*="/gift"]');
5156		if (link) link.classList.add('active');
5157		$this = $('#aside #slide_add_category > li > a[href*="/gift/"]');
5158    } else if (currentPath.includes('/best')) { //베스트셀러
5159		const link = document.querySelector('#header .top_category > ul >li > a[href*="/best"]');
5160		if (link) link.classList.add('active');
5161    } else if (currentPath.includes('/spa')) { //스파
5162		const link = document.querySelector('#header .top_category > ul >li > a[href*="/spa"]');
5163		if (link) link.classList.add('active');
5164		$this = $('#aside #slide_add_category > li > a[href*="/spa/"]');
5165    } else if (currentPath.includes('/flagship')) { //플래그십스토어
5166		const link = document.querySelector('#header .top_category > ul >li > a[href*="/flagship"]');
5167		if (link) link.classList.add('active');
5168		$this = $('#aside #slide_add_category > li > a[href*="/flagship/"]');
5169    } else if (currentPath.includes('/about-sulwhasoo')) { //ABOUT 설화수
5170		const link = document.querySelector('#header .top_category > ul >li > a[href*="/about-sulwhasoo"]');
5171		if (link) link.classList.add('active');
5172		if(currentPath.includes('/culture/')){
5173			const moLink = document.querySelector(`#aside.w-cafe24 #slide_add_category a[href*="/culture/"]`);	
5174			moLink.classList.add('is-current');
5175		} else if(currentPath.includes('/culture-project/')){
5176			const moLink = document.querySelector(`#aside.w-cafe24 #slide_add_category a[href*="/culture-project/"]`);		
5177			moLink.classList.add('is-current');
5178		} else if(currentPath.includes('/brand-news/')){
5179			const moLink = document.querySelector(`#aside.w-cafe24 #slide_add_category a[href*="/brand-news/"]`);		
5180			moLink.classList.add('is-current');
5181		} else if(currentPath.includes('/classic-luxury-set/')){
5182			const moLink = document.querySelector(`#aside.w-cafe24 #slide_add_category a[href*="/classic-luxury-set/"]`);		
5183			moLink.classList.add('is-current');
5184		} else {
5185			const moLinks = document.querySelectorAll(`#aside.w-cafe24 #slide_add_category a[href*="${currentPath}"]`);
5186			if(moLinks) {
5187				moLinks.forEach(function(moLink){
5188					moLink.classList.add('is-current');
5189				});
5190			}
5191		}
5192		$this = $('#aside #slide_add_category > li > a[href*="/about-sulwhasoo/"]');
5193    }
5194	if(!(currentPath.includes('/about-sulwhasoo')) && !(currentPath.includes('/category'))){
5195		const moLinks = document.querySelectorAll(`#aside.w-cafe24 #slide_add_category a[href*="${currentPath}"]`);
5196		if(moLinks) {
5197			moLinks.forEach(function(moLink){
5198				moLink.classList.add('is-current');
5199			});
5200		}
5201	}
5202	/* 모바일 사이드바 열림 */
5203	if($this) {
5204		const $parentLi = $this.parent('li');
5205		const $nextUl = $this.next('ul');
5206
5207		// 현재 클릭한 메뉴 열기
5208		$parentLi.addClass('selected');
5209		$nextUl.slideDown(250);
5210
5211		// 클릭한 게 1depth이고, 열리는 게 sub_cate01일 때만 작동
5212		if ($nextUl.hasClass('sub_cate01')) {
5213			setTimeout(function() {
5214				// sub_cate01 내부의 모든 sub_cate02를 찾아 슬라이드 다운
5215				const $thirdDepth = $nextUl.find('ul.sub_cate02');
5216				
5217				$thirdDepth.slideDown(250);
5218				$thirdDepth.parent('li').addClass('selected'); // 시각적 활성화
5219			}, 300);
5220		}
5221	}
5222
5223	/* header 메뉴 tabindex와 title 후처리 */
5224	$('.top_category a').each(function() {
5225        var $this = $(this);
5226        var linkText = $this.text(); // a 태그 안의 텍스트 가져오기 (공백 제거)
5227        // 속성 부여
5228        $this.attr({
5229            'tabindex': '0',
5230        });
5231    });
5232});
5233/* 웹접근성 (포커스 관련) */
5234document.addEventListener('keydown', function(e) {
5235	/* 검색창 */
5236    // 1. body에 searchExpand 클래스가 있을 때만 작동
5237    if (!document.body.classList.contains('searchExpand')) return;
5238
5239    const isTab = (e.key === 'Tab' || e.keyCode === 9);
5240    if (!isTab) return;
5241
5242    const shiftKey = e.shiftKey;
5243    const activeElem = document.activeElement;
5244    
5245    // 요소 선택
5246    const miscClose = document.querySelector('.misc-close-search');
5247    const keywordInput = document.querySelector('#keyword');
5248    const schClose = document.querySelector('.sch-close');
5249
5250    // 2. .misc-close-search에서 Tab을 누르면 #keyword로 이동
5251    if (activeElem === miscClose && !shiftKey) {
5252        if (keywordInput) {
5253            e.preventDefault();
5254            keywordInput.focus();
5255        }
5256    }
5257
5258    // 3. #keyword에서 Shift + Tab을 누르면 .misc-close-search로 이동
5259    if (activeElem === keywordInput && shiftKey) {
5260        if (miscClose) {
5261            e.preventDefault();
5262            miscClose.focus();
5263        }
5264    }
5265
5266    // 4. .sch-close에서 Tab을 누르면 해당 버튼을 클릭(닫기 실행)
5267    if (activeElem === schClose && !shiftKey) {
5268        e.preventDefault();
5269        schClose.click();
5270		document.querySelector('.top_category > ul > li > a').focus();
5271    }
5272});
5273
5274// ESC키 모달 닫기
5275window.addEventListener('keydown', function(event) {
5276  if (event.key === 'Escape') {
5277    // 검색창
5278    if (document.body.classList.contains('searchExpand')) {
5279      const btnClose = document.querySelector('.wrap-search-box .btnClose');
5280      if (btnClose) {
5281        btnClose.click();
5282      }
5283    }
5284  }
5285});
5286
5287document.addEventListener('DOMContentLoaded', function() {
5288  // 프레임을 찾는 함수
5289  function fixIframeAccessibility() {
5290    const $log = $('#log_realtime');
5291    if ($log.length) {
5292      $log.attr({
5293        'title': '데이터 수집 도구',
5294        'aria-hidden': 'true',
5295        'tabindex': '-1',
5296		'lang': 'ko'
5297      });
5298      return true;
5299    }
5300    return false;
5301  }
5302  function fixIframeAccessibility2() {
5303	const $session = $('iframe[src*="cafe24data.com"]');
5304	if ($session.length) {
5305      $session.attr({
5306        'title': '데이터 처리용 프레임',
5307		'aria-hidden': 'true',
5308		'tabindex': '-1',
5309			'lang': 'ko'
5310      });
5311      return true;
5312    }
5313    return false;
5314  }
5315
5316  if (!fixIframeAccessibility()) {
5317    setTimeout(fixIframeAccessibility, 1000);
5318  }
5319  if (!fixIframeAccessibility2()) {
5320    setTimeout(fixIframeAccessibility2, 1000);
5321  }
5322});
5323/* footer 메뉴 위치 재배치 */
5324document.addEventListener("DOMContentLoaded", function () {
5325	$('#footer .footer-links-login').insertBefore('.footer-last-li');
5326});
5327
5328//document.addEventListener("DOMContentLoaded", function () {
5329//	document.addEventListener('focusin', function() {
5330//	  console.log('현재 포커스:', document.activeElement);
5331//	});
5332//});
5333// $(document).ready(function() {
5334// //    let currentUrl = window.location.href;
5335
5336//     // 로그인 페이지용 IP와 일반 페이지용 IP 배열 분리
5337//     let generalIpArr = ['121.140.140.212', '121.140.140.210', '165.225.228.112', '165.225.228.121', '165.225.228.88'];
5338//     let allowedPrefix = '165.225.228';
5339
5340//     $.ajax({
5341//         url: 'https://app.weaverloft.com/breadymall/fo/ip',
5342//         type: 'POST',
5343//         dataType: 'json',
5344//         success: function(data) {
5345
5346// 		console.log(data);
5347
5348// 			if (!generalIpArr.includes(data) && !data.startsWith(allowedPrefix)) {
5349// 				window.stop();
5350// 				document.body.innerHTML = '접근이 거부되었습니다. ' + data;
5351
5352// 				return;					
5353// 			}
5354//         },
5355//         error: function(jqXHR, textStatus, errorThrown) {
5356//             console.log(textStatus, errorThrown);
5357//         }
5358//     });
5359// });
5360
5361/**
5362 * Webcomponent의 생명주기와 비슷하게 섹션을 컨트롤 할 수 있습니다.
5363 */
5364(function () {
5365  var base = {
5366    version: '1.0.0',
5367    component: {},
5368    ready: false,
5369    register: register,
5370    connect: connect,
5371    change: change,
5372    disconnect: disconnect,
5373  }
5374
5375  try {
5376    polyfill();
5377    init();
5378  } catch (e) {
5379
5380  }
5381
5382  function init() {
5383    try {
5384      _init();
5385    } catch (e) {
5386      console.error(e);
5387    }
5388  }
5389
5390  function _run(name, section, fn, type) {
5391    var handlers = this.component[name];
5392    if (handlers) {
5393      for (var j = 0; j < handlers.length; j++) {
5394        if (handlers[j][fn]) {
5395          handlers[j][fn](section, type);
5396        }
5397      }
5398    }
5399  }
5400
5401  function connect(name, section, type) {
5402    return _run.call(this, name, section, 'connect', type)
5403  }
5404
5405  function change(name, section, type) {
5406    return _run.call(this, name, section, 'change', type)
5407  }
5408
5409  function disconnect(name, section, type) {
5410    return _run.call(this, name, section, 'disconnect', type)
5411  }
5412
5413  /**
5414   * 섹션의 라이프사이클 관리 기능을 등록합니다.
5415   * @param  {string} name 섹션 이름
5416   * @param  {function | object} init 초기화시 호출 함수 또는 함수목록
5417   * @returns void
5418   */
5419  function register(name, init) {
5420    var handler = _register.call(this, name, (init.init || init)(), arguments);
5421    if (EZST.ready) {
5422      var sections = document.querySelectorAll('[data-ez-module="' + name + '"]');
5423      for (var i = 0; i < sections.length; i++) {
5424        if (handler.init) {
5425          handler.init(sections[i]);
5426        }
5427        if (handler.connect) {
5428          handler.connect(sections[i]);
5429        }
5430      }
5431    }
5432  }
5433
5434  function _init() {
5435    window.addEventListener('DOMContentLoaded', function (ev) {
5436      EZST.ready = true;
5437      for (var k in EZST.component) {
5438        var sections = document.querySelectorAll('[data-ez-module="' + k + '"]');
5439        for (var i = 0; i < sections.length; i++) {
5440          var handlers = EZST.component[k];
5441          for (var j = 0; j < handlers.length; j++) {
5442            if (handlers[j].init) {
5443              handlers[j].init(sections[i]);
5444            }
5445            if (handlers[j].connect) {
5446              handlers[j].connect(sections[i]);
5447            }
5448          }
5449        }
5450      }
5451    });
5452
5453    window.EZST = Object.assign(window.EZST || {}, base, {
5454      status: ('EZST' in window) ? 1 : 0,
5455    });
5456
5457    _prepare();
5458    _setViewType();
5459    _cleanup()
5460  }
5461
5462  function _setViewType() {
5463    try {
5464      var mq = window.matchMedia("(max-width: 1024px)");
5465      mq.addEventListener('change', function (ev) {
5466        _changeViewType(ev.target);
5467
5468      }, false);
5469      _changeViewType(mq);
5470    } catch (e) {
5471
5472    }
5473  }
5474  function _changeViewType(mq) {
5475    document.documentElement.classList.toggle('ez-view-type-mobile', mq.matches);
5476  }
5477
5478  function _cleanup() {
5479    window.addEventListener('DOMContentLoaded', function (ev) {
5480      var props = document.documentElement.querySelectorAll('ez-prop,script[type="text/ez-prop"]');
5481      for (var i = 0; i < props.length; i++) {
5482        props[i].parentNode && props[i].parentNode.removeChild(props[i]);
5483      }
5484    });
5485  }
5486
5487  function _prepare() {
5488    if (EZST.q && EZST.q.length) {
5489      for (var i = 0; i < EZST.q.length; i++) {
5490        _register.apply(EZST, EZST.q[i]);
5491      }
5492      delete EZST.q;
5493    }
5494  }
5495
5496  function _register(name, init, raw) {
5497    var handler = {
5498      // init: function (section) { },
5499      // disconnect: function (section) { },
5500      // changed: function (section) { },
5501      // connect: function (section) { },
5502    };
5503    Object.assign(handler, (init && init.constructor === Object) ? init : (raw[1].constructor === Object) ? raw[1] : {});
5504    if (!this.component[name]) {
5505      this.component[name] = [];
5506    }
5507    this.component[name].push(handler);
5508    return handler;
5509  }
5510
5511  function polyfill() {
5512    if (typeof Object.assign != "function") {
5513      Object.defineProperty(Object, "assign", {
5514        value: function assign(target, varArgs) {
5515          "use strict";
5516          if (target == null) {
5517            throw new TypeError("Cannot convert undefined or null to object");
5518          }
5519          var to = Object(target);
5520          for (var index = 1; index < arguments.length; index++) {
5521            var nextSource = arguments[index];
5522            if (nextSource != null) {
5523              for (var nextKey in nextSource) {
5524                if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
5525                  to[nextKey] = nextSource[nextKey];
5526                }
5527              }
5528            }
5529          }
5530          return to;
5531        },
5532        writable: true,
5533        configurable: true
5534      });
5535    }
5536  }
5537})();
5538
5539// 스크립트 생성 일시 2026 / 01 / 09 | 작성자 : LDG
5540// 스크립트 수정 일시 2026 / 03 / 09 | 작성자 : JMH (Footer 합침, 경로 주석 추가)
5541// 스크립트 수정 일시 2026 / 03 / 17 | 작성자 : JMH (1/2/3depth 분리, 2depth 부모 포함)
5542// GNB + Footer 삽입부
5543// layout/basic/layout.html 파일에 지정
5544window.addEventListener('load', function() {
5545    // ============================
5546    // PC GNB 1depth
5547    // ============================
5548    const gnb1depth = document.querySelectorAll('.header .top_category > ul > li');
5549    gnb1depth.forEach(item => {
5550        const link = item.querySelector(':scope > a');
5551        if (link && !link.hasAttribute('ap-click-area')) {
5552            const txt = link.textContent.trim();
5553            link.setAttribute('ap-click-area', 'GNB');
5554            link.setAttribute('ap-click-name', 'Click GNB');
5555            link.setAttribute('ap-click-data', txt);
5556        }
5557    });
5558
5559    // PC GNB 2depth
5560    const gnb2depth = document.querySelectorAll('.header .top_category > ul > li > ul.sub_cate01 > li');
5561    gnb2depth.forEach(item => {
5562        const link = item.querySelector(':scope > a');
5563        if (link) {
5564            const parentLi = item.parentElement.parentElement;
5565            const parentLink = parentLi.querySelector(':scope > a');
5566            const parentTxt = parentLink ? parentLink.textContent.trim() : '';
5567            const txt = link.textContent.trim();
5568
5569            link.setAttribute('ap-click-area', 'GNB');
5570            link.setAttribute('ap-click-name', 'Click GNB');
5571            link.setAttribute('ap-click-data', parentTxt + '>' + txt);
5572        }
5573    });
5574
5575    // PC GNB 3depth
5576    const gnb3depth = document.querySelectorAll('.header .top_category > ul > li > ul.sub_cate01 > li > ul.sub_cate02 > li');
5577    gnb3depth.forEach(item => {
5578        const link = item.querySelector(':scope > a');
5579        if (link) {
5580            // 2depth (부모의 부모)
5581            const depth2Li = item.parentElement.parentElement;
5582            const depth2Link = depth2Li.querySelector(':scope > a');
5583            const depth2Txt = depth2Link ? depth2Link.textContent.trim() : '';
5584
5585            // 1depth (2depth의 부모의 부모)
5586            const depth1Li = depth2Li.parentElement.parentElement;
5587            const depth1Link = depth1Li.querySelector(':scope > a');
5588            const depth1Txt = depth1Link ? depth1Link.textContent.trim() : '';
5589
5590            const txt = link.textContent.trim();
5591
5592            link.setAttribute('ap-click-area', 'GNB');
5593            link.setAttribute('ap-click-name', 'Click GNB');
5594            link.setAttribute('ap-click-data', depth1Txt + '>' + depth2Txt + '>' + txt);
5595        }
5596    });
5597
5598    // ============================
5599    // MOBILE GNB 1depth
5600    // ============================
5601    const mobileGnb1depth = document.querySelectorAll('#aside #slide_add_category > li');
5602    mobileGnb1depth.forEach(item => {
5603        const link = item.querySelector(':scope > a');
5604        if (link && !link.hasAttribute('ap-click-area')) {
5605            const txt = link.textContent.trim();
5606            link.setAttribute('ap-click-area', 'GNB');
5607            link.setAttribute('ap-click-name', 'Click GNB');
5608            link.setAttribute('ap-click-data', txt);
5609        }
5610    });
5611
5612    // MOBILE GNB 2depth
5613    const mobileGnb2depth = document.querySelectorAll('#aside #slide_add_category > li > ul.sub_cate01 > li');
5614    mobileGnb2depth.forEach(item => {
5615        const link = item.querySelector(':scope > a');
5616        if (link) {
5617            const parentLi = item.closest('#slide_add_category > li');
5618            const parentLink = parentLi ? parentLi.querySelector(':scope > a') : null;
5619            const parentTxt = parentLink ? parentLink.textContent.trim() : '';
5620            const txt = link.textContent.trim();
5621
5622            link.setAttribute('ap-click-area', 'GNB');
5623            link.setAttribute('ap-click-name', 'Click GNB');
5624            link.setAttribute('ap-click-data', parentTxt + '>' + txt);
5625        }
5626    });
5627
5628    // MOBILE GNB 3depth
5629    const mobileGnb3depth = document.querySelectorAll('#aside #slide_add_category > li > ul.sub_cate01 > li > ul.sub_cate02 > li');
5630    mobileGnb3depth.forEach(item => {
5631        const link = item.querySelector(':scope > a');
5632        if (link) {
5633            const depth2Li = item.parentElement.parentElement;
5634            const depth2Link = depth2Li.querySelector(':scope > a');
5635            const depth2Txt = depth2Link ? depth2Link.textContent.trim() : '';
5636
5637            const depth1Li = depth2Li.closest('#slide_add_category > li');
5638            const depth1Link = depth1Li ? depth1Li.querySelector(':scope > a') : null;
5639            const depth1Txt = depth1Link ? depth1Link.textContent.trim() : '';
5640
5641            const txt = link.textContent.trim();
5642
5643            link.setAttribute('ap-click-area', 'GNB');
5644            link.setAttribute('ap-click-name', 'Click GNB');
5645            link.setAttribute('ap-click-data', depth1Txt + '>' + depth2Txt + '>' + txt);
5646        }
5647    });
5648
5649    // ============================
5650    // Footer
5651    // ============================
5652    const footerLinks = document.querySelectorAll('#footer a, .footer a');
5653    footerLinks.forEach(link => {
5654        if (!link.hasAttribute('ap-click-area')) {
5655            const text = link.textContent.trim();
5656
5657            link.setAttribute('ap-click-area', 'Footer');
5658            link.setAttribute('ap-click-name', 'Click - Footer');
5659            link.setAttribute('ap-click-data', text);
5660        }
5661    });
5662
5663    // Footer SNS 링크
5664    const snsLinks = document.querySelectorAll('#footer .sns > a, .footer .sns > a, #footer .social > a, .footer .social > a, #footer [class*="sns"] > a, .footer [class*="sns"] > a');
5665    snsLinks.forEach(link => {
5666        const href = link.getAttribute('href') || '';
5667        let snsName = '';
5668
5669        if (href.includes('instagram')) snsName = 'Instagram';
5670        else if (href.includes('facebook')) snsName = 'Facebook';
5671        else if (href.includes('youtube')) snsName = 'YouTube';
5672        else if (href.includes('twitter') || href.includes('x.com')) snsName = 'X';
5673        else if (href.includes('tiktok')) snsName = 'TikTok';
5674        else if (href.includes('kakao')) snsName = 'Kakao';
5675        else if (href.includes('naver')) snsName = 'Naver';
5676        else snsName = link.textContent.trim() || 'SNS';
5677
5678        link.setAttribute('ap-click-area', 'Footer');
5679        link.setAttribute('ap-click-name', 'Click - Footer SNS');
5680        link.setAttribute('ap-click-data', snsName);
5681    });
5682    // ===== AS-IS 매핑 자동 부착 (시작) =====
5683    // AS-IS 사이트(www.sulwhasoo.com) ap-click 패턴을 href/text 매칭으로 자동 부착
5684    // HTML 구조 변경 없음 - 속성만 setAttribute로 추가
5685    const AS_IS_BY_HREF = {
5686    "#main": {
5687        "area": "Header",
5688        "name": "Click - #main",
5689        "data": "#main"
5690    },
5691    "/kr/ko/index.html": {
5692        "area": "Header",
5693        "name": "Click - Header",
5694        "data": "logo"
5695    },
5696    "/": {
5697        "area": "Header",
5698        "name": "Select Country",
5699        "data": "int/en"
5700    },
5701    "/index.html": {
5702        "area": "Header",
5703        "name": "Select Country",
5704        "data": "cn/zh"
5705    },
5706    "/tc_s/": {
5707        "area": "Header",
5708        "name": "Select Country",
5709        "data": "hk/zh"
5710    },
5711    "/hk/en": {
5712        "area": "Header",
5713        "name": "Select Country",
5714        "data": "hk/en"
5715    },
5716    "/en": {
5717        "area": "Header",
5718        "name": "Select Country",
5719        "data": "th/en"
5720    },
5721    "/tw/zh": {
5722        "area": "Header",
5723        "name": "Select Country",
5724        "data": "tw/zh"
5725    },
5726    "/fr/fr": {
5727        "area": "Header",
5728        "name": "Select Country",
5729        "data": "fr/fr"
5730    },
5731    "/kr/ko/misc/store/store.html": {
5732        "area": "Header",
5733        "name": "Click - Find a Store",
5734        "data": "매장찾기"
5735    },
5736    "/kr/ko/display/brand/detail?brandSn=18": {
5737        "area": "Header",
5738        "name": "Click - Mall",
5739        "data": "구매하기"
5740    },
5741    "#top-search": {
5742        "area": "Header",
5743        "name": "Click - Search",
5744        "data": "Search"
5745    },
5746    "#open-search": {
5747        "area": "Header",
5748        "name": "Click - Search Close",
5749        "data": "Search Close"
5750    },
5751    "/kr/ko/about-sulwhasoo/brand-news/archive/perfecting-cushion-limited-edition.html": {
5752        "area": "Main",
5753        "name": "Click - Main Visual",
5754        "data": "Main Visual_퍼펙팅 쿠션 LTD"
5755    },
5756    "/kr/ko/first-care-activating/first-care-activating-serum-vi.html": {
5757        "area": "Main",
5758        "name": "Click - Main Visual",
5759        "data": "Main Visual_윤조에센스 6세대 커버페이지"
5760    },
5761    "/kr/ko/gift/giftselection/gift-selection.html": {
5762        "area": "Main",
5763        "name": "Click - Main Visual",
5764        "data": "Main Visual_설화수 기프트 - 설화수의 특별한 선물"
5765    },
5766    "/kr/ko/products/first-care-activating-serum-mist.html": {
5767        "area": "Main",
5768        "name": "Click - Main Visual",
5769        "data": "Main Visual_윤조에센스 미스트"
5770    },
5771    "/kr/ko/concentrated-ginseng-rejuvenating/introduction.html": {
5772        "area": "Main",
5773        "name": "Click - Main Visual",
5774        "data": "Main Visual_자음생크림 (2025 AD)"
5775    },
5776    "/kr/ko/display/event_detail?planDisplaySn=14328": {
5777        "area": "Main",
5778        "name": "Click - Main Visual",
5779        "data": "Main Visual_봄처럼 반가운 설화수의 선물 (4/20~5/17)"
5780    },
5781    "/kr/ko/products/the-ultimate-s-cream-rich.html": {
5782        "area": "Main",
5783        "name": "Click - Recommendation",
5784        "data": "Recommendation_진설크림 리치"
5785    },
5786    "/kr/ko/products/concentrated-ginseng-rejuvenating-ampoule.html": {
5787        "area": "Main",
5788        "name": "Click - Recommendation",
5789        "data": "Recommendation_자음생앰플"
5790    },
5791    "/kr/ko/products/white-ginseng-radiance-refining-mask.html": {
5792        "area": "Main",
5793        "name": "Click - Recommendation",
5794        "data": "Recommendation_백삼팩"
5795    },
5796    "/kr/ko/products/perfecting-lip-color.html": {
5797        "area": "Main",
5798        "name": "Click - Recommendation",
5799        "data": "Recommendation_퍼펙팅 립컬러"
5800    },
5801    "/kr/ko/products/perfecting-powder-foundation.html": {
5802        "area": "Main",
5803        "name": "Click - Recommendation",
5804        "data": "Recommendation_퍼펙팅 트윈케이크"
5805    },
5806    "/kr/ko/products/gentle-cleansing-oil.html": {
5807        "area": "Main",
5808        "name": "Click - Recommendation",
5809        "data": "Recommendation_순행클렌징오일"
5810    },
5811    "/kr/ko/products/concentrated-ginseng-rejuvenating-serum.html": {
5812        "area": "Main",
5813        "name": "Click - Curation",
5814        "data": "Curation_Product_자음생캡슐세럼"
5815    },
5816    "/kr/ko/products/concentrated-ginseng-rejuvenating-cream-rich.html": {
5817        "area": "Main",
5818        "name": "Click - Curation",
5819        "data": "Curation_Product_자음생크림 리치"
5820    },
5821    "/kr/ko/flagship/bukchon/index.html": {
5822        "area": "Main",
5823        "name": "Click - Banner",
5824        "data": "Banner_설화수 북촌 플래그십 스토어"
5825    },
5826    "/kr/ko/flagship/dosan/index.html": {
5827        "area": "Main",
5828        "name": "Click - Banner",
5829        "data": "Banner_설화수 도산 플래그십 스토어"
5830    },
5831    "' + data[i].popupButtonUrl + '": {
5832        "area": "Main Popup",
5833        "name": "Click - Main Popup Detail Link",
5834        "data": "' + data[i].popupGTMCode + '"
5835    },
5836    "/kr/ko/products/first-care-activating-serum-vi.html": {
5837        "area": "Best-Seller",
5838        "name": "Click - VIEW DETAILS",
5839        "data": "First Care Activating Serum VI"
5840    },
5841    "/kr/ko/product/detail?onlineProdSn=62172&amp;utm_source=sulwhasoo.com&amp;utm_medium=mall&amp;utm_campaign=button_click&amp;onlineProdCode=111170002143": {
5842        "area": "Best-Seller",
5843        "name": "Click - VIEW DETAILS",
5844        "data": "Concentrated Ginseng Rejuvenating Ampoule"
5845    },
5846    "/kr/ko/product/detail?onlineProdSn=56900&amp;utm_source=sulwhasoo.com&amp;utm_medium=mall&amp;utm_campaign=button_click&amp;onlineProdCode=111170001579": {
5847        "area": "Best-Seller",
5848        "name": "Click - VIEW DETAILS",
5849        "data": "Overnight Vitalizing Mask"
5850    },
5851    "/kr/ko/product/detail?onlineProdSn=56898&amp;onlineProdCode=111170001577": {
5852        "area": "Best-Seller",
5853        "name": "Click - VIEW DETAILS",
5854        "data": "Gentle Cleansing Oil"
5855    },
5856    "/kr/ko/product/detail?onlineProdSn=62174&amp;onlineProdCode=111170002144": {
5857        "area": "Best-Seller",
5858        "name": "Click - VIEW DETAILS",
5859        "data": "Concentrated Ginseng Rejuvenating Serum"
5860    },
5861    "/kr/ko/product/detail?onlineProdSn=56947&amp;onlineProdCode=111170101593": {
5862        "area": "Best-Seller",
5863        "name": "Click - VIEW DETAILS",
5864        "data": "Men Skincare Duo Set"
5865    },
5866    "/kr/ko/product/detail?onlineProdSn=60647&amp;onlineProdCode=111170001997": {
5867        "area": "Best-Seller",
5868        "name": "Click - VIEW DETAILS",
5869        "data": "UV Daily Essential Sunscreen"
5870    }
5871};
5872    const AS_IS_BY_TEXT = {
5873    "본문 바로가기": {
5874        "area": "Header",
5875        "name": "Click - #main",
5876        "data": "#main"
5877    },
5878    "한국/한국어": {
5879        "area": "Header",
5880        "name": "Select Country",
5881        "data": "kr/ko"
5882    },
5883    "International/English": {
5884        "area": "Header",
5885        "name": "Select Country",
5886        "data": "int/en"
5887    },
5888    "中文": {
5889        "area": "Header",
5890        "name": "Select Country",
5891        "data": "cn/zh"
5892    },
5893    "繁體中文": {
5894        "area": "Header",
5895        "name": "Select Country",
5896        "data": "hk/zh"
5897    },
5898    "Hong Kong(China)/English": {
5899        "area": "Header",
5900        "name": "Select Country",
5901        "data": "hk/en"
5902    },
5903    "Singapore/English": {
5904        "area": "Header",
5905        "name": "Select Country",
5906        "data": "sg/en"
5907    },
5908    "Malaysia/English": {
5909        "area": "Header",
5910        "name": "Select Country",
5911        "data": "my/en"
5912    },
5913    "Việt Nam/Tiếng Việt": {
5914        "area": "Header",
5915        "name": "Select Country",
5916        "data": "vn/vi"
5917    },
5918    "Vietnam/English": {
5919        "area": "Header",
5920        "name": "Select Country",
5921        "data": "vn/en"
5922    },
5923    "Indonesia/Bahasa Indonesia": {
5924        "area": "Header",
5925        "name": "Select Country",
5926        "data": "id/id"
5927    },
5928    "ประเทศไทย/ไทย": {
5929        "area": "Header",
5930        "name": "Select Country",
5931        "data": "th/th"
5932    },
5933    "Thailand/English": {
5934        "area": "Header",
5935        "name": "Select Country",
5936        "data": "th/en"
5937    },
5938    "台灣/繁體中文": {
5939        "area": "Header",
5940        "name": "Select Country",
5941        "data": "tw/zh"
5942    },
5943    "USA/English": {
5944        "area": "Header",
5945        "name": "Select Country",
5946        "data": "us/en"
5947    },
5948    "FRANCE/FRANCAIS": {
5949        "area": "Header",
5950        "name": "Select Country",
5951        "data": "fr/fr"
5952    },
5953    "매장찾기": {
5954        "area": "Header",
5955        "name": "Click - Find a Store",
5956        "data": "매장찾기"
5957    },
5958    "구매하기": {
5959        "area": "Header",
5960        "name": "Click - Mall",
5961        "data": "구매하기"
5962    },
5963    "' + data[i].popupButtonName + '": {
5964        "area": "Main Popup",
5965        "name": "Click - Main Popup Detail Link",
5966        "data": "' + data[i].popupGTMCode + '"
5967    }
5968};
5969    
5970    function normHref(h) {
5971        if (!h) return '';
5972        return h.replace(/^https?:\/\/[^\/]+/, '').trim();
5973    }
5974    
5975    // 모든 정적 a/button 순회 (이미 ap-click 있으면 보존)
5976    document.querySelectorAll('a[href], button').forEach(function(el) {
5977        if (el.hasAttribute('ap-click-area')) return;
5978        const href = el.getAttribute('href') || '';
5979        const text = (el.textContent || '').trim();
5980        let entry = AS_IS_BY_HREF[normHref(href)] || AS_IS_BY_HREF[href] || AS_IS_BY_TEXT[text];
5981        if (!entry) return;
5982        if (entry.area) el.setAttribute('ap-click-area', entry.area);
5983        if (entry.name) el.setAttribute('ap-click-name', entry.name);
5984        if (entry.data) el.setAttribute('ap-click-data', entry.data);
5985    });
5986    // ===== AS-IS 매핑 자동 부착 (끝) =====
5987
5988    // ===== 디버그: GNB/Footer/AS-IS 부착 결과 =====
5989    setTimeout(function() {
5990        var apClicks = document.querySelectorAll('[ap-click-area]');
5991        // console.log('[GA GNB/Footer] 전체 ap-click 부착 요소:', apClicks.length);
5992        var byName = {};
5993        apClicks.forEach(function(el) {
5994            var n = el.getAttribute('ap-click-name') || '(no name)';
5995            byName[n] = (byName[n] || 0) + 1;
5996        });
5997        // console.log('[GA GNB/Footer] name별 분포:', byName);
5998    }, 800);
5999
6000});
6001
6002// ===== 디버그: 클릭 이벤트 추적 =====
6003window.addEventListener('load', function() {
6004    document.addEventListener('click', function(e) {
6005        var target = e.target.closest('[ap-click-area]');
6006        if (!target) return;
6007        var info = {
6008            area: target.getAttribute('ap-click-area'),
6009            name: target.getAttribute('ap-click-name'),
6010            data: target.getAttribute('ap-click-data'),
6011            href: target.getAttribute('href'),
6012            text: (target.textContent || '').trim().substring(0, 50)
6013        };
6014        // console.log('[CLICK]', info);
6015    }, true);
6016});
6017
6018// ===== 키워드 검색 추적 (모든 페이지) =====
6019// 인기검색어/추천/배너 키워드 클릭 시 sessionStorage 마커 셋팅
6020// → 검색 페이지 진입 시 w.ga_search.js가 마커 확인하여 'Keyword Search'로 판별
6021window.addEventListener('load', function() {
6022    var KEYWORD_SELECTORS = [
6023        '.keyword-list a',
6024        '.keyword-wrap a',
6025        '.popular-keyword a',
6026        '[class*="popular-keyword"] a',
6027        '[class*="hot-keyword"] a',
6028        '.recommend-keyword a',
6029        '.recom-keyword a',
6030        '.main-popup a[href*="search.html"]',
6031        '.hot_keyword a',
6032        '[ap-click-name*="Popular Keyword"]',
6033        '[ap-click-name*="Hot Keyword"]',
6034        '[ap-click-name*="Banner"]'
6035    ];
6036    document.querySelectorAll(KEYWORD_SELECTORS.join(', ')).forEac
6036h(function(link) {
6037        var href = link.getAttribute('href') || '';
6038        // search.html로 가는 링크만 (또는 keyword 파라미터 포함)
6039        if (href.indexOf('search.html') > -1 || href.indexOf('keyword=') > -1) {
6040            link.addEventListener('click', function() {
6041                sessionStorage.setItem('ga_keyword_search', '1');
6042                // console.log('[KEYWORD_CLICK] 키워드 검색 마커 셋팅:', (link.textContent || '').trim());
6043            });
6044        }
6045    });
6046});
6047
6048// ===== 해시태그 검색 추적 (모든 페이지) =====
6049// PDP/메인의 hashtag 클릭 시 sessionStorage 마커 셋팅
6050// → 검색 페이지에서 'Hashtag Search'로 판별
6051window.addEventListener('load', function() {
6052    var HASHTAG_SELECTORS = [
6053        '.pdp__hashtag',
6054        '.pdp__hashtags a',
6055        '.f-hashtag a',
6056        '.f-hashtag',
6057        '.hashtag a',
6058        '[class*="hashtag"] a',
6059        '[class*="hash-tag"] a',
6060        'a[href*="search.html"][href*="%23"]',
6061        'a[href*="keyword=%23"]'
6062    ];
6063    document.querySelectorAll(HASHTAG_SELECTORS.join(', ')).forEach(function(link) {
6064        var href = link.getAttribute('href') || '';
6065        // search.html로 가는 hashtag만
6066        if (href.indexOf('search.html') > -1 || href.indexOf('keyword=') > -1
6067            || link.tagName.toLowerCase() === 'span'
6068            || (link.textContent || '').indexOf('#') > -1) {
6069            link.addEventListener('click', function() {
6070                sessionStorage.setItem('ga_hashtag_search', '1');
6071                // console.log('[HASHTAG_CLICK] 해시태그 검색 마커:', (link.textContent || '').trim());
6072            });
6073        }
6074    });
6075});
6076
6077// ===== GNB 클릭 시 breadcrumb sessionStorage 저장 =====
6078// 카테고리 페이지에 #ga-bread DOM이 없을 때 fallback으로 사용
6079window.addEventListener('load', function() {
6080    function saveBreadFromGnbLink(link) {
6081        // 1depth/2depth/3depth Li 찾기
6082        var d3Li = link.closest('.sub_cate02 > li');
6083        var d2Li = link.closest('.sub_cate01 > li');
6084        var d1Li = link.closest('.top_category > ul > li, #slide_add_category > li, #aside #slide_add_category > li');
6085
6086        var d1Text = '', d2Text = '', d3Text = '';
6087        if (d1Li) {
6088            var d1A = d1Li.querySelector(':scope > a');
6089            if (d1A) d1Text = (d1A.textContent || '').trim();
6090        }
6091        if (d2Li) {
6092            var d2A = d2Li.querySelector(':scope > a');
6093            if (d2A) d2Text = (d2A.textContent || '').trim();
6094        }
6095        if (d3Li) {
6096            var d3A = d3Li.querySelector(':scope > a');
6097            if (d3A) d3Text = (d3A.textContent || '').trim();
6098        }
6099
6100        // 클릭한 링크의 텍스트 (가장 깊은 항목)
6101        var clickedText = (link.textContent || '').trim();
6102
6103        var parts = ['HOME'];
6104        if (d1Text) parts.push(d1Text);
6105        if (d2Text && d2Text !== d1Text) parts.push(d2Text);
6106        if (d3Text && d3Text !== d2Text && d3Text !== clickedText) parts.push(d3Text);
6107        // 클릭한 항목 자체가 깊이별 텍스트와 다르면 마지막에 추가
6108        if (clickedText && clickedText !== d1Text && clickedText !== d2Text && clickedText !== d3Text) {
6109            parts.push(clickedText);
6110        }
6111        var bread = parts.join(' > ');
6112        if (bread && bread !== 'HOME') {
6113            sessionStorage.setItem('ga-gnb-bread', bread);
6114            // console.log('[GNB_BREAD] 저장:', bread);
6115        }
6116    }
6117
6118    // PC + Mobile GNB 모두 처리
6119    document.querySelectorAll(
6120        '.header a, ' +
6121        '.top_category a, ' +
6122        '#aside #slide_add_category a, ' +
6123        '#slide_add_category a'
6124    ).forEach(function(link) {
6125        link.addEventListener('click', function() {
6126            saveBreadFromGnbLink(link);
6127        });
6128    });
6129});
6130
6131// 스크립트 생성 일시 2026 / 03 / 13 | 작성자 : JMH
6132// 동적 Bread 생성 함수 (HTML ID + GNB ap-click-data 기반)
6133// layout/basic/layout.html 파일에 지정 (w.ga_header.js보다 먼저 로드)
6134//
6135// [HTML 필수 작업]
6136// #ga-bread       : product/list.html, product/detail.html — product_headcategory 모듈의 <ol>
6137// #ga-prd-name    : product/detail.html — 상품명 요소
6138// #ga-bread-value : 커스텀 페이지 — bread 값 직접 지정 (선택)
6139
6140// ============================
6141// GNB 클릭 시 카테고리 경로 저장
6142// ap-click-data="메이크업>페이스>파운데이션" → sessionStorage에 "HOME > 메이크업 > 페이스 > 파운데이션"
6143// ============================
6144document.addEventListener('click', function(e) {
6145    var gnbLink = e.target.closest('[ap-click-area="GNB"]');
6146    if (!gnbLink) return;
6147    var data = gnbLink.getAttribute('ap-click-data');
6148    if (!data) return;
6149    var parts = data.split('>').map(function(s) { return s.trim(); }
6149).filter(Boolean);
6150    if (parts.length > 0) {
6151        sessionStorage.setItem('ga-gnb-bread', 'HOME > ' + parts.join(' > '));
6152    }
6153});
6154
6155window.generateBread = function(pageType) {
6156
6157    // ===== 페이지별 정적 매핑 (Excel TO-BE 기준) =====
6158    const PAGE_BREAD_MAP = {
6159        "/": "HOME",
6160        "/first-care-activating/first-care-activating-serum-vi.html": "HOME > 윤조",
6161        "/concentrated-ginseng-rejuvenating/introduction.html": "HOME > 자음생",
6162        "/gift/artofdelight/art-of-delight.html": "HOME > 기프트 > 아트 오브 딜라이트",
6163        "/gift/giftselection/gift-selection.html": "HOME > 기프트 > 기프트 셀렉션",
6164        "/best/best-seller.html": "HOME > 베스트 셀러",
6165        "/spa/introduction/introduction.html": "HOME > 스파 > 소개",
6166        "/spa/programs/programs.html": "HOME > 스파 > 프로그램",
6167        "/spa/reservation/reservation.html": "HOME > 스파 > 예약",
6168        "/spa/location/location.html": "HOME > 스파 > 매장 찾기",
6169        "/flagship/intro/index.html": "HOME > 플래그십 스토어 > 소개",
6170        "/flagship/bukchon/index.html": "HOME > 플래그십 스토어 > 북촌",
6171        "/flagship/dosan/index.html": "HOME > 플래그십 스토어 > 도산",
6172        "/about-sulwhasoo/brand-story/brand-story.html": "HOME > ABOUT 설화수 > 브랜드 스토리",
6173        "/about-sulwhasoo/brand-sustainability/sustainability/brand-sustainability.html": "HOME > ABOUT 설화수 > 지속가능성",
6174        "/about-sulwhasoo/brand-sustainability/anti-counterfeit/anti-counterfeit.html": "HOME > ABOUT 설화수 > 위조품 방지",
6175        "/about-sulwhasoo/culture/list.html": "HOME > ABOUT 설화수 > 설화문화전",
6176        "/about-sulwhasoo/salon-sulwhasoo/salon-sulwhasoo.html": "HOME > ABOUT 설화수 > 살롱 설화수",
6177        "/about-sulwhasoo/sulwha-project/archive.html": "HOME > ABOUT 설화수 > 설화 프로젝트",
6178        "/about-sulwhasoo/brand-news/archive/archive.html": "HOME > ABOUT 설화수 > 브랜드 뉴스",
6179        "/about-sulwhasoo/classic-luxury-set/classic-luxury-set.html": "HOME > ABOUT 설화수 > 명작 컬렉션",
6180        "/store/store.html": "HOME > 매장찾기",
6181        "/misc/sitemap/sitemap.html": "HOME > SITEMAP"
6182};
6183    const PAGE_BREAD_WILDCARDS = [
6184        {regex: '^/about-sulwhasoo/culture/sulwhasoo-post/sulwhasoo-post\d+\.html$', bread: 'HOME > ABOUT 설화수 > 살롱 설화수'},
6185        {regex: '^/about-sulwhasoo/sulwha-project/season-\w+\.html$', bread: 'HOME > ABOUT 설화수 > 설화 프로젝트'},
6186        {regex: '^/about-sulwhasoo/classic-luxury-set/[\w-]+\.html$', bread: 'HOME > ABOUT 설화수 > 명작 컬렉션'},
6187        {regex: '^/about-sulwhasoo/brand-news/archive/contents/\d+/[\w-]+\.html$', bread: 'HOME > ABOUT 설화수 > 브랜드 뉴스'}
6188    ];
6189    
6190    var cleanPathnameOnly = location.pathname.split('?')[0];
6191    if (PAGE_BREAD_MAP[cleanPathnameOnly]) {
6192        return PAGE_BREAD_MAP[cleanPathnameOnly];
6193    }
6194    for (var w = 0; w < PAGE_BREAD_WILDCARDS.length; w++) {
6195        if (new RegExp(PAGE_BREAD_WILDCARDS[w].regex).test(cleanPathnameOnly)) {
6196            return PAGE_BREAD_WILDCARDS[w].bread;
6197        }
6198    }
6199    
6200    var HOME = 'HOME';
6201
6202    // ============================
6203    // 1. 메인 페이지
6204    // ============================
6205    if (pageType === 'MAIN') return HOME;
6206
6207    // ============================
6208    // 2. 카테고리/상품 페이지 — #ga-bread (ol > li) 읽기
6209    // ============================
6210    if (pageType === 'PRODUCT_LIST' || pageType === 'PRODUCT_DETAIL') {
6211        var breadEl = document.getElementById('ga-bread');
6212        var categoryBread = null;
6213
6214        if (breadEl) {
6215            var items = breadEl.querySelectorAll('li');
6216            var parts = [];
6217            items.forEach(function(li) {
6218                var text = li.textContent.trim();
6219                if (text && text !== '홈' && text !== 'Home' && text !== 'home') {
6220                    parts.push(text);
6221                }
6222            });
6223            if (parts.length > 0) {
6224                categoryBread = HOME + ' > ' + parts.join(' > ');
6225            }
6226        }
6227
6228        // #ga-bread 비어있을 때 — GNB 클릭 경로 폴백
6229        if (!categoryBread) {
6230            categoryBread = sessionStorage.getItem('ga-gnb-bread') || null;
6231        }
6232
6233        if (pageType === 'PRODUCT_DETAIL') {
6234            // 상품명: #ga-prd-name → var product_name 폴백
6235            var prdNameEl = document.getElementById('ga-prd-name');
6236            var productName = prdNameEl ? prdNameEl.textContent.trim()
6237                : (typeof product_name !== 'undefined' && product_name ? product_name : '');
6238
6239            if (categoryBread) {
6240                sessionStorage.setItem('lastBread', categoryBread);
6241                return productName ? categoryBread + ' > ' + productName : categoryBread;
6242            }
6243
6244            // sessionStorage 폴백 (리스트 → 상세 이동 시)
6245            var prevBread = sessionStorage.getItem('lastBread');
6246            if (prevBread) {
6247                return productName ? prevBread + ' > ' + productName : prevBread;
6248            }
6249
6250            return productName ? HOME + ' > ' + productName : HOME;
6251        }
6252
6253        // 카테고리 리스트
6254        if (categoryBread) {
6255            sessionStorage.setItem('lastBread', categoryBread);
6256            return categoryBread;
6257        }
6258
6259        // #ga-bread-value 폴백 (커스텀 상품 페이지: /product/makeup.html 등)
6260        var breadValEl = document.getElementById('ga-bread-value');
6261        if (breadValEl) return breadValEl.textContent.trim();
6262
6263        return undefined;
6264    }
6265
6266    // ============================
6267    // 3. 검색 페이지 — URL 파라미터에서 키워드 추출
6268    // ============================
6269    if (pageType === 'SEARCH_RESULT') {
6270        var keyword = new URLSearchParams(location.search).get('keyword') || '';
6271        return keyword ? HOME + ' > SEARCH > ' + keyword : HOME + ' > SEARCH';
6272    }
6273
6274    // ============================
6275    // 4. 고정 페이지
6276    // ============================
6277    if (pageType === 'CART') return HOME + ' > 장바구니';
6278    if (pageType === 'ORDER') return HOME + ' > 장바구니 > 주문';
6279    if (pageType === 'EVENT_LIST') return HOME + ' > 이벤트';
6280
6281    // ============================
6282    // 5. 나머지 — h2 텍스트 또는 GNB 클릭 경로 활용
6283    // ============================
6284    var h2 = document.querySelector('h2');
6285    var h2Text = h2 ? h2.textContent.trim() : '';
6286
6287    if (pageType === 'MY') {
6288        return h2Text ? HOME + ' > 마이페이지 > ' + h2Text : HOME + ' > 마이페이지';
6289    }
6290
6291    if (pageType === 'EVENT_DETAIL') {
6292        return h2Text ? HOME + ' > 이벤트 > ' + h2Text : HOME + ' > 이벤트';
6293    }
6294
6295    // LBLL 상세 — h3.board-tit에서 제목 추출
6296    if (location.pathname.indexOf('/lbll/research/read') > -1) {
6297        var lbllTit = document.querySelector('h3.board-tit');
6298        var lbllTitle = lbllTit ? lbllTit.textContent.trim() : '';
6299        if (lbllTitle) return HOME + ' > LBLL > 리스트 > ' + lbllTitle;
6300    }
6301
6302    // HTML에 직접 지정된 bread 값 (커스텀 페이지: /product/makeup.html 등)
6303    var breadValueEl = document.getElementById('ga-bread-value');
6304    if (breadValueEl) return breadValueEl.textContent.trim();
6305
6306    // GNB 클릭 경로 폴백
6307    var gnbBread = sessionStorage.getItem('ga-gnb-bread');
6308    if (gnbBread) {
6309        // 상품 상세인 경우 상품명 추가 (#ga-prd-name → product_name → h2.prd-name)
6310        var prdEl = document.getElementById('ga-prd-name');
6311        var prdName = prdEl ? prdEl.textContent.trim()
6312            : (typeof product_name !== 'undefined' && product_name ? product_name : '');
6313        if (!prdName) {
6314            var prdH2 = document.querySelector('h2.prd-name');
6315            prdName = prdH2 ? prdH2.textContent.trim() : '';
6316        }
6317        if (prdName) return gnbBread + ' > ' + prdName;
6318        return gnbBread;
6319    }
6320
6321    return undefined;
6322};
6323
6324// 스크립트 생성 일시 2026 / 02 / 25 | 작성자 : JMH
6325// 페이징, 사용자 정보 변수
6326window.dataLayer = window.dataLayer || [];
6327
6328// ===== 유저 정보 API 활성화 플래그 =====
6329// true: API 호출 활성 (운영) / false: API 호출 비활성 (타 쇼핑몰 테스트용)
6330const ENABLE_USER_API = true;
6331
6332// CAFE24API.getCustomerIDInfo를 Promise로 래핑 + 폴링
6333// 옴니 SSO redirect 직후 cafe24 회원 세션이 미정착으로 member_id=null 응답 → 200ms × 최대 15회 재시도
6334function getCustomerId(maxAttempts = 15, interval = 200) {
6335    return new Promise((resolve) => {
6336        let attempts = 0;
6337        const tryOnce = () => {
6338            attempts++;
6339            CAFE24API.getCustomerIDInfo(function(err, res) {
6340                var memberId = res && res.id ? res.id.member_id : undefined;
6341                if (memberId) {
6342                    resolve(memberId);
6343                } else if (err || attempts >= maxAttempts) {
6344                    resolve(null);
6345                } else {
6346                    setTimeout(tryOnce, interval);
6347                }
6348            });
6349        };
6350        tryOnce();
6351    });
6352}
6353
6354// ===== 사용자 정보 비동기 로더 (페이지 식별 변수 push와 분리) =====
6355function loadUserInfoAsync(shopNo) {
6356    return getCustomerId().then(function(fullUserId) {
6357        const userId = fullUserId ? fullUserId.split('@')[0] : undefined;
6358        if (!ENABLE_USER_API) return null;
6359        if (!userId || !fullUserId.includes('@s')) return null;
6360        const storedUserId = localStorage.getItem('AP_USER_ID');
6361        if (storedUserId !== userId) {
6362            clearUserData();
6363            return fetchUserInfoOnce(userId, shopNo);
6364        } else if (localStorage.getItem('AP_USER_INFO')) {
6365            Object.assign(window, JSON.parse(localStorage.getItem('AP_USER_INFO')));
6366        }
6367        return null;
6368    }).then(function() {
6369        window.dataLayer = window.dataLayer || [];
6370        window.dataLayer.push({ event: 'user_info_ready' });
6371    });
6372}
6373
6374document.addEventListener('DOMContentLoaded', function() {
6375    const shopNo = CAFE24.SDE_SHOP_NUM;
6376
6377    // 로그인 상태 체크 (쿠키 기반 — AP_DATA_ISLOGIN 표시용)
6378    const isLoggedIn = document.cookie.match(/(?:^| |;)iscache=F/) ? 'Y' : 'N';
6379
6380    // 로그아웃 상태일 때 로컬 스토리지 초기화
6381    if (isLoggedIn === 'N') {
6382        clearUserData();
6383        sessionStorage.removeItem('AP_USER_ID');
6384        sessionStorage.removeItem('AP_USER_INFO');
6385    }
6386
6387    // 현재 페이지가 아이프레임 내부인지 확인
6388    try {
6389        if (window.self !== window.top) {
6390            return;
6391        }
6392    } catch (e) {
6393        return; // 보안 오류가 발생하면 아이프레임 내부로 간주
6394    }
6395
6396    // 상수 정의
6397    const SITE_NAME = 'SULWHASOO';
6398    const ENV = 'PRD';
6399
6400    // 페이지 타입 정의 (bread는 w.ga_bread.js에서 동적 생성)
6401    const PAGE_TYPES = {
6402        MAIN: { paths: ['/', '/index.html'], type: 'MAIN' },
6403        MY: { path: '/myshop', type: 'MY' },
6404        PRODUCT_DETAIL: { path: ['/product/detail'], type: 'PRODUCT_DETAIL' },
6405        PRODUCT_LIST: { path: ['/category', '/product/list', '/best'], type: 'PRODUCT_LIST' },
6406        SEARCH: { path: ['/shopSearch', '/product/search'], type: 'SEARCH_RESULT' },
6407        CART: { path: '/order/basket', type: 'CART' },
6408        ORDER: { path: '/order', type: 'ORDER' },
6409        EVENT_LIST: { path: '/event', type: 'EVENT_LIST' },
6410        EVENT_DETAIL: { path: '/event/detail', type: 'EVENT_DETAIL' }
6411    };
6412
6413    // 언어 코드에서 국가와 언어 정보를 추출
6414    const languageCode = CAFE24.FRONT_LANGUAGE_CODE;
6415    const [lang, country] = languageCode.split('_');
6416    const LANGUAGE_COUNTRY = country.toUpperCase();
6417    const LANGUAGE_LANG = lang.toUpperCase();
6418
6419    // 카페24 플러스앱에서 접속했는지 판별
6420    let isCafe24App = navigator.userAgent.indexOf('Cafe24Plus') > -1;
6421
6422    // 접속 디바이스 타입 확인
6423    const channel = isCafe24App ? 'APP' : EC_MOBILE_DEVICE ? 'MOBILE' : 'PC';
6424
6425    // 페이지 타입 결정
6426    let pageType = 'OTHERS';
6427
6428    // 쿼리 문자열 제거 (URL 경로만 추출)
6429    const cleanPath = location.pathname.split('?')[0];
6430
6431    // 메인 페이지 체크 (정확한 경로 매칭)
6432    if (PAGE_TYPES.MAIN.paths.includes(cleanPath)) {
6433        pageType = PAGE_TYPES.MAIN.type;
6434    } else {
6435        // 다른 페이지 타입 체크
6436        for (const [key, value] of Object.entries(PAGE_TYPES)) {
6437            if (Array.isArray(value.path)) {
6438                if (value.path.some(p => location.pathname.startsWith(p))) {
6439                    pageType = value.type;
6440                    break;
6441                }
6442            } else if (location.pathname.startsWith(value.path)) {
6443                pageType = value.type;
6444                break;
6445            }
6446        }
6447
6448        // 이벤트 상세 페이지 체크 (쿼리 파라미터 확인)
6449        if (cleanPath.includes('/event/detail')) {
6450            pageType = 'EVENT_DETAIL';
6451        }
6452    }
6453
6454    // URL 매칭 실패 시 — 변수/DOM 기반 보조 판별
6455    if (pageType === 'OTHERS') {
6456        if (typeof product_name !== 'undefined' && product_name) {
6457            pageType = 'PRODUCT_DETAIL';
6458        }
6459    }
6460
6461    // 동적 bread 생성 (w.ga_bread.js)
6462    const bread = window.generateBread ? window.generateBread(pageType) : undefined;
6463
6464    // 페이징 정보 전역 변수 선언
6465    window.AP_DATA_SITENAME = SITE_NAME;
6466    window.AP_DATA_COUNTRY = LANGUAGE_COUNTRY;
6467    window.AP_DATA_LANG = LANGUAGE_LANG;
6468    window.AP_DATA_ENV = ENV;
6469    window.AP_DATA_CHANNEL = channel;
6470    window.AP_DATA_BREAD = bread;
6471    window.AP_DATA_PAGETYPE = pageType;
6472    window.AP_DATA_ISLOGIN = isLoggedIn;
6473
6474    // // 페이지 정보 디버깅 로그
6475    // console.log('[GA HEADER]', {
6476    //     브랜드: window.AP_DATA_SITENAME,
6477    //     국가코드: window.AP_DATA_COUNTRY,
6478    //     페이지언어: window.AP_DATA_LANG,
6479    //     개발환경: window.AP_DATA_ENV,
6480    //     접속환경: window.AP_DATA_CHANNEL,
6481    //     페이지브래드: window.AP_DATA_BREAD,
6482    //     페이지타입: window.AP_DATA_PAGETYPE,
6483    //     로그인유무: window.AP_DATA_ISLOGIN
6484    // });
6485
6486    // console.log({
6487    //     회원아이디: window.AP_DATA_GCID,
6488    //     통합회원번호: window.AP_DATA_CID,
6489    //     통합회원여부: window.AP_DATA_ISMEMBER,
6490    //     성별: window.AP_DATA_CG,
6491    //     생년: window.AP_DATA_CD,
6492    //     로그인방법: window.AP_DATA_LOGINTYPE,
6493    //     회원등급: window.AP_DATA_CT,
6494    //     뷰티포인트등급: window.AP_DATA_BEAUTYCT,
6495    //     임직원여부: window.AP_DATA_ISEMPLOYEE
6496    // });
6497
6498    // 사용자 정보 비동기 로드 (페이지 식별 변수 push 완료 후 fire-and-forget)
6499    loadUserInfoAsync(shopNo).catch(function() {});
6500});
6501
6502async function fetchUserInfoOnce(user_id, shop_no) {
6503    // localStorage에서 먼저 확인
6504    const storedData = localStorage.getItem('AP_USER_INFO');
6505    const storedUserId = localStorage.getItem('AP_USER_ID'); // 저장된 사용자 ID
6506
6507    // 현재 로그인한 사용자와 저장된 데이터의 사용자 ID가 일치하는지 확인
6508    if (storedData && storedUserId === user_id) {
6509        // console.log('[USER_INFO 검증] fetchUserInfoOnce: localStorage에 데이터 존재 → API 호출 스킵');
6510        const userInfo = JSON.parse(storedData);
6511        Object.assign(window, userInfo); // 전역 변수에 데이터 할당
6512        return; // 이미 저장된 데이터가 있으면 API 호출 X
6513    }
6514
6515    // console.log('[USER_INFO 검증] fetchUserInfoOnce: API 호출 시작');
6516    try {
6517        const response = await fetch('https://ap-brand-cafe24-adm-fo.apddev.com/api/fo/api/apsulwhasoo/user-info', {
6518            method: 'POST',
6519            headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
6520            body: new URLSearchParams({ user_id, shop_no })
6521        });
6522
6523        if (!response.ok) throw new Error('API 호출 실패');
6524
6525        const data = await response.json();
6526        
6527        // 전역 변수 set을 login_complete 트리거 이전에 수행 (GTM에서 트리거 시점에 사용자 변수 활용 가능)
6528        const userInfo = {
6529            AP_DATA_GCID: data.ap_login_id || undefined,
6530            AP_DATA_CID: data.incs_no || undefined,
6531            AP_DATA_ISMEMBER: "Y", // 기본값 설정
6532            AP_DATA_CG: data.sxcl_cd || undefined,
6533            AP_DATA_CD: data.birth_year || undefined,
6534            AP_DATA_LOGINTYPE: "NORMAL", // 기본값 설정
6535            AP_DATA_CT: determineGroupName(data.group_name),
6536            AP_DATA_BEAUTYCT: data.icsg_nm || undefined,
6537            AP_DATA_ISEMPLOYEE: data.emp_yn || undefined
6538        };
6539        Object.assign(window, userInfo);
6540
6541        // 사용자 정보 set 완료 후 login_complete 트리거 발사
6542        window.dataLayer = window.dataLayer || [];
6543        window.dataLayer.push({
6544            'event':'login_complete',
6545            'event_category':'login',
6546            'event_action':'login - complete',
6547            'event_label': data.omni_amr
6548        });
6549
6550        if (data.omni_first_login_yn === 'Y') {
6551            window.dataLayer.push({
6552                'event':'sign_up_complete',
6553                'event_category':'sign_up',
6554                'event_action':'sign_up - complete',
6555                'event_label': data.omni_amr
6556            });
6557        }
6558
6559        // // localStorage에 사용자 정보 및 ID 저장
6560        localStorage.setItem('AP_USER_INFO', JSON.stringify(userInfo));
6561        localStorage.setItem('AP_USER_ID', user_id); // 현재 사용자 ID 저장
6562        // console.log('[USER_INFO 검증] fetchUserInfoOnce: API 호출 성공 → localStorage에 저장 완료');
6563
6564    } catch (error) {
6565        // console.error('[USER_INFO 검증] API 호출 중 에러:', error);
6566    }
6567}
6568
6569// 언어 판별 및 대문자 변환 함수
6570function determineGroupName(groupName) {
6571    if (!groupName) return undefined; // 값이 없으면 undefined 반환
6572
6573    const isEnglish = /^[A-Za-z\s]+$/.test(groupName); // 영어인지 확인
6574    return isEnglish ? groupName.toUpperCase() : groupName; // 영어면 대문자 변환, 아니면 그대로 반환
6575}
6576
6577
6578function clearUserData() {
6579    // console.log('[USER_INFO 검증] clearUserData: 사용자 데이터 초기화');
6580    // localStorage 초기화
6581    localStorage.removeItem('AP_USER_INFO');
6582    localStorage.removeItem('AP_USER_ID');
6583
6584    // 전역 변수 초기화
6585    window.AP_DATA_GCID = undefined;
6586    window.AP_DATA_CID = undefined;
6587    window.AP_DATA_ISMEMBER = undefined;
6588    window.AP_DATA_CG = undefined;
6589    window.AP_DATA_CD = undefined;
6590    window.AP_DATA_LOGINTYPE = undefined;
6591    window.AP_DATA_CT = undefined;
6592    window.AP_DATA_BEAUTYCT = undefined;
6593    window.AP_DATA_ISEMPLOYEE = undefined;
6594
6595    // console.log("사용자 데이터 초기화 완료");
6596}
6597
6598// 페이지 로드 시 카테고리 정보를 전역 변수에 저장
6599window.globalCategoryInfo = {};
6600let categoryInitialized = false; // 카테고리 초기화 완료 플래그
6601let categoryRetryCount = 0; // 카테고리 재시도 횟수
6602const MAX_CATEGORY_RETRY = 20; // 최대 재시도 (500ms × 20 = 10초)
6603
6604// 카테고리 초기화 및 계층 구조 생성
6605(function initCategoryInfo() {
6606    try {
6607        if (typeof aCategory !== 'undefined' && aCategory.length > 0) {
6608            for (let i = 0; i < aCategory.length; i++) {
6609                if (aCategory[i] && aCategory[i].cate_no) {
6610                    globalCategoryInfo[aCategory[i].cate_no] = aCategory[i];
6611                }
6612            }
6613
6614            // 계층 구조로 이름을 조합하여 전역 변수에 저장
6615            globalCategoryInfo.formatted = [];
6616            for (const cateNo in globalCategoryInfo) {
6617                const category = globalCategoryInfo[cateNo];
6618                const name = category.name;
6619                let parentCateNo = category.parent_cate_no;
6620
6621                let fullName = name;
6622
6623                // 상위 카테고리 이름을 포함하여 fullName 생성
6624                while (parentCateNo && globalCategoryInfo[parentCateNo]) {
6625                    const parentName = globalCategoryInfo[parentCateNo].name;
6626                    fullName = `${parentName} / ${fullName}`;
6627                    parentCateNo = globalCategoryInfo[parentCateNo].parent_cate_no;
6628                }
6629
6630                globalCategoryInfo.formatted.push({ cate_no: cateNo, name: fullName });
6631            }
6632
6633            categoryInitialized = true; // 초기화 완료 표시
6634
6635        } else if (categoryRetryCount < MAX_CATEGORY_RETRY) {
6636            categoryRetryCount++;
6637            setTimeout(initCategoryInfo, 500); // 데이터가 로드될 때까지 대기
6638        }
6639    } catch (error) {
6640        // console.error('카테고리 정보 초기화 중 오류:', error);
6641    }
6642})();
6643
6644
6645// 스크립트 생성 일시 2026 / 05 / 13 | 작성자 : JMH
6646// 외부 매장 링크 클릭 시 go_to_mall 이벤트 태깅
6647// console.log('[GO_TO_MALL] w.ga_gotomall.js 로드됨');
6648
6649document.addEventListener('DOMContentLoaded', function () {
6650    window.dataLayer = window.dataLayer || [];
6651    // console.log('[GO_TO_MALL] click listener 등록 시작');
6652
6653    function detectMallByHref(href) {
6654        if (!href) return null;
6655        var h = href.toLowerCase();
6656        if (h.indexOf('amoremall.com') > -1) return 'APMALL';
6657        if (h.indexOf('beautypoint.co.kr') > -1) return 'BEAUTYPOINT';
6658        if (h.indexOf('11st.co.kr') > -1) return '11ST';
6659        if (h.indexOf('coupang.com') > -1) return 'COUPANG';
6660        if (h.indexOf('gmarket.co.kr') > -1) return 'GMARKET';
6661        if (h.indexOf('auction.co.kr') > -1) return 'AUCTION';
6662        if (h.indexOf('lotte') > -1 && h.indexOf('shopping') > -1) return 'LOTTEON';
6663        if (h.indexOf('shinsegae') > -1 || h.indexOf('ssg.com') > -1) return 'SSG';
6664        if (h.indexOf('oliveyoung') > -1) return 'OLIVEYOUNG';
6665        if (h.indexOf('hyundai') > -1 && h.indexOf('hmall') > -1) return 'HMALL';
6666        if (h.indexOf('aekyung') > -1) return 'AEKYUNG';
6667        if (h.indexOf('emart') > -1) return 'EMART';
6668        if (h.indexOf('smartstore.naver.com') > -1 || h.indexOf('brand.naver.com') > -1 || h.indexOf('shopping.naver.com') > -1) return 'NAVER';
6669        return null;
6670    }
6671
6672    // 한글 몰명(어드민 등록 buyLinks key 등) → 영문 컨벤션 정규화
6673    var KOR_TO_EN = {
6674        '아모레몰': 'APMALL', 'AP몰': 'APMALL', 'APMALL': 'APMALL',
6675        '뷰티포인트': 'BEAUTYPOINT',
6676        '11번가': '11ST',
6677        '쿠팡': 'COUPANG',
6678        'G마켓': 'GMARKET', '지마켓': 'GMARKET',
6679        '옥션': 'AUCTION',
6680        '롯데온': 'LOTTEON', '롯데': 'LOTTEON',
6681        'SSG': 'SSG', '쓱닷컴': 'SSG', '신세계': 'SSG',
6682        '올리브영': 'OLIVEYOUNG',
6683        '현대H몰': 'HMALL', 'H몰': 'HMALL',
6684        '애경몰': 'AEKYUNG',
6685        '이마트몰': 'EMART', '이마트': 'EMART',
6686        '네이버': 'NAVER', '네이버 브랜드 스토어': 'NAVER',
6687        '네이버 스마트스토어': 'NAVER', '네이버쇼핑': 'NAVER', '네이버 쇼핑': 'NAVER'
6688    };
6689    function normalizeMallName(s) {
6690        if (!s) return s;
6691        var key = s.replace(/\s+/g, ' ').trim();
6692        if (KOR_TO_EN[key]) return KOR_TO_EN[key];
6693        // 부분 매칭 (예: "네이버 브랜드 스토어 (상품A)")
6694        for (var k in KOR_TO_EN) {
6695            if (key.indexOf(k) > -1) return KOR_TO_EN[k];
6696        }
6697        return key;
6698    }
6699
6700    // PDP 구매링크 컨테이너 안의 옵션 <a>는 텍스트(=buyLinks key=몰명)를 폴백으로 활용
6701    function isPdpBuyLink(link) {
6702        if (!link || !link.closest) return false;
6703        return !!link.closest('.btn-link-wrap, .ap2022-popup__body, #sws-go-apmall-link, .store-online');
6704    }
6705
6706    // capture 단계로 등록 (target=_blank로 새 창 열리기 전에 잡기 위해)
6707    document.addEventListener('click', function (e) {
6708        var link = e.target.closest('a, button, [ap-data-gotomall]');
6709        if (!link) return;
6710
6711        var mallName = link.getAttribute('ap-data-gotomall');
6712        if (!mallName) {
6713            var clickName = link.getAttribute('ap-click-name') || '';
6714            // 'Click - Mall' / 'Click-mall' / 'Click Mall' 등 대소문자·구분자 변형 허용
6715            if (/click[\s\-]*mall/i.test(clickName)) {
6716                mallName = link.getAttribute('ap-click-data') || null;
6717            }
6718        }
6719        if (!mallName) {
6720            var href = link.getAttribute('href') || '';
6721            mallName = detectMallByHref(href);
6722        }
6723        // PDP 구매링크 다중 옵션 폴백: 링크 텍스트(=어드민 등록 몰명) 사용
6724        if (!mallName && isPdpBuyLink(link)) {
6725            var txt = (link.textContent || '').replace(/\s+/g, ' ').trim();
6726            if (txt && txt !== '구매하러 가기' && txt.length <= 30) {
6727                mallName = txt;
6728            }
6729        }
6730
6731        if (!mallName) return;
6732        mallName = normalizeMallName(mallName);
6733
6734        var info = {
6735            mall_name: mallName,
6736            href: link.getAttribute('href') || '',
6737            text: (link.textContent || '').replace(/\s+/g, ' ').trim().substring(0, 50),
6738            target: link.getAttribute('target') || '_self'
6739        };
6740        // console.log('[GO_TO_MALL] 클릭 감지!', info);
6741
6742        try {
6743            window.dataLayer.push({
6744                'event': 'go_to_mall',
6745                'mall_name': mallName
6746            });
6747            // console.log('[GO_TO_MALL] dataLayer push 완료:', { event: 'go_to_mall', mall_name: mallName });
6748        } catch(err) {
6749            // console.error('[GO_TO_MALL] push 실패:', err);
6750        }
6751    }, true);  // capture phase
6752
6753    // console.log('[GO_TO_MALL] click listener 등록 완료 (capture phase)');
6754});
6755
6756// 외부 mall 링크에 ap-data-gotomall 속성 자동 부착
6757window.addEventListener('load', function() {
6758    var MALL_PATTERNS = [
6759        { host: 'amoremall.com',    name: 'APMALL' },
6760        { host: 'beautypoint.co.kr', name: 'BEAUTYPOINT' },
6761        { host: '11st.co.kr',       name: '11ST' },
6762        { host: 'coupang.com',      name: 'COUPANG' },
6763        { host: 'gmarket.co.kr',    name: 'GMARKET' },
6764        { host: 'oliveyoung',       name: 'OLIVEYOUNG' },
6765        { host: 'lotte',            name: 'LOTTEON' },
6766        { host: 'ssg.com',          name: 'SSG' },
6767        { host: 'smartstore.naver.com', name: 'NAVER' },
6768        { host: 'brand.naver.com',  name: 'NAVER' }
6769    ];
6770    document.querySelectorAll('a[href]').forEach(function(link) {
6771        if (link.hasAttribute('ap-data-gotomall')) return;
6772        var href = (link.getAttribute('href') || '').toLowerCase();
6773        if (!href.startsWith('http')) return;
6774        for (var i = 0; i < MALL_PATTERNS.length; i++) {
6775            if (href.indexOf(MALL_PATTERNS[i].host) > -1) {
6776                link.setAttribute('ap-data-gotomall', MALL_PATTERNS[i].name);
6777                if (!link.hasAttribute('ap-click-area')) {
6778                    link.setAttribute('ap-click-area', 'External');
6779                    link.setAttribute('ap-click-name', 'Click - Mall');
6780                    link.setAttribute('ap-click-data', MALL_PATTERNS[i].name);
6781                }
6782                break;
6783            }
6784        }
6785    });
6786
6787    var gotomallLinks = document.querySelectorAll('[ap-data-gotomall]');
6788    var clickMallLinks = document.querySelectorAll('[ap-click-name="Click - Mall"]');
6789    // console.log('[GO_TO_MALL] ap-data-gotomall 부착된 링크:', gotomallLinks.length);
6790    // console.log('[GO_TO_MALL] ap-click-name="Click - Mall" 링크:', clickMallLinks.length);
6791    if (gotomallLinks.length > 0) {
6792        var malls = {};
6793        gotomallLinks.forEach(function(l) {
6794            var m = l.getAttribute('ap-data-gotomall');
6795            malls[m] = (malls[m] || 0) + 1;
6796        });
6797        // console.log('[GO_TO_MALL] mall별 분포:', malls);
6798    }
6799    // Click - Mall 링크 샘플 (한율 구매하기 등)
6800    if (clickMallLinks.length > 0) {
6801        clickMallLinks.forEach(function(l, idx) {
6802            if (idx < 5) {
6803                console.log('[GO_TO_MALL] Click-Mall 링크 #' + (idx+1) + ':', {
6804                    href: l.getAttribute('href'),
6805                    data: l.getAttribute('ap-click-data'),
6806                    text: (l.textContent || '').trim().substring(0, 30)
6807                });
6808            }
6809        });
6810    }
6811});
6812
6813$(function(){
6814    if (typeof(EC_SHOP_MULTISHOP_SHIPPING) != "undefined") {
6815        var sShippingCountryCode4Cookie = 'shippingCountryCode';
6816        var bShippingCountryProc = false;
6817
6818        // 배송국가 선택 설정이 사용안함이면 숨김
6819        if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) {
6820            $('.xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist').hide();
6821            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptioncountry').hide();
6822        } else {
6823            $('.thumb .xans-layout-multishoplistitem').hide();
6824            var aShippingCountryCode = document.cookie.match('(^|;) ?'+sShippingCountryCode4Cookie+'=([^;]*)(;|$)');
6825            if (typeof(aShippingCountryCode) != 'undefined' && aS
6825hippingCountryCode != null && aShippingCountryCode.length > 2) {
6826                var sShippingCountryValue = aShippingCountryCode[2];
6827            }
6828
6829            // query string으로 넘어 온 배송국가 값이 있다면, 그 값을 적용함
6830            var aHrefCountryValue = decodeURIComponent(location.href).split("/?country=");
6831
6832            if (aHrefCountryValue.length == 2) {
6833                var sShippingCountryValue = aHrefCountryValue[1];
6834            }
6835
6836            // 메인 페이지에서 국가선택을 안한 경우, 그 외의 페이지에서 셋팅된 값이 안 나오는 현상 처리
6837            if (location.href.split("/").length != 4 && $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()) {
6838                $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join(""));
6839
6840                if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) {
6841                    $("#f_country").val($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val());
6842                }
6843            }
6844            if (typeof(sShippingCountryValue) != "undefined" && sShippingCountryValue != "" && sShippingCountryValue != null) {
6845                sShippingCountryValue = sShippingCountryValue.split("#")[0];
6846                var bShippingCountryProc = true;
6847
6848                $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue);
6849                $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join(""));
6850                var expires = new Date();
6851                expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30일간 쿠키 유지
6852                document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString();
6853                if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) {
6854                    $("#f_country").val(sShippingCountryValue).change();
6855                }
6856            }
6857        }
6858        // 언어선택 설정이 사용안함이면 숨김
6859        if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingLanguageSelection === false) {
6860            $('.xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist').hide();
6861            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptionlanguage').hide();
6862        } else {
6863            $('.thumb .xans-layout-multishoplistitem').hide();
6864        }
6865
6866        // 배송국가 및 언어 설정이 둘 다 사용안함이면 숨김
6867        if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShipping === false) {
6868            $(".xans-layout-multishopshipping").hide();
6869            $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption').hide();
6870        } else if (bShippingCountryProc === false && location.href.split("/").length == 4) { // 배송국가 값을 처리한 적이 없고, 메인화면일 때만 선택 레이어를 띄움
6871            var sShippingCountryValue = $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val();
6872            $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue);
6873            $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join(""));
6874            // 배송국가 선택을 사용해야 레이어를 보이게 함
6875            if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === true) {
6876                $(".xans-layout-multishopshipping").show();
6877            }
6878        }
6879
6880        $(".xans-layout-multishopshipping .btnClose").on("click", function() {
6881            $(".xans-layout-multishopshipping").hide();
6882        });
6883
6884        $(".xans-layout-multishopshipping .ec-base-button a").on("click", function() {
6885            var expires = new Date();
6886            expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30일간 쿠키 유지
6887            document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString();
6888
6889            // 도메인 문제로 쿠키로 배송국가 설정이 안 되는 경우를 위해 query string으로 배송국가 값
6889을 넘김
6890            var sQuerySting = (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) ? "" : "/?country="+encodeURIComponent($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val());
6891
6892            location.href = '//'+$(".xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist").val()+sQuerySting;
6893        });
6894        $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a").on("click", function() {
6895            $(".xans-layout-multishopshipping").show();
6896        });
6897    }
6898});
6899var aCategory = [];
6900$(function(){
6901    var methods = {
6902        aCategory    : [],
6903        aSubCategory : {},
6904        get: function() {
6905             $.ajax({
6906                url : '/exec/front/Product/SubCategory',
6907                dataType: 'json',
6908                success: function(aData) {
6909                    if (aData == null || aData == 'undefined') {
6910                        methods.checkSub();
6911                        return;
6912                    }
6913                    for (var i=0; i<aData.length; i++)
6914                    {
6915                        var sParentCateNo = aData[i].parent_cate_no;
6916                        var sCateNo = aData[i].cate_no;
6917                        if (!methods.aSubCategory[sParentCateNo]) {
6918                            methods.aSubCategory[sParentCateNo] = [];
6919                        }
6920                        if (!aCategory[sCateNo]) {
6921                            aCategory[sCateNo] = [];
6922                        }
6923                        methods.aSubCategory[sParentCateNo].push( aData[i] );
6924                        aCategory[sCateNo] = aData[i];
6925                    }
6926                    methods.checkSub();
6927                }
6928            });
6929        },
6930        getParam: function(sUrl, sKey) {
6931            if (typeof sUrl !== 'string') return;
6932            var aUrl         = sUrl.split('?');
6933            var sQueryString = aUrl[1];
6934            var aParam       = {};
6935            if (sQueryString) {
6936                var aFields = sQueryString.split("&");
6937                var aField  = [];
6938                for (var i=0; i<aFields.length; i++) {
6939                    aField = aFields[i].split('=');
6940                    aParam[aField[0]] = aField[1];
6941                }
6942            }
6943            return sKey ? aParam[sKey] : aParam;
6944        },
6945
6946        show: function(overNode, iCateNo) {
6947             var oParentNode = overNode;
6948            var aHtml = [];
6949            var sMyCateList = localStorage.getItem("myCateList");
6950            if (methods.aSubCategory[iCateNo] != undefined) {
6951                aHtml.push('<ul class="slideSubMenu">');
6952                $(methods.aSubCategory[iCateNo]).each(function() {
6953                    var sNextParentNo = this.cate_no;
6954                    var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : '';
6955                    if (methods.aSubCategory[sNextParentNo] == undefined) {
6956                        aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">');
6957                        var sHref = '/product/list.html'+this.param;
6958                    } else {
6959                        aHtml.push('<li id="cate'+this.cate_no+'">');
6960                        var sHref = '#none';
6961                    }
6962                    aHtml.push('<a href="/product/list.html'+this.param+'" class="view" cate="'+this.param+'" data-i18n="LIST.PRD_CATE_NO_'+this.cate_no+'" data-i18n-new>'+this.name+'</a>');
6963                    if (methods.aSubCategory[sNextParentNo] != undefined)  aHtml.push('<a href="'+sHref+'"'+this.param+'" onclick="subMenuEvent(this);" class="cate">상품보기</a>');
6964
6965                    if (methods.aSubCategory[sNextParentNo] != undefined) {
6966                        aHtml.push('<ul>');
6967                        $(methods.aSubCategory[sNextParentNo]).each(function() {
6968                            var sNextParentNo2 = this.cate_no;
6969                            var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : '';
6970                            if (methods.aSubCategory[sNextParentNo2] == undefined) {
6971                                aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">');
6972                                var sHref = '/product/list.html'+this.param;
6973                            } else {
6974                                aHtml.push('<li id="cate'+this.cate_no+'">');
6975                                var sHref = '#none';
6976                            }
6977                            aHtml.push('<a href="/product/list.html'+this.param+'" class="view" cate="'+this.param+'" data-i18n="LIST.PRD_CATE_NO_'+this.cate_no+'" data-i18n-new>'+this.name+'</a>');
6978                            if (methods.aSubCategory[sNextParentNo] != undefined)  aHtml.push('<a href="'+sHref+'"'+this.param+'" onclick="subMenuEvent(this);" class="cate">상품보기</a>');
6979
6980                            if (methods.aSubCategory[sNextParentNo2] != undefined) {
6981                                aHtml.push('<ul>');
6982
6983                                $(methods.aSubCategory[sNextParentNo2]).each(function() {
6984                                    aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">');
6985                                    var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : '';
6986                                    aHtml.push('<a href="/product/list.html'+this.param+'" class="view" cate="'+this.param+'" onclick="subMenuEvent(this);" data-i18n="LIST.PRD_CATE_NO_'+this.cate_no+'" data-i18n-new>'+this.name+'</a>');
6987                                    aHtml.push('</li>');
6988                                });
6989                                aHtml.push('</ul>');
6990                            }
6991                            aHtml.push('</li>');
6992                        });
6993                        aHtml.push('</ul>');
6994                    }
6995                    aHtml.push('</li>');
6996                });
6997                aHtml.push('</ul>');
6998            }
6999            $(oParentNode).append(aHtml.join(''));
7000            if (window.i18nextCafe24) {
7001            	i18nextCafe24.translate('data-i18n-new');
7002            }
7003        },
7004        close: function() {
7005            $('.slideSubMenu').remove();
7006        },
7007        checkSub: function() {
7008            $('.cate').each(function(){
7009                var sParam = $(this).attr('cate');
7010                if (!sParam) return;
7011                var iCateNo = Number(methods.getParam(sParam, 'cate_no'));
7012                var result = methods.aSubCategory[iCateNo];
7013                if (result == undefined) {
7014                    if ($(this).closest('#slideProjectList').length) {
7015                        var sHref = '/product/project.html'+sParam;
7016                    } else {
7017                        var sHref = '/product/list.html'+sParam;
7018                    }
7019
7020                    $(this).attr('href', sHref);
7021                    $(this).parent().attr('class', 'noChild');
7022                }
7023            });
7024        }
7025    };
7026
7027    methods.get();
7028
7029    $('#slideCateList li > a.cate').on('click', function(e) {
7030        var sParam = $(this).attr('cate');
7031        if (!sParam) return;
7032        var iCateNo = Number(methods.getParam(sParam, 'cate_no'));
7033        var hasClass =  $(this).parent().hasClass('selected');
7034
7035        if(hasClass) {
7036            methods.close();
7037            $(this).parent().removeClass('selected');
7038        } else {
7039            if (!iCateNo) return;
7040            $('#aside #slideCateList li').removeClass('selected');
7041            $(this).parent().addClass('selected');
7042            methods.close();
7043            methods.show(this.parentNode, iCateNo);
7044        }
7045        e.preventDefault();
7046    });
7047
7048	/* 모바일 슬라이드바 카테고리 중분류체크 */
7049	jQuery('#slide_add_category li').each(function(){
7050		if( jQuery(this).children('ul').length == 0 ){
7051			jQuery(this).addClass('noChild');
7052		} else {
7053			jQuery(this).append('<button type="button" class="cate">상품보기</button>');
7054		}
7055    });
7056
7057    $('#aside #slide_add_category a').not(".cate").on('click', function(e) {
7058		const $this = $(this);
7059		const $parentLi = $this.parent('li');
7060		const $nextUl = $this.next('ul');
7061
7062		if ($nextUl.length > 0 && !($(this).attr("href").includes('/category') && $(this).closest('.sub_cate01').length > 0)) {
7063			e.preventDefault();
7064
7065			// 1. 이미 열려있는 메뉴를 다시 클릭한 경우 -> 전체 닫기
7066			if ($parentLi.hasClass('selected')) {
7067				$parentLi.removeClass('selected');
7068				$parentLi.find('ul').slideUp(250);
7069				$parentLi.find('li').removeClass('selected');
7070			} 
7071			
7072			// 2. 새로운 메뉴를 여는 경우
7073			else {
7074				// 다른 형제 메뉴들은 모두 닫음 (기존 규칙 유지)
7075				const $siblings = $parentLi.siblings();
7076				$siblings.removeClass('selected');
7077				$siblings.find('ul').slideUp(250);
7078				$siblings.find('li').removeClass('selected');
7079
7080				// 현재 클릭한 메뉴 열기
7081				$parentLi.addClass('selected');
7082				$nextUl.slideDown(250);
7083
7084				// [추가된 로직] 2depth가 열릴 때 하위 3depth 자동 전개
7085				// 클릭한 게 1depth이고, 열리는 게 sub_cate01일 때만 작동
7086				if ($nextUl.hasClass('sub_cate01')) {
7087					setTimeout(function() {
7088						// sub_cate01 내부의 모든 sub_cate02를 찾아 슬라이드 다운
7089						const $thirdDepth = $nextUl.find('ul.sub_cate02');
7090						
7091						$thirdDepth.slideDown(250);
7092						$thirdDepth.parent('li').addClass('selected'); // 시각적 활성화
7093					}, 300);
7094				}
7095			}
7096		}
7097	});
7098
7099    $('#slideCateList h2').on('click', function() {
7100        var oParentId = $(this).parent().attr('id');
7101        if (oParentId == 'slideCateList' || oParentId == 'slideMultishopList' || oParentId == 'slideProjectList') {
7102            ($(this).attr('class') == 'selected') ? $(this).next().hide() : $(this).next().show();
7103        }
7104        $(this).toggleClass('selected');
7105    });
7106
7107    $('#slideProjectList .icoCategory').on('click', function() {
7108        var target = $(this).parents('#slideProjectList');
7109        if(target.find('.categoryList').css("display") == "none"){
7110            target.find('.categoryList').show();
7111        }else{
7112            target.find('.categoryList').hide();
7113        }
7114
7115        $(this).parents('.title').toggleClass('selected');
7116    });
7117
7118});
7119function subMenuEvent(obj) {
7120    $(obj).parent().find('li').removeClass('selected');
7121    $(obj).parent().toggleClass('selected');
7122}
7123
7124function checkInArray(sBookmarkList, iCateNo) {
7125    if (sBookmarkList == null) return false;
7126    var aBookmarkList = sBookmarkList.split("|");
7127    for (var i = 0; i < aBookmarkList.length; i++) {
7128        if (aBookmarkList[i] == iCateNo) {
7129            return true;
7130        }
7131    }
7132    return false;
7133}

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.