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AAKgB,UAAUoD,GAC7C,CAGQ,SAAStE,EAAoB5G,GAClC,IAAMkL,EAAOpE,KAAKC,MAAMsE,aAAaE,QAAQvL,IAE7C,OAAKkL,EAImB,OAApBA,EAAKE,aAAwB,IAAIxB,MAAOE,UAAYoB,EAAKC,UAAaD,EAAKE,YAC3EC,aAAaG,WAAWxL,GACjB,MAGJkL,EAAKF,QARD,IASf,CAEO,SAAS3M,EAAUmL,GAYzB,IAXA,IAAIiC,EAASjC,EAAO,IAChBkC,EAAKzE,SAASuD,OAAOvL,MAAM,KAE3B0M,EAAS,SAAgBC,GAC5B,IACC9E,KAAKC,MAAM6E,EACZ,CAAE,MAAOC,GACR,OAAO,CACR,CACA,OAAO,CACR,EACSC,EAAI,EAAGA,EAAIJ,EAAG3K,OAAQ+K,IAAK,CAEnC,IADA,IAAIC,EAAIL,EAAGI,GACW,KAAfC,EAAEC,OAAO,IAAWD,EAAIA,EAAEE,UAAU,EAAGF,EAAEhL,QAChD,GAAyB,GAArBgL,EAAElL,QAAQ4K,GAAc,CAC3B,IAAIT,EAAUe,EAAEE,UAAUR,EAAO1K,OAAQgL,EAAEhL,QAC3C,GAAI4K,EAAOX,GAAU,CACpBA,EAAUlE,KAAKC,MAAMiE,GAErB,IAAK,IAALkB,EAAA,EAAAC,EAA0B/B,OAAOC,QAAQW,GAAQkB,EAAAC,EAAApL,OAAAmL,IAAE,CAA9C,IAAAE,EAAAxK,EAAAuK,EAAAD,GAAA,GAAOlM,EAAGoM,EAAA,GAAE7B,EAAI6B,EAAA,GACD,iBAAR7B,IAAkBS,EAAQhL,GAAOuK,EAAKpI,QAAQ,UAAU,KACpE,CACD,CACA,OAAO6I,CACR,CACD,CACA,OAAO,IACR,C","sources":["webpack://@hero-digital/zoom/./src/js/utilities/money.js","webpack://@hero-digital/zoom/./src/js/utilities/pricing.js","webpack://@hero-digital/zoom/./src/js/utilities/utilities.js"],"sourcesContent":["import { getCookie } from './utilities'\r\n\r\n\r\nexport const separatorConfig = {\r\n 'en-US': { decimal: '.', commaStyle: ',', place: 'begin', space: false },\r\n 'en-GB': { decimal: '.', commaStyle: ',', place: 'begin', space: false },\r\n 'zh-CN': { decimal: '.', commaStyle: ',', place: 'end', space: true, specialSymbol: true },\r\n 'es-ES': { decimal: ',', commaStyle: '.', place: 'end', space: true },\r\n 'fr-FR': { decimal: ',', commaStyle: ' ', place: 'end', space: true },\r\n 'jp-JP': { decimal: '.', commaStyle: ',', place: 'begin', space: false },\r\n 'de-DE': { decimal: ',', commaStyle: '.', place: 'end', space: true },\r\n 'pt-PT': { decimal: ',', commaStyle: '.', place: 'begin', space: true },\r\n 'ru-RU': { decimal: ',', commaStyle: ' ', place: 'end', space: true, specialSymbol: true },\r\n 'zh-TW': { decimal: '.', commaStyle: ',', place: 'end', space: true, specialSymbol: true },\r\n 'ko-KO': { decimal: '.', commaStyle: ',', place: 'begin', space: false },\r\n 'it-IT': { decimal: ',', commaStyle: '.', place: 'begin', space: true },\r\n 'vi-VN': { decimal: ',', commaStyle: '.', place: 'begin', space: true },\r\n};\r\n\r\nexport const langMapping = {\r\n 'en': 'en-US',\r\n 'es': 'es-ES',\r\n 'fr': 'fr-FR',\r\n 'de': 'de-DE',\r\n 'zh': 'zh-CN',\r\n 'jp': 'jp-JP',\r\n 'pt': 'pt-PT',\r\n 'ru': 'ru-RU',\r\n 'ko': 'ko-KO',\r\n 'it': 'it-IT',\r\n 'vi': 'vi-VN',\r\n};\r\nexport const NO_DECIMAL_CURRENCIES = ['VND'];\r\n\r\nexport const CURRENCY_COOKIE_KEY = '_zm_currency';\r\n\r\nexport const NEED_REMOVE_DECIMAL_CURRENCY = ['JPY', 'INR', 'VND'];\r\n\r\n/**\r\n *\r\n * @param {String: en-US | en-GB | zh-CN | zh-TW | es-ES | jp-JP | de-DE | pt-PT | ru-RU | ko-KO | it-IT | vi-VN } language\r\n *\r\n */\r\nexport const getSeparatorConfig = language => {\r\n if (!language) language = langMapping[getLanguageFromURL()] || 'en-US';\r\n return separatorConfig[language || 'en-US'] || { decimal: '.', commaStyle: ',', place: 'begin', space: false };\r\n};\r\n\r\nexport const separators = getSeparatorConfig((getCookie('_zm_lang')));\r\n\r\nexport const toThousands = (num, comma = separators['commaStyle']) => {\r\n return (num || 0).toString().replace(/(\\d)(?=(?:\\d{3})+$)/g, `$1${comma}`);\r\n};\r\nexport const getEffectiveCurrency = () => {\r\n const currency = getCookie(CURRENCY_COOKIE_KEY);\r\n return currency || 'USD';\r\n};\r\n\r\n/**\r\n *\r\n * @param {String: USD | AUD | EUR | GBP | JPY | CAD | CNY} currency\r\n *\r\n */\r\nexport const getCurrencySymbol = currency => {\r\n switch (currency) {\r\n case 'USD':\r\n return '$';\r\n case 'AUD':\r\n return 'A$';\r\n case 'EUR':\r\n return '\\u20AC';\r\n case 'GBP':\r\n return '\\u00A3';\r\n case 'JPY':\r\n return '\\uFFE5';\r\n case 'CAD':\r\n return 'CAD';\r\n case 'CNY':\r\n return '\\uFFE5';\r\n case 'INR':\r\n return '₹';\r\n case 'NZD':\r\n return 'NZ$';\r\n case 'SAR':\r\n return 'SAR';\r\n case 'ZAR':\r\n return 'R';\r\n case 'AED':\r\n return 'AED';\r\n default:\r\n return window.SB?.getCurrencySymbol(currency) ?? currency;\r\n }\r\n};\r\n\r\n/**\r\n *\r\n * @param amount\r\n * @param options {TransferMoneyOptionsBean}\r\n * @return {number}\r\n */\r\nexport const getDecimalsWithCurrency = (amount, options = {}) => {\r\n if (isNaN(+amount)) return 0;\r\n\r\n const { fixedLength = 2, needRemoveDecimal = true } = options;\r\n\r\n if (!needRemoveDecimal) return fixedLength;\r\n\r\n const currency = getEffectiveCurrency();\r\n\r\n return NEED_REMOVE_DECIMAL_CURRENCY.includes(currency) ? 0 : fixedLength;\r\n};\r\n\r\nexport const getLanguageFromURL = () => window.location.pathname?.split('/')[1] || null;\r\n\r\nexport class PriceHandler {\r\n #priceInCents\r\n #billingCycle\r\n #options\r\n\r\n // export values\r\n currency = {\r\n symbol: '',\r\n place: 'begin'\r\n }\r\n integer = ''\r\n decimal = ''\r\n constructor (priceInCents, billingCycle, options) {\r\n this.#priceInCents = priceInCents;\r\n this.#billingCycle = billingCycle;\r\n this.#options = options;\r\n }\r\n static of (priceInCents, billingCycle, options) {\r\n return new PriceHandler(priceInCents, billingCycle, options);\r\n }\r\n build () {\r\n return this.currencyWrapper().priceWrapper();\r\n }\r\n currencyWrapper () {\r\n const { place } = separators;\r\n this.currency = {\r\n place: place\r\n };\r\n return this;\r\n }\r\n priceWrapper () {\r\n const priceInCents = this.#priceInCents;\r\n // Nan check\r\n if (isNaN(priceInCents)) {\r\n this.integer = priceInCents.toString();\r\n this.decimal = '';\r\n return this;\r\n }\r\n const options = this.#options;\r\n // get dollar amount, cents / 100\r\n const amount = priceInCents / 100;\r\n const { forceDiff = false } = options;\r\n let currencyFixedLength = 2;\r\n const isNoDecimalCurrencies = NO_DECIMAL_CURRENCIES.indexOf(getEffectiveCurrency()) !== -1;\r\n currencyFixedLength = isNoDecimalCurrencies ? 0 : getDecimalsWithCurrency(priceInCents, options);\r\n let fixedDollars = amount.toFixed(currencyFixedLength);\r\n if (forceDiff && parseInt(fixedDollars) === parseFloat(fixedDollars)) {\r\n fixedDollars = amount.toFixed(0);\r\n }\r\n const { commaStyle } = separators;\r\n\r\n if(this.#billingCycle===12){\r\n const divide = 12;\r\n // transfer all to monthly price\r\n fixedDollars = (fixedDollars / divide).toFixed(currencyFixedLength);\r\n }\r\n const moneySplitByMonth = fixedDollars.split('.');\r\n const [integerPartByMonth, decimalPartByMonth = ''] = moneySplitByMonth;\r\n this.integer = `${toThousands(integerPartByMonth, commaStyle)}`;\r\n this.decimal = decimalPartByMonth;\r\n return this;\r\n }\r\n}\r\n\r\nexport const priceByMonth = (priceInCents = 0, billingCycle = 12, options = {}) => {\r\n return PriceHandler\r\n .of(priceInCents, billingCycle, options)\r\n .build();\r\n};\r\n","import { getCookie, getFromLocalStorage,saveToLocalStorage } from './utilities'\r\nimport{getFormatVal, safeToFixed ,SafeNumber,divide} from './numberFormat'\r\nimport{priceByMonth, separators} from './money'\r\n\r\nfunction getApiValue(jsonData, currency,property) {\r\n return getCurrencyProperty(jsonData, currency, property)\r\n}\r\nlet currencyLocale = ''\r\nlet currencyValue = ''\r\n\r\nfunction getCurrencyProperty(jsonData, currency, property) {\r\n const currencyAbbreviation= currency?.currencyAbbreviation || \"USD\"\r\n let currencyAbb=(currencyAbbreviation==\"R\")?\"ZAR\":currencyAbbreviation\r\n switch (currencyAbb) {\r\n case 'USD':\r\n currencyValue = jsonData?.result?.USD[property] || ''\r\n currencyLocale = 'en-US'\r\n break\r\n case 'AUD':\r\n currencyValue = jsonData?.result?.AUD[property] || ''\r\n currencyLocale = 'en-AU'\r\n break\r\n case 'BRL':\r\n currencyValue = jsonData?.result?.BRL[property] || ''\r\n currencyLocale = 'pt-BR'\r\n break\r\n case 'CAD':\r\n currencyValue = jsonData?.result?.CAD[property] || ''\r\n currencyLocale = 'pt-BR'\r\n break\r\n case 'DKK':\r\n currencyValue = jsonData?.result?.DKK[property] || ''\r\n currencyLocale = 'da-DK'\r\n break\r\n case 'AED':\r\n currencyValue = jsonData?.result?.AED[property] || ''\r\n currencyLocale = 'ar-AE'\r\n break\r\n case 'HKD':\r\n currencyValue = jsonData?.result?.HKD[property] || ''\r\n currencyLocale = 'ar-AE'\r\n break\r\n case 'INR':\r\n currencyValue = jsonData?.result?.INR[property] || ''\r\n currencyLocale = 'en-IN'\r\n break\r\n case 'IDR':\r\n currencyValue = jsonData?.result?.IDR[property] || ''\r\n currencyLocale = 'id-ID'\r\n break\r\n case 'JPY':\r\n currencyValue = jsonData?.result?.JPY[property] || ''\r\n currencyLocale = 'ja-JP'\r\n break\r\n case 'MYR':\r\n currencyValue = jsonData?.result?.MYR[property] || ''\r\n currencyLocale = 'ms-MY'\r\n break\r\n case 'MXN':\r\n currencyValue = jsonData?.result?.MXN[property] || ''\r\n currencyLocale = 'es-MX'\r\n break\r\n case 'NZD':\r\n currencyValue = jsonData?.result?.NZD[property] || ''\r\n currencyLocale = 'en-NZ'\r\n break\r\n case 'NOK':\r\n currencyValue = jsonData?.result?.NOK[property] || ''\r\n currencyLocale = 'no-NO'\r\n break\r\n case 'PHP':\r\n currencyValue = jsonData?.result?.PHP[property] || ''\r\n currencyLocale = 'en-PH'\r\n break\r\n case 'PLN':\r\n currencyValue = jsonData?.result?.PLN[property] || ''\r\n currencyLocale = 'pl-PL'\r\n break\r\n case 'GBP':\r\n currencyValue = jsonData?.result?.GBP[property] || ''\r\n currencyLocale = 'en-GB'\r\n break\r\n case 'SAR':\r\n currencyValue = jsonData?.result?.SAR[property] || ''\r\n currencyLocale = 'ar-SA'\r\n break\r\n case 'SGD':\r\n currencyValue = jsonData?.result?.SGD[property] || ''\r\n currencyLocale = 'en-SG'\r\n break\r\n case 'ZAR':\r\n currencyValue = jsonData?.result?.ZAR[property] || ''\r\n currencyLocale = 'en-ZA'\r\n break\r\n case 'KRW':\r\n currencyValue = jsonData?.result?.KRW[property] || ''\r\n currencyLocale = 'ko-KR'\r\n break\r\n case 'SEK':\r\n currencyValue = jsonData?.result?.SEK[property] || ''\r\n currencyLocale = 'sv-SE'\r\n break\r\n case 'CHF':\r\n currencyValue = jsonData?.result?.CHF[property] || ''\r\n currencyLocale = 'de-CH'\r\n break\r\n case 'VND':\r\n currencyValue = jsonData?.result?.VND[property] || ''\r\n currencyLocale = 'vi-VN'\r\n break\r\n case 'EUR':\r\n currencyValue = jsonData?.result?.EUR[property] || ''\r\n currencyLocale = 'fr-FR' \r\n break\r\n default:\r\n currencyValue = jsonData?.result?.USD[property] || ''\r\n currencyLocale = 'en-US'\r\n break\r\n }\r\n\r\nif (currencyValue && currencyValue !== '' && Array.isArray(currencyValue) && currencyValue[0]?.price !== undefined) {\r\n let prices = currencyValue[0].price\r\n currencyValue=prices\r\n} \r\n return currencyValue\r\n}\r\n\r\nfunction convertToMonthlyPrice(rawPrice,subType) {\r\n const currencyPrice = divide(rawPrice,100)\r\n return formatToTwoDecimalPlaces(currencyPrice,subType)\r\n}\r\n\r\nfunction monthlyPriceBilledMonthly(monthlyPrice) {\r\n return priceByMonth(monthlyPrice,1);\r\n}\r\n\r\nfunction monthlyPriceBilledAnnually(monthlyPrice, subType) {\r\n return priceByMonth(monthlyPrice,12);\r\n}\r\n\r\nfunction convertToYearlyPrice(monthlyPrice,subType) {\r\n const currencyPrice = divide(divide(monthlyPrice,100), 12)\r\n return formatToTwoDecimalPlaces(currencyPrice,subType)\r\n}\r\n\r\nfunction formatToTwoDecimalPlaces(number,subType) {\r\n let isJapanese=currencyLocale==='ja-JP'\r\n return getFormatVal(isJapanese?SafeNumber(number,2):number.toFixed(2),isJapanese,subType===1)\r\n}\r\n\r\nfunction formatNumberToString(number) {\r\n let numStr = number.toString()\r\n let [integerPart, decimalPart] = numStr.split('.')\r\n if (decimalPart) {\r\n decimalPart = decimalPart.slice(0, 2) \r\n } else {\r\n decimalPart = '' \r\n }\r\n let result= (decimalPart && decimalPart !== '00')? `${integerPart}.${decimalPart.padEnd(2, '0')}`:`${integerPart}`\r\n\r\n return parseFloat(result).toLocaleString('en-US')\r\n}\r\n\r\nfunction findCurrency(currencyAbbreviation) {\r\n return allCurrencyList?.find(currency =>\r\n currency.currencyAbbreviation.toLowerCase() === currencyAbbreviation.toLowerCase()\r\n )\r\n}\r\n\r\nexport function callPricingAPI() {\r\n const fetchOpts = {\r\n method: 'GET',\r\n credentials: 'include',\r\n mode: 'cors',\r\n }\r\n const currencyCookieName = \"_zm_currency\"\r\n const currencyCookieValue = getCookie(currencyCookieName)\r\n let currencyValue=(currencyCookieValue==\"R\")?\"ZAR\":currencyCookieValue\r\n let planPriceStorageName = `_zm_plan_price_${currencyValue}`\r\n const planPriceStorageValue = getFromLocalStorage(planPriceStorageName)\r\n\r\n if(planPriceStorageValue)\r\n {\r\n const body = JSON.parse(planPriceStorageValue)\r\n processPriceApiResponse(body)\r\n return\r\n }\r\n\r\n const planPriceApi= document.getElementById(\"plan-price-api\")?.value\r\n if(!planPriceApi) return\r\n fetch(`${planPriceApi}?currency=${currencyValue}`, fetchOpts)\r\n .then(response => {\r\n if (!response.ok) {\r\n throw new Error('Network response was not ok')\r\n }\r\n return response.json()\r\n })\r\n .then(body => {\r\n let planResponse= JSON.stringify(body)\r\n saveToLocalStorage(planPriceStorageName,planResponse, 15)\r\n processPriceApiResponse(body)\r\n })\r\n .catch(err => {\r\n console.error('Plan Price Request Failed:', err)\r\n })\r\n\r\n // Function to handle the response from the price API\r\n function processPriceApiResponse(body) {\r\n const pricingHtmlElements = document.querySelectorAll('.fdn-api-price');\r\n if (pricingHtmlElements.length === 0) return;\r\n\r\n const currency = findCurrency(currencyCookieValue);\r\n if (!currency) {\r\n console.warn('Currency not found in allCurrencyList');\r\n return;\r\n }\r\n\r\n pricingHtmlElements.forEach(priceElement => {\r\n try {\r\n const pricePlan = priceElement.getAttribute('data-price');\r\n const priceType = parseInt(priceElement.getAttribute('data-price-type'), 10);\r\n const subType = parseInt(priceElement.getAttribute('data-price-sub'), 10);\r\n\r\n if (!pricePlan || isNaN(priceType)) return;\r\n\r\n const rawPrice = getApiValue(body, currency, pricePlan);\r\n if (typeof rawPrice !== 'number' || isNaN(rawPrice)) return;\r\n\r\n let result;\r\n if (priceType === 0) {\r\n result = monthlyPriceBilledMonthly(rawPrice);\r\n } else if (priceType === 1) {\r\n result = monthlyPriceBilledAnnually(rawPrice);\r\n } else {\r\n return;\r\n }\r\n\r\n if (result !== undefined) {\r\n let htmlString = '';\r\n let currencySymbol = currency.currencySymbol;\r\n if (currency.currencyAbbreviation === \"AED\" || currency.currencyAbbreviation === \"SAR\") {\r\n currencySymbol = currency.currencyAbbreviation;\r\n }\r\n const { decimal, integer } = result;\r\n\r\n const{decimal: separatorDecimal, place}=separators;\r\n \r\n let formattedPrice= integer + (decimal && (subType ? `${decimal}` : decimal !== '00' ? separatorDecimal + decimal : ''));\r\n htmlString = place === 'begin'?`${currencySymbol}${formattedPrice}`:`${formattedPrice} ${currencySymbol}`;\r\n priceElement.innerHTML = htmlString;\r\n }\r\n } catch (error) {\r\n console.error('Error processing price element:', error);\r\n }\r\n });\r\n }\r\n}","/**\r\n * A function which adds click detection to document\r\n * and performs a prescribed action when a click is detected\r\n * outside of the supllied element.\r\n * Use an array for params.exceptionClassArray to create exceptions.\r\n *\r\n * @param {Object} elem A DOM element\r\n * @param {Function} name of class to search for\r\n * @param {Object} an object containing parameters\r\n */\r\nexport function actionOnClickOutside(element, action, params = {}) {\r\n\tlet exceptionClassArray = params.exceptionClassArray || [];\r\n\tlet useCapture = params.useCapture || false;\r\n\r\n\tconst outsideClickListener = event => {\r\n\t\tif (!element.contains(event.target) && event.target.classList.length && !exceptionClassArray.includes(...event.target.classList)) {\r\n\t\t\taction();\r\n\t\t\tremoveClickListener();\r\n\t\t}\r\n\t}\r\n\r\n\tconst removeClickListener = () => {\r\n\t\tdocument.removeEventListener('click', outsideClickListener)\r\n\t}\r\n\r\n\tdocument.addEventListener('click', outsideClickListener, useCapture);\r\n\telement.clearListener = function () {\r\n\t\tremoveClickListener();\r\n\t}\r\n}\r\n\r\n/**\r\n * Simple function to return an array of sibling elements\r\n */\r\nexport function getSiblings(elem) {\r\n\treturn Array.prototype.filter.call(elem.parentNode.children, function (sibling) {\r\n\t\treturn sibling !== elem;\r\n\t});\r\n}\r\n\r\n/**\r\n * A function which traps tabbing to modal element.\r\n * Escape key will close modal.\r\n */\r\nexport function limitKeyboardAccesibility(element, closeFunction) {\r\n\t// get all accessibile elements, put into array\r\n\tconst focusableElsRaw = element.querySelectorAll(\r\n\t\t'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex=\"0\"]'\r\n\t);\r\n\tconst focusableEls = Array.prototype.slice.call(focusableElsRaw);\r\n\t// go through elements and pull out only the ones that are visible\r\n\tlet visibleEls = [].filter.call(focusableEls, el => {\r\n\t\treturn (el.offsetParent !== null);\r\n\t});\r\n\t// get the first and last elements\r\n\tconst firstFocusableEl = visibleEls[0];\r\n\tconst lastFocusableEl = visibleEls[visibleEls.length - 1];\r\n\t// set up keyboard handler\r\n\tconst KEY_TAB = 9;\r\n\tconst KEY_ESC = 27;\r\n\tconst keyHandler = (e) => {\r\n\t\t// special case to return when keyhandling is disabled on this element\r\n\t\tif (element.disableKeyHandler) return;\r\n\r\n\t\t// specials key actions\r\n\t\tswitch (e.keyCode) {\r\n\t\t\tcase KEY_TAB:\r\n\t\t\t\t// forward tab\r\n\t\t\t\tif (!e.shiftKey) {\r\n\t\t\t\t\tif (document.activeElement === lastFocusableEl) {\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\tfirstFocusableEl.focus();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// backward tab\r\n\t\t\t\telse {\r\n\t\t\t\t\tif (document.activeElement === firstFocusableEl) {\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\tlastFocusableEl.focus();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase KEY_ESC:\r\n\t\t\t\tif (closeFunction) closeFunction();\r\n\t\t\t\tremoveKeyHandler();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak\r\n\t\t}\r\n\t}\r\n\t// clear function\r\n\tconst removeKeyHandler = () => {\r\n\t\tdocument.removeEventListener('keydown', keyHandler);\r\n\t}\r\n\t// attach clear function to element\r\n\telement.clearKeyHandler = () => {\r\n\t\tremoveKeyHandler();\r\n\t}\r\n\t// attach keyboard handler to doc\r\n\tdocument.addEventListener('keydown', keyHandler, false);\r\n}\r\n\r\n/**\r\n * A function which traverses all parents of a given DOM element\r\n * and returns the first parent with a class name that matches\r\n * the supplied class. This matches the JavaScript \"closest\"\r\n * function which IE11 does not support.\r\n *\r\n * @param {Object} elem A DOM element\r\n * @param {String} name of class to search for\r\n * @return {Object} the closest DOM parent with matching class\r\n */\r\nexport function closestByClass(el, clazz) {\r\n\t// Traverse the DOM up with a while loop\r\n\r\n\r\n\twhile (!el.classList.contains(clazz)) {\r\n\t\t// Increment the loop to the parent node\r\n\t\tel = el.parentNode;\r\n\t\tif (!el || el instanceof HTMLDocument) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}\r\n\t// At this point, the while loop has stopped and `el` represents the element that has\r\n\t// the class you specified in the second parameter of the function `clazz`\r\n\r\n\t// Then return the matched element\r\n\treturn el;\r\n}\r\n\r\n\r\n/**\r\n * Utility functions for setting and getting cookies\r\n */\r\nexport function setCookie(name, value, days) {\r\n\tvar expires = \"\";\r\n\tif (days) {\r\n\t\tvar date = new Date();\r\n\t\tdate.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\r\n\t\texpires = \"; expires=\" + date.toUTCString();\r\n\t}\r\n\tif (typeof value === 'object') {\r\n\t\t// because of Safari bug handling JSON in cookies commas need to be stripped out\r\n\t\tlet obj = {};\r\n\t\tfor (const [key, item] of Object.entries(value)) {\r\n\t\t\tif (typeof item == 'string') obj[key] = item.replace(/,/,'U+0002C');\r\n\t\t\telse obj[key] = item;\r\n\t\t}\r\n\t\t// turn value into JSON\r\n\t\tvalue = JSON.stringify(obj);\r\n\t}\r\n\t// create cookie\r\n\tdocument.cookie = name + \"=\" + (value || \"\") + expires + \"; path=/;SameSite=Strict\";\r\n}\r\n\r\nexport function setCookieWithDomain(cookieName, value, days, domain) {\r\n try{\r\n var expires = \"\"\r\n if (days) {\r\n var date = new Date()\r\n date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000))\r\n expires = \"; expires=\" + date.toUTCString()\r\n }\r\n if (typeof value === 'object') {\r\n // because of Safari bug handling JSON in cookies commas need to be stripped out\r\n let obj = {}\r\n for (const [key, item] of Object.entries(value)) {\r\n if (typeof item == 'string') obj[key] = item.replace(/,/,'U+0002C')\r\n else obj[key] = item\r\n }\r\n // turn value into JSON\r\n value = JSON.stringify(obj)\r\n }\r\n // create cookie\r\n document.cookie = cookieName + \"=\" + (value || \"\") + expires + \"; path=/;secure;samesite=none;domain=.\" + domain \r\n }\r\n catch(err){\r\n console.log('set cookie error:', err)\r\n }\r\n } \r\n\r\n // Save content in localStorage with expiration\r\n export function saveToLocalStorage(key, content, expirationInMinutes = null) {\r\n\t const data = {\r\n\t content: content,\r\n\t timestamp: new Date().getTime(),\r\n\t expiration: expirationInMinutes ? expirationInMinutes * 60 * 1000 : null\r\n\t };\r\n\t localStorage.setItem(key, JSON.stringify(data));\r\n\t}\r\n\r\n // Retrieve content from localStorage with expiration check\r\n export function getFromLocalStorage(key) {\r\n const data = JSON.parse(localStorage.getItem(key));\r\n\r\n if (!data) {\r\n return null;\r\n }\r\n\r\n if (data.expiration !== null && (new Date().getTime() - data.timestamp) > data.expiration) {\r\n localStorage.removeItem(key);\r\n return null;\r\n }\r\n\r\n return data.content;\r\n} \r\n\r\nexport function getCookie(name) {\r\n\tvar nameEQ = name + \"=\";\r\n\tvar ca = document.cookie.split(';');\r\n\t// see if value is JSON\r\n\tlet isJSON = function isJson(str) {\r\n\t\ttry {\r\n\t\t\tJSON.parse(str);\r\n\t\t} catch (e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t};\r\n\tfor (var i = 0; i < ca.length; i++) {\r\n\t\tvar c = ca[i];\r\n\t\twhile (c.charAt(0) == ' ') c = c.substring(1, c.length);\r\n\t\tif (c.indexOf(nameEQ) == 0) {\r\n\t\t\tlet content = c.substring(nameEQ.length, c.length);\r\n\t\t\tif (isJSON(content)) {\r\n\t\t\t\tcontent = JSON.parse(content);\r\n\t\t\t\t// replace commas\r\n\t\t\t\tfor (const [key, item] of Object.entries(content)) {\r\n\t\t\t\t\tif (typeof item == 'string') content[key] = item.replace('U+0002C',',')\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn content;\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n// Get a cookie without an exact name - Adobe cookies are unique to a machine\r\nexport function getCookieFuzzy(nameStartsWith,nameEndsWith) {\r\n\tlet cookies = document.cookie.split(';');\r\n\t\r\n\t// see if value is JSON\r\n\tlet isJSON = function isJson(str) {\r\n\t\ttry {\r\n\t\t\tJSON.parse(str);\r\n\t\t} catch (e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t};\r\n\r\n\t// Loop through the cookies\r\n\tfor (var i = 0; i < cookies.length; i++) {\r\n\t\tvar cookie = cookies[i];\r\n\t\t\r\n\t\t// Trim the cookie\r\n\t\twhile (cookie.charAt(0) == ' ') cookie = cookie.substring(1, cookie.length);\r\n\r\n\t\t// Split the cookie name and value\r\n\t\tvar cookiePair = cookie.split('=');\r\n\r\n\t\t// Check that we got something to work with\r\n\t\tif (cookiePair.length > 1)\r\n\t\t{\r\n\t\t\t// Get the cookie name and value\r\n\t\t\tvar cookieName = cookiePair[0];\r\n\t\t\tvar cookieValue = cookiePair[1];\r\n\t\t\t\r\n\t\t\t// Name comparison\r\n\t\t\tif (cookieName.startsWith(nameStartsWith) && cookieName.endsWith(nameEndsWith))\r\n\t\t\t{\r\n\t\t\t\treturn cookieValue;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n\r\nexport function eraseCookie(name) {\r\n\tdocument.cookie = name + '=; Max-Age=-99999999;';\r\n}\r\n\r\nexport function eraseCookieByPath(name) {\r\n\tdocument.cookie = `${name}=; path=/; Max-Age=-99999999;`;\r\n}\r\n\r\n/**\r\n * Convert a string to title case\r\n */\r\nexport function toTitleCase(str) {\r\n\treturn str\r\n\t\t.toLowerCase()\r\n\t\t.split(' ')\r\n\t\t.map(word => word.charAt(0).toUpperCase() + word.slice(1))\r\n\t\t.join(' ');\r\n};\r\n\r\n/**\r\n * Validate US zip code\r\n */\r\nexport function validateZipCode(str, allowPlusFour) {\r\n\tlet regexp;\r\n\tif (allowPlusFour) regexp = /^[0-9]{5}(?:-[0-9]{4})?$/;\r\n\telse regexp = /^[0-9]{5}?$/;\r\n\tif (regexp.test(str)) return true;\r\n\telse return false;\r\n};\r\n\r\n/**\r\n * Returns a function, that, as long as it continues to be invoked, will not\r\n * be triggered. The function will be called after it stops being called for\r\n * N milliseconds. If `immediate` is passed, trigger the function on the\r\n * leading edge, instead of the trailing.\r\n *\r\n * @param {Function} func A function to call after N milliseconds\r\n * @param {number} wait The number of milliseconds to wait\r\n * @param {boolean} immediate Trigger the function on the leading edge instead of the trailing\r\n * @return {Function} A function, that, as long as it continues to be invoked, will not be triggered\r\n */\r\nexport function debounce(func, wait, immediate) {\r\n\tvar timeout;\r\n\treturn function () {\r\n\t\tvar context = this,\r\n\t\t\targs = arguments;\r\n\t\tvar later = function () {\r\n\t\t\ttimeout = null;\r\n\t\t\tif (!immediate) func.apply(context, args);\r\n\t\t};\r\n\t\tvar callNow = immediate && !timeout;\r\n\t\tclearTimeout(timeout);\r\n\t\ttimeout = setTimeout(later, wait);\r\n\t\tif (callNow) func.apply(context, args);\r\n\t}\r\n}\r\n\r\n\r\n/* function to add smooth scrolling from a click event */\r\nexport function scrollAnchors(e, respond = null) {\r\n\te.preventDefault();\r\n\r\n\tfunction distanceToTop(el) {\r\n\t\treturn Math.floor((el.getBoundingClientRect().top) - 150);\r\n\t}\r\n\tvar targetID = (respond) ? respond.getAttribute('href') : this.getAttribute('href');\r\n\tvar targetAnchor = document.querySelector(targetID);\r\n\tif (!targetAnchor) return;\r\n\tvar originalTop = distanceToTop(targetAnchor);\r\n\t\r\n\t// detect if the user is on IE11\r\n\tconst isIE11 = !!window.MSInputMethodContext && !!document.documentMode;\r\n\tconst agent = window.navigator.userAgent.toLowerCase();\r\n\tconst isEdge = agent.indexOf(\"edge\") > -1 || agent.indexOf(\"edg\") > -1;\r\n\r\n\tif (isIE11 || isEdge) {\r\n\t\twindow.scroll(0, originalTop);\r\n\t} else {\r\n\t\twindow.scrollBy({\r\n\t\t\ttop: originalTop,\r\n\t\t\tleft: 0,\r\n\t\t\tbehavior: 'smooth'\r\n\t\t});\r\n\t}\r\n\r\n\tvar checkIfDone = setInterval(function () {\r\n\r\n\t\tif (distanceToTop(targetAnchor) === 0) {\r\n\t\t\ttargetAnchor.tabIndex = '-1';\r\n\t\t\ttargetAnchor.focus();\r\n\t\t\tconsole.log('scroll anchors');\r\n\t\t\t// Let's make sure the History API even exists first..\r\n\t\t\tif ('history' in window) {\r\n\r\n\t\t\t\twindow.history.pushState('', '', targetID);\r\n\r\n\t\t\t} else {\r\n\t\t\t\t// Do it the old-fashioned way!\r\n\t\t\t\twindow.location = targetID;\r\n\r\n\t\t\t}\r\n\r\n\t\t\tclearInterval(checkIfDone);\r\n\t\t}\r\n\t}, 100);\r\n}\r\n\r\n/* get browser window dimentions */\r\nexport function viewportSize() {\r\n\tconst vw = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\r\n\tconst vh = Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0);\r\n\treturn { width: vw, height: vh }\r\n}\r\n\r\n/* test a string for JSON and return if true */\r\nexport function tryParseJSON (jsonString) {\r\n try {\r\n var o = JSON.parse(jsonString);\r\n\r\n // Handle non-exception-throwing cases:\r\n // Neither JSON.parse(false) or JSON.parse(1234) throw errors, hence the type-checking,\r\n // but... JSON.parse(null) returns null, and typeof null === \"object\", \r\n // so we must check for that, too. Thankfully, null is falsey, so this suffices:\r\n if (o && typeof o === \"object\") {\r\n return o;\r\n }\r\n }\r\n catch (e) { }\r\n\r\n return false;\r\n};\r\n\r\n// Function to remove a parameter from URL\r\nexport function removeURLParameter(url, parameter) {\r\n // Prefer not to use regex to avoid potential issues with special characters in parameter values\r\n var urlParts = url.split('?');\r\n if (urlParts.length >= 2) {\r\n var prefix = encodeURIComponent(parameter) + '=';\r\n var params = urlParts[1].split(/[&;]/g);\r\n\r\n // Reverse iteration to properly remove parameter\r\n for (var i = params.length; i-- > 0;) { \r\n if (params[i].lastIndexOf(prefix, 0) !== -1) { \r\n params.splice(i, 1);\r\n }\r\n }\r\n\r\n // Join back the parts\r\n url = urlParts[0] + (params.length > 0 ? '?' + params.join('&') : \"\");\r\n return url;\r\n } else {\r\n return url;\r\n }\r\n}\r\n"],"names":["language","NO_DECIMAL_CURRENCIES","NEED_REMOVE_DECIMAL_CURRENCY","separators","getCookie","getLanguageFromURL","decimal","commaStyle","place","space","specialSymbol","getEffectiveCurrency","_window$location$path","window","location","pathname","split","_priceInCents","WeakMap","_billingCycle","_options","PriceHandler","priceInCents","billingCycle","options","_classCallCheck","_classPrivateFieldInitSpec","_defineProperty","symbol","_classPrivateFieldSet","this","key","value","currencyWrapper","priceWrapper","currency","_classPrivateFieldGet","isNaN","integer","toString","currencyFixedLength","amount","_options$forceDiff","forceDiff","indexOf","arguments","length","undefined","_options$fixedLength","fixedLength","_options$needRemoveDe","needRemoveDecimal","includes","getDecimalsWithCurrency","fixedDollars","toFixed","parseInt","parseFloat","_moneySplitByMonth","_slicedToArray","integerPartByMonth","_moneySplitByMonth$","decimalPartByMonth","concat","num","comma","replace","toThousands","priceByMonth","of","build","getApiValue","jsonData","property","_jsonData$result","_jsonData$result2","_jsonData$result3","_jsonData$result4","_jsonData$result5","_jsonData$result6","_jsonData$result7","_jsonData$result8","_jsonData$result9","_jsonData$result10","_jsonData$result11","_jsonData$result12","_jsonData$result13","_jsonData$result14","_jsonData$result15","_jsonData$result16","_jsonData$result17","_jsonData$result18","_jsonData$result19","_jsonData$result20","_jsonData$result21","_jsonData$result22","_jsonData$result23","_jsonData$result24","_jsonData$result25","_jsonData$result26","_currencyValue$","currencyAbbreviation","currencyValue","result","USD","AUD","BRL","CAD","DKK","AED","HKD","INR","IDR","JPY","MYR","MXN","NZD","NOK","PHP","PLN","GBP","SAR","SGD","ZAR","KRW","SEK","CHF","VND","EUR","Array","isArray","price","prices","getCurrencyProperty","callPricingAPI","_document$getElementB","currencyCookieValue","planPriceStorageName","planPriceStorageValue","getFromLocalStorage","processPriceApiResponse","JSON","parse","planPriceApi","document","getElementById","fetch","method","credentials","mode","then","response","ok","Error","json","body","planResponse","stringify","saveToLocalStorage","err","console","error","pricingHtmlElements","querySelectorAll","_allCurrencyList","allCurrencyList","find","toLowerCase","forEach","priceElement","pricePlan","getAttribute","priceType","subType","rawPrice","htmlString","currencySymbol","_result","separatorDecimal","formattedPrice","innerHTML","warn","setCookie","name","days","expires","date","Date","setTime","getTime","toUTCString","_typeof","obj","_i","_Object$entries","Object","entries","_Object$entries$_i","item","cookie","setCookieWithDomain","cookieName","domain","_i2","_Object$entries2","_Object$entries2$_i","log","content","expirationInMinutes","data","timestamp","expiration","localStorage","setItem","getItem","removeItem","nameEQ","ca","isJSON","str","e","i","c","charAt","substring","_i3","_Object$entries3","_Object$entries3$_i"],"sourceRoot":""}