{"version":3,"sources":["webpack:///./src/client/default/js/components/impressionsComponent.js","webpack:///./src/client/default/js/base/baseComponent.js","webpack:///./node_modules/@babel/runtime/helpers/asyncToGenerator.js","webpack:///./node_modules/@babel/runtime/regenerator/index.js","webpack:///./node_modules/regenerator-runtime/runtime.js","webpack:///./src/client/default/js/utilities/URLDecoder.js"],"names":["impressionsComponent","element","setTimeout","productTiles","getProductTiles","triggerDataLayerEvents","this","CUSTOM_MESSAGES","UPDATE_GRID_EVENTS","done","triggerDLEventsUpdateDone","multisearchdone","triggerDLEventsMultiSearch","CAROUSEL_EVENTS","RECOMMENDER_MOUNTED","msg","Array","from","$el","querySelectorAll","update","window","dataLayer","triggerProductImpressionsEvents","triggerViewPromotionEvents","pushPromotionImpressions","triggerViewItemListEvents","startIndex","impressionsItems","getProductImpressionsItems","sendEventsInChunks","prdImpressions","map","el","dataset","productJson","cardSize","editorialCard","closest","classList","contains","impressions","length","productIndex","Number","tempImpressions","prdImpression","i","undefined","impression","JSON","parse","list_name","product_index","zeroResultPage","querySelector","getPathName","document","location","pathname","$options","impressionList","list","slice","items","eventType","itemsPartial","sendEvent","itemsChunk","pushProductImpressionsToDL","pushViewPromotionToDL","pushViewItemListToDL","console","log","viewPromotionItems","getViewPromotionItems","filter","productTile","promotionInfo","optionProductPromotionInfo","discountPercentage","optionProductDiscountpercentage","name","productImpressions","item_id","id","item_name","promotion_name","promotion_id","creative_name","location_id","price","item_type","dimension53","a","allPromoClicksEl","promotions","ga4TrackingObj","forEach","promoclick","promovalues","data","stringify","filteredPromoDataset","Object","keys","key","includes","reduce","obj","concat","ga4tracking","event","promo_title","promoTitle","promo_template","promoTemplate","promo_type","promoType","promo_format","promoFormat","push","ecommerce","promoView","viewItemListItems","getViewItemListItems","pathName","cardPathName","index","optionProductPrice","breadcrumbs","optionProductBreadcrumbs","sales","value","discount","toFixed","item_brand","brand","item_category","htmlValue","item_category2","item_category3","item_category4","item_list_id","item_list_name","item_tooltip","Boolean","promoSpendiRiprendi","currencyCode","baseComponent","BaseComponent","_componentElement","setAttribute","_checkMessages","compOptions","options","entry","optionValue","cleanEntry","cleanOptionKey","replace","convertType","deepFreeze","getAttribute","events","cb","elements","Bean","on","e","stopPropagation","one","off","fire","container","message","_loading","EMIT","LOADER_EVENTS","show","body","error","icon","hide","option","optionReturn","str","charAt","toLocaleLowerCase","BaseGiaComponent","asyncGeneratorStep","gen","resolve","reject","_next","_throw","arg","info","Promise","then","module","exports","fn","self","args","arguments","apply","err","__esModule","runtime","Op","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","defineProperty","enumerable","configurable","writable","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","state","method","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","type","makeInvokeMethod","call","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","invoke","result","__await","unwrapped","TypeError","resultName","next","nextLoc","pushTryEntry","locs","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","displayName","isGeneratorFunction","genFun","ctor","constructor","mark","setPrototypeOf","__proto__","awrap","async","iter","object","reverse","pop","skipTempReset","prev","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","globalThis","Function","dontUseCustomPathName","urlPathNameTable","split","urlPathNameOrSandbox","toString","endsWith","indexOf","replaceAll","parsePathName","getCustomPathName"],"mappings":"stBAKqBA,E,kCAQnB,WAAYC,GAAS,yBACnB,cAAMA,GAGNC,YAAW,WACT,IAAIC,EAAe,EAAKC,kBACxB,EAAKC,u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BrC,SAASzJ,EAAYsE,EAAUqM,GACpC,IAAIrQ,EAAiC,SAA1BqQ,EAAmCA,EAKhD,SAA2BrM,GACzB,IAAIsM,EAAmBtM,EAASuM,MAAM,KAClCC,EAA+C,MAAxBF,EAAiB,GAAa,YAAcA,EACvE,OAAsC,IAA/BA,EAAiB,GAAG1R,OACvB,WACwB,MAAxB0R,EAAiB,IAAsC,uBAAxBA,EAAiB,GAChD,eAIN,SAAuB/L,GACrB,IAAIqD,EAAMrD,EAAMkM,WAEZ7I,EAAI8I,SAAS,OACf9I,EAAMA,EAAI3H,MAAM,IAAK,IAEnB2H,EAAI8I,SAAS,WACf9I,EAAMA,EAAI3H,MAAM,IAAK,IAEC,GAApB2H,EAAI+I,QAAQ,OACd/I,EAAMA,EAAI3H,MAAM,IAGlB,OAAO2H,EAAIgJ,WAAW,IAAK,KAhBvBC,CAAcL,GAZoDM,CAAkB9M,GAExF,OADAtD,QAAQC,IAAI,oBAAsBX,GAC3BA,EATT","file":"js/component-impressionsComponent-js.chunks.js","sourcesContent":["import baseComponent from '../base/baseComponent';\n\nimport { getPathName } from '../utilities/URLDecoder';\n//import { getItemListName } from '../utilities/dataLayerUtils';\n\nexport default class impressionsComponent extends baseComponent {\n  get Messages() {\n    return {\n      [this.CUSTOM_MESSAGES.UPDATE_GRID_EVENTS.done]: this.triggerDLEventsUpdateDone,\n      [this.CUSTOM_MESSAGES.UPDATE_GRID_EVENTS.multisearchdone]: this.triggerDLEventsMultiSearch,\n      [this.CUSTOM_MESSAGES.CAROUSEL_EVENTS.RECOMMENDER_MOUNTED]: this.triggerDLEventsUpdateDone\n    };\n  }\n  constructor(element) {\n    super(element);\n    // let slotRecommenderCarousel = this.$el.querySelector('.slot-recommender-carousel');\n    // if (!slotRecommenderCarousel) {\n    setTimeout(() => {\n      let productTiles = this.getProductTiles();\n      this.triggerDataLayerEvents(productTiles);\n    }, 2200);\n    // }\n  }\n\n  get PARAMS_BLACK_LIST() {\n    return [];\n  }\n\n  triggerDLEventsUpdateDone() {\n    let productTiles = this.getProductTiles();\n    this.triggerDataLayerEvents(productTiles, true);\n  }\n\n  triggerDLEventsMultiSearch(msg) {\n    let productTiles = msg.productTiles;\n    this.triggerDataLayerEvents(productTiles);\n  }\n\n  getProductTiles() {\n    return Array.from(this.$el.querySelectorAll('.product.tile[data-product-json]'));\n  }\n\n  triggerDataLayerEvents(productTiles, update) {\n    if (!window.dataLayer) return;\n    this.triggerProductImpressionsEvents(productTiles);\n    this.triggerViewPromotionEvents(productTiles);\n    if (!update) this.pushPromotionImpressions();\n    this.triggerViewItemListEvents(productTiles);\n  }\n\n  triggerProductImpressionsEvents(productTiles, startIndex) {\n    let impressionsItems = this.getProductImpressionsItems(productTiles, startIndex);\n    this.sendEventsInChunks(impressionsItems, 'productImpressions');\n  }\n\n  getProductImpressionsItems(productTiles, startIndex) {\n    let prdImpressions = productTiles.map((el) => el.dataset.productJson);\n    let cardSize = productTiles.map((el) => {\n      let editorialCard = el.closest('.editorial-product-card');\n      if (editorialCard) {\n        if (editorialCard.classList.contains('half-width')) return '_card_single';\n        else if (editorialCard?.classList.contains('full-width')) return '_card_double';\n        else return '';\n      }\n    });\n    let impressions = [];\n    if (prdImpressions.length > 0) {\n      let productIndex = startIndex ? Number(startIndex) : 0;\n      let tempImpressions = prdImpressions.map((prdImpression, i) => {\n        if (prdImpression !== undefined) {\n          let impression = JSON.parse(prdImpression);\n          if (startIndex) {\n            impression.list_name = 'listing';\n            impression.product_index = productIndex;\n            productIndex++;\n          }\n          let zeroResultPage = !!this.$el.querySelector('.zero-search-results');\n          if (!zeroResultPage && getPathName(document.location.pathname, this.$options.impressionList) === 'wishlist') {\n            impression.list = 'le_mie_liste';\n          } else if (cardSize.length > 0 && cardSize[i]) {\n            impression.list = getPathName(document.location.pathname, this.$options.impressionList) + cardSize[i];\n            impression.list_name = impression.list;\n          } else {\n            impression.list = zeroResultPage ? 'searchresult_0' : getPathName(document.location.pathname, this.$options.impressionList);\n          }\n          return impression;\n        }\n        return null;\n      });\n      if (startIndex) {\n        impressions = tempImpressions.slice(startIndex);\n      } else {\n        impressions = tempImpressions;\n      }\n    }\n    return impressions;\n  }\n\n  sendEventsInChunks(items, eventType) {\n    if (items.length > 30) {\n      //push items in increments of 30 as GTM cannot handle very long items\n      for (let i = 0; i < items.length / 30; i++) {\n        let itemsPartial = items.slice(30 * i, 30 * (i + 1));\n        this.sendEvent(itemsPartial, eventType);\n      }\n      //push the last part of the array\n      if (items.length % 30 != 0) {\n        this.sendEvent(items.slice(30 * (items.length / 30)), eventType);\n      }\n    } else if (items.length > 0) {\n      this.sendEvent(items, eventType);\n    }\n  }\n\n  sendEvent(itemsChunk, eventType) {\n    if (itemsChunk && itemsChunk.length > 0) {\n      switch (eventType) {\n        case 'productImpressions':\n          this.pushProductImpressionsToDL(itemsChunk);\n          break;\n        case 'viewPromotion':\n          this.pushViewPromotionToDL(itemsChunk);\n          break;\n        case 'viewItemList':\n          this.pushViewItemListToDL(itemsChunk);\n          break;\n        default:\n          console.log(`Event type - ${eventType} - doesn't exist.`);\n      }\n    }\n  }\n\n  triggerViewPromotionEvents(productTiles) {\n    let viewPromotionItems = this.getViewPromotionItems(productTiles);\n    this.sendEventsInChunks(viewPromotionItems, 'viewPromotion');\n  }\n\n  getViewPromotionItems(productTiles) {\n    return productTiles\n      .filter((productTile) => {\n        let promotionInfo = productTile.dataset.optionProductPromotionInfo && JSON.parse(productTile.dataset.optionProductPromotionInfo);\n        let discountPercentage = productTile.dataset.optionProductDiscountpercentage;\n\n        return (promotionInfo && promotionInfo.name) || discountPercentage;\n      })\n      .map((el) => {\n        let productImpressions = el.dataset.productJson && JSON.parse(el.dataset.productJson);\n        let promotionInfo = el.dataset.optionProductPromotionInfo && JSON.parse(el.dataset.optionProductPromotionInfo);\n\n        return {\n          item_id: productImpressions && productImpressions.id,\n          item_name: productImpressions && productImpressions.name,\n          promotion_name: promotionInfo && promotionInfo.name,\n          promotion_id: promotionInfo ? (promotionInfo.id ? promotionInfo.id : promotionInfo.name) : '',\n          creative_name: 'product card',\n          location_id: 'product listing',\n          price: productImpressions && productImpressions.price,\n          item_type: productImpressions.dimension53\n        };\n      });\n  }\n\n  async pushPromotionImpressions() {\n    if (!window.dataLayer) return;\n    let allPromoClicksEl = this.$el.querySelectorAll('.promoclick');\n    if (allPromoClicksEl.length > 0) {\n      let promotions = [];\n      let ga4TrackingObj = {};\n      allPromoClicksEl.forEach(function(promoclick) {\n        if (!!promoclick && !!promoclick.dataset) {\n          let promovalues = ['id', 'name', 'creative', 'position'];\n          let data = JSON.parse(JSON.stringify(promoclick.dataset));\n          let filteredPromoDataset = Object.keys(data)\n            .filter((key) => promovalues.includes(key))\n            .reduce((obj, key) => {\n              obj[key] = data[key];\n              return obj;\n            }, {});\n          promotions = promotions.concat(filteredPromoDataset);\n          if (data && data.ga4tracking == 'true') {\n            ga4TrackingObj = {\n              event: 'promo_impression',\n              promo_title: data.promoTitle != 'null' ? data.promoTitle : '',\n              promo_template: data.promoTemplate != 'null' ? data.promoTemplate : '',\n              promo_type: data.promoType != 'null' ? data.promoType : '',\n              promo_format: data.promoFormat != 'null' ? data.promoFormat : ''\n            };\n          }\n        }\n      });\n      window.dataLayer.push({\n        event: 'promotion impressions',\n        ecommerce: {\n          promoView: {\n            promotions: promotions\n          }\n        }\n      });\n      if (Object.keys(ga4TrackingObj).length > 0) {\n        window.dataLayer.push(ga4TrackingObj);\n      }\n    }\n  }\n\n  triggerViewItemListEvents(productTiles) {\n    let viewItemListItems = this.getViewItemListItems(productTiles);\n    this.sendEventsInChunks(viewItemListItems, 'viewItemList');\n  }\n\n  getViewItemListItems(productTiles) {\n    let pathName;\n    let cardPathName;\n    if (getPathName(document.location.pathname, this.$options.impressionList) === 'wishlist') {\n      pathName = 'le_mie_liste';\n    } else {\n      pathName = getPathName(document.location.pathname, this.$options.impressionList);\n    }\n    let zeroResultPage = !!this.$el.querySelector('.zero-search-results');\n    return productTiles.map((el, index) => {\n      let productImpressions = el.dataset.productJson && JSON.parse(el.dataset.productJson);\n      let promotionInfo = el.dataset.optionProductPromotionInfo && JSON.parse(el.dataset.optionProductPromotionInfo);\n      let price = el.dataset.optionProductPrice && JSON.parse(el.dataset.optionProductPrice);\n      let breadcrumbs = el.dataset.optionProductBreadcrumbs && JSON.parse(el.dataset.optionProductBreadcrumbs);\n      let editorialCard = el.closest('.editorial-product-card');\n      if (editorialCard) {\n        if (editorialCard.classList.contains('half-width')) cardPathName = pathName + '_card_single';\n        if (editorialCard.classList.contains('full-width')) cardPathName = pathName + '_card_double';\n      }\n\n      return {\n        item_id: productImpressions && productImpressions.id,\n        item_name: productImpressions && productImpressions.name,\n        price: price && price.sales && price.sales.value,\n        discount: price && price.list && price.list.value ? (price.list.value - price.sales.value).toFixed(2) : '',\n        promotion_name: promotionInfo && promotionInfo.name,\n        index: index,\n        item_brand: productImpressions && productImpressions.brand,\n        item_category: breadcrumbs && breadcrumbs.length > 1 ? breadcrumbs[1].htmlValue : '',\n        item_category2: breadcrumbs && breadcrumbs.length > 2 ? breadcrumbs[2].htmlValue : '',\n        item_category3: breadcrumbs && breadcrumbs.length > 3 ? breadcrumbs[3].htmlValue : '',\n        item_category4: breadcrumbs && breadcrumbs.length > 4 ? breadcrumbs[4].htmlValue : '',\n        item_list_id: zeroResultPage ? 'searchresult_0' : cardPathName ? cardPathName : pathName,\n        item_list_name: zeroResultPage ? 'searchresult_0' : cardPathName ? cardPathName : pathName,\n        item_type: productImpressions.dimension53,\n        item_tooltip: Boolean(promotionInfo && promotionInfo.promoSpendiRiprendi)\n      };\n    });\n  }\n\n  pushViewPromotionToDL(items) {\n    window.dataLayer.push({\n      event: 'view_promotion',\n      ecommerce: {\n        items: items\n      }\n    });\n  }\n\n  pushProductImpressionsToDL(impressions) {\n    const currencyCode = this.$el.dataset.currencyCode;\n    window.dataLayer.push({\n      event: 'product impressions',\n      ecommerce: {\n        currencyCode: currencyCode,\n        impressions: impressions\n      }\n    });\n  }\n\n  pushViewItemListToDL(items) {\n    window.dataLayer.push({\n      event: 'view_item_list',\n      ecommerce: {\n        items: items\n      }\n    });\n  }\n}\n","/* eslint-disable new-cap */\n/* eslint-disable valid-jsdoc */\n/* eslint-disable no-underscore-dangle */\n\nimport Bean from 'bean';\nimport deepFreeze from '../utilities/freeze';\nimport BaseGiaComponent from './baseGiaComponent';\n\nexport default class BaseComponent extends BaseGiaComponent {\n  /**\n   * @returns {HTMLElement}\n   */\n  get $el() {\n    return /** @type {HTMLElement} */ (this._componentElement);\n  }\n\n  get $options() {\n    const compOptions = {};\n    const options = { ...this.$el.dataset };\n    const optionsEntires = Object.keys(options).filter((entry) => entry.includes('option'));\n    optionsEntires.forEach((entry) => {\n      const cleanEntry = BaseComponent.cleanOptionKey(entry);\n      let optionValue;\n      if (options[entry].includes('{') && options[entry].includes('}')) {\n        optionValue = JSON.parse(options[entry].replace(/'/g, '\"'));\n      } else {\n        optionValue = BaseComponent.convertType(options[entry]);\n      }\n      compOptions[cleanEntry] = optionValue;\n    });\n    return deepFreeze(compOptions);\n  }\n\n  get COMPONENT_NAME() {\n    return this.$el.getAttribute('data-component');\n  }\n\n  /**\n   *\n   * constructor\n   *\n   * @param {Element} element\n   */\n  constructor(element) {\n    super(element);\n    this._componentElement = element;\n    this._componentElement.setAttribute('data-component-init', 'true');\n    this._checkMessages();\n  }\n\n  static convertType(option) {\n    let optionReturn;\n    switch (option) {\n      case 'false':\n        optionReturn = false;\n        break;\n      case 'true':\n        optionReturn = true;\n        break;\n      case 'null':\n        optionReturn = null;\n        break;\n      default:\n        optionReturn = option;\n        break;\n    }\n\n    return optionReturn;\n  }\n\n  static cleanOptionKey(key) {\n    const str = key.replace('option', '');\n    return `${str.charAt(0).toLocaleLowerCase()}${str.slice(1)}`;\n  }\n\n  /**\n   *\n   * $on\n   *\n   * @param {String} events\n   * @param {Function} cb\n   * @param {Element} [element = this.$el]\n   * @param {Array|String|Element} [elements = null]\n   */\n  $on(events, cb, element = this.$el, elements = null) {\n    if (!element || !events || !cb) return;\n    if (!elements) {\n      Bean.on(element, events, (e) => {\n        if (e) e.stopPropagation();\n        cb(e);\n      });\n    } else {\n      Bean.on(element, events, elements, (e) => {\n        if (e) e.stopPropagation();\n        cb(e);\n      });\n    }\n  }\n\n  /**\n   *\n   * $one\n   *\n   * @param {String} events\n   * @param {Function} cb\n   * @param {Element} [element = this.$el]\n   */\n  $one(events, cb, element = this.$el) {\n    Bean.one(element, events, cb);\n  }\n\n  /**\n   *\n   * $off\n   *\n   * @param {String} events\n   * @param {Element} [element = this.$el]\n   */\n  $off(events, element = this.$el) {\n    Bean.off(element, events);\n  }\n\n  /**\n   *\n   * $fire\n   *\n   * @param {String} events\n   * @param {Element} [element = this.$el]\n   */\n  $fire(events, element = this.$el) {\n    Bean.fire(element, events);\n  }\n\n  /**\n   *\n   * Activate loader\n   *\n   * @param {HTMLElement} [container]\n   * @param {String} [message]\n   */\n  loading(container, message) {\n    this._loading = true;\n    this.EMIT(this.CUSTOM_MESSAGES.LOADER_EVENTS.show, {\n      container: container || document.body,\n      message: message ?? null\n    });\n  }\n\n  /**\n   *\n   * Deactivate loader\n   *\n   * @param {HTMLElement} [container]\n   * @param {String} [message]\n   * @param {Boolean} [error=false]\n   * @param {String} [icon]\n   */\n  endLoading(container, message, error = false, icon) {\n    this._loading = false;\n    setTimeout(() => {\n      if (!this._loading) {\n        this.EMIT(this.CUSTOM_MESSAGES.LOADER_EVENTS.hide, {\n          container: container || document.body,\n          message,\n          error,\n          icon\n        });\n      }\n    }, 400);\n  }\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n  try {\n    var info = gen[key](arg);\n    var value = info.value;\n  } catch (error) {\n    reject(error);\n    return;\n  }\n\n  if (info.done) {\n    resolve(value);\n  } else {\n    Promise.resolve(value).then(_next, _throw);\n  }\n}\n\nfunction _asyncToGenerator(fn) {\n  return function () {\n    var self = this,\n        args = arguments;\n    return new Promise(function (resolve, reject) {\n      var gen = fn.apply(self, args);\n\n      function _next(value) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n      }\n\n      function _throw(err) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n      }\n\n      _next(undefined);\n    });\n  };\n}\n\nmodule.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","module.exports = require(\"regenerator-runtime\");\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n  \"use strict\";\n\n  var Op = Object.prototype;\n  var hasOwn = Op.hasOwnProperty;\n  var undefined; // More compressible than void 0.\n  var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n  var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n  var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n  var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n  function define(obj, key, value) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n    return obj[key];\n  }\n  try {\n    // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n    define({}, \"\");\n  } catch (err) {\n    define = function(obj, key, value) {\n      return obj[key] = value;\n    };\n  }\n\n  function wrap(innerFn, outerFn, self, tryLocsList) {\n    // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n    var generator = Object.create(protoGenerator.prototype);\n    var context = new Context(tryLocsList || []);\n\n    // The ._invoke method unifies the implementations of the .next,\n    // .throw, and .return methods.\n    generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n    return generator;\n  }\n  exports.wrap = wrap;\n\n  // Try/catch helper to minimize deoptimizations. Returns a completion\n  // record like context.tryEntries[i].completion. This interface could\n  // have been (and was previously) designed to take a closure to be\n  // invoked without arguments, but in all the cases we care about we\n  // already have an existing method we want to call, so there's no need\n  // to create a new function object. We can even get away with assuming\n  // the method takes exactly one argument, since that happens to be true\n  // in every case, so we don't have to touch the arguments object. The\n  // only additional allocation required is the completion record, which\n  // has a stable shape and so hopefully should be cheap to allocate.\n  function tryCatch(fn, obj, arg) {\n    try {\n      return { type: \"normal\", arg: fn.call(obj, arg) };\n    } catch (err) {\n      return { type: \"throw\", arg: err };\n    }\n  }\n\n  var GenStateSuspendedStart = \"suspendedStart\";\n  var GenStateSuspendedYield = \"suspendedYield\";\n  var GenStateExecuting = \"executing\";\n  var GenStateCompleted = \"completed\";\n\n  // Returning this object from the innerFn has the same effect as\n  // breaking out of the dispatch switch statement.\n  var ContinueSentinel = {};\n\n  // Dummy constructor functions that we use as the .constructor and\n  // .constructor.prototype properties for functions that return Generator\n  // objects. For full spec compliance, you may wish to configure your\n  // minifier not to mangle the names of these two functions.\n  function Generator() {}\n  function GeneratorFunction() {}\n  function GeneratorFunctionPrototype() {}\n\n  // This is a polyfill for %IteratorPrototype% for environments that\n  // don't natively support it.\n  var IteratorPrototype = {};\n  define(IteratorPrototype, iteratorSymbol, function () {\n    return this;\n  });\n\n  var getProto = Object.getPrototypeOf;\n  var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n  if (NativeIteratorPrototype &&\n      NativeIteratorPrototype !== Op &&\n      hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n    // This environment has a native %IteratorPrototype%; use it instead\n    // of the polyfill.\n    IteratorPrototype = NativeIteratorPrototype;\n  }\n\n  var Gp = GeneratorFunctionPrototype.prototype =\n    Generator.prototype = Object.create(IteratorPrototype);\n  GeneratorFunction.prototype = GeneratorFunctionPrototype;\n  define(Gp, \"constructor\", GeneratorFunctionPrototype);\n  define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n  GeneratorFunction.displayName = define(\n    GeneratorFunctionPrototype,\n    toStringTagSymbol,\n    \"GeneratorFunction\"\n  );\n\n  // Helper for defining the .next, .throw, and .return methods of the\n  // Iterator interface in terms of a single ._invoke method.\n  function defineIteratorMethods(prototype) {\n    [\"next\", \"throw\", \"return\"].forEach(function(method) {\n      define(prototype, method, function(arg) {\n        return this._invoke(method, arg);\n      });\n    });\n  }\n\n  exports.isGeneratorFunction = function(genFun) {\n    var ctor = typeof genFun === \"function\" && genFun.constructor;\n    return ctor\n      ? ctor === GeneratorFunction ||\n        // For the native GeneratorFunction constructor, the best we can\n        // do is to check its .name property.\n        (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n      : false;\n  };\n\n  exports.mark = function(genFun) {\n    if (Object.setPrototypeOf) {\n      Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n    } else {\n      genFun.__proto__ = GeneratorFunctionPrototype;\n      define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n    }\n    genFun.prototype = Object.create(Gp);\n    return genFun;\n  };\n\n  // Within the body of any async function, `await x` is transformed to\n  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n  // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n  // meant to be awaited.\n  exports.awrap = function(arg) {\n    return { __await: arg };\n  };\n\n  function AsyncIterator(generator, PromiseImpl) {\n    function invoke(method, arg, resolve, reject) {\n      var record = tryCatch(generator[method], generator, arg);\n      if (record.type === \"throw\") {\n        reject(record.arg);\n      } else {\n        var result = record.arg;\n        var value = result.value;\n        if (value &&\n            typeof value === \"object\" &&\n            hasOwn.call(value, \"__await\")) {\n          return PromiseImpl.resolve(value.__await).then(function(value) {\n            invoke(\"next\", value, resolve, reject);\n          }, function(err) {\n            invoke(\"throw\", err, resolve, reject);\n          });\n        }\n\n        return PromiseImpl.resolve(value).then(function(unwrapped) {\n          // When a yielded Promise is resolved, its final value becomes\n          // the .value of the Promise<{value,done}> result for the\n          // current iteration.\n          result.value = unwrapped;\n          resolve(result);\n        }, function(error) {\n          // If a rejected Promise was yielded, throw the rejection back\n          // into the async generator function so it can be handled there.\n          return invoke(\"throw\", error, resolve, reject);\n        });\n      }\n    }\n\n    var previousPromise;\n\n    function enqueue(method, arg) {\n      function callInvokeWithMethodAndArg() {\n        return new PromiseImpl(function(resolve, reject) {\n          invoke(method, arg, resolve, reject);\n        });\n      }\n\n      return previousPromise =\n        // If enqueue has been called before, then we want to wait until\n        // all previous Promises have been resolved before calling invoke,\n        // so that results are always delivered in the correct order. If\n        // enqueue has not been called before, then it is important to\n        // call invoke immediately, without waiting on a callback to fire,\n        // so that the async generator function has the opportunity to do\n        // any necessary setup in a predictable way. This predictability\n        // is why the Promise constructor synchronously invokes its\n        // executor callback, and why async functions synchronously\n        // execute code before the first await. Since we implement simple\n        // async functions in terms of async generators, it is especially\n        // important to get this right, even though it requires care.\n        previousPromise ? previousPromise.then(\n          callInvokeWithMethodAndArg,\n          // Avoid propagating failures to Promises returned by later\n          // invocations of the iterator.\n          callInvokeWithMethodAndArg\n        ) : callInvokeWithMethodAndArg();\n    }\n\n    // Define the unified helper method that is used to implement .next,\n    // .throw, and .return (see defineIteratorMethods).\n    this._invoke = enqueue;\n  }\n\n  defineIteratorMethods(AsyncIterator.prototype);\n  define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n    return this;\n  });\n  exports.AsyncIterator = AsyncIterator;\n\n  // Note that simple async functions are implemented on top of\n  // AsyncIterator objects; they just return a Promise for the value of\n  // the final result produced by the iterator.\n  exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n    if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n    var iter = new AsyncIterator(\n      wrap(innerFn, outerFn, self, tryLocsList),\n      PromiseImpl\n    );\n\n    return exports.isGeneratorFunction(outerFn)\n      ? iter // If outerFn is a generator, return the full iterator.\n      : iter.next().then(function(result) {\n          return result.done ? result.value : iter.next();\n        });\n  };\n\n  function makeInvokeMethod(innerFn, self, context) {\n    var state = GenStateSuspendedStart;\n\n    return function invoke(method, arg) {\n      if (state === GenStateExecuting) {\n        throw new Error(\"Generator is already running\");\n      }\n\n      if (state === GenStateCompleted) {\n        if (method === \"throw\") {\n          throw arg;\n        }\n\n        // Be forgiving, per 25.3.3.3.3 of the spec:\n        // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n        return doneResult();\n      }\n\n      context.method = method;\n      context.arg = arg;\n\n      while (true) {\n        var delegate = context.delegate;\n        if (delegate) {\n          var delegateResult = maybeInvokeDelegate(delegate, context);\n          if (delegateResult) {\n            if (delegateResult === ContinueSentinel) continue;\n            return delegateResult;\n          }\n        }\n\n        if (context.method === \"next\") {\n          // Setting context._sent for legacy support of Babel's\n          // function.sent implementation.\n          context.sent = context._sent = context.arg;\n\n        } else if (context.method === \"throw\") {\n          if (state === GenStateSuspendedStart) {\n            state = GenStateCompleted;\n            throw context.arg;\n          }\n\n          context.dispatchException(context.arg);\n\n        } else if (context.method === \"return\") {\n          context.abrupt(\"return\", context.arg);\n        }\n\n        state = GenStateExecuting;\n\n        var record = tryCatch(innerFn, self, context);\n        if (record.type === \"normal\") {\n          // If an exception is thrown from innerFn, we leave state ===\n          // GenStateExecuting and loop back for another invocation.\n          state = context.done\n            ? GenStateCompleted\n            : GenStateSuspendedYield;\n\n          if (record.arg === ContinueSentinel) {\n            continue;\n          }\n\n          return {\n            value: record.arg,\n            done: context.done\n          };\n\n        } else if (record.type === \"throw\") {\n          state = GenStateCompleted;\n          // Dispatch the exception by looping back around to the\n          // context.dispatchException(context.arg) call above.\n          context.method = \"throw\";\n          context.arg = record.arg;\n        }\n      }\n    };\n  }\n\n  // Call delegate.iterator[context.method](context.arg) and handle the\n  // result, either by returning a { value, done } result from the\n  // delegate iterator, or by modifying context.method and context.arg,\n  // setting context.delegate to null, and returning the ContinueSentinel.\n  function maybeInvokeDelegate(delegate, context) {\n    var method = delegate.iterator[context.method];\n    if (method === undefined) {\n      // A .throw or .return when the delegate iterator has no .throw\n      // method always terminates the yield* loop.\n      context.delegate = null;\n\n      if (context.method === \"throw\") {\n        // Note: [\"return\"] must be used for ES3 parsing compatibility.\n        if (delegate.iterator[\"return\"]) {\n          // If the delegate iterator has a return method, give it a\n          // chance to clean up.\n          context.method = \"return\";\n          context.arg = undefined;\n          maybeInvokeDelegate(delegate, context);\n\n          if (context.method === \"throw\") {\n            // If maybeInvokeDelegate(context) changed context.method from\n            // \"return\" to \"throw\", let that override the TypeError below.\n            return ContinueSentinel;\n          }\n        }\n\n        context.method = \"throw\";\n        context.arg = new TypeError(\n          \"The iterator does not provide a 'throw' method\");\n      }\n\n      return ContinueSentinel;\n    }\n\n    var record = tryCatch(method, delegate.iterator, context.arg);\n\n    if (record.type === \"throw\") {\n      context.method = \"throw\";\n      context.arg = record.arg;\n      context.delegate = null;\n      return ContinueSentinel;\n    }\n\n    var info = record.arg;\n\n    if (! info) {\n      context.method = \"throw\";\n      context.arg = new TypeError(\"iterator result is not an object\");\n      context.delegate = null;\n      return ContinueSentinel;\n    }\n\n    if (info.done) {\n      // Assign the result of the finished delegate to the temporary\n      // variable specified by delegate.resultName (see delegateYield).\n      context[delegate.resultName] = info.value;\n\n      // Resume execution at the desired location (see delegateYield).\n      context.next = delegate.nextLoc;\n\n      // If context.method was \"throw\" but the delegate handled the\n      // exception, let the outer generator proceed normally. If\n      // context.method was \"next\", forget context.arg since it has been\n      // \"consumed\" by the delegate iterator. If context.method was\n      // \"return\", allow the original .return call to continue in the\n      // outer generator.\n      if (context.method !== \"return\") {\n        context.method = \"next\";\n        context.arg = undefined;\n      }\n\n    } else {\n      // Re-yield the result returned by the delegate method.\n      return info;\n    }\n\n    // The delegate iterator is finished, so forget it and continue with\n    // the outer generator.\n    context.delegate = null;\n    return ContinueSentinel;\n  }\n\n  // Define Generator.prototype.{next,throw,return} in terms of the\n  // unified ._invoke helper method.\n  defineIteratorMethods(Gp);\n\n  define(Gp, toStringTagSymbol, \"Generator\");\n\n  // A Generator should always return itself as the iterator object when the\n  // @@iterator function is called on it. Some browsers' implementations of the\n  // iterator prototype chain incorrectly implement this, causing the Generator\n  // object to not be returned from this call. This ensures that doesn't happen.\n  // See https://github.com/facebook/regenerator/issues/274 for more details.\n  define(Gp, iteratorSymbol, function() {\n    return this;\n  });\n\n  define(Gp, \"toString\", function() {\n    return \"[object Generator]\";\n  });\n\n  function pushTryEntry(locs) {\n    var entry = { tryLoc: locs[0] };\n\n    if (1 in locs) {\n      entry.catchLoc = locs[1];\n    }\n\n    if (2 in locs) {\n      entry.finallyLoc = locs[2];\n      entry.afterLoc = locs[3];\n    }\n\n    this.tryEntries.push(entry);\n  }\n\n  function resetTryEntry(entry) {\n    var record = entry.completion || {};\n    record.type = \"normal\";\n    delete record.arg;\n    entry.completion = record;\n  }\n\n  function Context(tryLocsList) {\n    // The root entry object (effectively a try statement without a catch\n    // or a finally block) gives us a place to store values thrown from\n    // locations where there is no enclosing try statement.\n    this.tryEntries = [{ tryLoc: \"root\" }];\n    tryLocsList.forEach(pushTryEntry, this);\n    this.reset(true);\n  }\n\n  exports.keys = function(object) {\n    var keys = [];\n    for (var key in object) {\n      keys.push(key);\n    }\n    keys.reverse();\n\n    // Rather than returning an object with a next method, we keep\n    // things simple and return the next function itself.\n    return function next() {\n      while (keys.length) {\n        var key = keys.pop();\n        if (key in object) {\n          next.value = key;\n          next.done = false;\n          return next;\n        }\n      }\n\n      // To avoid creating an additional object, we just hang the .value\n      // and .done properties off the next function object itself. This\n      // also ensures that the minifier will not anonymize the function.\n      next.done = true;\n      return next;\n    };\n  };\n\n  function values(iterable) {\n    if (iterable) {\n      var iteratorMethod = iterable[iteratorSymbol];\n      if (iteratorMethod) {\n        return iteratorMethod.call(iterable);\n      }\n\n      if (typeof iterable.next === \"function\") {\n        return iterable;\n      }\n\n      if (!isNaN(iterable.length)) {\n        var i = -1, next = function next() {\n          while (++i < iterable.length) {\n            if (hasOwn.call(iterable, i)) {\n              next.value = iterable[i];\n              next.done = false;\n              return next;\n            }\n          }\n\n          next.value = undefined;\n          next.done = true;\n\n          return next;\n        };\n\n        return next.next = next;\n      }\n    }\n\n    // Return an iterator with no values.\n    return { next: doneResult };\n  }\n  exports.values = values;\n\n  function doneResult() {\n    return { value: undefined, done: true };\n  }\n\n  Context.prototype = {\n    constructor: Context,\n\n    reset: function(skipTempReset) {\n      this.prev = 0;\n      this.next = 0;\n      // Resetting context._sent for legacy support of Babel's\n      // function.sent implementation.\n      this.sent = this._sent = undefined;\n      this.done = false;\n      this.delegate = null;\n\n      this.method = \"next\";\n      this.arg = undefined;\n\n      this.tryEntries.forEach(resetTryEntry);\n\n      if (!skipTempReset) {\n        for (var name in this) {\n          // Not sure about the optimal order of these conditions:\n          if (name.charAt(0) === \"t\" &&\n              hasOwn.call(this, name) &&\n              !isNaN(+name.slice(1))) {\n            this[name] = undefined;\n          }\n        }\n      }\n    },\n\n    stop: function() {\n      this.done = true;\n\n      var rootEntry = this.tryEntries[0];\n      var rootRecord = rootEntry.completion;\n      if (rootRecord.type === \"throw\") {\n        throw rootRecord.arg;\n      }\n\n      return this.rval;\n    },\n\n    dispatchException: function(exception) {\n      if (this.done) {\n        throw exception;\n      }\n\n      var context = this;\n      function handle(loc, caught) {\n        record.type = \"throw\";\n        record.arg = exception;\n        context.next = loc;\n\n        if (caught) {\n          // If the dispatched exception was caught by a catch block,\n          // then let that catch block handle the exception normally.\n          context.method = \"next\";\n          context.arg = undefined;\n        }\n\n        return !! caught;\n      }\n\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        var record = entry.completion;\n\n        if (entry.tryLoc === \"root\") {\n          // Exception thrown outside of any try block that could handle\n          // it, so set the completion value of the entire function to\n          // throw the exception.\n          return handle(\"end\");\n        }\n\n        if (entry.tryLoc <= this.prev) {\n          var hasCatch = hasOwn.call(entry, \"catchLoc\");\n          var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n          if (hasCatch && hasFinally) {\n            if (this.prev < entry.catchLoc) {\n              return handle(entry.catchLoc, true);\n            } else if (this.prev < entry.finallyLoc) {\n              return handle(entry.finallyLoc);\n            }\n\n          } else if (hasCatch) {\n            if (this.prev < entry.catchLoc) {\n              return handle(entry.catchLoc, true);\n            }\n\n          } else if (hasFinally) {\n            if (this.prev < entry.finallyLoc) {\n              return handle(entry.finallyLoc);\n            }\n\n          } else {\n            throw new Error(\"try statement without catch or finally\");\n          }\n        }\n      }\n    },\n\n    abrupt: function(type, arg) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc <= this.prev &&\n            hasOwn.call(entry, \"finallyLoc\") &&\n            this.prev < entry.finallyLoc) {\n          var finallyEntry = entry;\n          break;\n        }\n      }\n\n      if (finallyEntry &&\n          (type === \"break\" ||\n           type === \"continue\") &&\n          finallyEntry.tryLoc <= arg &&\n          arg <= finallyEntry.finallyLoc) {\n        // Ignore the finally entry if control is not jumping to a\n        // location outside the try/catch block.\n        finallyEntry = null;\n      }\n\n      var record = finallyEntry ? finallyEntry.completion : {};\n      record.type = type;\n      record.arg = arg;\n\n      if (finallyEntry) {\n        this.method = \"next\";\n        this.next = finallyEntry.finallyLoc;\n        return ContinueSentinel;\n      }\n\n      return this.complete(record);\n    },\n\n    complete: function(record, afterLoc) {\n      if (record.type === \"throw\") {\n        throw record.arg;\n      }\n\n      if (record.type === \"break\" ||\n          record.type === \"continue\") {\n        this.next = record.arg;\n      } else if (record.type === \"return\") {\n        this.rval = this.arg = record.arg;\n        this.method = \"return\";\n        this.next = \"end\";\n      } else if (record.type === \"normal\" && afterLoc) {\n        this.next = afterLoc;\n      }\n\n      return ContinueSentinel;\n    },\n\n    finish: function(finallyLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.finallyLoc === finallyLoc) {\n          this.complete(entry.completion, entry.afterLoc);\n          resetTryEntry(entry);\n          return ContinueSentinel;\n        }\n      }\n    },\n\n    \"catch\": function(tryLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc === tryLoc) {\n          var record = entry.completion;\n          if (record.type === \"throw\") {\n            var thrown = record.arg;\n            resetTryEntry(entry);\n          }\n          return thrown;\n        }\n      }\n\n      // The context.catch method must only be called with a location\n      // argument that corresponds to a known catch block.\n      throw new Error(\"illegal catch attempt\");\n    },\n\n    delegateYield: function(iterable, resultName, nextLoc) {\n      this.delegate = {\n        iterator: values(iterable),\n        resultName: resultName,\n        nextLoc: nextLoc\n      };\n\n      if (this.method === \"next\") {\n        // Deliberately forget the last sent value so that we don't\n        // accidentally pass it on to the delegate.\n        this.arg = undefined;\n      }\n\n      return ContinueSentinel;\n    }\n  };\n\n  // Regardless of whether this script is executing as a CommonJS module\n  // or not, return the runtime object so that we can declare the variable\n  // regeneratorRuntime in the outer scope, which allows this module to be\n  // injected easily by `bin/regenerator --include-runtime script.js`.\n  return exports;\n\n}(\n  // If this script is executing as a CommonJS module, use module.exports\n  // as the regeneratorRuntime namespace. Otherwise create a new empty\n  // object. Either way, the resulting object will be used to initialize\n  // the regeneratorRuntime variable at the top of this file.\n  typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n  regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n  // This module should not be running in strict mode, so the above\n  // assignment should always work unless something is misconfigured. Just\n  // in case runtime.js accidentally runs in strict mode, in modern engines\n  // we can explicitly access globalThis. In older engines we can escape\n  // strict mode using a global Function call. This could conceivably fail\n  // if a Content Security Policy forbids using Function, but in that case\n  // the proper solution is to fix the accidental strict mode problem. If\n  // you've misconfigured your bundler to force strict mode and applied a\n  // CSP to forbid Function, and you're not willing to fix either of those\n  // problems, please detail your unique predicament in a GitHub issue.\n  if (typeof globalThis === \"object\") {\n    globalThis.regeneratorRuntime = runtime;\n  } else {\n    Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n  }\n}\n","/**\n * @property {string} pathName\n * @property {boolean} dontUseCustomPathName\n *\n * @returns {string}\n */\nexport function getPathName(pathName, dontUseCustomPathName) {\n  let list = dontUseCustomPathName === 'true' ? dontUseCustomPathName : getCustomPathName(pathName);\n  console.log('URLDecoder list: ' + list);\n  return list;\n}\n\nfunction getCustomPathName(pathName) {\n  let urlPathNameTable = pathName.split('/');\n  let urlPathNameOrSandbox = urlPathNameTable[1] === 's' ? 'isSandbox' : urlPathNameTable;\n  return urlPathNameTable[1].length === 0\n    ? 'homepage'\n    : urlPathNameTable[1] === 'p' || urlPathNameTable[1] === 'dettaglio-prodotto'\n    ? 'product-page'\n    : parsePathName(urlPathNameOrSandbox);\n}\n\nfunction parsePathName(value) {\n  let str = value.toString();\n\n  if (str.endsWith(',')) {\n    str = str.slice('', -1);\n  }\n  if (str.endsWith('.html')) {\n    str = str.slice('', -5);\n  }\n  if (str.indexOf(',') == 0) {\n    str = str.slice(1);\n  }\n\n  return str.replaceAll(',', '/');\n}\n"],"sourceRoot":""}