var _____WB$wombat$assign$function_____=function(name){return (globalThis._wb_wombat && globalThis._wb_wombat.local_init && globalThis._wb_wombat.local_init(name))||globalThis[name];};if(!globalThis.__WB_pmw){globalThis.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{ let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); window.addEventListener('load', function () { if (typeof window.navigator === 'undefined') { return false; } /** * MANAGE 전역 설정 값 리턴 * * @param sOption * @returns {*} */ var getManageConfig = function (sOption) { if (typeof window.EC_FRONT_JS_CONFIG_MANAGE === 'object') { if (sOption in window.EC_FRONT_JS_CONFIG_MANAGE) { return window.EC_FRONT_JS_CONFIG_MANAGE[sOption]; } } return null; }; // 프로토콜 체크까지 포함된다. if ('serviceWorker' in window.navigator) { var sCafeSWName = '/ind-script/sw.php'; var sA2hsLogEndpoint = '/exec/front/manage/a2hs'; var sA2hsLogKey = 'a2hs_manifest_name'; var $manifest = document.querySelector('link[rel="manifest"]'); var bHasManifest = !!$manifest; if (bHasManifest === true) { // start_url 로 들어온 경우 로깅 if (location.pathname === '/' && location.search.indexOf('a2hs=1') !== -1) { var sManifestName = $manifest.href.split("/").pop(); var sStoredManifestName = localStorage.getItem(sA2hsLogKey); if (!sStoredManifestName || sStoredManifestName !== sManifestName) { if (window.fetch) { fetch(sA2hsLogEndpoint, { headers: { 'Content-Type': 'application/json' }, method: 'POST', body: JSON.stringify({ ua: navigator.userAgent }) }) .then(function (oResponse) { localStorage.setItem(sA2hsLogKey, sManifestName); }); } } } } var sUserAgent = (navigator.userAgent || '').toLowerCase(); var sClientWebView = ((sUserAgent.indexOf('android') !== -1 && sUserAgent.indexOf('wv') !== -1) || sUserAgent.indexOf('cafe24plus') !== -1) ? 'T' : 'F'; // 서비스워커 설치 검증 var bIsWebView = getManageConfig('IS_WEB_VIEW') === 'T' || sClientWebView === 'T'; navigator.serviceWorker.getRegistration('/') .then(function (oSWRegistration) { var bInstallable = true; // 등록된 서비스워커가 있을 경우, Cafe24 서비스워커인지 확인 if (oSWRegistration) { var oSW = oSWRegistration.installing || oSWRegistration.waiting || oSWRegistration.active; if (oSW && oSW.scriptURL.indexOf(sCafeSWName) === -1) { bInstallable = false; } else if (bIsWebView === true) { // cafe24 서비스워커면서 웹뷰 접근일 경우 서비스워커 삭제 (크롬 75.0.3770.67 버전 대응) return oSWRegistration.unregister().then(function () { return false; }).catch(function (oError) { if (window.EC_JET && EC_JET.message) { EC_JET.message(oError); } console.warn('unregisterError => ', oError, oError.message, oError.name); return false; }); } } // 웹뷰인 경우 설치하지 않음 if (bIsWebView === true) { bInstallable = false; } return bInstallable; }) .then(function (bInstallable) { if (bInstallable === true) { var sRevision = getManageConfig('FW_MANIFEST_CACHE_REVISION'); if (sRevision) { sCafeSWName = sCafeSWName + '?v=' + sRevision; } return navigator.serviceWorker.register(sCafeSWName, { scope: '/', updateViaCache: 'all' }).catch(function (oError) { if (window.EC_JET && EC_JET.message) { EC_JET.message(oError); } console.warn('registerError => ', oError, oError.message, oError.name); }); } }); } }); var EC_EXTERNAL_FRONT_APPSCRIPT = { insertAppScript : function() { if (typeof EC_APPSCRIPT_ASSIGN_DATA !== "undefined" && Array.isArray(window.EC_APPSCRIPT_ASSIGN_DATA)) { while (EC_APPSCRIPT_ASSIGN_DATA.length > 0) { EC_EXTERNAL_FRONT_APPSCRIPT.appendAppScript(EC_APPSCRIPT_ASSIGN_DATA.pop()); } } if (typeof EC_APPSCRIPT_SOURCE_DATA !== "undefined" && Array.isArray(window.EC_APPSCRIPT_SOURCE_DATA)) { while (EC_APPSCRIPT_SOURCE_DATA.length > 0) { EC_EXTERNAL_FRONT_APPSCRIPT.appendSourceTypeScript(EC_APPSCRIPT_SOURCE_DATA.pop()); } } }, appendAppScript : function(sSrc) { var js = document.createElement('script'); js.src = sSrc; document.body.appendChild(js); }, appendSourceTypeScript : function (sSrc) { var js = document.createElement('script'); js.type = 'text/javascript'; js.text = EC_EXTERNAL_FRONT_APPSCRIPT.base64Decode(sSrc); document.body.appendChild(js); }, base64Decode: function (sEncoded) { return decodeURIComponent(atob(sEncoded).split('').map(function(c) { return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2); }).join('')); } }; if (window.addEventListener) { window.addEventListener('load', EC_EXTERNAL_FRONT_APPSCRIPT.insertAppScript); } else if (window.attachEvent) { window.attachEvent('onload', EC_EXTERNAL_FRONT_APPSCRIPT.insertAppScript); } /** * SDK spec interface */ EC_EXTERNAL_UTIL_APP_SPECINTERFACE = { oMemberInfo : { member_id: null, group_no: null, guest_id: null }, oCustomerIDInfo : { member_id: null, guest_id: null }, oCustomerInfo: { member_id: null, name: null, nick_name: null, group_name: null, group_no: null, email: null, phone: null, cellphone: null, birthday: null, additional_information: null, created_date: null }, // @todo deprecated oMileageInfo: { available_mileage: null, returned_mileage: null, total_mileage: null, unavailable_mileage: null, used_mileage: null }, // @todo deprecated oDepositInfo: { all_deposit: null, member_total_deposit: null, refund_wait_deposit: null, total_deposit: null, used_deposit: null }, oPointInfo: { available_point: null, returned_point: null, total_point: null, unavailable_point: null, used_point: null }, oCreditInfo: { all_credit: null, member_total_credit: null, refund_wait_credit: null, total_credit: null, used_credit: null }, oCartList: { shop_no: null, product_no: null, additional_option: null, attached_file_option: null, basket_product_no: null, product_price: null, quantity: null, selected_product: null, variant_code: null }, oCartInfo: { basket_price: null }, oCartItemList : { basket_product_no: null, product_no: null, price: null, option_price: null, quantity: null, discount_price: null, variant_code: null, product_weight: null, display_group: null, quantity_based_discount: null, non_quantity_based_discount: null, product_volume: null, additional_option_values: null, product_bundle: null, product_bundle_no: null, option_id: null, product_name: null, product_image : null, option_value: null }, oCount: { count: 0 }, oShopInfo: { language_code: null, currency_code: null, timezone: null } }; /** * 비동기식 데이터 - App Common ( 앱 공통정보 ) */ CAPP_ASYNC_METHODS.aDatasetList.push('AppCommon'); CAPP_ASYNC_METHODS.AppCommon = { STORAGE_KEY: 'AppCommon_' + EC_SDE_SHOP_NUM, __sGuestId: null, isUse: function() { if ( typeof EC_APPSCRIPT_SDK_DATA != "undefined" && EC$.inArray('application', EC_APPSCRIPT_SDK_DATA ) > -1 ) { return true; } return false; }, restoreCache: function() { // sessionStorage 지원 여부 확인 if (!window.sessionStorage) { return false; } try { var aStorageData = JSON.parse(window.sessionStorage.getItem(this.STORAGE_KEY)); // expire 체크 if (aStorageData.exp < Date.now()) { throw 'cache has expired.'; } // 데이터 체크 if (typeof aStorageData.data.guest_id === 'undefined') { throw 'Invalid cache data.'; } // 데이터 복구 this.__sGuestId = aStorageData.data.guest_id; return true; } catch(e) { // 복구 실패시 캐시 삭제 this.removeCache(); return false; } }, removeCache: function() { // sessionStorage 지원 여부 확인 if (!window.sessionStorage) { return; } // 캐시 삭제 window.sessionStorage.removeItem(this.STORAGE_KEY); }, setData: function(oData) { // sessionStorage 지원 여부 확인 if (!window.sessionStorage) { return; } this.__sGuestId = oData.guest_id || ''; try { sessionStorage.setItem(this.STORAGE_KEY, JSON.stringify({ exp: Date.now() + (1000 * 60 * 10), data: this.getData() })); } catch (error) { } }, execute: function() { }, getData: function() { return { guest_id: this.__sGuestId }; }, setSpecData : function(oSpec, oData) { var aData = {}; for (var prop in oSpec) { if (oData.hasOwnProperty(prop) === true) { aData[prop] = oData[prop]; } else { aData[prop] = oSpec[prop]; } } return aData; }, setSpecDataMap : function(oSpec, oData, oMapData) { var aData = {}; for (var prop in oSpec) { if (oData.hasOwnProperty(oMapData[prop]) === true) { aData[prop] = oData[oMapData[prop]]; } else { aData[prop] = oSpec[prop]; } } return aData; }, // sdk function list getMemberID: function() { return CAPP_ASYNC_METHODS.member.getData().member_id; }, getMemberInfo: function() { if (CAPP_ASYNC_METHODS.IS_LOGIN === true) { return this.setSpecData(EC_EXTERNAL_UTIL_APP_SPECINTERFACE.oMemberInfo, {group_no: CAPP_ASYNC_METHODS.member.getData().group_no, member_id: CAPP_ASYNC_METHODS.member.getData().member_id}); } else { return this.setSpecData(EC_EXTERNAL_UTIL_APP_SPECINTERFACE.oMemberInfo, {guest_id: CAPP_ASYNC_METHODS.AppCommon.getData().guest_id}); } }, getCustomerIDInfo: function() { if (CAPP_ASYNC_METHODS.IS_LOGIN === true) { return this.setSpecData(EC_EXTERNAL_UTIL_APP_SPECINTERFACE.oCustomerIDInfo, {member_id: CAPP_ASYNC_METHODS.member.getData().member_id}); } else { return this.setSpecData(EC_EXTERNAL_UTIL_APP_SPECINTERFACE.oCustomerIDInfo, {guest_id: CAPP_ASYNC_METHODS.AppCommon.getData().guest_id}); } }, getCustomerInfo: function() { var oMember = CAPP_ASYNC_METHODS.member.getData(); if (oMember.created_date && typeof oMember.created_date === 'string') { oMember.created_date = oMember.created_date.replace(/(\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}).+/, '$1'); } return this.setSpecData(EC_EXTERNAL_UTIL_APP_SPECINTERFACE.oCustomerInfo, oMember); }, // @todo deprecated getMileageInfo: function() { return this.setSpecData(EC_EXTERNAL_UTIL_APP_SPECINTERFACE.oMileageInfo, CAPP_ASYNC_METHODS.Mileage.getData()); }, // @todo deprecated getDepositInfo: function() { return this.setSpecData(EC_EXTERNAL_UTIL_APP_SPECINTERFACE.oDepositInfo, CAPP_ASYNC_METHODS.Deposit.getData()); }, getPointInfo: function() { var oMapData = { available_point : 'available_mileage', returned_point : 'returned_mileage', total_point : 'total_mileage', unavailable_point : 'unavailable_mileage', used_point : 'used_mileage' }; return this.setSpecDataMap(EC_EXTERNAL_UTIL_APP_SPECINTERFACE.oPointInfo, CAPP_ASYNC_METHODS.Mileage.getData(), oMapData); }, getCreditInfo: function() { var oMapData = { all_credit : 'all_deposit', member_total_credit : 'member_total_deposit', refund_wait_credit : 'refund_wait_deposit', total_credit : 'total_deposit', used_credit : 'used_deposit' }; return this.setSpecDataMap(EC_EXTERNAL_UTIL_APP_SPECINTERFACE.oCreditInfo, CAPP_ASYNC_METHODS.Deposit.getData(), oMapData); }, getCartList: function() { var oData = CAPP_ASYNC_METHODS.BasketProduct.getData(); var oCartList = EC_EXTERNAL_UTIL_APP_SPECINTERFACE.oCartList; var aCartList = []; for (var iKey in oData) { aCartList.push(this.setSpecData(oCartList, oData[iKey])); } return aCartList; }, getCartInfo: function() { return this.setSpecData(EC_EXTERNAL_UTIL_APP_SPECINTERFACE.oCartInfo, CAPP_ASYNC_METHODS.Basketprice.getData()); }, getCartItemList: function() { var aCartItemList = []; if ( typeof aBasketProductData == "undefined" && typeof aBasketProductOrderData == "undefined") { return aCartItemList; } //aBasketProductOrderData : 주문서 //aBasketProductData : 장바구니 var aData = (typeof aBasketProductOrderData != "undefined") ? aBasketProductOrderData : aBasketProductData; var oMapData = { basket_product_no: 'basket_prd_no', product_no: 'product_no', price: 'product_price', option_price: 'opt_price', quantity : 'product_qty', discount_price: 'product_sale_price', variant_code: 'item_code', product_weight: 'product_weight', display_group: 'main_cate_no', quantity_based_discount : 'add_sale_related_qty', non_quantity_based_discount : 'add_sale_not_related_qty', product_volume: 'volume_size_serial', product_bundle : 'is_set_product', product_bundle_no : 'set_product_no', option_id : 'opt_id', product_name : 'product_name', product_image : 'product_image', //tiny 작은목록이미지 option_value : 'option_str' }; var idx = 0; var iOldBpPrdNo = null; var iNewBpPrdNo = null; for (var iKey in aData) { iNewBpPrdNo = aData[iKey].basket_prd_no; if (iOldBpPrdNo !== iNewBpPrdNo) { aCartItemList[idx] = this.setSpecDataMap(EC_EXTERNAL_UTIL_APP_SPECINTERFACE.oCartItemList, aData[iKey], oMapData); if (aCartItemList[idx]['product_volume'] !== '' && aCartItemList[idx]['product_volume'] !== null && aCartItemList[idx]['product_volume'] !== undefined) { var aProductVolume = aCartItemList[idx]['product_volume'].split('|'); aCartItemList[idx]['product_volume'] = { 'product_width': parseFloat(aProductVolume[0]), 'product_height': parseFloat(aProductVolume[1]), 'product_length': parseFloat(aProductVolume[2]), }; } else { aCartItemList[idx]['product_volume'] = { 'product_width': null, 'product_height': null, 'product_length': null, }; } if (aCartItemList[idx]['product_bundle_no'] == '0') { //세트상품번호 기본값 null 로 노출되도록 aCartItemList[idx]['product_bundle_no'] = null; } if (aCartItemList[idx]['product_image'] == '') { aCartItemList[idx]['product_image'] = null; } if (aCartItemList[idx]['option_value'] !== null && aCartItemList[idx]['option_value'].length < 1) { aCartItemList[idx]['option_value'] = null; } if (aData[iKey].custom_data != null) { aCartItemList[idx]['additional_option_values'] = []; aCartItemList[idx]['additional_option_values'].push(aData[iKey].custom_data); } idx++; } else { aCartItemList[idx - 1]['quantity'] += aData[iKey].product_qty; if (aData[iKey].custom_data != null) { aCartItemList[idx - 1]['additional_option_values'].push(aData[iKey].custom_data); } } iOldBpPrdNo = iNewBpPrdNo; } return aCartItemList; }, getCartCount: function() { return this.setSpecData(EC_EXTERNAL_UTIL_APP_SPECINTERFACE.oCount, CAPP_ASYNC_METHODS.Basketcnt.getData()); }, getCouponCount: function() { return this.setSpecData(EC_EXTERNAL_UTIL_APP_SPECINTERFACE.oCount, CAPP_ASYNC_METHODS.Couponcnt.getData()); }, getWishCount: function() { return this.setSpecData(EC_EXTERNAL_UTIL_APP_SPECINTERFACE.oCount, CAPP_ASYNC_METHODS.Wishcount.getData()); }, getShopInfo: function() { return this.setSpecData(EC_EXTERNAL_UTIL_APP_SPECINTERFACE.oShopInfo, {language_code: SHOP.getLanguage(), currency_code: SHOP.getCurrency(), timezone: SHOP.getTimezone()}); } }; } /* FILE ARCHIVED ON 04:08:01 Feb 15, 2021 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 11:53:04 Jun 05, 2026. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* playback timings (ms): capture_cache.get: 0.401 captures_list: 0.888 exclusion.robots: 0.269 exclusion.robots.policy: 0.258 esindex: 0.01 cdx.remote: 13.141 LoadShardBlock: 96.78 (3) PetaboxLoader3.datanode: 108.197 (4) load_resource: 269.421 PetaboxLoader3.resolve: 233.788 */