{"version":3,"sources":["../../../../dev/j/v3/components/vue-pricebox.js"],"names":["optionType","number","fake","isYearPeriod","obj","priceFlag","maintenance","searchPlatform","dataset","platform","returnedValue","Object","keys","options","forEach","optionName","i","toUpperCase","initModal","modalButton","modalTarget","getAttribute","modalPeriod","addEventListener","loadModal","e","charCode","target","period","periodName","targetName","document","getElementById","contentHolder","querySelector","xhr","XMLHttpRequest","onreadystatechange","this","readyState","status","container","createElement","innerHTML","responseText","append","BSN","Modal","show","open","avastGlobals","web","domain","ulocale","setRequestHeader","send","Vue","config","devtools","errorHandler","err","vm","info","console","log","detectedPlatform","detect","browser","toLowerCase","boxWrapElement","querySelectorAll","campaignMarkerModule","avm","require","downloadPopup","length","component","template","delimiters","props","data","setup","isfake","showToggler","togglersCount","themeClass","theme","size","computed","promoClass","promotedBox","multiboxClass","hasMultibox","renderedBoxes","b","address","sets","set","option","methods","changeIndex","event","optionIndex","setIndex","forInfluencer","$emit","getOptionData","optionData","setOptions","settings","hasToggler","settingIndex","togglerValues","horizontalToggler","togglerTheme","isSelected","index","selectedIndex","togglerClick","pricelist","getPricelist","multidata","getMultiData","spanned","ctaAutoNoteEnd","updated","setCampaignMarker","button","$el","setPopup","count","getLabelText","getTextAnnual","getVal","textUnderPrice","mounted","watch","getCtaNote","handler","val","$nextTick","getPlatformIcons","icons","platforms","icon","arr","getProdiconVar","value","variant","getProdiconName","name","getLabelVariant","buttonStyle","buttonTheme","buttonText","buttonDefaultText","showListPrice","locale","showCTANote","note","auto_cta_note","discountPercent","textFrom","text","getAnnualPrices","annualPrices","discount","annualMonthly3Yrs","annualMonthly2Yrs","annualMonthly1Yr","annualMonthly1Mnth","yearPriceDiscounted","yearPriceFull","replace","annualPricesPeriod","period3Years","period2Years","period1Year","periodMonth","test","originalText","currentText","noteContent","ctaAutoNote","fullPrice","billingContent","subscriptionContent","ctaAutoNoteGBmonth","ctaAutoNoteGByear","priceFormatted","legalSuffixStart","ctaAutoNoteMonth","ctaAutoNoteYear","legalSuffix","subscriptionText","indexOf","fixedDot","slice","label","discountPercentFormatted","saveText","calculatedText","monthlyPrice","oneTimeService","realPriceRoundedPerMonth","priceFormat","currencySymbol","worksOutAsPrice","textAbovePrice","worksOutAs","decimalPart","priceDecimalPart","decimalSeparator","getSecondaryTextPeriod","period1st3Years","period1st2Years","period1st1Year","period1stMonth","paramName","convertToBoolean","boolCheck","paramArr","isString","boxPriceIndex","Array","boxAddress","price","cartLinks","setCampaignMarkerCookie","abtest","undefined","el","dataCM","split","hrefCM","abTest","ticketNumber","testVariant","setAttribute","join","getPricelists","optionPricelists","pricelists","priceIndex","pricesCount","optionPricelist","productId","j","listCount","multibox","boxesCount","boxOrder","getMainPricePeriod","isLongPeriod","element","JSON","parse","appid","lastTogglerSwitch","settingsCount","renderedBoxesCount","created","s","setting","defaultIndex","settingOptionsNames","horizontal_toggler","toggler_theme","default_option","platform_detect","default_platform","addSet","o","optionSetting","pricelistsCount","campaign","promoted_box","parseFloat","togglerText","push","addOption","updateSetup","thisApp","thisAppTable","closest","isAppParentBottom","eventFromPricebox","eventParentPosition","selectSet","parentBoxOptionsCount","influencerCell","eventParent","previousElementSibling","newOption","selected","window","dispatchEvent","eventData","setLastTogglerSwitch","newSet","firstBox","lastBox","boxesCountSum","start","hasPromo","addresses","selectedOption","optionBoxes","p","CustomEvent","detail"],"mappings":"CAQA,WACC,YAg8BA,SAASA,GAAWC,EAAQC,GAC3B,MAAID,GAAS,IAAc,IAATC,EACV,QACa,GAAVD,EACH,SAEA,QAKT,QAASE,GAAaC,GACrB,MAAqB,KAAjBA,EAAIC,WAAuC,GAAnBD,EAAIE,YASjC,QAASC,GAAeC,EAASC,GAChC,GAAIC,IAAgB,CASpB,OAPAC,QAAOC,KAAKJ,EAAQK,SAASC,QAAQ,SAASC,EAAYC,GACrD,YAAcR,GAAQK,QAAQE,IAC7BN,EAASQ,gBAAkBT,EAAQK,QAAQE,GAAYN,SAASQ,gBACnEP,EAAgBM,KAIZN,EAIR,QAASQ,GAAU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AcsN,GAE1BP,UAAW,SAASjM,GACnB,MAAO,IAAI6M,aAAY,oBACtBC,QACCxD,QAAUxN,KAAK0F,IACfzB,SAAYjE,KAAK4N,kBAAkB3J,SACnCD,YAAehE,KAAK4N,kBAAkB5J,YACtCE,cAAiBA","file":"vue-pricebox.js","sourcesContent":["/**\n * vue-pricebox\n * @version 3.2\n * @author ÄŒenÄ›k Hybler , Jaroslav Slaby ,\n * @requires avast.web.campaignMarkerCookie\n * @requires avast.web.downloadPopup\n */\n\n(function() {\n\t'use strict';\n\tVue.config.devtools = true;\n\n\tVue.config.errorHandler = function(err, vm, info) {\n\t\tconsole.log('errorHandler');\n\t\tconsole.log(1, err); // err: error trace\n\t\tconsole.log(2, vm); // vm: component in which error occured\n\t\tconsole.log(3, info); // info: Vue specific error information such as lifecycle hooks, events etc.\n\t\t// TODO: Perform any custom logic or log to server\n\t};\n\n\tvar detectedPlatform = avastGlobals.detect.browser.platform.toLowerCase(),\n\t\tboxWrapElement = document.querySelectorAll('.js-pricebox'), // lookup for all abox components on page\n\t\tcampaignMarkerModule = avm.require('avast.web.campaignMarkerCookie')(),\n\t\tdownloadPopup = avm.require('avast.web.downloadPopup');\n\n\t// Terminate if no aboxes present on the page\n\t// Todo : this can be defined in avast.js config where modules boot\n\tif (boxWrapElement.length === 0) {\n\t\treturn false;\n\t}\n\n\t// Components\n\t// ---------------------------------------------------------------------------------------\n\t// DATA - Data passed from script to template (not tracked by reactivity)\n\t// PROPS - Data passed from template to script\n\t// METHODS - Methods are available both in script and in template\n\t// COMPUTED - Computed property. Not a method, doesnt accept parameters. Getters.\n\n\t// main abox-container\n\tVue.component('Container', {\n\t\ttemplate: '#container',\n\t\tdelimiters: ['<%', '%>'],\n\t\tprops: ['settings', 'setup', 'isfake', 'appid', 'theme', 'size'],\n\t\tdata: function() {\n\t\t\treturn {\n\t\t\t\tsetup: this.setup,\n\t\t\t\tisfake: this.isfake,\n\t\t\t\tshowToggler: this.setup.togglersCount > 0 ? true : false,\n\t\t\t\tthemeClass: 'theme-' + this.theme,\n\t\t\t\tsize: this.size\n\t\t\t};\n\t\t},\n\t\tcomputed: {\n\t\t\tpromoClass: function() {\n\t\t\t\treturn this.setup.promotedBox ? 'promo-'+ this.setup.promotedBox : false;\n\t\t\t},\n\t\t\tmultiboxClass: function() {\n\t\t\t\tvar\n\t\t\t\t\thasMultibox = false, // info whether there is multibox among rendered boxes\n\t\t\t\t\trenderedBoxes = this.setup.renderedBoxes; //addresses of all displayed boxes\n\n\t\t\t\t// for each rendered box take address and find by it in setup if it's type is multibox\n\t\t\t\tfor (var b = 0; b < Object.keys(renderedBoxes).length; b++) {\n\t\t\t\t\tvar address = renderedBoxes[b];\n\n\t\t\t\t\tif (!hasMultibox) {\n\t\t\t\t\t\thasMultibox = this.setup.sets[address.set].options[address.option].optionType === 'multi' ? true : false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn hasMultibox == true ? 'multibox' : false;\n\t\t\t},\n\t\t},\n\t\tmethods: {\n\t\t\tchangeIndex: function(event, optionIndex, setIndex, forInfluencer) {\n\t\t\t\t// optionIndex => selected option index\n\t\t\t\t// setIndex => order of the box in the multibox\n\t\t\t\tthis.$emit('change_data', event, optionIndex, setIndex, forInfluencer);\n\t\t\t},\n\t\t\tgetOptionData: function(address) {\n\t\t\t\tvar\n\t\t\t\t\toptionIndex = address.option, // index of the box\n\t\t\t\t\tsetIndex = address.set,\n\t\t\t\t\tsetOptions = this.settings[setIndex].options,\n\t\t\t\t\toptionData;\n\n\t\t\t\t// go through options in this set, find the selected one by index and check out the pricelist\n\t\t\t\tObject.keys(setOptions).forEach(function(optionName, i) {\n\t\t\t\t\tif (i == optionIndex) {\n\t\t\t\t\t\toptionData = setOptions[optionName];\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn optionData;\n\t\t\t}\n\t\t}\n\t});\n\n\n\t// Toggler\n\tVue.component('Toggler', {\n\t\ttemplate: '#box-toggler',\n\t\tdelimiters: ['<%', '%>'],\n\t\tprops: [\n\t\t\t'setup',\n\t\t\t'settingIndex', // index of given setting\n\t\t\t'selectedIndex', // selected value index\n\t\t\t'firstBox',\n\t\t\t'lastBox',\n\t\t\t'size',\n\t\t],\n\t\tdata: function() {\n\t\t\treturn {\n\t\t\t\thasToggler: this.setup.sets[this.settingIndex].hasToggler, // determine whether to render the toggler\n\t\t\t\ttogglerValues: this.setup.sets[this.settingIndex].togglerValues, // Text values for all toggler's option in array\n\t\t\t\thorizontalToggler: this.setup.sets[this.settingIndex].horizontalToggler, // Type of toggler\n\t\t\t\ttogglerTheme: this.setup.sets[this.settingIndex].togglerTheme, // Color of toggler\n\t\t\t};\n\t\t},\n\t\tmethods: {\n\t\t\tisSelected: function(index){\n\t\t\t\treturn index == this.selectedIndex;\n\t\t\t},\n\t\t\ttogglerClick: function(event, optionIndex, setIndex, forInfluencer) {\n\t\t\t\tthis.$emit('change_data', event, optionIndex, setIndex, forInfluencer);\n\t\t\t}\n\t\t}\n\t});\n\n\n\t// Abox\n\tVue.component('Pricebox', {\n\t\ttemplate: '#pricebox',\n\t\tdelimiters: ['<%', '%>'],\n\t\tprops: [\n\t\t\t'size', // size of the box\n\t\t\t'boxOrder', // index of the box\n\t\t\t'boxAddress', // address is the object in setup with instructions where to search for data for this box in the settings\n\t\t\t'optionData', // setting for the option\n\t\t\t'isfake', // fake multibox\n\t\t\t'boxesCount', // count of all boxes rendered\n\t\t\t'currentText', // 'Current price' text for screen readers\n\t\t\t'originalText', // 'Original price' text text for screen readers\n\n\t\t\t// ROW discount year periods:\n\t\t\t'period1st1Year', // '/first yr' period text\n\t\t\t'period1st2Years', // '/first 2 yrs' period text\n\t\t\t'period1st3Years', // '/first 3 yrs' period text\n\t\t\t'period1stMonth', // '/first month' period text\n\n\t\t\t// ROW no discount year periods + EN-GB (both discount and no discount)\n\t\t\t'period1Year', // '/year' period text\n\t\t\t'period2Years', // '/2 years' period text\n\t\t\t'period3Years', // '/3 years' period text\n\n\t\t\t// Month period\n\t\t\t'periodMonth', // '/month' period text (also for prices per month)\n\n\t\t\t// Annual texts ($XX.XX $XX.XX/first ...)\n\t\t\t'annualMonthly1Mnth', // 1 month annual sentence\n\t\t\t'annualMonthly1Yr', // 1 year annual sentence\n\t\t\t'annualMonthly2Yrs', // 2 years annual sentence\n\t\t\t'annualMonthly3Yrs', // 3 years annual sentence\n\n\t\t\t// Monthly prices\n\t\t\t'worksOutAs', // text above price (Monthly pricing)\n\t\t\t'worksOutAsPrice', // text under price (Yearly pricing)\n\n\t\t\t// CTA note for ROW with discount\n\t\t\t'ctaAutoNoteYear', // 'Savings compared to renewal price %fullPrice%/year.'\n\t\t\t'ctaAutoNoteMonth', // 'Savings compared to renewal price %fullPrice%/month.'\n\t\t\t// CTA notes for EN-GB\n\t\t\t'ctaAutoNoteGByear', // 'It automatically renews at %fullPrice%/year unless cancelled.'\n\t\t\t'ctaAutoNoteGBmonth', // 'It automatically renews at %fullPrice%/month unless cancelled.'\n\n\t\t\t'subscriptionText', // Subscription details text\n\t\t\t'saveText', // default label text when discounted price is in place\n\t\t\t'buttonDefaultText' // Default button text\n\t\t],\n\t\tdata: function() {\n\t\t\treturn {\n\t\t\t\tpricelist: this.getPricelist(), // make price data easily accessible\n\t\t\t\tmultidata: this.getMultiData(), // have multidata generated only once per render\n\t\t\t\tspanned: 1, // how many slots should be spanned by instructions\n\t\t\t\tctaAutoNoteEnd: ' ',\n\t\t\t};\n\t\t},\n\t\tupdated: function() {\n\t\t\t// Refresh data for this box after index change\n\t\t\tthis.pricelist = this.getPricelist();\n\t\t\tthis.multidata = this.getMultiData();\n\t\t\tthis.setCampaignMarker();\n\t\t\t// lookup all download buttons in this instance and link it with DTYPopup\n\t\t\tvar button = this.$el.querySelector('a[data-role=\"download-link\"]:not([data-behavior=\"downloadPage\"])');\n\t\t\tif(button !== null) {\n\t\t\t\tdownloadPopup.setPopup(button);\n\t\t\t}\n\n\t\t\t// check content to determine Instruction spanning\n\t\t\tvar count = 1;\n\t\t\tif (!this.getLabelText) { count++;}; //+1 for missing label\n\t\t\tif (count == 2 && !this.getTextAnnual) { count++;}; //+1 for From text\n\t\t\tif (count == 3 && !this.pricelist) { count++;}; //+1 for instalments\n\t\t\tif (count == 4 && !this.getVal('price_title')) { count++; }; //+1 for price/price_title\n\t\t\tif (count == 5 && !this.textUnderPrice) { count++; }; //+1 for note under price\n\t\t\tthis.spanned = count;\n\t\t},\n\t\tmounted: function() {\n\t\t\t// once the DOM is rendered, update the content\n\t\t\tthis.setCampaignMarker();\n\n\t\t\t// lookup all download buttons in this instance and link it with DTYPopup\n\t\t\tvar button = this.$el.querySelector('a[data-role=\"download-link\"]:not([data-behavior=\"downloadPage\"])');\n\t\t\tif(button !== null) {\n\t\t\t\tdownloadPopup.setPopup(button);\n\t\t\t}\n\n\t\t\t// create modal for legal text\n\t\t\tvar modalButton = this.$el.querySelector('[data-toggle=\"modal\"]');\n\t\t\tinitModal(modalButton);\n\n\t\t\t// check content to determine Instruction spanning\n\t\t\tvar count = 1;\n\t\t\tif (!this.getLabelText) { count++;}; //+1 for missing label\n\t\t\tif (count == 2 && !this.getTextAnnual) { count++;}; //+1 for From text\n\t\t\tif (count == 3 && !this.pricelist) { count++;}; //+1 for instalments\n\t\t\tif (count == 4 && !this.getVal('price_title')) { count++; }; //+1 for price/price_title\n\t\t\tif (count == 5 && !this.textUnderPrice) { count++; }; //+1 for note under price\n\t\t\tthis.spanned = count;\n\t\t},\n\t\twatch: {\n\t\t\tgetCtaNote: {\n\t\t\t\t// Everytime when getCtaNote changed:\n\t\t\t\thandler: function(val) {\n\t\t\t\t\tthis.$nextTick(function() {\n\t\t\t\t\t\t// create modal for legal text\n\t\t\t\t\t\tvar modalButton = this.$el.querySelector('[data-toggle=\"modal\"]');\n\t\t\t\t\t\tinitModal(modalButton);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcomputed: {\n\t\t\tgetPlatformIcons: function() {\n\t\t\t\tvar icons = false;\n\t\t\t\tif (this.optionData.platforms != null) {\n\t\t\t\t\tthis.optionData.platforms.forEach(function(icon, i, arr) {\n\t\t\t\t\t\tarr[i] = icon === 'pc' ? 'win' : icon; // make sure that only valid name of platform is returned\n\t\t\t\t\t});\n\t\t\t\t\ticons = this.optionData.platforms;\n\t\t\t\t}\n\t\t\t\treturn icons;\n\t\t\t},\n\t\t\tgetProdiconVar: function() {\n\t\t\t\tvar\n\t\t\t\t\tvalue = this.getVal('product_icon').variant,\n\t\t\t\t\tprodIconVar = value && value !== '' ? value : 'box'; // default variant is box\n\t\t\t\treturn prodIconVar;\n\t\t\t},\n\t\t\tgetProdiconName: function() {\n\t\t\t\tvar\n\t\t\t\t\tvalue = this.getVal('product_icon').name,\n\t\t\t\t\tprodIconName = value && value !== '' ? value + (this.getProdiconVar == 'box' ? '_white' : '') : false; // concat the icon path\n\t\t\t\treturn prodIconName;\n\t\t\t},\n\t\t\tgetLabelVariant: function() {\n\t\t\t\tvar\n\t\t\t\t\tvalue = this.getVal('labels').variant,\n\t\t\t\t\tlabelVar = value && value !== '' ? value : 'green-bright'; // default variant is green-bright\n\t\t\t\treturn labelVar;\n\t\t\t},\n\t\t\tbuttonStyle: function() {\n\t\t\t\t// checks if there is defined custom button variant. Default is 'full'.\n\t\t\t\t// It is possible to send values like 'outline', 'outline dark' or 'full blue disabled' to achieve various results\n\t\t\t\tvar\n\t\t\t\t\tvalue = this.getVal('button_style'),\n\t\t\t\t\tbtnStyle = value && value != '' ? value : 'full';\n\n\t\t\t\treturn btnStyle;\n\t\t\t},\n\t\t\tbuttonTheme: function() {\n\t\t\t\t// checks if there is defined custom button theme. Default is blue.\n\t\t\t\tvar\n\t\t\t\t\tvalue = this.getVal('button_theme'),\n\t\t\t\t\tbtnThm = value && value != '' ? 'theme-' + value : 'theme-blue';\n\n\t\t\t\treturn btnThm;\n\t\t\t},\n\t\t\tbuttonText: function() {\n\t\t\t\t// checks if there is defined custom button text. Default is 'Buy Now'.\n\t\t\t\tvar\n\t\t\t\t\tvalue = this.getVal('button_text'),\n\t\t\t\t\tbtnText = value && value != '' ? value : this.buttonDefaultText;\n\n\t\t\t\treturn btnText;\n\t\t\t},\n\t\t\tshowListPrice: function() {\n\t\t\t\t// in default, always show list price unless set to 'false' in parameter\n\t\t\t\t// EN-GB has hidden list price, but can be overriden with strictly defined show_listPrice parameter as true\n\t\t\t\tif (avastGlobals.web.locale === 'en-gb' && this.getVal('show_listPrice', false) != 'true') {\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\tvar result = this.getVal('show_listPrice', false) === 'false' ? false : true;\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t},\n\t\t\tshowCTANote: function() {\n\t\t\t\tvar\n\t\t\t\t\tnote = this.getVal('cta_note'), // return the cta note content or false if not found\n\t\t\t\t\tauto_cta_note = this.optionData['auto_cta_note'] === 'false' ? false : true; // default value is true if not set as false\n\n\t\t\t\t// show note when there is custom note...\n\t\t\t\tif (note) {\n\t\t\t\t\treturn true;\n\n\t\t\t\t// ...or GB with pricelist (GB have always legal notes) or discount\n\t\t\t\t} else if (this.pricelist && (avastGlobals.web.locale === 'en-gb' || (this.pricelist.discountPercent && this.pricelist.discountPercent !== ''))) {\n\t\t\t\t\treturn true;\n\n\t\t\t\t// no custom note but with auto note functionality\n\t\t\t\t} else if (auto_cta_note) {\n\t\t\t\t\treturn true;\n\n\t\t\t\t// no custom note, no auto note functionality\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tgetTextAnnual: function() {\n\t\t\t\t// Returns either default value of annual price (discounted (if any)/full price) or custom content\n\t\t\t\tvar\n\t\t\t\t\ttextFrom = this.getVal('annual').text,\n\t\t\t\t\tvalue = false;\n\n\t\t\t\tif (this.getAnnualPrices) {\n\t\t\t\t\tvalue = this.getAnnualPrices;\n\t\t\t\t} else if (textFrom && textFrom != '') {\n\t\t\t\t\tvalue = textFrom;\n\t\t\t\t}\n\t\t\t\treturn value;\n\t\t\t},\n\t\t\tgetAnnualPrices: function() {\n\t\t\t\tvar annualPrices = false;\n\n\t\t\t\t// If there is a pricelist lets do some circus with the content:\n\t\t\t\t// - detect discount price, full price and maintenance\n\t\t\t\t// - add these to legal content for given subscribtion period\n\t\t\t\tif (this.pricelist && !isYearPeriod(this.pricelist) && this.pricelist.maintenance != '1') { // evaluate only if main price is per month\n\t\t\t\t\tvar\n\t\t\t\t\t\tdiscount = this.pricelist.discountPercent && this.pricelist.discountPercent !== '' ? true : false,\n\t\t\t\t\t\tmaintenance = this.pricelist.maintenance ? this.pricelist.maintenance : false\n\t\t\t\t\t;\n\n\t\t\t\t\tif (discount) { // when discounted\n\t\t\t\t\t\tannualPrices = maintenance === '36' ? this.annualMonthly3Yrs : (maintenance === '24' ? this.annualMonthly2Yrs : (maintenance === '12' ? this.annualMonthly1Yr : this.annualMonthly1Mnth));\n\n\t\t\t\t\t\tvar yearPriceDiscounted = this.getVal('yearPriceDiscounted'+maintenance),\n\t\t\t\t\t\t\t\tyearPriceFull = this.getVal('yearPriceFull'+maintenance);\n\n\t\t\t\t\t\t// Prices placeholders replacement\n\t\t\t\t\t\tannualPrices = yearPriceDiscounted && yearPriceFull ? annualPrices.replace('$$', yearPriceFull).replace('ÅÅ', yearPriceDiscounted) : annualPrices;\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar annualPricesPeriod = maintenance === '36' ? this.period3Years : (maintenance === '24' ? this.period2Years : (maintenance === '12' ? this.period1Year : this.periodMonth));\n\t\t\t\t\t\tannualPrices = this.getVal('yearPriceFull'+maintenance) + annualPricesPeriod;\n\t\t\t\t\t}\n\n\t\t\t\t\t// set A11y screen reader hidden text (stroke tags replacement)\n\t\t\t\t\tif (/.+<\\/s>/.test(annualPrices)) {\n\t\t\t\t\t\tannualPrices = annualPrices.replace(//, '' + this.originalText + '').replace(/<\\/s>/, ' '+ this.currentText + '')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn annualPrices ;\n\t\t\t},\n\t\t\tgetCtaNote: function() {\n\t\t\t\tvar\n\t\t\t\t\tnoteContent = this.getVal('cta_note'), // return the cta note content or false if not found\n\t\t\t\t\tauto_cta_note = this.optionData['auto_cta_note'] === 'false' ? false : true; // check whether use automatic formatting for the CTA Note\n\n\t\t\t\t// If there is a pricelist, lets do some circus with the content:\n\t\t\t\tif (this.pricelist && auto_cta_note) {\n\t\t\t\t\tvar\n\t\t\t\t\t\tdiscount = this.pricelist.discountPercent && this.pricelist.discountPercent !== '' ? this.pricelist.discountPercent : false, // set the discount value or false if not found\n\t\t\t\t\t\tmaintenance = this.pricelist.maintenance ? this.pricelist.maintenance : false,\n\t\t\t\t\t\t\n\t\t\t\t\t\tctaAutoNote = '',\n\t\t\t\t\t\tfullPrice = '',\n\t\t\t\t\t\tbillingContent = '',\n\t\t\t\t\t\tsubscriptionContent = '';\n\n\t\t\t\t\t// GB legal content is different than others\n\t\t\t\t\tif (avastGlobals.web.locale === 'en-gb'){\n\t\t\t\t\t\tctaAutoNote = maintenance === '1' ? this.ctaAutoNoteGBmonth : this.ctaAutoNoteGByear; // default text\n\t\t\t\t\t\tfullPrice = maintenance === '1' ? this.pricelist.priceFormatted : this.getVal('yearPriceFull12'); // full price for month/year subscription period\n\n\t\t\t\t\t\t// Subscription modal link wrapper and price placeholder replacement\n\t\t\t\t\t\tnoteContent = this.legalSuffixStart() + ctaAutoNote.replace('$$', fullPrice) + this.ctaAutoNoteEnd;\n\n\t\t\t\t\t// ROW legal content\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (discount) {\n\t\t\t\t\t\t\tctaAutoNote = maintenance === '1' ? this.ctaAutoNoteMonth : this.ctaAutoNoteYear; // default text\n\t\t\t\t\t\t\tfullPrice = maintenance === '1' ? this.pricelist.priceFormatted : this.getVal('yearPriceFull12'); // full price for month/year subscription period\n\n\t\t\t\t\t\t\tbillingContent = fullPrice ? ctaAutoNote.replace('$$', fullPrice) : ctaAutoNote;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Add legal content to whatever note content\n\t\t\t\t\t\tvar legalSuffix = this.legalSuffixStart() + this.subscriptionText + this.ctaAutoNoteEnd;\n\n\t\t\t\t\t\t// Fix of sentence ending characters\n\t\t\t\t\t\tif (billingContent.length > 0) {\n\t\t\t\t\t\t\tvar specialDotLocales = ['ja-jp', 'zh-cn', 'zh-tw'];\n\n\t\t\t\t\t\t\tif (specialDotLocales.indexOf(avastGlobals.web.locale) > -1) {\n\t\t\t\t\t\t\t\tvar fixedDot = (billingContent.slice(-1) !== '。') ? '。 ' : ' ';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tvar fixedDot = (billingContent.slice(-1) !== '.') ? '. ' : ' ';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsubscriptionContent = billingContent + fixedDot + legalSuffix; // adds period (if it's missing) and Subscription modal link\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsubscriptionContent = legalSuffix; // Subscription modal link only\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Join all legal texts together\n\t\t\t\t\t\tif (subscriptionContent.length > 0) {\n\t\t\t\t\t\t\tnoteContent = noteContent ? (noteContent + '
' + subscriptionContent) : subscriptionContent;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnoteContent = noteContent ? (noteContent + '
' + billingContent) : billingContent;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn noteContent;\n\t\t\t},\n\t\t\tgetLabelText: function() {\n\t\t\t\tvar\n\t\t\t\t\tlabel = this.getVal('labels').text,\n\t\t\t\t\tvalue = label && label !== '' ? label : false;\n\n\t\t\t\t// if there is not custom text defined, check if there is a discount in pricelist\n\t\t\t\tif (!value) {\n\t\t\t\t\tif (this.pricelist && this.pricelist.discountPercentFormatted && this.pricelist.discountPercentFormatted !== '') {\n\t\t\t\t\t\tvalue = this.saveText.replace('$$', this.pricelist.discountPercentFormatted);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn value;\n\t\t\t},\n\t\t\ttextUnderPrice: function() {\n\t\t\t\tvar\n\t\t\t\t\toneTimeService = this.getVal('period_text'),\n\t\t\t\t\ttextUnderPrice = this.getVal('note_under_price'),\n\t\t\t\t\tcalculatedText,\n\t\t\t\t\tmonthlyPrice;\n\n\t\t\t\t// If there is custom period (i.e. '/call'), lets assume that the pricebox is one time service (Total Care)\n\t\t\t\tif (!oneTimeService) {\n\t\t\t\t\t// if yearly price is displayed -----------------------------\n\t\t\t\t\tif (this.pricelist && isYearPeriod(this.pricelist)){\n\t\t\t\t\t\t// retrieve monthly price from pricelist\n\t\t\t\t\t\tif (this.pricelist.realPriceRoundedPerMonth && this.pricelist.realPriceRoundedPerMonth !== '') {\n\t\t\t\t\t\t\tvar monthlyPrice = this.pricelist.priceFormat.replace('#c', this.pricelist.currencySymbol).replace('#p', this.pricelist.realPriceRoundedPerMonth);\n\t\t\t\t\t\t\tcalculatedText = this.worksOutAsPrice.replace('$$', ''+monthlyPrice+'');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// if any custom text was defined, attach it after the monthly price\n\t\t\t\t\t\treturn textUnderPrice ? (calculatedText + '
' + textUnderPrice) : calculatedText;\n\n\t\t\t\t\t// if no pricelist, show only custom text ----------------------\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn textUnderPrice;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t},\n\t\t\ttextAbovePrice: function() {\n\t\t\t\tvar textAbovePrice = false;\n\n\t\t\t\t// if monthly price is displayed, show it 'It works out as'\n\t\t\t\tif (this.pricelist && !isYearPeriod(this.pricelist) && this.pricelist.maintenance != '1'){\n\t\t\t\t\ttextAbovePrice = this.worksOutAs;\n\t\t\t\t}\n\t\t\t\treturn textAbovePrice;\n\t\t\t},\n\t\t\tdecimalPart: function() {\n\t\t\t\treturn this.pricelist.priceDecimalPart != '' ? this.pricelist.decimalSeparator + this.pricelist.priceDecimalPart : '';\n\t\t\t},\n\t\t\tgetSecondaryTextPeriod: function() {\n\t\t\t\tif (this.period) {\n\t\t\t\t\t// custom text for period (e.g. /call)\n\t\t\t\t\treturn this.period;\n\t\t\t\t} else if (isYearPeriod(this.pricelist)) {\n\t\t\t\t\t// price is yearly\n\t\t\t\t\treturn this.pricelist.maintenance === '36' ? this.period1st3Years : (this.pricelist.maintenance === '24' ? this.period1st2Years : this.period1st1Year);\n\t\t\t\t} else {\n\t\t\t\t\t// price is monthly\n\t\t\t\t\treturn this.period1stMonth;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tgetVal: function(paramName, convertToBoolean) {\n\t\t\t\tvar\n\t\t\t\t\tboolCheck = convertToBoolean != null ? convertToBoolean : true, // default is true - always convert string boolean to boolean\n\t\t\t\t\tparamArr = this.optionData[paramName] ? this.optionData[paramName] : false, // retrieve value of given parameter\n\t\t\t\t\tisString = false,\n\t\t\t\t\tboxPriceIndex = 0,\n\t\t\t\t\tvalue = false,\n\t\t\t\t\tparamValue;\n\n\t\t\t\t// Check type of parameter\n\t\t\t\tif (paramArr && paramArr !== '') {\n\t\t\t\t\tisString = typeof(paramArr) === 'string' ? true : false, // check if value is just a string\n\t\t\t\t\tboxPriceIndex = paramArr instanceof Array ? this.boxAddress.price : this.boxAddress.price + 1;// control of param type (array or object). (pressume there will be no other types entered (please))\n\t\t\t\t}\n\n\t\t\t\t// if box is not part of multibox and only string then return as it is (used for singleboxes or same value for all boxes(e.g. period_text))\n\t\t\t\tif (isString) {\n\t\t\t\t\tvalue = paramArr;\n\n\t\t\t\t\t// if NOT a string, takes only the first item in object/array or from proper index\n\t\t\t\t} else {\n\t\t\t\t\tvalue = paramArr[boxPriceIndex] && paramArr[boxPriceIndex] !== '' ? paramArr[boxPriceIndex] : false;\n\t\t\t\t}\n\n\t\t\t\tif (boolCheck) {\n\t\t\t\t\t// check whether there is true/false value as string and convert it to boolean\n\t\t\t\t\tparamValue = !value || value === 'false' ? false : (value === 'true' ? true : value);\n\t\t\t\t} else {\n\t\t\t\t\tparamValue = value;\n\t\t\t\t}\n\n\t\t\t\treturn paramValue;\n\t\t\t},\n\t\t\tlegalSuffixStart: function() {\n\t\t\t\tvar\n\t\t\t\t\tmodalPeriod = avastGlobals.web.locale === 'en-gb' ? (isYearPeriod(this.pricelist) ? 'data-period=\"y\"' : 'data-period=\"m\"') : '',\n\t\t\t\t\tctaAutoNoteStart = '';\n\t\t\t\treturn ctaAutoNoteStart;\n\t\t\t},\n\t\t\tsetCampaignMarker: function() {\n\t\t\t\tvar cartLinks = this.$el.querySelectorAll('[data-role=\"cart-link\"]');\n\n\t\t\t\t// Update campaign marker data and href attributes with __trSrc cookie\n\t\t\t\tif (cartLinks.length) {\n\t\t\t\t\tcampaignMarkerModule.setCampaignMarkerCookie(cartLinks);\n\t\t\t\t}\n\t\t\t\t// TODO - Description of this code:\n\t\t\t\tif(avastGlobals.web.abtest !== undefined) {\n\t\t\t\t\tcartLinks.forEach(function(el) {\n\t\t\t\t\t\tvar dataCM = el.getAttribute('data-campaign-marker').split('~'),\n\t\t\t\t\t\t\threfCM = el.getAttribute('href').split('~'),\n\t\t\t\t\t\t\tabTest = avastGlobals.web.abtest.ticketNumber,\n\t\t\t\t\t\t\ttestVariant = avastGlobals.web.abtest.testVariant;\n\n\t\t\t\t\t\tdataCM[3] = abTest;\n\t\t\t\t\t\tdataCM[4] = testVariant;\n\t\t\t\t\t\threfCM[3] = abTest;\n\t\t\t\t\t\threfCM[4] = testVariant;\n\t\t\t\t\t\tel.setAttribute('data-campaign-marker', dataCM.join('~'))\n\t\t\t\t\t\tel.setAttribute('href', hrefCM.join('~'))\n\t\t\t\t\t})\n\t\t\t\t};\n\t\t\t\treturn cartLinks;\n\t\t\t},\n\t\t\tgetPricelists: function() {\n\t\t\t\t// Return array of pricelists for this option\n\t\t\t\tvar optionPricelists = false;\n\n\t\t\t\tif (this.optionData.pricelist != null) {\n\t\t\t\t\toptionPricelists = this.optionData.pricelist;\n\t\t\t\t}\n\t\t\t\treturn optionPricelists;\n\t\t\t},\n\t\t\tgetPricelist: function() {\n\t\t\t\t// Return pricelist for this box defined by price index in address\n\t\t\t\tvar\n\t\t\t\t\tpricelists = this.getPricelists(),\n\t\t\t\t\tpriceIndex = this.boxAddress.price,\n\t\t\t\t\tpricesCount = Object.keys(pricelists).length,\n\t\t\t\t\toptionPricelist = false;\n\n\t\t\t\tif (pricesCount > 0) {\n\t\t\t\t\tObject.keys(pricelists).forEach(function(productId, j) {\n\t\t\t\t\t\tif (j == priceIndex) {\n\t\t\t\t\t\t\toptionPricelist = pricelists[productId];\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn optionPricelist;\n\t\t\t},\n\t\t\tgetMultiData: function() {\n\t\t\t\t// detection if this box is part of multibox or fake multibox and what is it's order in the scope of this (fake)multibox\n\t\t\t\tvar\n\t\t\t\t\tpricelists = this.getPricelists(),\n\t\t\t\t\tlistCount = pricelists ? Object.keys(pricelists).length : 0,\n\t\t\t\t\tmultibox = false;\n\n\t\t\t\tif (this.isfake && this.boxesCount > 1) {\n\t\t\t\t\tif (this.boxOrder == 1) {\n\t\t\t\t\t\tmultibox = 'start';\n\t\t\t\t\t} else if (this.boxOrder == this.boxesCount) {\n\t\t\t\t\t\tmultibox = 'end';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmultibox = true;\n\t\t\t\t\t}\n\n\t\t\t\t} else if (listCount > 1) {\n\t\t\t\t\tif (this.boxAddress.price == 0) {\n\t\t\t\t\t\tmultibox = 'start';\n\t\t\t\t\t} else if (this.boxAddress.price == listCount - 1) {\n\t\t\t\t\t\tmultibox = 'end';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmultibox = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn multibox;\n\t\t\t}\n\t\t}\n\t});\n\n\t// Price\n\tVue.component('Price', {\n\t\ttemplate: '#box-price',\n\t\tdelimiters: ['<%', '%>'],\n\t\tprops: [\n\t\t\t'pricelist',\n\t\t\t'period',\n\t\t\t'campaign',\n\t\t\t'showListPrice',\n\t\t\t'size',\n\t\t\t'period1st1Year',\n\t\t\t'period1st2Years',\n\t\t\t'period1st3Years',\n\t\t\t'period1stMonth',\n\t\t\t'period1Year',\n\t\t\t'period2Years',\n\t\t\t'period3Years',\n\t\t\t'periodMonth',\n\t\t],\n\t\tcomputed: {\n\t\t\tdecimalPart: function() {\n\t\t\t\treturn this.pricelist.priceDecimalPart != '' ? this.pricelist.decimalSeparator + this.pricelist.priceDecimalPart : '';\n\t\t\t},\n\t\t\tgetMainPricePeriod: function() {\n\t\t\t\tvar maintenance = this.pricelist.maintenance;\n\t\t\t\tvar discount = this.pricelist.discountPercent && this.pricelist.discountPercent !== '' ? true : false;\n\n\t\t\t\tif (this.period) {\n\t\t\t\t\t// custom text for period (e.g. /call)\n\t\t\t\t\treturn this.period;\n\t\t\t\t} else if (isYearPeriod(this.pricelist)) {\n\t\t\t\t\t// price is yearly\n\t\t\t\t\tif (discount) {\n\t\t\t\t\t\treturn maintenance === '36' ? this.period1st3Years : (maintenance === '24' ? this.period1st2Years : this.period1st1Year);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn maintenance === '36' ? this.period3Years : (maintenance === '24' ? this.period2Years : this.period1Year);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// price is monthly\n\t\t\t\t\treturn discount && maintenance === '1' ? this.period1stMonth : this.periodMonth;\n\t\t\t\t}\n\t\t\t},\n\t\t\tisLongPeriod: function() {\n\t\t\t\t// Long period meand there is a discount \n\t\t\t\t// this will detect what kind of period is used and allow to apply class\n\t\t\t\t// - yearly pricing for yearly subscriptions\n\t\t\t\t// - discount\n\t\t\t\tvar discount = this.pricelist.discountPercent && this.pricelist.discountPercent !== '' ? true : false;\n\n\t\t\t\treturn discount && this.pricelist.priceFlag != \"M\";\n\t\t\t},\n\t\t}\n\t});\n\n\n\n\t// Init (One VUE object for each abox element on page)\n\t// --------------------------------------------------------------------------------------------------------------\n\tfor (var i = 0; i < boxWrapElement.length; i++) {\n\t\tvar element = boxWrapElement[i],\n\t\t\tsettings = JSON.parse(element.getAttribute('data-settings')),\n\t\t\tisfake = element.getAttribute('data-fake'),\n\t\t\tappid = element.getAttribute('id');\n\n\t\t// MAIN PARENT OBJECT\n\t\t// --------------------------------------------------------------------------------------------------------------\n\t\telement = new Vue({\n\t\t\tel: element,\n\t\t\tdelimiters: ['<%', '%>'],\n\t\t\tdata: function() {\n\t\t\t\treturn {\n\t\t\t\t\tsettings: settings,\n\t\t\t\t\tisfake: isfake === 'true' ? true : false,\n\t\t\t\t\tappid: appid,\n\t\t\t\t\tlastTogglerSwitch: {\n\t\t\t\t\t\t\"setIndex\": 0,\n\t\t\t\t\t\t\"optionIndex\": 0,\n\t\t\t\t\t},\n\t\t\t\t\tsetup: {\n\t\t\t\t\t\t\"settingsCount\": settings.length, // count of all settings (#)\n\t\t\t\t\t\t\"togglersCount\": 0, // togglers count to add class to container\n\t\t\t\t\t\t\"renderedBoxesCount\": 0, // how many aboxes should be rendered based on default indexes of all settings\n\t\t\t\t\t\t\"renderedBoxes\": [], // addresses of rendered boxes\n\t\t\t\t\t\t\"sets\": [],\n\t\t\t\t\t\t\"promotedBox\": false, // to set proper class for promoted box\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\t\t\tcreated: function () {\n\t\t\t\t// Values for the Setup\n\t\t\t\t// --------------------------------------------------------------------------------------------------------------\n\t\t\t\t// - settings - all settings of whole CONTAINER\n\t\t\t\t// - setting - single setting (rendered as separate ABOX/MULTIBOX)\n\t\t\t\t// - option - values of an option in the given box (setting) (switched with toggler)\n\t\t\t\tfor (var s = 0; s < this.settings.length; s++) {\n\t\t\t\t\tvar\n\t\t\t\t\t\tsetting = this.settings[s], // each setting from settings\n\t\t\t\t\t\tdefaultIndex = 0, // default index per setting is 0\n\t\t\t\t\t\thasToggler = false, // is there a toggler for this setting?\n\t\t\t\t\t\thorizontalToggler, // type of toggler\n\t\t\t\t\t\ttogglerTheme, // color of toggler\n\t\t\t\t\t\tsettingOptionsNames = Object.keys(setting.options); // array of this setting options names\n\n\t\t\t\t\t// Togglers count ---------------------------\n\t\t\t\t\t// if the given setting has more options, there will be toggler\n\t\t\t\t\t// also if there is only one option but name must bedefined and this toggler will be 'disabled'\n\t\t\t\t\tif (settingOptionsNames.length > 1 || (settingOptionsNames.length == 1 && setting.options[settingOptionsNames[0]]['toggler_text'])) {\n\t\t\t\t\t\tthis.setup.togglersCount++;\n\t\t\t\t\t\thasToggler = true; // show toggler if there is more than 1 option\n\t\t\t\t\t\thorizontalToggler = setting.horizontal_toggler != undefined && setting.horizontal_toggler === 'true' ? true : false;\n\t\t\t\t\t\ttogglerTheme = setting.toggler_theme != undefined && setting.toggler_theme != '' ? 'bg-' + (setting.toggler_theme == 'gray' ? 'gray07' : setting.toggler_theme) : 'bg-orange-pale';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Default option index ----------------------------\n\t\t\t\t\tif (setting.default_option !== undefined) { // default_option is defined in parameter\n\t\t\t\t\t\tdefaultIndex = setting.default_option - 1; // default index from settings minus 1 so it match with iteration index\n\n\t\t\t\t\t} else if (setting.platform_detect === 'true') { // default_option not defined but platform detection is active\n\n\t\t\t\t\t\t// Check if there is option with same platform as detected user's platform\n\t\t\t\t\t\t// NOTE: if options in dataset are not ordered by number, the toggler will not match!!! Reason is that index is not option name.\n\t\t\t\t\t\tdefaultIndex = searchPlatform(setting, detectedPlatform); // Lookup for option in given setting for detected platform\n\n\t\t\t\t\t\tif (defaultIndex === false) { // if there is no option for detected platform, look up for option with default platform\n\t\t\t\t\t\t\tif (!setting.default_platform) { // if there is no default platform defined, use first option\n\t\t\t\t\t\t\t\tdefaultIndex = 0;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdefaultIndex = searchPlatform(setting, setting.default_platform);\n\n\t\t\t\t\t\t\t\t// TODO - check if setting.default_platform is a string or array. If string, use just one value. If array, search for default platform for detected platform.\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (defaultIndex === false) { // if no option with default platform is found, use first option\n\t\t\t\t\t\t\t\tdefaultIndex = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else { // if there is no default_option and no platform_detect, use first option\n\t\t\t\t\t\tdefaultIndex = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t// add values of this setting to the Setup\n\t\t\t\t\tthis.addSet(defaultIndex, hasToggler, horizontalToggler, togglerTheme, 1, 1);\n\n\t\t\t\t\t// Option values ------------------------------\n\t\t\t\t\tfor (var o = 0; o < settingOptionsNames.length; o++) {\n\t\t\t\t\t\tvar\n\t\t\t\t\t\t\toptionName = settingOptionsNames[o],\n\t\t\t\t\t\t\toptionSetting = setting.options[optionName],\n\t\t\t\t\t\t\tpricelistsCount = optionSetting['pricelist'] !== undefined ? Object.keys(optionSetting['pricelist']).length : 0,\n\t\t\t\t\t\t\tcampaign = optionSetting['campaign'] !== undefined ? optionSetting['campaign'] : false,\n\t\t\t\t\t\t\tpromotedBox = optionSetting.promoted_box !== undefined ? parseFloat(optionSetting.promoted_box) : false,\n\t\t\t\t\t\t\ttogglerText = optionSetting['toggler_text'] !== undefined ? optionSetting['toggler_text'] : ('option_'+ (o+1)),\n\t\t\t\t\t\t\tboxesCount = 0; // count of rendered boxes in the option\n\n\t\t\t\t\t\t// how many boxes should be rendered for this option\n\t\t\t\t\t\tif (pricelistsCount >= 1) {\n\t\t\t\t\t\t\tboxesCount = pricelistsCount;\n\t\t\t\t\t\t} else if (pricelistsCount == 0) {\n\t\t\t\t\t\t\tboxesCount = 1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// toggler values of this option in this set\n\t\t\t\t\t\tif (optionSetting['toggler_text'] != undefined)\n\t\t\t\t\t\tthis.setup.sets[s].togglerValues.push(togglerText);\n\n\t\t\t\t\t\t// add values of this option to the Setup\n\t\t\t\t\t\tthis.addOption(s, boxesCount, optionType(pricelistsCount, this.isfake), promotedBox, campaign);\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t\tthis.updateSetup(); // calculate toggler positions in grid and boxcounts\n\n\t\t\t\t// ---------------- TABLE INFLUENCER LISTENER ----------------\n\t\t\t\tvar\n\t\t\t\t\tthisApp = this, // required to pass into EventListener!\n\t\t\t\t\tthisAppTable = element.closest(\".table.with-influencer\"); // find the closest parent table with influencer and hang listener on it\n\n\t\t\t\tif (thisAppTable) {\n\t\t\t\t\tthisAppTable.addEventListener(\"change\", function(e){\n\t\t\t\t\t\tvar isAppParentBottom = thisApp.$el.closest(\".bottom-price-tr\"); // check if this app is in bottom pricing table row\n\t\t\t\t\t\tvar eventFromPricebox = e.target.closest('.box-toggler') ? e.target.closest('.box-toggler') : false; // check if event was triggered from pricebox\n\n\t\t\t\t\t\t// Get parent of the select element\n\t\t\t\t\t\tif (e.target.closest(\".table-header-tr\")) {\n\t\t\t\t\t\t\tvar eventParentPosition = 'header';\n\t\t\t\t\t\t} else if (e.target.closest(\".bottom-price-tr\")) {\n\t\t\t\t\t\t\tvar eventParentPosition = 'bottom';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (eventParentPosition == 'header' && !eventFromPricebox) {\n\t\t\t\t\t\t\tvar influencerCell = -1;\n\t\t\t\t\t\t\tvar eventParent = e.target.closest(\".table-header-tr .cell\");\n\n\t\t\t\t\t\t\t// Get index of .cell node with event triggering influencer\n\t\t\t\t\t\t\twhile((eventParent = eventParent.previousElementSibling) != null) {\n\t\t\t\t\t\t\t\tinfluencerCell++;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Update priceboxes by data from Influencer Select only if its position was calcluated\n\t\t\t\t\t\t\tif (influencerCell != -1) {\n\t\t\t\t\t\t\t\tif (isAppParentBottom) {\n\t\t\t\t\t\t\t\t\t// this should choose the proper option in dropdown directly in the bottom pricebox if the event comes from Influencer\n\t\t\t\t\t\t\t\t\tvar newOption = thisApp.$el.querySelectorAll('.box-toggler[set=\"'+(influencerCell+1)+'\"] select option')[e.target.selectedIndex];\n\t\t\t\t\t\t\t\t\tif (newOption) {newOption.selected = true;} // set the option as selected\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tthisApp.changeIndex(e, e.target.selectedIndex, influencerCell, false);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else if (eventParentPosition == 'bottom' && !isAppParentBottom) {\n\t\t\t\t\t\t\tvar selectSet = eventFromPricebox.getAttribute('set') - 1;\n\t\t\t\t\t\t\tvar parentBoxOptionsCount = thisApp.setup.sets[selectSet].options.length; // get the top price row parent\n\n\t\t\t\t\t\t\t// Check whether there is more sets in upper pricebox or not\n\t\t\t\t\t\t\tif (parentBoxOptionsCount > 1) {\n\t\t\t\t\t\t\t\tthisApp.changeIndex(e, e.target.selectedIndex, selectSet, true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t// ---------------- / INFLUENCER LISTENER ----------------\n\t\t\t},\n\t\t\tmounted: function() {\n\t\t\t\tthis.$nextTick(function(){window.dispatchEvent(this.eventData())}) // send global event on creation\n\t\t\t},\n\t\t\tmethods: {\n\t\t\t\tchangeIndex: function(event, optionIndex, setIndex, forInfluencer) {\n\t\t\t\t\t// optionIndex => selected option index\n\t\t\t\t\t// setIndex => order of the box in the multibox\n\n\t\t\t\t\tthis.setup.sets[setIndex].selectedIndex = optionIndex; // update setup with selected option index\n\t\t\t\t\tthis.updateSetup(); // recalculate the rest of setup\n\t\t\t\t\tthis.setLastTogglerSwitch(setIndex, optionIndex); // update info about last switched toggler\n\t\t\t\t\tthis.$nextTick(function(){\n\t\t\t\t\t\twindow.dispatchEvent(this.eventData(forInfluencer)); // send global event on toggler change\n\t\t\t\t\t});\n\t\t\t\t},\n\n\t\t\t\t// update information about which toggler was changed last\n\t\t\t\tsetLastTogglerSwitch: function(setIndex, optionIndex) {\n\t\t\t\t\tthis.lastTogglerSwitch.setIndex = setIndex;\n\t\t\t\t\tthis.lastTogglerSwitch.optionIndex = optionIndex;\n\t\t\t\t},\n\n\t\t\t\t// add setting to the Setup\n\t\t\t\taddSet: function(selectedIndex, hasToggler, horizontalToggler, togglerTheme) {\n\t\t\t\t\tvar newSet = {\n\t\t\t\t\t\t\"selectedIndex\": selectedIndex,\n\t\t\t\t\t\t\"hasToggler\": hasToggler,\n\t\t\t\t\t\t\"horizontalToggler\": horizontalToggler,\n\t\t\t\t\t\t\"togglerTheme\": togglerTheme,\n\t\t\t\t\t\t\"firstBox\": 0,\n\t\t\t\t\t\t\"lastBox\": 0,\n\t\t\t\t\t\t\"togglerValues\": [],\n\t\t\t\t\t\t\"options\": []\n\t\t\t\t\t}\n\t\t\t\t\tthis.setup.sets.push(newSet);\n\t\t\t\t},\n\n\t\t\t\t// add option to parent setting in the Setup\n\t\t\t\taddOption: function(setIndex, boxesCount, optionType, promotedBox, campaign) {\n\t\t\t\t\tvar newOption = {\n\t\t\t\t\t\t\"boxesCount\": boxesCount,\n\t\t\t\t\t\t\"optionType\": optionType,\n\t\t\t\t\t\t\"promotedBox\": promotedBox,\n\t\t\t\t\t\t\"campaign\": campaign\n\t\t\t\t\t}\n\t\t\t\t\tthis.setup.sets[setIndex].options.push(newOption);\n\t\t\t\t},\n\n\t\t\t\t// calculate setup params (while init and when togglers change status)\n\t\t\t\tupdateSetup: function() {\n\t\t\t\t\tvar\n\t\t\t\t\t\tboxesCountSum = 0, // box count init value\n\t\t\t\t\t\tstart = 0, // toggler start column- init value\n\t\t\t\t\t\thasPromo = false, // promo detection init value\n\t\t\t\t\t\taddresses = []; // array for rendered boxes setup addresses\n\n\t\t\t\t\tfor (var s = 0; s < this.setup.settingsCount; s++) {\n\t\t\t\t\t\tvar\n\t\t\t\t\t\t\tset = this.setup.sets[s],\n\t\t\t\t\t\t\tselectedIndex = set.selectedIndex, // selected option index\n\t\t\t\t\t\t\tselectedOption = set.options[selectedIndex], //\n\t\t\t\t\t\t\toptionBoxes = selectedOption.boxesCount; // how many has selected option boxes\n\n\t\t\t\t\t\t// calculate box count and define addresses of rendered boxes\n\t\t\t\t\t\tif (optionBoxes >= 1) {\n\t\t\t\t\t\t\tboxesCountSum += optionBoxes;\n\n\t\t\t\t\t\t\tfor (var p = 0; p < optionBoxes; p++) {\n\t\t\t\t\t\t\t\taddresses.push({\n\t\t\t\t\t\t\t\t\t\"set\": s,\n\t\t\t\t\t\t\t\t\t\"option\": selectedIndex,\n\t\t\t\t\t\t\t\t\t\"price\": p\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (optionBoxes == 0) {\n\t\t\t\t\t\t\tboxesCountSum++;\n\n\t\t\t\t\t\t\taddresses.push({\n\t\t\t\t\t\t\t\t\"set\": s,\n\t\t\t\t\t\t\t\t\"option\": selectedIndex,\n\t\t\t\t\t\t\t\t\"price\": 1\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.setup.renderedBoxesCount = boxesCountSum;\n\n\t\t\t\t\t\t// toggler position and span\n\t\t\t\t\t\tset.firstBox = start + 1;\n\t\t\t\t\t\tset.lastBox = start + optionBoxes;\n\t\t\t\t\t\tstart += optionBoxes;\n\t\t\t\t\t}\n\t\t\t\t\tthis.setup.renderedBoxes = addresses;\n\n\t\t\t\t\t// promoted box index detection (i.e. which of rendered option of a set has the promotion - first found serves)\n\t\t\t\t\taddresses.forEach(function(boxAddress, i) {\n\t\t\t\t\t\tvar\n\t\t\t\t\t\t\tset = boxAddress.set, // this setting index\n\t\t\t\t\t\t\toption = boxAddress.option, // this option index\n\t\t\t\t\t\t\tprice = boxAddress.price, // this option pricelist index\n\t\t\t\t\t\t\tpromotedBox = this.sets[set].options[option].promotedBox; // order of promoted box in this option\n\n\t\t\t\t\t\t// if promo wasn't found yet during the loop\n\t\t\t\t\t\tif (!hasPromo && price+1 == promotedBox) {\n\t\t\t\t\t\t\t// if there is value in the setting, the assign the value\n\t\t\t\t\t\t\thasPromo = promotedBox && promotedBox != null ? promotedBox : false;\n\n\t\t\t\t\t\t\t// if promo is not false and it is in the range of count of rendered boxes, then assign the value\n\t\t\t\t\t\t\thasPromo = hasPromo && hasPromo > 0 && hasPromo <= boxesCountSum ? i + 1 : false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}, this.setup);\n\t\t\t\t\tthis.setup.promotedBox = hasPromo;\n\t\t\t\t},\n\t\t\t\teventData: function(forInfluencer) {\n\t\t\t\t\treturn new CustomEvent('pricebox-updated', {\n\t\t\t\t\t\t'detail': {\n\t\t\t\t\t\t\t'element':this.$el,\n\t\t\t\t\t\t\t'setIndex': this.lastTogglerSwitch.setIndex,\n\t\t\t\t\t\t\t'optionIndex': this.lastTogglerSwitch.optionIndex,\n\t\t\t\t\t\t\t'forInfluencer': forInfluencer\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t};\n\n\n\t// METHODS\n\t// --------------------------------------------------------------------------------------------------------------\n\n\t// Type of option based on number of pricelists\n\tfunction optionType(number, fake) {\n\t\tif (number > 1 || fake === true) {\n\t\t\treturn \"multi\";\n\t\t} else if (number == 1) {\n\t\t\treturn \"single\";\n\t\t} else {\n\t\t\treturn \"trial\";\n\t\t}\n\t};\n\n\t// Checks if price is monthly\n\tfunction isYearPeriod(obj) {\n\t\tif (obj.priceFlag == \"M\" || obj.maintenance == 1) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\t// Lookup the user platform in given dataset.\n\t// Will look up such option where detected platform matches with value in parameter 'platform'. If there are more with the same name, the last one is selected\n\tfunction searchPlatform(dataset, platform) {\n\t\tvar returnedValue = false;\n\n\t\tObject.keys(dataset.options).forEach(function(optionName, i) {\n\t\t\tif ('platform' in dataset.options[optionName]) {\n\t\t\t\tif (platform.toUpperCase() === dataset.options[optionName].platform.toUpperCase()) {\n\t\t\t\t\treturnedValue = i;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn returnedValue;\n\t}\n\n\t// Legal notes modal initialization\n\tfunction initModal(modalButton) { // button triggering the modal\n\t\tvar\n\t\t\tmodalTarget = modalButton !== null ? modalButton.getAttribute('data-target') : null,\n\t\t\tmodalPeriod = modalButton !== null ? modalButton.getAttribute('data-period') : null;\n\n\t\t// load modal in the moment of user interaction\n\t\tif (modalButton !== null && modalTarget !== null) {\n\t\t\t// pass modal name and optional period to modal loader\n\t\t\tmodalButton.addEventListener('click', function() {\n\t\t\t\tloadModal(modalTarget, modalPeriod);\n\t\t\t});\n\t\t\tmodalButton.addEventListener('keypress', function(e) {\n\t\t\t\tif (e.charCode === 13) {\n\t\t\t\t\tloadModal(modalTarget, modalPeriod);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tfunction loadModal(target, period) {\n\t\tvar\n\t\t\tperiodName = period !== null && period !== '' ? ('-' + period) : '',\n\t\t\ttargetName = target + periodName;\n\n\n\t\t/* ATTENTION: make sure name of source page for modal and target in modal trigger are same!!\n\t\t- pricebox-modal => Global legal text\n\t\t- pricebox-modal-gb => GB yearly legal text\n\t\t- pricebox-modal-gb-month => GB monthly legal text\n\t\t*/\n\t\t// if modal with name in the target is not on page\n\t\tif(document.getElementById(targetName) === null) {\n\t\t\tvar\n\t\t\t\tcontentHolder = document.querySelector('.content-holder'),\n\t\t\t\txhr = new XMLHttpRequest();\n\n\t\t\txhr.onreadystatechange = function() {\n\t\t\t\tif (this.readyState == 4 && this.status == 200) {\n\t\t\t\t\tvar container = document.createElement('div');\n\n\t\t\t\t\tcontainer.innerHTML = this.responseText;\n\t\t\t\t\tcontentHolder.append(container);\n\n\t\t\t\t\tvar modal = new BSN.Modal(document.getElementById(targetName));\n\t\t\t\t\tmodal.show();\n\t\t\t\t}\n\t\t\t};\n\t\t\txhr.open('GET', 'https://' + avastGlobals.web.domain + avastGlobals.web.ulocale + '/pricebox-modal?p=' + period, true);\n\t\t\txhr.setRequestHeader('x-requested-with', 'XMLHttpRequest');\n\t\t\txhr.send(null);\n\n\t\t} else {\n\t\t\tvar modal = new BSN.Modal(document.getElementById(targetName));\n\t\t\tmodal.show();\n\t\t}\n\t}\n})();\n"]}