{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./_dev/js/front/checkout/checkout-16-opc.js","webpack:///./_dev/js/front/checkout/checkout.js","webpack:///./_dev/js/mondialrelay_widget.js"],"names":["mondialRelayCarrierSelected","updateAddresses","$","ajax","type","headers","url","orderOpcUrl","Date","getTime","async","cache","dataType","data","static_token","success","json","hasError","errors","error","html","text","alert","order_opc_adress","parseHTML","find","contents","updateAddressesDisplay","bindUniform","XMLHttpRequest","textStatus","errorThrown","MR","on","savedRelay","empty","updatePaymentMethodsDisplay","show","summary_container","hide","init","ColLivMod","document","ev","fromAjax","initialized","MONDIALRELAY_SELECTED_RELAY_IDENTIFIER","save_button","click","initOrUpdate","widget","MR_Widget","isCarrierSelected","MONDIALRELAY_NATIVE_CARRIERS_IDS","includes","getSelectedCarrierId","id","val","replace","getCarrierDeliveryMode","id_carrier","MONDIALRELAY_CARRIER_METHODS","preventDefault","stopPropagation","displayErrors","addLoader","trigger","params","action","mondialrelay_selectedRelay","MONDIALRELAY_AJAX_CHECKOUT_URL","response","status","content","relaySummary","save_container","length","removeLoader","MONDIALRELAY_SAVE_RELAY_ERROR","loadJs","callback","script","createElement","onload","src","head","appendChild","load","loaded","MONDIALRELAY_BAD_CONFIGURATION","slideDown","widget_container","defaultParams","Target","selected_relay_input","Brand","MONDIALRELAY_ENSEIGNE","Country","MONDIALRELAY_COUNTRY_ISO","PostCode","MONDIALRELAY_POSTCODE","ShowResultsOnMap","MONDIALRELAY_DISPLAY_MAP","NbResults","Responsive","OnParcelShopSelected","relayData","setSelectedRelay","extend","MR_ParcelShopPicker","update","relayIdentifier","oldRelay","messages","box","error_container","stop","children","fadeOut","queue","each","k","m","push","addClass","append","dequeue","fadeIn","container","clone","attr","appendTo","remove","ready","change_button"],"mappings":";;;;;;;;;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AAC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U,EAAT,EAAa;AAClDA,IAAE,CAACmB,cAAH;AACAnB,IAAE,CAACoB,eAAH;AACH,CAHD","file":"js/front/checkout/checkout-16-opc.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 = \"./_dev/js/front/checkout/checkout-16-opc.js\");\n","/**\n * NOTICE OF LICENSE\n *\n * @author 202 ecommerce \n * @author Mondial Relay\n * @copyright Copyright (c) Mondial Relay\n */\n\n/**\n * Javascript for PS 1.6, when using OPC\n */\n\n// modules ES6\nimport * as MR from './checkout';\n\n// Tracks wether a MR carrier was selected; useful to detect changes between\n// MR / non-MR carriers\nlet mondialRelayCarrierSelected = false;\n\n/**\n * Mostly from PrestaShop order-opc.js, updateNewAccountToAddressBlock()\n * Updates the addresses from server\n */\nconst updateAddresses = () => {\n $.ajax({\n type: 'POST',\n headers: { \"cache-control\": \"no-cache\" },\n url: orderOpcUrl + '?rand=' + new Date().getTime(),\n async: true,\n cache: false,\n dataType : \"json\",\n data: 'ajax=true&method=getAddressBlockAndCarriersAndPayments&token=' + static_token,\n success: function(json)\n {\n if (json.hasError)\n {\n var errors = '';\n for(var error in json.errors)\n //IE6 bug fix\n if(error !== 'indexOf')\n errors += $('
').html(json.errors[error]).text() + \"\\n\";\n alert(errors);\n }\n else\n {\n if (typeof json.order_opc_adress !== 'undefined' && json.order_opc_adress) {\n $('.opc-main-block .addresses').html($($.parseHTML('
'+json.order_opc_adress+'
')).find('.opc-main-block .addresses').contents());\n updateAddressesDisplay(true);\n if (typeof bindUniform !=='undefined') {\n bindUniform();\n }\n }\n }\n },\n error: function(XMLHttpRequest, textStatus, errorThrown) {\n \n }\n });\n};\n\n$(MR.widget).on('mondialrelay.ready', function() {\n if (MR.isCarrierSelected()) {\n mondialRelayCarrierSelected = true;\n if (!MR.widget.savedRelay) {\n // This *should* hide or show the payment methods using a pretty\n // dirty method, but it's still the cleanest.\n $(\"#HOOK_PAYMENT\").empty();\n updatePaymentMethodsDisplay();\n MR.widget.show();\n } else {\n $(MR.widget.summary_container).show();\n MR.widget.hide();\n }\n MR.widget.init({ ColLivMod: MR.getCarrierDeliveryMode(MR.getSelectedCarrierId()) });\n }\n});\n\n$(document).on('mondialrelay.contentRefreshed', '#mondialrelay_content', function(ev, data) {\n // We only care about this event if the content was reloaded by AJAX\n if (!data.fromAjax) {\n return;\n }\n \n // The content was refreshed, so the widget is no longer there\n MR.widget.initialized = false;\n // Get latest data\n MR.widget.savedRelay = MONDIALRELAY_SELECTED_RELAY_IDENTIFIER;\n \n if (!MR.isCarrierSelected()) {\n if (mondialRelayCarrierSelected) {\n updateAddresses();\n }\n MR.widget.hide();\n mondialRelayCarrierSelected = false;\n } else {\n if (MR.widget.savedRelay) {\n // If we have a selected relay, then we're reselecting the carrier\n // Resubmit the relay, just in case\n $(MR.widget.save_button).click();\n MR.widget.hide();\n } else {\n MR.widget.show();\n }\n \n MR.widget.initOrUpdate({ColLivMod: MR.getCarrierDeliveryMode(MR.getSelectedCarrierId())});\n mondialRelayCarrierSelected = true;\n }\n});\n\n$(MR.widget).on('mondialrelay.saveSelectedRelay.before', function() {\n // This *should* hide or show the payment methods using a pretty\n // dirty method, but it's still the cleanest.\n $(\"#HOOK_PAYMENT\").empty();\n});\n\n$(MR.widget).on('mondialrelay.saveSelectedRelay.success', function() {\n // This *should* hide or display the payment methods using a pretty\n // dirty method, but it's still the cleanest. We have to call it\n // after our own call, because we can't specify any additional data\n // to send.\n updatePaymentMethodsDisplay();\n updateAddresses();\n});\n\n$(MR.widget).on('mondialrelay.saveSelectedRelay.error', function() {\n // This *should* hide or display the payment methods using a pretty\n // dirty method, but it's still the cleanest. We have to call it\n // after our own call, because we can't specify any additional data\n // to send.\n updatePaymentMethodsDisplay();\n updateAddresses();\n});","/**\n * NOTICE OF LICENSE\n *\n * @author 202 ecommerce \n * @author Mondial Relay\n * @copyright Copyright (c) Mondial Relay\n */\n\n// modules ES6\nimport * as MR_Widget from '../../mondialrelay_widget';\n\nconst widget = MR_Widget.widget;\n\nconst isCarrierSelected = () => {\n return MONDIALRELAY_NATIVE_CARRIERS_IDS.includes(getSelectedCarrierId());\n};\n\nconst getSelectedCarrierId = () => {\n let id = $('[name^=\"delivery_option\"]:checked').val();\n return id ? id.replace(',', '') : false;\n};\n\nconst getCarrierDeliveryMode = (id_carrier) => {\n return MONDIALRELAY_CARRIER_METHODS[id_carrier]['delivery_mode'];\n};\n\n$(document).on('click', widget.save_button, function(ev) {\n ev.preventDefault();\n ev.stopPropagation();\n\n widget.displayErrors(null);\n $(widget.summary_container).empty().show();\n widget.addLoader(widget.summary_container);\n \n $(widget).trigger('mondialrelay.saveSelectedRelay.before');\n \n let params = {\n ajax: true,\n action: 'saveSelectedRelay',\n mondialrelay_selectedRelay: MONDIALRELAY_SELECTED_RELAY_IDENTIFIER ? MONDIALRELAY_SELECTED_RELAY_IDENTIFIER : 0,\n id_carrier: getSelectedCarrierId(),\n };\n \n $.ajax(\n {\n type : 'POST',\n url: MONDIALRELAY_AJAX_CHECKOUT_URL,\n data : params,\n dataType: 'json',\n success: function(response) {\n if (!response) {\n this.error(response);\n return;\n }\n \n if (response.status == 'ok') {\n widget.savedRelay = MONDIALRELAY_SELECTED_RELAY_IDENTIFIER;\n $(widget.summary_container)\n .html(response.content.relaySummary);\n widget.hide();\n $(widget.save_container).hide();\n } else {\n widget.savedRelay = null;\n if (response.error.length) {\n widget.displayErrors(response.error);\n }\n widget.removeLoader($(widget.summary_container));\n $(widget).trigger('mondialrelay.saveSelectedRelay.error');\n return;\n }\n \n $(widget).trigger('mondialrelay.saveSelectedRelay.success');\n },\n error: function(response) {\n widget.savedRelay = null;\n alert(MONDIALRELAY_SAVE_RELAY_ERROR);\n $(widget).trigger('mondialrelay.saveSelectedRelay.error');\n widget.removeLoader($(widget.summary_container));\n }\n });\n \n return false;\n});\n\nexport {\n isCarrierSelected,\n getSelectedCarrierId,\n getCarrierDeliveryMode,\n widget,\n};\n","/**\n * NOTICE OF LICENSE\n *\n * @author 202 ecommerce \n * @author Mondial Relay\n * @copyright Copyright (c) Mondial Relay\n */\n\nconst widget = {\n 'url': '//widget.mondialrelay.com/parcelshop-picker/jquery.plugin.mondialrelay.parcelshoppicker.min.js',\n 'loaded': false,\n 'initialized': false,\n 'widget_container': '#mondialrelay_widget',\n 'save_container': '#mondialrelay_save-container',\n 'error_container': '#mondialrelay_errors',\n 'summary_container': '#mondialrelay_summary',\n 'save_button': '#mondialrelay_save-relay',\n 'change_button': '#mondialrelay_change-relay',\n 'selected_relay_input': '#mondialrelay_selected-relay',\n 'savedRelay': null,\n};\n\nconst loadJs = (url, callback) => {\n var script = document.createElement('script');\n script.onload = callback;\n script.src = url;\n \n document.head.appendChild(script);\n};\n\nwidget.load = (callback) => {\n loadJs(widget.url, function() {\n widget.loaded = true;\n callback();\n });\n};\n\nwidget.init = (params) => {\n \n // Access to the page may be completely blocked if the configuration isn't\n // done, so this variable may not always be defined.\n if (\n typeof MONDIALRELAY_BAD_CONFIGURATION != 'undefined'\n && MONDIALRELAY_BAD_CONFIGURATION\n ) {\n return;\n }\n \n if (widget.savedRelay) {\n $(widget.summary_container).slideDown();\n }\n \n if (!widget.loaded) {\n widget.addLoader(widget.widget_container);\n widget.load(function() {\n // No need to remove the loader; it will be replaced by the\n // widget's content\n widget.init();\n });\n return;\n }\n \n let defaultParams = {\n // Where to store the selected relay's ID\n Target: widget.selected_relay_input,\n Brand: MONDIALRELAY_ENSEIGNE,\n // iso code, 2 letters\n Country: MONDIALRELAY_COUNTRY_ISO,\n // Postcode for default search\n PostCode: MONDIALRELAY_POSTCODE,\n // Delivery mode; carrier dependent (Standard [24R], XL [24L], XXL [24X], Drive [DRI])\n ColLivMod: '24R',\n // Wether to display the relays on a map or as a list\n ShowResultsOnMap: MONDIALRELAY_DISPLAY_MAP == true,\n // Nombre de Point Relais à afficher\n NbResults: \"7\",\n Responsive: true,\n OnParcelShopSelected: function(relayData) {\n $(widget.save_container).show();\n widget.setSelectedRelay(null, relayData);\n }\n };\n \n if (params) {\n $.extend(defaultParams, params);\n }\n\n // This isn't really pretty, but it *should* add events useful to our processes\n // TODO : OPC, lock process until widget is initialized. How can we detect an\n // error though ?... Is OnNoResultReturned called either way ?...\n /*let firstSearch = true;\n let OnNoResultReturned = defaultParams.OnNoResultReturned;\n let OnSearchSuccess = defaultParams.OnSearchSuccess;\n \n defaultParams.OnNoResultReturned = function() {\n if (firstSearch) {\n firstSearch = false;\n widget.initialized = true;\n $(widget).trigger('mondialrelay.initialized');\n }\n \n if (OnNoResultReturned) {\n OnNoResultReturned();\n }\n \n $(widget).trigger('mondialrelay.searchComplete', {result: []});\n };\n \n defaultParams.OnSearchSuccess = function(data) {\n if (firstSearch) {\n firstSearch = false;\n widget.initialized = true;\n $(widget).trigger('mondialrelay.initialized');\n }\n \n if (OnSearchSuccess) {\n OnSearchSuccess(data);\n }\n \n $(widget).trigger('mondialrelay.searchComplete', {result: data});\n };*/\n\n $(widget.widget_container).MR_ParcelShopPicker(defaultParams);\n widget.initialized = true;\n};\n\nwidget.show = () => {\n $(widget.widget_container).show();\n};\n\nwidget.hide = () => {\n $(widget.widget_container).hide();\n};\n\nwidget.update = (params) => {\n $(widget.widget_container).trigger(\"MR_SetParams\", params);\n};\n\nwidget.initOrUpdate = (params) => {\n if (widget.initialized) {\n widget.update(params);\n } else {\n widget.init(params);\n }\n};\n\nwidget.setSelectedRelay = (relayIdentifier, relayData) => {\n if (typeof relayIdentifier == 'undefined' || !relayIdentifier) {\n relayIdentifier = $(widget.selected_relay_input).val();\n }\n \n if (relayIdentifier != $(widget.selected_relay_input).val()) {\n // @TODO : select relay on map... if we can\n return;\n }\n \n // This can happen sometimes; we don't want to trigger a change if the value\n // didn't actually change\n if (MONDIALRELAY_SELECTED_RELAY_IDENTIFIER != relayIdentifier) {\n let oldRelay = MONDIALRELAY_SELECTED_RELAY_IDENTIFIER;\n MONDIALRELAY_SELECTED_RELAY_IDENTIFIER = relayIdentifier;\n $(widget).trigger('mondialrelay.selectedRelay', {oldRelay: oldRelay, relayData: relayData});\n }\n};\n\nwidget.displayErrors = (messages) => {\n let box = $(widget.error_container);\n if (box.length == 0) {\n return;\n }\n \n box.stop(true);\n \n if (box.children().length) {\n box.fadeOut(function() {\n $(this).empty();\n });\n }\n \n if (typeof messages == 'undefined' || !messages) {\n return;\n }\n \n // Either the queue is already going with .fadeOut(), either it will be\n // launched by .fadeIn()\n box.queue(function() {\n \n let errors = [];\n $.each(messages, function(k, m) {\n errors.push($(\"
\").addClass(\"alert alert-danger\").text(m));\n });\n \n $(this).append(errors);\n $(this).dequeue();\n });\n box.fadeIn();\n};\n\nwidget.addLoader = (container) => {\n if ($(container).length == 0) {\n return;\n }\n \n if ($(container).children('.mondialrelay_loader').length > 0) {\n return;\n }\n \n $(\"#mondialrelay_loader-template\")\n .clone()\n .attr('id', null)\n .show()\n .appendTo(container);\n};\n\nwidget.removeLoader = (container) => {\n $(container).children('.mondialrelay_loader').remove();\n};\n\n$(document).ready(function() {\n widget.savedRelay = MONDIALRELAY_SELECTED_RELAY_IDENTIFIER;\n $(widget).trigger('mondialrelay.ready');\n});\n\n$(document).on('click', widget.change_button, function(ev) {\n widget.show();\n});\n\n$(document).on('click', '.MRW-ShowList', function(ev) {\n ev.preventDefault();\n ev.stopPropagation();\n});\n\nexport { widget };"],"sourceRoot":""}