<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/*! @kyobobook/kbb-js v1.0.10 (build 20250108-143354) */
"use strict";!function(t,e){"object"==typeof exports&amp;&amp;"object"==typeof module?module.exports=e():"function"==typeof define&amp;&amp;define.amd?define([],e):"object"==typeof exports?exports.__KbbJS__=e():(t.__KbbJS__=t.__KbbJS__||{},t.__KbbJS__["plugins.ui-recently-contents"]=e())}(self,(function(){return(self.webpackChunk_KbbJS_=self.webpackChunk_KbbJS_||[]).push([[399],{96350:function(t,e,i){i.r(e),i.d(e,{default:function(){return k}});var a=i(35820),n=i.n(a),s=i(82324),l=i(13792),c=i(51956),o=i(48306),r=i(96526),d=i(37302);function u(t){const{catg:e,data:i,type:a,id:n}=t;let s={"bg-target":".img_box"},l=null;switch(e){case c.RecentCatCode.PRODUCT:s={...s,size:"100x0"},"CAS"===a?Object.assign(s,{"img-path":(0,d.Xo)(null==i?void 0:i.imgPath),url:(0,c.parseStageURL)("/BCF/post/detail/".concat(null==i?void 0:i.saleCmdtid))}):null!=i&amp;&amp;i.imgPath?Object.assign(s,{pid:null==i?void 0:i.saleCmdtid,bid:null==i?void 0:i.saleCmdtid,type:"GFT","img-path":(0,d.Xo)(null==i?void 0:i.imgPath)}):Object.assign(s,{pid:null==i?void 0:i.saleCmdtid,bid:null==i?void 0:i.cmdtcode,type:null==i?void 0:i.saleCmdtDvsnCode,adult:null==i?void 0:i.saleLmttAge}),l=(0,c.createS3ImgEl)(s);break;case c.RecentCatCode.EVENT:(0,c.isEmpty)(null==i?void 0:i.imgPath)||null==(null==i?void 0:i.imgPath)?l=(0,c.createEl)({},"img"):(s=Object.assign(s,{"img-path":(0,d.Xo)(null==i?void 0:i.imgPath),url:(0,c.parseStageURL)("".concat("GFT"===a?"/HTR/e/".concat(n):"/EVT/detail/".concat(n)))}),l=(0,c.createS3ImgEl)(s));break;case c.RecentCatCode.SPECIAL:null!=(null==i?void 0:i.imgPath)?(s=Object.assign(s,{"img-path":null==i?void 0:i.imgPath,url:(0,c.parseStageURL)("/HTR/e/".concat(n))}),l=(0,c.createS3ImgEl)(s)):l=(0,c.createEl)({},"img");break;case c.RecentCatCode.BRAND:null!=(null==i?void 0:i.imgPath)?(s={"img-path":null==i?void 0:i.imgPath,url:(0,c.parseStageURL)("/HTR/b/".concat(n))},l=(0,c.createS3ImgEl)(s)):l=(0,c.createEl)({},"img")}return l}var h=i(42365),p=i(26479);function g(t,e){var i;switch(e.catg){case o.k7.EVENT:case o.k7.SPECIAL:return}const a=null!==(i=null==t?void 0:t.saleCmdtid)&amp;&amp;void 0!==i?i:e.id,n=(0,r.R_)(t,{clss:"circle",id:a}).addClass("size_sm");return o.q$&amp;&amp;n.children(".ico_wish").addClass("type_gray"),(0,d.I5)(null==e?void 0:e.type)&amp;&amp;n.on("click",(()=&gt;{if(!this.authorized)return;const t=!n.hasClass("active");h.xs.call(this,t,e)})),n}function _(t){const{data:e}=t;this.cookieData[0].id===t.id&amp;&amp;this.emit("get.firstItem",{data:t});const i=null==e?{id:t.id}:e,a=function(t){const e=t.data;let i=null;switch(t.catg){case o.k7.PRODUCT:if("CAS"===t.type){i=(0,r.$u)("/BCF/post/detail/".concat(null==e?void 0:e.saleCmdtid));break}i=(0,r.kR)({pid:null==e?void 0:e.saleCmdtid,bid:null!=e&amp;&amp;e.imgPath?null==e?void 0:e.saleCmdtid:null==e?void 0:e.cmdtcode,type:null!=e&amp;&amp;e.imgPath?"GFT":null==e?void 0:e.saleCmdtDvsnCode});break;case o.k7.EVENT:i=(0,r.$u)("/EVT/detail/".concat(t.id)),"GFT"===t.type&amp;&amp;(i=(0,r.$u)("/HTR/e/".concat(t.id)));break;case o.k7.SPECIAL:i=(0,r.$u)("/HTR/e/".concat(t.id));break;case o.k7.BRAND:i=(0,r.$u)("/HTR/b/".concat(t.id))}return i}(t),n=(0,r.nV)(i,"history_item","LI"),s=(0,r.ut)("prod_area horizontal"),l=(0,r.T0)("img_box no_img"),c=(0,r.ut)({class:"prod_link",href:a},"A").append(l.append(u.call(this,t))),h=(0,r.ut)("prod_thumb_box size_sm".concat(t.catg===o.k7.BRAND?" type_brand":" type_cover")).append(c),_=(0,r.ut)("prod_info_box"),m=(0,r.T0)({class:["badge_md","badge_line_primary"]}).append((0,r.T0)({class:"text",text:(0,d.zD)(t.catg)}));let b=(null==e?void 0:e.cmdtName)||"",C=null;t.catg===o.k7.PRODUCT&amp;&amp;(b="".concat((0,d.Oo)(t.type)," ").concat(b),C=(0,d.I5)(null==t?void 0:t.type)?null==e?void 0:e.brandName:null==e?void 0:e.chrcName);const f=(0,r.ut)({class:"prod_info",href:a},"A").append((0,r.T0)({class:"prod_name",html:b}).attr("data-kbbfn-dvsncode",t.type)),E=(0,r.T0)({class:"prod_period",text:null==e?void 0:e.period}),y=null==e?void 0:e.saleCmdtSapr,v=null==e?void 0:e.saleCmdtPrceDscnRate,k=(0,r.ut)("prod_price","span").append([v?'&lt;span class="percent"&gt;'.concat(v,"%&lt;/span&gt;"):null,(0,r.jK)(y)]);_.append([m,f,C?$('&lt;span class="prod_author"&gt;'.concat(C,"&lt;/span&gt;")):null,null!=e&amp;&amp;e.period?E:null,y||v?k:null]),s.append([h,_]);const R=(0,r.ut)("history_control_box").append([g.call(this,e,t),(0,r.Rd)("btn_history_delete").append([(0,r.T0)("ico_history_del"),(0,r.T0)("hidden","��젣")])]);return(0,p.r)([c,f],Object.assign({catg:t.catg,url:a},t.data)),n.append([s,R])}function m(){const t=this.recentList.length;this.getElement("recentCount").text(t),(0,d.d3)(this.count),b.call(this)}function b(){const{catg:t}=this.curTab;let e="理쒓렐 蹂� �곹뭹 諛� 肄섑뀗痢좉� �놁뒿�덈떎";const i=_.bind(this);if(this.getElement("itemWrap").empty(),this.recentList.length){const t=this.recentList.map((t=&gt;i(t)));this.getElement("itemWrap").append(t)}else{switch(t){case o.k7.PRODUCT:e="理쒓렐 蹂� �곹뭹�� �놁뒿�덈떎";break;case o.k7.SPECIAL:e="理쒓렐 蹂� 湲고쉷�꾩씠 �놁뒿�덈떎";break;case o.k7.EVENT:e="理쒓렐 蹂� �대깽�멸� �놁뒿�덈떎";break;case o.k7.BRAND:e="理쒓렐 蹂� 釉뚮옖�쒓� �놁뒿�덈떎"}this.getElement("itemWrap").html(function(t){return(0,r.ut)({class:"no_data"}).append((0,r.ut)({class:"no_data_desc",text:t}))}(e))}C.call(this)}function C(){var t;const{elements:e}=this.options,i=this.$root.find(null==e||null===(t=e.tag)||void 0===t?void 0:t.item);i.off("click").on("click",(t=&gt;{const e=$(t.target).closest("button");if(e.hasClass("active"))return;const a=e.index(),n=e.data("catg");i.removeClass("active"),e.addClass("active"),this.curTab={index:a,catg:n},0!==this.curTab.index?this.recentList=this.cookieData.filter((t=&gt;{let{catg:e}=t;return e===n})):this.recentList=this.cookieData})),this.setElement("tab",i),this.$root.find(".btn_history_delete").on("click",(t=&gt;{const e=$(t.target.closest(".history_item")).data("id");this.itemDelete(e)})),$("#btnDeleteAllHistory").off("click").on("click",(t=&gt;{this.count&gt;0&amp;&amp;this.ui.alert({title:"理쒓렐 蹂� �꾩껜 肄섑뀗痢좊� ��젣�섏떆寃좎뒿�덇퉴?",showCancelButton:!0}).then((t=&gt;{t.value&amp;&amp;this.listAllDelete()}))}))}function f(){const t=$(this.getOption("trigger"));if(null===t)return;const e=t.attr("data-target").slice(1),i=(0,c.createEl)({id:e,class:"dialog_wrap ".concat(c.IS_MOBILE?"has_btn dialog_history":""),"data-class":c.IS_MOBILE?"dialog_full":"dialog_history"});return i.append([()=&gt;(0,c.createBtnEl)({class:"btn_dialog_close","data-dialog-close":!0}).append([(0,c.createSpanEl)({class:"ico_dialog_close"}),(0,c.createSpanEl)({class:"hidden",text:"�リ린"})]),(0,c.createEl)("dialog_header").append((0,c.createEl)({class:"dialog_title",text:"理쒓렐 蹂� 肄섑뀗痢�"},c.IS_MOBILE?"H1":"DIV")),E.call(this)]),$("body").append(i),i}function E(){const t=["�곹뭹|".concat(c.RecentCatCode.PRODUCT),"湲고쉷��|".concat(c.RecentCatCode.SPECIAL),"�대깽��|".concat(c.RecentCatCode.EVENT),"釉뚮옖��|".concat(c.RecentCatCode.BRAND)],e=(0,c.createEl)("dialog_contents"),i=(0,c.createEl)({class:["tag_wrap",c.IS_MOBILE?"size_md":"size_lg"],"data-tag-toggle":!0}),a=(0,c.uniqBy)(this.cookieData,"catg").map((t=&gt;{let{catg:e}=t;return"".concat((0,d.zD)(e),"|").concat(e)}));(0,c.concat)(["�꾩껜|a"],[...new Set([...a,...t])]).forEach(((t,e)=&gt;{const a=t.split("|");i.append((0,c.createBtnEl)({class:"tag ".concat(0===e?"active":""),"data-catg":a[1]}).append((0,c.createSpanEl)({class:"text",text:a[0]})))})),e.append(i);const n=(0,c.createEl)("sort_list_header").append([(0,c.createSpanEl)({class:"sort_result_desc",html:'&lt;span class="val"&gt;0&lt;/span&gt;媛�'}),(0,c.createBtnEl)({id:"btnDeleteAllHistory",class:"btn_delete_text",html:'&lt;span class="text"&gt;�꾩껜��젣&lt;/span&gt;'})]),s=(0,c.createEl)({class:["list_result_wrap","type_no_line"]}).append([(0,c.createEl)({class:"result_count",html:'&lt;span class="fc_green"&gt;0&lt;/span&gt;媛�'},"P"),(0,c.createEl)({class:"right_area",html:'&lt;button id="btnDeleteAllHistory" type="button" class="btn_delete_text"&gt;\n              &lt;span class="text"&gt;�꾩껜��젣&lt;/span&gt;\n            &lt;/button&gt;'})]),l=c.IS_MOBILE?s:n;e.append(l);const o=(0,c.createEl)("history_list_wrap"),r=(0,c.createEl)("custom_scroll_wrap"),u=(0,c.createEl)("history_list","ul");return o.append(c.IS_MOBILE?u:r.append(u)),e.append(o),e}class y extends c.UiPluginsModuleItem{constructor(t,e,i){super(t,e,i),this.initOptions(),this._curTab={index:0,catg:c.RecentCatCode.ALL},this._count=0,this._cookieData=[],this._data=null,this._recentList=null;const a=$(this.getOption("trigger"));if(null==a)return;const n=a.attr("data-target").replace(/^#/,"");$("#".concat(n)).length&gt;0||(this.once("get.firstItem",(t=&gt;{let{data:e}=t;if(!c.IS_MOBILE){const t=this.getElement("count").closest(".btn_history"),i=(0,d.R4)(e);if(null!=i){return $('[data-kbbfn="ui-recently-contents"]').find("img").attr("src",i),void t.removeClass("no_item")}t.addClass("no_item")}})),this.domInit())}domInit(){const t=f.call(this).one("dialogcreate",((t,e)=&gt;{this._dialog=$(t.target).dialog("instance"),this.init(),this.initialized=!0}));this.ui.dialog("#"+t.attr("id"))}initOptions(){Object.assign(this.options,{elements:{root:"#popHistoryContents",recentBtn:{web:".btn_history",mobile:".btn_docker_history"},tag:{wrap:".tag_wrap",item:".tag"},itemWrap:".history_list",item:{wrap:".history_item",deleteBtn:".btn_history_delete",wish:{ink:".btn_wish_circle.size_sm",mok:".btn_wish_circle.size_sm"},badge:".badge_md"}}})}get active(){return this.$root.dialog("isOpen")}set active(t){t!==this.active&amp;&amp;this.$root.dialog(t?"open":"close")}set curTab(t){const{index:e}=t;this._curTab=t,this.getElement("tab").removeClass("active"),this.getElement("tab").eq(e).addClass("active")}get curTab(){return this._curTab}set recentList(t){const{catg:e}=this.curTab;let i=[];switch(e){case c.RecentCatCode.ALL:i=t.map((t=&gt;{let{id:e,type:i,catg:a}=t,n={id:e,type:i,catg:a};switch(a){case c.RecentCatCode.EVENT:n={id:e,type:i,catg:a};break;case c.RecentCatCode.BRAND:case c.RecentCatCode.SPECIAL:n={id:e,catg:a}}return n}));break;case c.RecentCatCode.PRODUCT:i=t.filter((t=&gt;{let{catg:e}=t;return e===c.RecentCatCode.PRODUCT})).map((t=&gt;{let{id:e,type:i,catg:a}=t;return{id:e,type:i,catg:a}}));break;case c.RecentCatCode.EVENT:i=t.filter((t=&gt;{let{catg:e}=t;return e===c.RecentCatCode.EVENT})).map((t=&gt;{let{id:e,type:i,catg:a}=t;return{id:e,type:i,catg:a}}));break;case c.RecentCatCode.BRAND:i=t.filter((t=&gt;{let{catg:e}=t;return e===c.RecentCatCode.BRAND})).map((t=&gt;{let{id:e,catg:i}=t;return{id:e,catg:i}}));break;case c.RecentCatCode.SPECIAL:i=t.filter((t=&gt;{let{catg:e}=t;return e===c.RecentCatCode.SPECIAL})).map((t=&gt;{let{id:e,catg:i}=t;return{id:e,catg:i}}))}i.length?h._2.call(this,i).then((e=&gt;{t=t.map((t=&gt;{const{id:i}=t,a=e.find((t=&gt;{let{saleCmdtid:e}=t;return e===i}));return null!=a?{...t,data:a}:t}))})).finally((()=&gt;{this._recentList=t,m.call(this)})):(this._recentList=t,m.call(this))}get recentList(){return this._recentList}get history(){return this.modules.get("history")}set count(t){this._count=t;const e=this.getElement("count"),i=this.getElement("totalCount.mok");t&gt;0?i.show():i.hide(),e.text(t),i.text(t)}get count(){return this._count}get cookieData(){return(this.history.list||[]).reverse().map((t=&gt;{const e=t.split("|");return{catg:e[0],type:e[1],id:e[2]}}))}set cookieData(t){this._cookieData=t}get $root(){const{elements:t}=this.options,e=null==t?void 0:t.root;if(null!==e)return $(e)}init(){var t;const{elements:e}=this.options,i=this.ui.$body;this.setElement("count",i.find(".floating_wrapper .btn_history").find(".count")),this.setElement("recentCount",this.$root.find(c.IS_MOBILE?".result_count .fc_green":".sort_list_header .val")),this.setElement("totalCount.mok",this.$root.find(".dialog_header .fc_spot")),this.setElement("itemWrap",this.$root.find(null==e?void 0:e.itemWrap)),this.setElement("item",this.$root.find(null==e||null===(t=e.item)||void 0===t?void 0:t.wrap)),this.count=this.cookieData.length,this.recentList=this.cookieData}listAllDelete(){null==this.history.list||this.history.clear(),this._cookieData=[],this.recentList=[],this.count=0}itemDelete(t){const e=this.recentList.filter((e=&gt;e.id!==t.toString()));this.recentList=e,this.count=this.count-1,this.history.remove(t.toString()),0===this.count&amp;&amp;this.history.clear()}}class v extends s.YZ{constructor(){super("recently-contents"),this._list=[]}get list(){return this._list}get history(){return this.modules.get("history")}addItem(t){const{catg:e,type:i,id:a}=t;this.history.put(e,i,a)}createDialog(t){if(!this.initialized)return this.ready((()=&gt;this.createDialog(t)));let e=(0,l.U2)(t,"trigger");if(null==e)return n().reject(new Error("[".concat(e,"] undefined trigger element selector!")));if(!(0,l.HD)(e)){const t="trigger_"+this.list.length;$(e).data("kbbfn-sid",t),e=t}const i=this.getInstance(e);if(null!=i)return n().resolve(i);const a=new y(this,e,t);return this.list.push(a),n().resolve(a)}exists(t){return null!=this.getInstance(t)}getInstance(t){return this.list.find((e=&gt;{let{id:i}=e;return i===t}))}}var k=new v}},function(t){return t.O(0,[321,160,712],(function(){return e=96350,t(t.s=e);var e})),t.O()}])}));</pre></body></html>