{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./LAL/js-general/orderTracking.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","$","document","ready","length","html","trim","remove","x","text","parseInt","window","load","orderStr","hide","today","Date","now","toDate","dateStr","dateParts","split","dateFormat","orderDate","orderDateNum","parse","shippDate","shippStr","shippDateNum","etaDate","etaStr","etaDateNum","manufacturDays","Math","floor","daysOrderPassed","manufacturDaysPercent","totalShipping","daysSippPassed","shippDaysPercent","barElem","ceil","days","getDay","months","getMonth","getDate","find","reverse","stepsElem","barHeight","outerHeight","nm","k","addClass","animateBar","thisPos","position","top","thisHeight","goToHeight","css","setTimeout","dataStep","attr","hasClass","width","widthElem","each","index","elem","unbind","on","this","toggleClass","slideToggle","journeyBtn","animate","removeClass","toggle","click","e","stopPropagation"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc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U,eAMlC5D,EAAE,uBAAuBsE,OAAO,SAASC,GAAG,SAAS,WACnDvE,EAAEwE,MAAMC,YAAY,wBACpBzE,EAAE,sBAAsB0E,iBAlE9B,GAuEA,IAAIC,EAAa3E,EAAE,gBAAgB8C,KAAK,WACxC9C,EAAE2E,GAAYJ,GAAG,SAAS,WAExBvE,EAAE,gBAAgB4D,IAAI,SAAU,SAChC5D,EAAE,gBAAgB4D,IAAI,SAAU,SAE5B5D,EAAE,iBAAiBgE,SAAS,gBAC9BhE,EAAE,iBAAiB4E,QAAQ,CAAE,OAAU,UAAWC,YAAY,gBAE9D7E,EAAE,iBAAiB4E,QAAQ,CAAE,OAAU,UAAWvB,SAAS,mBAI/DrD,EAAE,mBAAmBuE,GAAG,SAAS,WAC/BvE,EAAE,mBAAmB8E,YAEvB9E,EAAE,QAAQuE,GAAG,SAAS,WACpBvE,EAAE,mBAAmBa,UAGvBb,EAAE,eAAe+E,OAAM,SAAUC,GAC/BA,EAAEC","file":"LAL.US/mobile/js/orderTracking.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n","/*\nthe var's: dateFormat, days and months are declared in the webpage table acoording to the language and date format.\nthe var's: orderStr, shippStr and etaStr are declared in the order tracking translations.\n*/\n$(document).ready(function () {\n\n if ($('.couponLine2').length > 0 && $('.couponLine2').html().trim() == '') {\n $('.couponLineWrap').remove();\n $('.discountLineWrap').remove();\n }\n\n if ($('.shippingCostLine2').length > 0 && $('.shippingCostLine2').html().trim() == '') {\n $('.shippingCostLineWrap').remove();\n }\n if ($('.orderCommentLine2').length > 0 && $('.orderCommentLine2').html().trim() == '') {\n $('.orderCommentLineWrap').remove();\n }\n\n var x = $('.shippingCostLine2').text();\n x = parseInt(x);\n if (x === 0) {\n $('.shippingCostLine2').text(\"FREE\");\n }\n});\n\n$(window).load(function () {\n\n if (typeof orderStr != 'undefined' && orderStr != '') {\n $('.orderTrackingBanner').hide();\n }\n\n var oneDay = 24 * 60 * 60 * 1000;\n var today = Date.now();\n\n if (typeof orderStr != 'undefined') {\n\n function toDate(dateStr) {\n var dateParts = dateStr.split(\"/\");\n if (dateFormat === 1) {\n return new Date(dateParts[2], dateParts[1] - 1, dateParts[0]);\n } else if (dateFormat === 2) {\n return new Date(dateParts[2], dateParts[0] - 1, dateParts[1]);\n }\n }\n\n var orderDate = toDate(orderStr);\n var orderDateNum = Date.parse(orderDate);\n var shippDate = toDate(shippStr);\n var shippDateNum = Date.parse(shippDate);\n var etaDate = toDate(etaStr);\n var etaDateNum = Date.parse(etaDate);\n\n var totalDays = Math.floor((etaDateNum - orderDateNum) / oneDay);\n var manufacturDays = totalDays / 2;\n var daysOrderPassed = Math.floor((today - orderDateNum) / oneDay);\n var manufacturDaysPercent = daysOrderPassed / manufacturDays;\n var totalShipping = Math.floor((etaDateNum - shippDateNum) / oneDay);\n var daysSippPassed = Math.floor((today - shippDateNum) / oneDay);\n var shippDaysPercent = daysSippPassed / totalShipping;\n\n var daysShippRemined = Math.ceil((etaDateNum - today) / oneDay);\n\n var dayName = days[etaDate.getDay()];\n var monthName = months[etaDate.getMonth()];\n var dateNumber = etaDate.getDate();\n\n var barElem = $('.progress-bar').find('li').get().reverse();\n var stepsElem = $('.progress-text').find('li').get().reverse();\n var barHeight = $('.progress-bar').outerHeight();\n var nm = 0;\n if ($('.ot-shipped').length > 0) {\n nm = 4;\n for (var k = 0; k < nm; k++) {\n $(barElem[k + 1]).addClass('complate');\n }\n }\n (function animateBar() {\n nm++;\n var thisPos = $(barElem[nm]).position().top;\n var thisHeight = $(barElem[nm]).outerHeight();\n var goToHeight = barHeight - thisPos - thisHeight;\n $('#progress-bg').css('height', goToHeight);\n setTimeout(function () {\n $(barElem[nm]).addClass('complate');\n\n var dataStep = $(barElem[nm]).attr('data-step');\n\n if ($(barElem[nm]).hasClass('current') && dataStep == 'manufacturing' && daysOrderPassed > 0) {\n setTimeout(function () {\n if (manufacturDaysPercent < 0.85) {\n goToHeight = goToHeight + thisHeight * manufacturDaysPercent;\n } else {\n goToHeight = goToHeight + thisHeight * .85;\n }\n $('#progress-bg').css('height', goToHeight);\n $(stepsElem[nm - 1]).addClass('text-complate');\n }, 200);\n return;\n } else if ($(barElem[nm]).hasClass('current') && dataStep == 'shipped' && daysSippPassed > 0) {\n setTimeout(function () {\n if (shippDaysPercent < 1 && shippDaysPercent > 0) {\n goToHeight = goToHeight + (thisHeight * shippDaysPercent) * 2;\n $('#progress-bg').css('height', goToHeight);\n $(stepsElem[nm - 1]).addClass('text-complate');\n if (shippDaysPercent > 0.2 && shippDaysPercent < 0.9) {\n $('.shipping-point').css('display', 'block')\n }\n } else if (shippDaysPercent >= 1) {\n goToHeight = goToHeight + thisHeight * 2;\n $('#progress-bg').css('height', goToHeight);\n $(stepsElem[nm - 1]).addClass('text-complate');\n }\n }, 200);\n return;\n } else if ($(barElem[nm]).hasClass('current')) {\n $(stepsElem[nm - 1]).addClass('text-complate');\n return;\n } else {\n animateBar()\n }\n }, 500);\n\n // only desktop\n if ($(window).width() >= 768) {\n\n var widthElem = 0;\n $('.progress-bar li').each(function (index, elem) {\n\n // count width until current status\n if ($(elem).hasClass('complate') && !$(elem).hasClass('current')) {\n widthElem = $(elem).width() + widthElem;\n }\n\n $('#progress-bg').css('width', widthElem + 'px');\n $('#progress-bg').css('height', '2px');\n });\n }\n // mobile\n else {\n // toggle ordered items on mobile\n $('.orderTrackingBlock').unbind('click').on('click', function () {\n $(this).toggleClass('helpCenterMenuActive');\n $('.orderTrackingWrap').slideToggle();\n });\n }\n })();\n\n var journeyBtn = $('.journey-txt').find(' > span');\n $(journeyBtn).on('click', function () {\n\n $(\"#progress-bg\").css('bottom', '-80px');\n $('#progress-bg').css('height', '240px');\n\n if ($('.progress-box').hasClass('journey-open')) {\n $('.progress-box').animate({ 'height': '200px' }).removeClass('journey-open');\n } else {\n $('.progress-box').animate({ 'height': '300px' }).addClass('journey-open');\n }\n });\n\n $('.ot-tooltip-btn').on('click', function () {\n $('.ot-tooltip-msg').toggle();\n });\n $('body').on('click', function () {\n $('.ot-tooltip-msg').hide();\n });\n\n $('.ot-tooltip').click(function (e) {\n e.stopPropagation();\n });\n\n\n }\n\n})"],"sourceRoot":""}