window.talkablePlacementsConfig = {"placements":[{"id":57127,"inclusion_matcher":{"blank":true},"inclusion_matchers":[{"blank":true}],"exclusion_matchers":[],"event_category":"purchase","device_types":["desktop","tablet","mobile"]},{"id":82122,"inclusion_matcher":{"host_pattern":null,"query_pattern":{},"path_pattern":"/services/invite"},"inclusion_matchers":[{"host_pattern":null,"query_pattern":{},"path_pattern":"/services/invite"}],"exclusion_matchers":[],"event_category":"affiliate_member","device_types":["desktop","tablet","mobile"]},{"id":57128,"inclusion_matcher":{"host_pattern":null,"query_pattern":{},"path_pattern":"/pages/invite"},"inclusion_matchers":[{"host_pattern":null,"query_pattern":{},"path_pattern":"/pages/invite"}],"exclusion_matchers":[],"event_category":"affiliate_member","device_types":["desktop","tablet","mobile"]},{"id":57129,"inclusion_matcher":{"blank":true},"inclusion_matchers":[{"blank":true}],"exclusion_matchers":[],"event_category":"affiliate_member","device_types":["desktop","tablet","mobile"]},{"id":57130,"inclusion_matcher":{"regexp":"utm_medium=email"},"inclusion_matchers":[{"regexp":"utm_medium=email"}],"exclusion_matchers":[{"regexp":"utm_medium=partnerships"},{"regexp":"utm_medium=affiliate"}],"event_category":"affiliate_member","device_types":["desktop","tablet","mobile"]}],"integration_id":"production-bouqs","site_url":"https://bouqs.com","timestamp":1541510223}; /*! production-bouqs | talkable-integration v4.0.6 | (c) Talkable | talkable.com */ Array.prototype.indexOf||(Array.prototype.indexOf=function(searchElement){if(void 0===this||null===this)throw TypeError();var t=Object(this),len=t.length>>>0;if(0===len)return-1;var n=0;if(arguments.length>0&&(n=Number(arguments[1]),isNaN(n)?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n)))),n>=len)return-1;for(var k=n>=0?n:Math.max(len-Math.abs(n),0);len>k;k++)if(k in t&&t[k]===searchElement)return k;return-1}),Array.isArray||(Array.isArray=function(arg){return"[object Array]"===Object.prototype.toString.call(arg)}),Object.keys||(Object.keys=function(){"use strict";var hasOwnProperty=Object.prototype.hasOwnProperty,hasDontEnumBug=!{toString:null}.propertyIsEnumerable("toString"),dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dontEnumsLength=dontEnums.length;return function(obj){if("object"!=typeof obj&&("function"!=typeof obj||null===obj))throw new TypeError("Object.keys called on non-object");var prop,i,result=[];for(prop in obj)hasOwnProperty.call(obj,prop)&&result.push(prop);if(hasDontEnumBug)for(i=0;dontEnumsLength>i;i++)hasOwnProperty.call(obj,dontEnums[i])&&result.push(dontEnums[i]);return result}}()),Array.prototype.forEach||(Array.prototype.forEach=function(callback,thisArg){var T,k;if(null==this)throw new TypeError("this is null or not defined");var O=Object(this),len=O.length>>>0;if("[object Function]"!=={}.toString.call(callback))throw new TypeError(callback+" is not a function");for(thisArg&&(T=thisArg),k=0;len>k;){var kValue;Object.prototype.hasOwnProperty.call(O,k)&&(kValue=O[k],callback.call(T,kValue,k,O)),k++}}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}),function(window,document,JSON,Object){var talkable=window.curebit=window.talkable=function(){var UUID_KEY="tkbl_cvuuid",customerData={},config={testing:!1,debug:!1,verify_integration:!1,site_id:"",server:"https://www.talkable.com",version:"4.0.6",queue_check_interval:200,async:!1,url_length_limit:2e3,current_location:window.location.href,timeout:15,overrides:{init:{},register_affiliate:{},register_purchase:{},register_event:{}}},postmessage={send:function(json,target,targetElement){var self=this;if("undefined"==typeof target)throw new Error("You must supply a target as a string");"undefined"==typeof targetElement&&(targetElement=window.parent),targetElement.postMessage(self._serialize(json),target)},listen:function(callback){var self=this,receiveMessage=function(e){callback(self._unserialize(e.data))};window.addEventListener?window.addEventListener("message",receiveMessage,!1):window.attachEvent("onmessage",receiveMessage)},_unserialize:function(string){try{var o=JSON.parse(string);if(o&&"object"==typeof o&&null!==o)return o}catch(ex){return}},_serialize:function(obj){return JSON.stringify(obj)}},Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(input){var chr1,chr2,chr3,enc1,enc2,enc3,enc4,output="",i=0;for(input=Base64._utf8_encode(input);i>2,enc2=(3&chr1)<<4|chr2>>4,enc3=(15&chr2)<<2|chr3>>6,enc4=63&chr3,isNaN(chr2)?enc3=enc4=64:isNaN(chr3)&&(enc4=64),output=output+this._keyStr.charAt(enc1)+this._keyStr.charAt(enc2)+this._keyStr.charAt(enc3)+this._keyStr.charAt(enc4);return output},decode:function(input){var chr1,chr2,chr3,enc1,enc2,enc3,enc4,output="",i=0;for(input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");i>4,chr2=(15&enc2)<<4|enc3>>2,chr3=(3&enc3)<<6|enc4,output+=String.fromCharCode(chr1),64!=enc3&&(output+=String.fromCharCode(chr2)),64!=enc4&&(output+=String.fromCharCode(chr3));return output=Base64._utf8_decode(output)},_utf8_encode:function(string){string=string.replace(/\r\n/g,"\n");for(var utftext="",n=0;nc?utftext+=String.fromCharCode(c):c>127&&2048>c?(utftext+=String.fromCharCode(c>>6|192),utftext+=String.fromCharCode(63&c|128)):(utftext+=String.fromCharCode(c>>12|224),utftext+=String.fromCharCode(c>>6&63|128),utftext+=String.fromCharCode(63&c|128))}return utftext},_utf8_decode:function(utftext){for(var string="",i=0,c=c1=c2=0;ic?(string+=String.fromCharCode(c),i++):c>191&&224>c?(c2=utftext.charCodeAt(i+1),string+=String.fromCharCode((31&c)<<6|63&c2),i+=2):(c2=utftext.charCodeAt(i+1),c3=utftext.charCodeAt(i+2),string+=String.fromCharCode((15&c)<<12|(63&c2)<<6|63&c3),i+=3);return string}},utils={lastLoadedIframeName:[],gleamRewardCallback:void 0,log:function(message,source){"undefined"!=typeof window.console&&config.debug&&(source=source||"all-"+config.version,console.log(source+" >> "+message))},serialize:function(object,prefix){var i,key;if(!object)return"";if(!prefix&&!this.isObject(object))throw new Error("Url parameters should be a javascript hash");var s=[];if(this.isArray(object))for(i=0,object.length;i-1||window.navigator.userAgent.indexOf("MSIE 7.0")>-1)},getIframeCreationExtension:function(){return this.isBrowserSupported()?"html":"gif"},documentAppend:function(node){document.body.appendChild(node)},isObject:function(object){return"[object Object]"==this.getObjectType(object)},isArray:function(object){return"[object Array]"==this.getObjectType(object)},isGenerated:function(el){return"true"==el.getAttribute("data-talkable-generated")},getObjectType:function(object){return Object.prototype.toString.call(object)},hasProperty:function(options,key){return options.hasOwnProperty(key)},setAttributes:function(element,attrs){for(var key in attrs)element.setAttribute(key,attrs[key])},location_parameters:function(){for(var vars={},current_location=config.current_location.split("#")[0],hashes=current_location.slice(current_location.indexOf("?")+1).split("&"),i=0;i0&&(data.y=matches[0].offsetTop)}window.scrollTo(data.x,data.y||iframe.offsetTop)}),utils.subscribe("offer_close",iframe.name,function(data,iframe){var index=utils.lastLoadedIframeName.indexOf(iframe.name);-1!=index&&utils.lastLoadedIframeName.splice(index,1),iframe.parentNode.removeChild(iframe),styleTag&&styleTag.parentNode.removeChild(styleTag),iframe=null,styleTag=null}),utils.subscribe("offer_loaded",iframe.name,function(data){if(utils.lastLoadedIframeName.push(iframe.name),data.current_visitor_uuid?utils.setUUID(data.current_visitor_uuid):utils.deleteUUID(),data.perform_snapshot&&utils.scrapeDOM(),utils.gleamRewardCallback&&data.gleam_reward)try{utils.gleamRewardCallback(data.gleam_reward)}catch(ex){utils.log(ex)}"inline"===data.campaign_appearance&&iframe.parentNode&&utils.isGenerated(iframe.parentNode)||data.integration_css&&data.integration_css.css&&(styleTag=document.createElement("style"),styleTag.id=data.integration_css.attribute_value,styleTag.type="text/css",styleTag.styleSheet?styleTag.styleSheet.cssText=data.integration_css.css:styleTag.appendChild(document.createTextNode(data.integration_css.css)),document.getElementById(data.integration_css.attribute_value)||document.body&&document.body.appendChild(styleTag),data.integration_css.attribute_name&&data.integration_css.attribute_value&&iframe.setAttribute(data.integration_css.attribute_name,data.integration_css.attribute_value))}),iframe},buildJs:function(url){var result=document.createElement("script");return result.type="text/javascript",result.async=config.async,result.src=url,result},addJs:function(url){utils.log("addJs: "+url);var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(utils.buildJs(url),s)},createUrl:function(path,parameters){var create_url=utils.namespace()+path,items=null;if(parameters=utils.merge({v:config.version},parameters),parameters.o&¶meters.o.i&&(items=parameters.o.i,delete parameters.o.i),create_url=create_url+"?"+utils.serialize(parameters),items)for(var i=0;i",domString=doctypeString;domString+="",domString+=document.documentElement.innerHTML,domString+="",this.publish("dom_capture",iframeName,{dom:domString,url:document.location.href})}},domReady:function(callback){var ready=!1,detach=function(){document.addEventListener?(document.removeEventListener("DOMContentLoaded",completed),window.removeEventListener("load",completed)):(document.detachEvent("onreadystatechange",completed),window.detachEvent("onload",completed))},completed=function(){ready||!document.addEventListener&&"load"!==event.type&&"complete"!==document.readyState||(ready=!0,detach(),callback())};if("complete"===document.readyState)callback();else if(document.addEventListener)document.addEventListener("DOMContentLoaded",completed),window.addEventListener("load",completed);else{document.attachEvent("onreadystatechange",completed),window.attachEvent("onload",completed);var top=!1;try{top=null==window.frameElement&&document.documentElement}catch(e){}top&&top.doScroll&&!function scrollCheck(){if(!ready){try{top.doScroll("left")}catch(e){return setTimeout(scrollCheck,50)}ready=!0,detach(),callback()}}()}},getCookie:function(name){var query="(^|; )"+name+"=([^;]*)";return(document.cookie.match(query)||[]).pop()},setCookie:function(name,value){if(name&&value){var date=new Date;date.setTime(date.getTime()+63072e7),document.cookie=name+"="+value+"; expires="+date.toGMTString()+"; path=/"}},deleteCookie:function(name){document.cookie=name+"=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;"},getUUID:function(){return this.getCookie(UUID_KEY)},setUUID:function(current_visitor_uuid){this.setCookie(UUID_KEY,current_visitor_uuid)},deleteUUID:function(){this.deleteCookie(UUID_KEY)}};utils.doubleIntegrationCheck();var methods={init:function(options){for(var key in options)utils.hasProperty(options,key)&&(config[key]=options[key]);if(!config.site_id)throw new Error("site_id must be specified!");this.initialized=!0},authenticate_customer:function(data){var registerData=utils.clone(data||{}),customer=registerData.customer?utils.clone(registerData.customer):registerData;utils.isObject(customer)&&(customerData=customer)},register_affiliate:function(data){utils.ensureInitialized();for(var registerData=utils.clone(data||{}),affiliate_member=registerData.customer||registerData.affiliate_member||{},options={iframe:registerData.iframe||{},trigger_widget:registerData.trigger_widget||{}},verify_integration=utils.location_parameter("tkbl_verify_integration")||config.verify_integration,url_parameters=["email","first_name","last_name","traffic_source"],i=0;i-1)return!0;return!1};window._talkableq=window._talkableq||[],_talkableq.unshift(["init",{site_id:_TALKABLE_PER_CLIENT_CONFIG.site_slug,server:_TALKABLE_PER_CLIENT_CONFIG.server}]),window.talkable.before("register_affiliate",function(data){return data&&!isCurrentPath(["/checkout"])?data:void 0});var _tkbl_data=!1;window.talkable.before("register_purchase",function(data){if(data.purchase){try{if("string"==typeof data.purchase.coupon_code){var coupons=data.purchase.coupon_code.split(",");data.purchase.coupon_code=coupons.filter(function(v){return""!==v})}}catch(e){console.log("Talkable coupon error",e)}return _tkbl_data||(_tkbl_data=data,data.campaign_tags=["404"]),data}}),window.showPopup=function(){(_tkbl_data||_tkbl_data.purchase)&&(delete _tkbl_data.campaign_tags,window._talkableq.push(["register_purchase",_tkbl_data]))};var tkbl_url=document.getElementsByClassName("js-show-talkable-popup");tkbl_url.length>0&&tkbl_url[0].addEventListener("click",function(e){e.preventDefault(),window.showPopup()},!1),talkable.run()}(window,document,JSON,Object);