{"version":3,"sources":["polyfill.js","accordion.js","dropdown.js","menu.js","price.script.js","service-worker-registration.js"],"names":["checkFetchStatus","response","status","json","t","this","element","e","RegExp","n","i","length","call","prototype","add","arguments","contains","className","remove","replace","toggle","test","Element","Object","defineProperty","get","window","DOMTokenList","closest","s","matches","document","ownerDocument","querySelectorAll","el","item","parentElement","self","fetch","Promise","a","ok","r","statusText","url","responseURL","text","resolve","responseText","JSON","parse","blob","Blob","clone","headers","keys","o","entries","u","toLowerCase","has","c","XMLHttpRequest","open","method","onload","getAllResponseHeaders","push","onerror","withCredentials","credentials","setRequestHeader","send","body","accordionActiveClass","accordionToggleCollection","accordionToggle","addEventListener","accordionWrap","accordion","classList","_iterator","_step","done","_loop","activeClass","dropdownCollection","dropdownToggle","event","target","getElementById","getElementsByTagName","loc","location","href","querySelector","insertAdjacentHTML","resizeTimer","price_lgr","price_rr","menuToggle","onclick","preventDefault","submenuToggle","offsetWidth","offsetHeight","hideMenu","readCookie","name","nameEQ","escape","ca","cookie","split","charAt","substring","indexOf","unescape","setLGRCookie","value","days","expires","domain","date","Date","setTime","getTime","toGMTString","hostname","reverse","security","setCrossCookie","getQueryString","results","exec","decodeURIComponent","updateQueryStringParameter","uri","key","re","separator","match","clearTimeout","setTimeout","apiUrl","price_pids","default_pids_replaced_during_build","price_pkgids","default_pkgids_replaced_during_build","default_host","default_lgr_attributes","default_lgr_attributes_replaced_during_build","price_default_lgr","price_query_lgr","price_query_rr","Fees","feesElement","lgrx_cookie","forEach","innerHTML","toFixed","replaceLGA","useDefaultLGR","_sessionLGAs$LinkGene","jsonUrl","lgaItems","_toConsumableArray","getElementsByClassName","applyLGA","data","lgaList","_objectSpread","sessionStorage","setItem","stringify","lgaItem","string","lgrString","lgaItemHTML","replaceWith","pattern","includes","concat","sessionLGAs","getItem","LinkGeneratorGuid","then","catch","err","modifyRegUrl","real_lgr","regLink","productApi","pids","callback","toString","productApiDefault","packageApi","pkgids","packageApiDefault","chunkArray","myArray","size","index","slice","displayPrice","showPrice","pid","priceDisplay","price_per_unit","amount","priceDollars","display_dollars","priceCents","display_cents","origPrice","Math","round","priceDisplayFees","feesDollars","feesCents","id","Number","Array","isArray","displayPackagePrice","pkgid","_pkgid$package_produc3","discountAmount","abs","_pkgid$package_produc","package_products","_pkgid$package_produc2","filter","addPriceToSession","pkgflag","discount","_data$package_product","_data$package_product2","_data$package_product3","product_price","lgr","getProductPrice","current_pids","undefined","getPackagePrice","pricingInit","pidData","pkgidData","navigator","serviceWorker","register","reg","onupdatefound","installingWorker","installing","onstatechange","state","controller"],"mappings":"aAuBA,SAASA,iBAAiBC,GACxB,GAAwB,MAApBA,EAASC,OAIb,OAAOD,EAASE,O,moCA1BjB,WAAW,SAASC,EAAEA,GAAGC,KAAKC,QAAQF,EAAQ,SAAFG,EAAWH,GAAG,OAAOI,OAAO,QAAQJ,EAAE,SAAY,SAAFK,EAAWL,EAAEG,EAAEE,GAAG,IAAI,IAAIC,EAAE,EAAEA,EAAEN,EAAEO,OAAOD,IAAIH,EAAEK,KAAKH,EAAEL,EAAEM,IACrJN,EAAES,UAAU,CAACC,IAAI,WAAWL,EAAEM,UAAU,SAASX,GAAGC,KAAKW,SAASZ,KAAKC,KAAKC,QAAQW,WAAW,IAAIb,IAAIC,OAAOa,OAAO,WAAWT,EAAEM,UAAU,SAASX,GAAGC,KAAKC,QAAQW,UAAUZ,KAAKC,QAAQW,UAAUE,QAAQZ,EAAEH,GAAG,KAAKC,OAAOe,OAAO,SAAShB,GAAG,OAAOC,KAAKW,SAASZ,IAAIC,KAAKa,OAAOd,IAAG,IAAKC,KAAKS,IAAIV,IAAG,IAAKY,SAAS,SAASZ,GAAG,OAAOG,EAAEH,GAAGiB,KAAKhB,KAAKC,QAAQW,YAAYE,QAAQ,SAASf,EAAEG,GAAGF,KAAKa,OAAOd,GAAGC,KAAKS,IAAIP,KAAK,cAAce,QAAQT,WAAWU,OAAOC,eAAeF,QAAQT,UAAU,YAAY,CAACY,IAAI,WAAW,OAAO,I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BAAqB2D,IAAQpE,QAAQ,SAAA3H,GAAI,OAAIA,EAAK4H,UAAYiD,EAAahD,QAAQ,KACvHM,mBAAIvI,SAASwI,uBAAuB,mBAAqB2D,IAAQpE,QAAQ,SAAA3H,GAAI,OAAIA,EAAK4H,UAAYwD,IAClGjD,mBAAIvI,SAASwI,uBAAuB,iBAAmB2D,IAAQpE,QAAQ,SAAA3H,GAAI,OAAIA,EAAKP,QAAQ,UAAUoD,UAAUlE,IAAI,WACpHwJ,mBAAIvI,SAASwI,uBAAuB,wBAA0B2D,IAAQpE,QAAQ,SAAA3H,GAAI,OAAIA,EAAK4H,UAAL,IAAAuB,OAAqB8C,SAG/Gc,gBAAgBjG,YAChBoG,gBAAgBlG,cAKlB0C,eA9RkB,OAAhBhC,aACF1B,eAAe,OAAQ0B,YAAa,IAGf,OAAnBH,gBAA8C,KAAnBA,gBAC7BpC,aAAa,KAAMoC,eAAgB,IACnCvD,SAAWQ,WAAW,OACO,MAApBA,WAAW,OAAqC,IAApBA,WAAW,QAChDR,SAAWQ,WAAW,OAiDxBsD,aAuOAqF,cCrWI,kBAAmBG,WAIrB/N,OAAOmD,iBAAiB,OAAQ,WAK9B4K,UAAUC,cAAcC,SAAS,UAAUjE,KAAK,SAASkE,GAEvDA,EAAIC,cAAgB,WAGlB,IAAIC,EAAmBF,EAAIG,WAE3BD,EAAiBE,cAAgB,WAExB,cADCF,EAAiBG,OAEjBR,UAAUC,cAAcQ,eAmBnCvE,MAAM,SAASpL","file":"main.min.js","sourcesContent":["// Source: https://gist.github.com/k-gun/c2ea7c49edf7b757fe9561ba37cb19ca\r\n// .classList() Polyfill for older browser - IE9 again...\r\n!function(){function t(t){this.element=t}var e=function(t){return RegExp(\"(^| )\"+t+\"( |$)\")},n=function(t,e,n){for(var i=0;i= 0 && matches.item(i) !== el) {};\r\n } while ((i < 0) && (el = el.parentElement));\r\n return el;\r\n }\r\n}\r\n\r\n// fetch polyfill for older browser, the minimum needed\r\nself.fetch||(self.fetch=function(e,n){return n=n||{},new Promise(function(t,s){var r=new XMLHttpRequest,o=[],u=[],i={},a=function(){return{ok:2==(r.status/100|0),statusText:r.statusText,status:r.status,url:r.responseURL,text:function(){return Promise.resolve(r.responseText)},json:function(){return Promise.resolve(JSON.parse(r.responseText))},blob:function(){return Promise.resolve(new Blob([r.response]))},clone:a,headers:{keys:function(){return o},entries:function(){return u},get:function(e){return i[e.toLowerCase()]},has:function(e){return e.toLowerCase()in i}}}};for(var c in r.open(n.method||\"get\",e,!0),r.onload=function(){r.getAllResponseHeaders().replace(/^(.*?):[^\\S\\n]*([\\s\\S]*?)$/gm,function(e,n,t){o.push(n=n.toLowerCase()),u.push([n,t]),i[n]=i[n]?i[n]+\",\"+t:t}),t(a())},r.onerror=s,r.withCredentials=\"include\"==n.credentials,n.headers)r.setRequestHeader(c,n.headers[c]);r.send(n.body||null)})});\r\n// to check for fetch response...\r\nfunction checkFetchStatus(response) {\r\n if (response.status !== 200) {\r\n console.log('Looks like there was a problem. Status Code: ' + response.status);\r\n return;\r\n }\r\n return response.json()\r\n}\r\n","/* requires:\r\npolyfill.js\r\n*/\r\n\r\n// accordion Toggle\r\nconst accordionActiveClass = \"is-open\";\r\nconst accordionToggleCollection = document.querySelectorAll(\".accordion .accordion-toggle\");\r\nfor (let accordionToggle of accordionToggleCollection) {\r\n accordionToggle.addEventListener('click', function() {\r\n const accordionWrap = accordionToggle.closest(\".accordion-wrap\");\r\n const accordion = accordionToggle.closest(\".accordion\");\r\n if ( !accordion.classList.contains(accordionActiveClass) ) {\r\n var el = accordionWrap.querySelectorAll(\".accordion\");\r\n var i; for (i = 0; i < el.length; i++) {\r\n el[i].classList.remove(accordionActiveClass)\r\n }\r\n accordion.classList.toggle(accordionActiveClass)\r\n } else\r\n if ( accordion.classList.contains(accordionActiveClass) ) {\r\n accordion.classList.remove(accordionActiveClass)\r\n }\r\n })\r\n}\r\n\r\n","/* requires:\r\npolyfill.js\r\n*/\r\n\r\n// Dropdown Select Toggle\r\nconst activeClass = \"is-active\";\r\nconst dropdownCollection = document.querySelectorAll(\".dropdown-list span.dropdown\");\r\nfor (let dropdownToggle of dropdownCollection) {\r\n dropdownToggle.addEventListener('click', function() {\r\n //console.log(dropdownToggle.classList);\r\n if ( !dropdownToggle.classList.contains(activeClass) ) {\r\n var el = document.querySelectorAll(\".dropdown-list span.dropdown\");\r\n var i; for (i = 0; i < el.length; i++) {\r\n el[i].classList.remove(activeClass);\r\n }\r\n dropdownToggle.classList.toggle(activeClass);\r\n } else\r\n if ( dropdownToggle.classList.contains(activeClass) ) {\r\n dropdownToggle.classList.remove(activeClass);\r\n }\r\n })\r\n}\r\n\r\ndocument.addEventListener('click', function(e) {\r\n // Dropdown Select Toggle\r\n var el = document.querySelectorAll(\".dropdown-list span.dropdown\")\r\n var e=e? e : window.event;\r\n var eventElement=e.target;\r\n if (!eventElement.closest(\".dropdown-list\")){\r\n //console.log(event_element.closest(\".dropdown-list\"));\r\n var i; for (i = 0; i < el.length; i++) {\r\n el[i].classList.remove(activeClass);\r\n }\r\n }\r\n}, false);\r\n","/* requires:\r\npolyfill.js\r\n*/\r\n\r\n// for active menu highlighting\r\n(function(){\r\n const a = document.getElementById('nav').getElementsByTagName(\"a\");\r\n // let loc;\r\n // if (window.location.href.substr(location.href.length - 1, 1) == '/') {\r\n // loc = window.location.href + 'index.html';\r\n // } else {\r\n // loc = window.location.href;\r\n // }\r\n let loc = window.location.href;\r\n for(var i=0; i < a.length; i++) {\r\n if (a[i].href == loc) {\r\n a[i].classList.add('is-active');\r\n }\r\n }\r\n})();\r\n\r\ndocument.getElementById('nav').querySelector('ul').insertAdjacentHTML(\"beforebegin\", \"Menu\");\r\nconst menuToggle = document.getElementById(\"menutoggle\");\r\nconst activeClass = \"is-active\"\r\n\r\nmenuToggle.onclick = function(event) {\r\n menuToggle.classList.toggle(activeClass);\r\n //menuToggle.nextSibling.classList.toggle(activeClass);\r\n var el = document.querySelectorAll(\"#nav span.submenu, #nav a.submenu, #nav ul.submenu\");\r\n var i; for (i = 0; i < el.length; i++) {\r\n el[i].classList.remove(activeClass);\r\n }\r\n event.preventDefault();\r\n};\r\n\r\nfor (let submenuToggle of document.querySelectorAll(\"#nav span.submenu, #nav a.submenu\")) {\r\n submenuToggle.addEventListener('click', function() {\r\n if ( menuToggle.offsetWidth > 0 && menuToggle.offsetHeight > 0 ) { // if the #menuToggle is visible\r\n submenuToggle.classList.toggle(activeClass);\r\n }\r\n })\r\n}\r\n\r\nfunction hideMenu() {\r\n var el = document.querySelectorAll(\"#menutoggle, #menutoggle + ul, #nav span.submenu, #nav a.submenu, #nav ul.submenu\");\r\n var i; for (i = 0; i < el.length; i++) {\r\n el[i].classList.remove(activeClass);\r\n }\r\n}\r\n\r\ndocument.addEventListener('click', function(e) {\r\n if ( menuToggle.offsetWidth > 0 && menuToggle.offsetHeight > 0 ) { // if the #menuToggle is visible\r\n var e=e? e : window.event;\r\n var eventElement=e.target;\r\n if (!eventElement.closest(\"#nav\")){\r\n //console.log(event_element.closest(\"#nav\"));\r\n if (menuToggle.classList.contains(activeClass)) {\r\n hideMenu();\r\n }\r\n }\r\n }\r\n}, false);\r\n\r\nvar resizeTimer;\r\nwindow.addEventListener(\"resize\", function () {\r\n clearTimeout(resizeTimer);\r\n resizeTimer = setTimeout(function() {\r\n if ( menuToggle.offsetWidth <= 0 && menuToggle.offsetHeight <= 0 ) { // if the #menuToggle is hidden\r\n hideMenu();\r\n }\r\n }, 250);\r\n}, false);\r\n","/* requires:\r\npolyfill.js\r\n*/\r\n\r\nfunction readCookie(name) {\r\n let nameEQ = escape(name) + \"=\";\r\n let ca = document.cookie.split(';');\r\n for (let i = 0; i < ca.length; i++) {\r\n let c = ca[i];\r\n while (c.charAt(0) == ' ') c = c.substring(1, c.length);\r\n if (c.indexOf(nameEQ) == 0) return unescape(c.substring(nameEQ.length, c.length));\r\n }\r\n return null;\r\n}\r\nfunction setLGRCookie(name, value, days) {\r\n let expires = \"\";\r\n if (days) {\r\n let date = new Date();\r\n date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\r\n expires = \"; expires=\" + date.toGMTString();\r\n }\r\n const domain = location.hostname == \"localhost\" ? \"\" : \";domain=.\" + location.hostname.split('.').reverse()[1] + \".\" + location.hostname.split('.').reverse()[0];\r\n const security = location.hostname == \"localhost\" ? \"\" : \";SameSite=None; Secure\";\r\n document.cookie = name + \"=\" + value + expires + \";path=/\" + domain + security;\r\n}\r\nfunction setCrossCookie(name, value, days) {\r\n let expires = \"\";\r\n if (days) {\r\n let date = new Date();\r\n date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\r\n expires = \"; expires=\" + date.toGMTString();\r\n }\r\n const domain = location.hostname == \"localhost\" ? \"\" : \";domain=.\" + location.hostname.split('.').reverse()[1] + \".\" + location.hostname.split('.').reverse()[0];\r\n const security = location.hostname == \"localhost\" ? \"\" : \";SameSite=None; Secure\";\r\n document.cookie = name + \"=\" + value + expires + \";path=/\" + domain + security;\r\n}\r\nfunction getQueryString(name, url) {\r\n if (!url) url = window.location.href;\r\n name = name.replace(/[\\[\\]]/g, \"\\\\$&\");\r\n let regex = new RegExp(\"[?&]\" + name + \"(=([^&#]*)|&|#|$)\"),\r\n results = regex.exec(url);\r\n if (!results) return null;\r\n if (!results[2]) return '';\r\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\r\n}\r\nfunction updateQueryStringParameter(uri, key, value) {\r\n let re = new RegExp(\"([?&])\" + key + \"=.*?(&|$)\", \"i\");\r\n let separator = uri.indexOf('?') !== -1 ? \"&\" : \"?\";\r\n if (uri.match(re)) {\r\n return uri.replace(re, '$1' + key + \"=\" + value + '$2');\r\n } else {\r\n return uri + separator + key + \"=\" + value;\r\n }\r\n}\r\n\r\nlet price_lgr,\r\n price_rr;\r\n\r\nlet apiUrl = \"apiURL_product_replaced_during_build\", // this will be dynamically replaced by the build\r\n price_pids = default_pids_replaced_during_build, // this will be dynamically replaced by the build\r\n price_pkgids = default_pkgids_replaced_during_build, // this will be dynamically replaced by the build\r\n default_host = \"default_host_replaced_during_build\", // this will be dynamically replaced by the build\r\n default_lgr_attributes = default_lgr_attributes_replaced_during_build || {}, // this will be dynamically replaced by the build\r\n price_default_lgr = \"default_lgr_replaced_during_build\", // this will be dynamically replaced by the build\r\n price_query_lgr = getQueryString(\"lgr\", window.location.href),\r\n price_query_rr = getQueryString(\"rr\", window.location.href);\r\n\r\nlet Fees = 3.00;\r\nvar feesElement = document.querySelectorAll(\".showfees\");\r\nfeesElement.forEach(el => {\r\n el.innerHTML = '$' + Fees.toFixed(2);\r\n});\r\n \r\nif (price_query_lgr !== null && price_query_lgr !== \"\") {\r\n setLGRCookie('lgr', price_query_lgr.toLowerCase(), 60);\r\n price_lgr = readCookie(\"lgr\");\r\n // console.log(1);\r\n} else if (readCookie(\"lgr\") !== null && readCookie(\"lgr\") !== \"\") {\r\n price_lgr = readCookie(\"lgr\");\r\n // console.log(2);\r\n} else {\r\n setLGRCookie(\"lgr\", price_default_lgr.toLowerCase(), 60);\r\n price_lgr = readCookie(\"lgr\");\r\n // console.log(3);\r\n}\r\n\r\n// setting the cross-domain lgrx cookie for reg3 enhancement\r\nconst lgrx_cookie = readCookie('lgr') !== null ? (readCookie('lgr')).toLowerCase() : null;\r\nif (lgrx_cookie !== null) {\r\n setCrossCookie('lgrx', lgrx_cookie, 60);\r\n}\r\n\r\nif (price_query_rr !== null && price_query_rr !== \"\") {\r\n setLGRCookie('rr', price_query_rr, 60);\r\n price_rr = readCookie(\"rr\");\r\n} else if (readCookie(\"rr\") != null && readCookie(\"rr\") != \"\") {\r\n price_rr = readCookie(\"rr\");\r\n}\r\n\r\n// applying the LGR replacement strings\r\nfunction replaceLGA(useDefaultLGR) {\r\n // const jsonUrl = \"https://mlapi.amersc.com/product/api/v2.0/linkgeneratorattributes/7517bb61-d11a-4620-a579-39fbbf8911ca\";\r\n let jsonUrl;\r\n if (useDefaultLGR) {\r\n jsonUrl = apiUrl +'linkgeneratorattributes/'+ price_default_lgr;\r\n }\r\n else {\r\n jsonUrl = apiUrl +'linkgeneratorattributes/'+ price_lgr;\r\n }\r\n const lgaItems = [...document.getElementsByClassName(\"lga-item\")]\r\n function applyLGA(data) {\r\n const lgaList = {...default_lgr_attributes, ...data};\r\n sessionStorage.setItem(\"LGAs\", JSON.stringify(lgaList));\r\n function replaceLGAString(string, lgrString, replaceWith) {\r\n const pattern = new RegExp('\\\\$\\\\$' + lgrString + '\\\\$\\\\$', 'g');\r\n const newInnerHTML = string.replace(pattern, replaceWith);\r\n return newInnerHTML;\r\n }\r\n for (const key in lgaList) {\r\n if (lgaList[key] !== \"\") {\r\n lgaItems.forEach(lgaItem => {\r\n const lgaItemHTML = lgaItem.innerHTML;\r\n let value = lgaList[key].replace(/\\+/g, \"%20\")\r\n lgaItem.innerHTML = replaceLGAString(lgaItemHTML, key, decodeURIComponent(value));\r\n if (lgaItemHTML.includes(`$${key}$$`)) {\r\n lgaItem.classList.add(\"lga-replaced\");\r\n }\r\n });\r\n }\r\n }\r\n }\r\n const sessionLGAs = sessionStorage.getItem(\"LGAs\") ? JSON.parse(sessionStorage.getItem(\"LGAs\")) : null;\r\n if (sessionLGAs && sessionLGAs.LinkGeneratorGuid?.toLowerCase() == price_lgr) {\r\n applyLGA(sessionLGAs);\r\n }\r\n else {\r\n fetch(jsonUrl).then(checkFetchStatus)\r\n .then(data => {\r\n applyLGA(data);\r\n })\r\n .catch(function(err) {\r\n replaceLGA(true)\r\n });\r\n }\r\n}\r\nreplaceLGA();\r\n\r\n// appending LGR and RR query string in the registration URL\r\nfunction modifyRegUrl(real_lgr) {\r\n const regLinks = [...document.querySelectorAll(\"a[href*='/registration/']\")]\r\n regLinks.forEach(regLink => {\r\n let price_lgr = real_lgr || readCookie(\"lgr\");\r\n let href = regLink.href;\r\n if (getQueryString(\"lgr\", href) != null) {\r\n href = href;\r\n }\r\n else {\r\n href = href + \"&lgr=\" + price_lgr;\r\n }\r\n if (price_rr && getQueryString(\"rr\", href) != null) {\r\n href = href;\r\n }\r\n else if (price_rr && getQueryString(\"rr\", href) == null) {\r\n href = href + \"&rr=\" + price_rr;\r\n }\r\n regLink.href = href\r\n // console.log(href)\r\n });\r\n}\r\n\r\nfunction productApi(pids, callback) {\r\n let jsonUrl;\r\n if (pids.length === 1) {\r\n jsonUrl = apiUrl +'product/'+ pids.toString() +'/'+ price_lgr + '/'+ default_host + '/' + \"?includeRelated=false\"; // using API endpoint for multiple PIDs\r\n }\r\n else {\r\n jsonUrl = apiUrl +'products/'+ pids.toString() +'/'+ price_lgr + '/'+ default_host + '/' + \"?includeRelated=false\"; // using API endpoint for multiple PIDs\r\n }\r\n fetch(jsonUrl).then(checkFetchStatus)\r\n .then(data => {\r\n callback(data);\r\n })\r\n .catch(function(err) {\r\n productApiDefault(pids, callback)\r\n });\r\n}\r\nfunction productApiDefault(pids, callback) {\r\n let jsonUrl;\r\n if (pids.length === 1) {\r\n jsonUrl = apiUrl +'product/'+ pids.toString() +'/'+ price_default_lgr + '/'+ default_host + '/' + \"?includeRelated=false\"; // using API endpoint for multiple PIDs\r\n }\r\n else {\r\n jsonUrl = apiUrl +'products/'+ pids.toString() +'/'+ price_default_lgr + '/'+ default_host + '/' + \"?includeRelated=false\"; // using API endpoint for multiple PIDs\r\n }\r\n fetch(jsonUrl).then(checkFetchStatus)\r\n .then(data => {\r\n callback(data);\r\n });\r\n}\r\n\r\nfunction packageApi(pkgids, callback) {\r\n const jsonUrl = apiUrl +'package/'+ pkgids.toString() + '/' + default_host + '/' + price_lgr + '/' + \"?includeRelated=false\";\r\n fetch(jsonUrl).then(checkFetchStatus)\r\n .then(data => {\r\n callback(data);\r\n })\r\n .catch(function(err) {\r\n packageApiDefault(pkgids, callback)\r\n });\r\n}\r\nfunction packageApiDefault(pkgids, callback) {\r\n const jsonUrl = apiUrl +'package/'+ pkgids.toString() + '/' + default_host + '/' + price_default_lgr + '/' + \"?includeRelated=false\";\r\n fetch(jsonUrl).then(checkFetchStatus)\r\n .then(data => {\r\n callback(data);\r\n });\r\n}\r\n\r\nfunction chunkArray(myArray, size){\r\n let results = [],\r\n index = 0;\r\n while (index < myArray.length) {\r\n results.push(myArray.slice(index, size + index));\r\n index += size;\r\n }\r\n return results;\r\n}\r\n\r\nfunction displayPrice(data) {\r\n //console.log(data)\r\n function showPrice(pid) {\r\n const priceDisplay = pid.price_per_unit.amount;\r\n const priceDollars = pid.price_per_unit.display_dollars;\r\n const priceCents = pid.price_per_unit.display_cents;\r\n const origPrice = Math.round((priceDisplay + (priceDisplay * .2)).toFixed(0) / 5) * 5; // adding 20% to current price for display\r\n const priceDisplayFees = (pid.price_per_unit.amount - Fees).toFixed(2).toString();\r\n\t\tconst feesDollars = priceDisplayFees.split('.')[0];\r\n\t\tconst feesCents = priceDisplayFees.split('.')[1];\r\n [...document.getElementsByClassName(\"dollars-fees pid-\" + pid.id)].forEach(item => item.innerHTML = feesDollars);\r\n [...document.getElementsByClassName(\"cents-fees pid-\" + pid.id)].forEach(item => feesCents !== \"00\" ? item.innerHTML = feesCents : item.classList.add(\"display-none\"));\r\n [...document.getElementsByClassName(\"dollars pid-\" + pid.id)].forEach(item => item.innerHTML = priceDollars);\r\n [...document.getElementsByClassName(\"cents pid-\" + pid.id)].forEach(item => priceCents !== \"00\" ? item.innerHTML = priceCents : item.classList.add(\"display-none\"));\r\n [...document.getElementsByClassName(\"fullprice pid-\" + pid.id)].forEach(item => item.innerHTML = priceDisplay.toFixed(2));\r\n [...document.getElementsByClassName(\"fullprice-fees pid-\" + pid.id)].forEach(item => item.innerHTML = Number(priceDisplayFees).toFixed(2));\r\n [...document.getElementsByClassName(\"origprice pid-\" + pid.id)].forEach(item => item.innerHTML = origPrice);\r\n [...document.getElementsByClassName(\"dollars pid-\" + pid.id)].forEach(item => item.closest(\".price\").classList.add(\"shown\"));\r\n [...document.getElementsByClassName(\"dollars-fees pid-\" + pid.id)].forEach(item => item.closest(\".price\").classList.add(\"shown\"));\r\n }\r\n if (Array.isArray(data)) {\r\n data.forEach(pid => showPrice(pid, false))\r\n }\r\n else {\r\n if (data.price_per_unit != null){\r\n showPrice(data);\r\n }\r\n }\r\n}\r\nfunction displayPackagePrice(pkgid) {\r\n // console.log(pkgid)\r\n if (pkgid.price_per_unit != null){\r\n const priceDisplay = pkgid.price_per_unit.amount;\r\n const priceDollars = pkgid.price_per_unit.display_dollars;\r\n const priceCents = pkgid.price_per_unit.display_cents;\r\n const origPrice = Math.round((priceDisplay + (priceDisplay * .2)).toFixed(0) / 5) * 5; // adding 20% to current price for display\r\n const discountAmount = Math.abs(pkgid.package_products?.filter(item => item.id === 1324)[0]?.price_per_unit?.amount || 0).toFixed(2);\r\n [...document.getElementsByClassName(\"dollars pkgid-\" + pkgid.id)].forEach(item => item.innerHTML = priceDollars);\r\n [...document.getElementsByClassName(\"cents pkgid-\" + pkgid.id)].forEach(item => priceCents !== \"00\" ? item.innerHTML = priceCents : item.classList.add(\"display-none\"));\r\n [...document.getElementsByClassName(\"fullprice pkgid-\" + pkgid.id)].forEach(item => item.innerHTML = priceDisplay.toFixed(2));\r\n [...document.getElementsByClassName(\"origprice pkgid-\" + pkgid.id)].forEach(item => item.innerHTML = origPrice);\r\n [...document.getElementsByClassName(\"dollars pkgid-\" + pkgid.id)].forEach(item => item.closest(\".price\").classList.add(\"shown\"));\r\n [...document.getElementsByClassName(\"savings-amount pkgid-\" + pkgid.id)].forEach(item => item.innerHTML = `$${discountAmount}`);\r\n }\r\n}\r\n\r\nfunction addPriceToSession(data, pkgflag) {\r\n const discount = (data.package_products?.filter(item => item.id === 1324)[0]?.price_per_unit?.amount || 0) * -1;\r\n const product_price = {\r\n id: data.id,\r\n amount: data.price_per_unit.amount,\r\n display_dollars: data.price_per_unit.display_dollars,\r\n display_cents: data.price_per_unit.display_cents,\r\n discount: discount.toFixed(2),\r\n lgr: data.lgr\r\n };\r\n const prefix = pkgflag ? 'pkgid_' : 'pid_';\r\n sessionStorage.setItem(prefix + data.id, JSON.stringify(product_price))\r\n}\r\n\r\nfunction getProductPrice(pids) {\r\n const chunk_pids = chunkArray(pids, 30);\r\n chunk_pids.forEach(current_pids => {\r\n productApi(current_pids, function(data){\r\n // console.log(current_pids.length)\r\n if (data !== undefined && current_pids.length > 1) {\r\n data.forEach(data => addPriceToSession(data))\r\n sessionStorage.setItem('asc_pricing', true);\r\n displayPrice(data);\r\n }\r\n else if (data !== undefined && current_pids.length === 1) {\r\n addPriceToSession(data);\r\n sessionStorage.setItem('asc_pricing', true);\r\n displayPrice(data);\r\n }\r\n else {\r\n console.log(\"API is down or something else is going on...\");\r\n }\r\n });\r\n })\r\n}\r\n\r\nfunction getPackagePrice(pkgids) {\r\n pkgids.forEach(pkgid => {\r\n packageApi(pkgid, function(data){\r\n //console.log(data);\r\n if (data !== undefined) {\r\n if (data.price_per_unit != null){\r\n addPriceToSession(data, true);\r\n }\r\n sessionStorage.setItem('asc_pricing', true);\r\n displayPackagePrice(data);\r\n }\r\n else {\r\n console.log(\"API is down or something else is going on...\");\r\n }\r\n })\r\n })\r\n}\r\n\r\n// creating init funtion in case pricing needs to be called independently from DOM ready\r\nfunction pricingInit() {\r\n if (sessionStorage.getItem('asc_pricing')) {\r\n price_pids.forEach(pid => {\r\n if (sessionStorage.getItem('pid_'+pid)) {\r\n const pidData = JSON.parse(sessionStorage.getItem('pid_' + pid))\r\n const priceDisplay = pidData.amount;\r\n const priceDollars = pidData.display_dollars;\r\n const priceCents = pidData.display_cents;\r\n const origPrice = Math.round((priceDisplay + (priceDisplay * .2)).toFixed(0) / 5) * 5; // adding 20% to current price for display\r\n const priceDisplayFees = (priceDisplay - Fees).toFixed(2).toString();\r\n const feesDollars = priceDisplayFees.split('.')[0];\r\n const feesCents = priceDisplayFees.split('.')[1];\r\n [...document.getElementsByClassName(\"dollars-fees pid-\" + pid)].forEach(item => item.innerHTML = feesDollars);\r\n [...document.getElementsByClassName(\"cents-fees pid-\" + pid)].forEach(item => feesCents !== \"00\" ? item.innerHTML = feesCents : item.classList.add(\"display-none\"));\r\n [...document.getElementsByClassName(\"dollars pid-\" + pid)].forEach(item => item.innerHTML = priceDollars);\r\n [...document.getElementsByClassName(\"cents pid-\" + pid)].forEach(item => priceCents !== \"00\" ? item.innerHTML = priceCents : item.classList.add(\"display-none\"));\r\n [...document.getElementsByClassName(\"fullprice pid-\" + pid)].forEach(item => item.innerHTML = priceDisplay.toFixed(2));\r\n [...document.getElementsByClassName(\"fullprice-fees pid-\" + pid)].forEach(item => item.innerHTML = Number(priceDisplayFees).toFixed(2));\r\n [...document.getElementsByClassName(\"origprice pid-\" + pid)].forEach(item => item.innerHTML = origPrice);\r\n [...document.getElementsByClassName(\"dollars pid-\" + pid)].forEach(item => item.closest(\".price\").classList.add(\"shown\"));\r\n [...document.getElementsByClassName(\"dollars-fees pid-\" + pid)].forEach(item => item.closest(\".price\").classList.add(\"shown\"));\r\n }\r\n })\r\n price_pkgids.forEach(pkgid => {\r\n if (sessionStorage.getItem('pkgid_'+pkgid)) {\r\n const pkgidData = JSON.parse(sessionStorage.getItem('pkgid_' + pkgid))\r\n const priceDisplay = pkgidData.amount;\r\n const priceDollars = pkgidData.display_dollars;\r\n const priceCents = pkgidData.display_cents;\r\n const discountAmount = pkgidData.discount;\r\n const origPrice = Math.round((priceDisplay + (priceDisplay * .2)).toFixed(0) / 5) * 5; // adding 20% to current price for display\r\n [...document.getElementsByClassName(\"dollars pkgid-\" + pkgid)].forEach(item => item.innerHTML = priceDollars);\r\n [...document.getElementsByClassName(\"cents pkgid-\" + pkgid)].forEach(item => priceCents !== \"00\" ? item.innerHTML = priceCents : item.classList.add(\"display-none\"));\r\n [...document.getElementsByClassName(\"fullprice pkgid-\" + pkgid)].forEach(item => item.innerHTML = priceDisplay.toFixed(2));\r\n [...document.getElementsByClassName(\"origprice pkgid-\" + pkgid)].forEach(item => item.innerHTML = origPrice);\r\n [...document.getElementsByClassName(\"dollars pkgid-\" + pkgid)].forEach(item => item.closest(\".price\").classList.add(\"shown\"));\r\n [...document.getElementsByClassName(\"savings-amount pkgid-\" + pkgid)].forEach(item => item.innerHTML = `$${discountAmount}`);\r\n }\r\n })\r\n getProductPrice(price_pids); // this will make sure that the price is being updated from API even if there's stored pricing\r\n getPackagePrice(price_pkgids); // this will make sure that the price is being updated from API even if there's stored pricing\r\n } else {\r\n getProductPrice(price_pids);\r\n getPackagePrice(price_pkgids);\r\n }\r\n modifyRegUrl();\r\n}\r\npricingInit();\r\n","/**\r\n * Copyright 2015 Google Inc. All rights reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n/* eslint-env browser */\r\n'use strict';\r\n\r\nif ('serviceWorker' in navigator) {\r\n // Delay registration until after the page has loaded, to ensure that our\r\n // precaching requests don't degrade the first visit experience.\r\n // See https://developers.google.com/web/fundamentals/instant-and-offline/service-worker/registration\r\n window.addEventListener('load', function() {\r\n // Your service-worker.js *must* be located at the top-level directory relative to your site.\r\n // It won't be able to control pages unless it's located at the same level or higher than them.\r\n // *Don't* register service worker file in, e.g., a scripts/ sub-directory!\r\n // See https://github.com/slightlyoff/ServiceWorker/issues/468\r\n navigator.serviceWorker.register('/sw.js').then(function(reg) {\r\n // updatefound is fired if service-worker.js changes.\r\n reg.onupdatefound = function() {\r\n // The updatefound event implies that reg.installing is set; see\r\n // https://w3c.github.io/ServiceWorker/#service-worker-registration-updatefound-event\r\n var installingWorker = reg.installing;\r\n\r\n installingWorker.onstatechange = function() {\r\n switch (installingWorker.state) {\r\n case 'installed':\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the old content will have been purged and the fresh content will\r\n // have been added to the cache.\r\n // It's the perfect time to display a \"New content is available; please refresh.\"\r\n // message in the page's interface.\r\n console.log('New or updated content is available.');\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a \"Content is cached for offline use.\" message.\r\n console.log('Content is now available offline!');\r\n }\r\n break;\r\n\r\n case 'redundant':\r\n console.error('The installing service worker became redundant.');\r\n break;\r\n }\r\n };\r\n };\r\n }).catch(function(e) {\r\n console.error('Error during service worker registration:', e);\r\n });\r\n });\r\n}\r\n"]}