(function(){function _vwo_err(e){var vwo_e=new Image;vwo_e.src="https://dev.visualwebsiteoptimizer.com/e.gif?a=722852&s=j.php&e="+encodeURIComponent(e&&e.message&&e.message.substring(0,1e3)+"&vn=")}try{var extE=0;(function(){window._VWO=window._VWO||{};var aC=window._vwo_code;if(typeof aC==='undefined'){window._vwo_mt='dupCode';return;}if(window._VWO.sCL){window._vwo_mt='dupCode';window._VWO.sCDD=true;try{if(aC){clearTimeout(window._vwo_settings_timer);var h=document.querySelectorAll('#_vis_opt_path_hides');var x=h[h.length>1?1:0];x&&x.remove();}}catch(e){}return;}window._VWO.sCL=true;;window._vwo_mt="live";var localPreviewObject={};var previewKey="_vis_preview_"+722852;var wL=window.location;;try{localPreviewObject[previewKey]=window.localStorage.getItem(previewKey);JSON.parse(localPreviewObject[previewKey])}catch(e){localPreviewObject[previewKey]=""}try{window._vwo_tm="";var getMode=function(e){var n;if(window.name.indexOf(e)>-1){n=window.name}else{n=wL.search.match("_vwo_m=([^&]*)");n=n&&atob(decodeURIComponent(n[1]))}return n&&JSON.parse(n)};var ccMode=getMode("_vwo_cc");if(window.name.indexOf("_vis_heatmap")>-1||window.name.indexOf("_vis_editor")>-1||ccMode||window.name.indexOf("_vis_preview")>-1){try{if(ccMode){window._vwo_mt=decodeURIComponent(wL.search.match("_vwo_m=([^&]*)")[1])}else if(window.name&&JSON.parse(window.name)){window._vwo_mt=window.name}}catch(e){if(window._vwo_tm)window._vwo_mt=window._vwo_tm}}else if(window._vwo_tm.length){window._vwo_mt=window._vwo_tm}else if(location.href.indexOf("_vis_opt_preview_combination")!==-1&&location.href.indexOf("_vis_test_id")!==-1){window._vwo_mt="sharedPreview"}else if(localPreviewObject[previewKey]){window._vwo_mt=JSON.stringify(localPreviewObject)}if(window._vwo_mt!=="live"){;if(typeof extE!=="undefined"){extE=1}if(!getMode("_vwo_cc")){(function(){var cParam='';try{if(window.VWO&&window.VWO.appliedCampaigns){var campaigns=window.VWO.appliedCampaigns;for(var cId in campaigns){if(campaigns.hasOwnProperty(cId)){var v=campaigns[cId].v;if(cId&&v){cParam='&c='+cId+'-'+v+'-1';break;}}}}}catch(e){}var prevMode=false;_vwo_code.load('https://dev.visualwebsiteoptimizer.com/j.php?mode='+encodeURIComponent(window._vwo_mt)+'&a=722852&f=1&u='+encodeURIComponent(window._vis_opt_url||document.URL)+'&eventArch=true'+cParam,{sL:window._vwo_code.sL});if(window._vwo_code.sL){prevMode=true;}})();}else{(function(){window._vwo_code&&window._vwo_code.finish();_vwo_ccc={u:"/j.php?a=722852&u=https%3A%2F%2Fwww.vivo.co.nz%2Fexclusive-offer-g&f=1&vn=1.5"};var s=document.createElement("script");s.src="https://app.vwo.com/visitor-behavior-analysis/dist/codechecker/cc.min.js?r="+Math.random();document.head.appendChild(s)})()}}}catch(e){var vwo_e=new Image;vwo_e.src="https://dev.visualwebsiteoptimizer.com/ee.gif?s=mode_det&e="+encodeURIComponent(e&&e.stack&&e.stack.substring(0,1e3)+"&vn=");aC&&window._vwo_code.finish()}})();
;window._vwo_cookieDomain="vivo.co.nz";if(window._vwo_mt === "live"){window.VWO=window.VWO||[];window._vwo_acc_id=722852;window.VWO._=window.VWO._||{};;const shouldSampleApm=false;if(shouldSampleApm){VWO.load_co=function(a){var b=document.createElement("script");b.src=a;b.crossOrigin="anonymous";b.type="text/javascript";b.fetchPriority="high";b.innerText;b.onerror=function(){_vwo_code.finish()};document.getElementsByTagName("head")[0].appendChild(b)};setTimeout((function(){VWO.load_co("https://dev.visualwebsiteoptimizer.com/cdn/apmLib-7716d5be4a4d111d8af5b28be8ff864cbr.js")}),0)}VWO._=VWO._||{};var visMeta=VWO._.visMeta;VWO._.allSettings=function(){return{dataStore:{events:{}}}}();window.VWO.visUuid="D79F2D38C4A644B0D7B63E0D54E5ED0B8|8895863bc1e6ef2b5ddbb277a2060cd0";
;_vwo_code.sT=_vwo_code.finished();(function(c,a,e,d,b,z,g,sT){if(window.VWO._&&window.VWO._.isBot)return;const cookiePrefix=window._vwoCc&&window._vwoCc.cookiePrefix||"";const useLocalStorage=sT==="ls";const cookieName=cookiePrefix+"_vwo_uuid_v2";const escapedCookieName=cookieName.replace(/([.*+?^${}()|[\]\\])/g,"\\$1");const cookieDomain=g;function getValue(){if(useLocalStorage){return localStorage.getItem(cookieName)}else{const regex=new RegExp("(^|;\\s*)"+escapedCookieName+"=([^;]*)");const match=e.cookie.match(regex);return match?decodeURIComponent(match[2]):null}}function setValue(value,days){if(useLocalStorage){localStorage.setItem(cookieName,value)}else{e.cookie=cookieName+"="+value+"; expires="+new Date(864e5*days+ +new Date).toGMTString()+"; domain="+cookieDomain+"; path=/"}}let existingValue=null;if(sT){const cookieRegex=new RegExp("(^|;\\s*)"+escapedCookieName+"=([^;]*)");const cookieMatch=e.cookie.match(cookieRegex);const cookieValue=cookieMatch?decodeURIComponent(cookieMatch[2]):null;const lsValue=localStorage.getItem(cookieName);if(useLocalStorage){if(lsValue){existingValue=lsValue;if(cookieValue){e.cookie=cookieName+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT; domain="+cookieDomain+"; path=/"}}else if(cookieValue){localStorage.setItem(cookieName,cookieValue);e.cookie=cookieName+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT; domain="+cookieDomain+"; path=/";existingValue=cookieValue}}else{if(cookieValue){existingValue=cookieValue;if(lsValue){localStorage.removeItem(cookieName)}}else if(lsValue){e.cookie=cookieName+"="+lsValue+"; expires="+new Date(864e5*366+ +new Date).toGMTString()+"; domain="+cookieDomain+"; path=/";localStorage.removeItem(cookieName);existingValue=lsValue}}a=existingValue||a}else{const regex=new RegExp("(^|;\\s*)"+escapedCookieName+"=([^;]*)");const match=e.cookie.match(regex);a=match?decodeURIComponent(match[2]):a}-1==e.cookie.indexOf("_vis_opt_out")&&-1==d.location.href.indexOf("vwo_opt_out=1")&&(window.VWO.visUuid=a),a=a.split("|"),b=new Image,g=window._vis_opt_domain||c||d.location.hostname.replace(/^www\./,""),b.src="https://dev.visualwebsiteoptimizer.com/v.gif?cd="+(window._vis_opt_cookieDays||0)+"&a=722852&d="+encodeURIComponent(d.location.hostname.replace(/^www\./,"") || c)+"&u="+a[0]+"&h="+a[1]+"&t="+z,d.vwo_iehack_queue=[b],setValue(a.join("|"),366)})("vivo.co.nz",window.VWO.visUuid,document,window,0,_vwo_code.sT,"vivo.co.nz","false"||null);
;;window.VWO=window.VWO||[];(function(){function l(e){return e.replace(/[^\w\s-.][\w]/g,(function(e){return e.toUpperCase()})).replace(/[^\w\s-.]/g,"").replace(/ [\w]/g,(function(e){return e.toUpperCase()})).replace(/ /g,"")}function i(e,t){if("object"!=typeof t||Array.isArray(t))return s("Invalid attribute type: attribute can only be an object!");var n,r,a,o={};for(n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var i="props"===(i=(i=l((i=n).slice(i.search(/[\w-.]/g)))).replace(/^(_|vwo_|\.|v_|i_|-)*/g,""))?"":i;if(!i.trim())return s("Invalid attribute name: "+n+" is not allowed as an attribute name!");40<i.length&&(i=i.slice(0,40),console.warn("Attribute name should not be greater than 40 characters!"));var c=u(t[n])||(c=t[n],"[object Array]"===toString.call(c))?JSON.stringify(t[n]):t[n];v(e)||(a=100,c=(r=c).length>a?r.slice(0,a-1)+"...":r),o[i]=c}return o}function u(e){return"[object Object]"===toString.call(e)}function s(e){console.log("%cVWO Event API Error:","font-weight:bold;",e),_vwo_err({message:e})}function c(e=-1,t=""){switch(e){case 0:return s("Event name cannot be empty!");case 1:return console.warn("Event name should not be greater than 40 characters!");case 2:return s("Invalid event name: "+t+" is not allowed as an event name!");default:return s("Invalid event name: event name can only be a string!")}}function r(e,t,n){var e=function(e,t){if("string"!=typeof e)return c();if(!(e=e.trim()))return c(0);var n=e;if(!(e=function(e){return"visitors"===(e=(e=l(e.slice(e.search(/[\w-.]/g)))).replace(/^(_|vwo_|\.|v_|i_|-)*/g,"")).toLowerCase()&&(e+="_1"),e}(e)))return c(2,n);40<e.length&&(c(1),e=e.slice(0,40));n=i(e,t);if(n)return{eventName:e,filteredAttributeObject:n}}(e,t=t||{}),r={ogName:1,source:1};if(!e)return{filteredData:void 0,cb:null};t=null;if(u(n)){"function"==typeof n.cb&&(t=n.cb),delete n.cb;var a,o={};for(a in n)r[a]&&(o[a]=n[a]);0<Object.keys(o).length&&(e.filteredAttributeObject.vwoMeta=o)}return{filteredData:e,cb:t}}function v(e){return window.VWO._&&VWO._.allSettings&&VWO._.allSettings.dataStore&&VWO._.allSettings.dataStore.events&&VWO._.allSettings.dataStore.events[e]}VWO.event=function(e,t,n){var{filteredData:e,cb:n}=r(e,t,n);if(e&&function(e){if(!window._vis_debug&&!v(e)){var t;try{t=JSON.parse(window.localStorage.getItem("vwoUnRegEvents"))||{}}catch(e){t={}}if(t[e])return!1;t[e]=!0;e=JSON.stringify(t);window.localStorage.setItem("vwoUnRegEvents",e)}return!0}(e.eventName))return window._vis_debug?void 0:((t={d:{event:{}}}).d.event.props=e.filteredAttributeObject||{},t.d.event.props.page={title:document.title,url:window._vis_opt_url||window.location.href,referrerUrl:document.referrer},t.d.event.name=e.eventName,t.d.event.time=Date.now(),e="https://dev.visualwebsiteoptimizer.com/events/"+(v(e.eventName)?"t":"t/u")+"?en="+e.eventName+"&a="+722852+"&_cu="+encodeURIComponent(document.URL),navigator.sendBeacon(e,JSON.stringify(t)),void("function"==typeof n&&n()))}})();
;for(var e=0;e<window.VWO.length;e++){exC(window.VWO[e])}window.VWO.push=function(){exC(arguments[0])};function exC(a){if(!Array.isArray(a))return;switch(a[0]){case"onVWOLoaded":var p=[];p[0]={};p[1]=[];return a[1].call(this,p);case"onVWOCampaignsLoaded":return a[1].call(this,{bucketed_campaigns:[]});case"event":return VWO.event(a[1],a[2],a[3])}}
;_vwo_code.finish()}}catch(e){_vwo_code.finish();_vwo_err(e);window.VWO.caE=1}})();
