(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.sendgrid=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){"use strict";var integration=require("@segment/analytics.js-integration");var FacebookPixel=module.exports=integration("Facebook Pixel").option("pixelId","");FacebookPixel.prototype.initialize=function(){var self=this;this.ready();this.analytics.on("invoke",function(msg){var action=msg.action();var listener="on"+msg.action();self.debug("%s %o",action,msg);if(self[listener])self[listener](msg);self.ready()})};FacebookPixel.prototype.loaded=function(){return true};FacebookPixel.prototype.onpage=function(){var img=new Image;img.src="https://www.facebook.com/tr?id="+this.options.pixelId+"&ev=PageView&noscript=1"};FacebookPixel.prototype.ontrack=function(track){var event=track.event();if(event==="Lead Captured"){var img=new Image;img.src="https://www.facebook.com/tr?id="+this.options.pixelId+"&ev=Lead&noscript=1"+"&cd[value]="+track.properties().value+"&cd[currency]="+(track.properties().currency||"USD")+"&cd[content_name]="+track.properties().email+"&cd[content_category]="+track.properties().source}else if(event==="Purchase Completed"){this.purchaseCompleted(track)}};FacebookPixel.prototype.purchaseCompleted=function(track){var inputProducts=[];if(!track.properties().products.length){inputProducts.push(track.properties().products)}else{inputProducts=track.properties().products}var products=[];for(var i=0;i<inputProducts.length;i++){var product=inputProducts[i];products.push({id:product.product_id,sku:product.sku,name:product.name,item_price:product.price,quantity:product.quantity})}var img=new Image;img.src="https://www.facebook.com/tr?id="+this.options.pixelId+"&ev=Purchase&noscript=1"+"&cd[value]="+track.properties().total+"&cd[currency]="+(track.properties().currency||"USD")+"&cd[content_type]=product"+"&cd[contents]="+JSON.stringify(products)}},{"@segment/analytics.js-integration":13}],2:[function(require,module,exports){"use strict";var arity=require("@ndhoule/arity");var objToString=Object.prototype.toString;var isFunction=function(val){return typeof val==="function"};var isNumber=function(val){var type=typeof val;return type==="number"||type==="object"&&objToString.call(val)==="[object Number]"};var after=function after(n,fn){if(!isNumber(n)){throw new TypeError("Expected a number but received "+typeof n)}if(!isFunction(fn)){throw new TypeError("Expected a function but received "+typeof fn)}var callCount=0;return arity(fn.length,function(){callCount+=1;if(callCount<n){return}return fn.apply(this,arguments)})};module.exports=after},{"@ndhoule/arity":3}],3:[function(require,module,exports){"use strict";var objToString=Object.prototype.toString;var isFunction=function(val){return typeof val==="function"};var isNumber=function(val){var type=typeof val;return type==="number"||type==="object"&&objToString.call(val)==="[object Number]"};var createParams=function createParams(n){var args=[];for(var i=1;i<=n;i+=1){args.push("arg"+i)}return args};var createArityWrapper=function createArityWrapper(n){var paramNames=createParams(n).join(", ");var wrapperBody="".concat("  return function(",paramNames,") {\n","    return func.apply(this, arguments);\n","  };");return new Function("func",wrapperBody)};var arityWrapperCache=[function(fn){return function(){return fn.apply(this,arguments)}},function(fn){return function(arg1){return fn.apply(this,arguments)}},function(fn){return function(arg1,arg2){return fn.apply(this,arguments)}},function(fn){return function(arg1,arg2,arg3){return fn.apply(this,arguments)}},function(fn){return function(arg1,arg2,arg3,arg4){return fn.apply(this,arguments)}},function(fn){return function(arg1,arg2,arg3,arg4,arg5){return fn.apply(this,arguments)}}];var arity=function arity(n,func){if(!isFunction(func)){throw new TypeError("Expected a function but got "+typeof func)}n=Math.max(isNumber(n)?n:0,0);if(!arityWrapperCache[n]){arityWrapperCache[n]=createArityWrapper(n)}return arityWrapperCache[n](func)};module.exports=arity},{}],4:[function(require,module,exports){"use strict";var drop=require("@ndhoule/drop");var rest=require("@ndhoule/rest");var has=Object.prototype.hasOwnProperty;var objToString=Object.prototype.toString;var isObject=function isObject(value){return Boolean(value)&&typeof value==="object"};var isPlainObject=function isPlainObject(value){return Boolean(value)&&objToString.call(value)==="[object Object]"};var shallowCombiner=function shallowCombiner(target,source,value,key){if(has.call(source,key)&&target[key]===undefined){target[key]=value}return source};var deepCombiner=function(target,source,value,key){if(has.call(source,key)){if(isPlainObject(target[key])&&isPlainObject(value)){target[key]=defaultsDeep(target[key],value)}else if(target[key]===undefined){target[key]=value}}return source};var defaultsWith=function(combiner,target){if(!isObject(target)){return target}combiner=combiner||shallowCombiner;var sources=drop(2,arguments);for(var i=0;i<sources.length;i+=1){for(var key in sources[i]){combiner(target,sources[i],sources[i][key],key)}}return target};var defaultsDeep=function defaultsDeep(target){return defaultsWith.apply(null,[deepCombiner,target].concat(rest(arguments)))};var defaults=function(target){return defaultsWith.apply(null,[null,target].concat(rest(arguments)))};module.exports=defaults;module.exports.deep=defaultsDeep},{"@ndhoule/drop":5,"@ndhoule/rest":12}],5:[function(require,module,exports){"use strict";var max=Math.max;var drop=function drop(count,collection){var length=collection?collection.length:0;if(!length){return[]}var toDrop=max(Number(count)||0,0);var resultsLength=max(length-toDrop,0);var results=new Array(resultsLength);for(var i=0;i<resultsLength;i+=1){results[i]=collection[i+toDrop]}return results};module.exports=drop},{}],6:[function(require,module,exports){"use strict";var keys=require("@ndhoule/keys");var objToString=Object.prototype.toString;var isNumber=function isNumber(val){var type=typeof val;return type==="number"||type==="object"&&objToString.call(val)==="[object Number]"};var isArray=typeof Array.isArray==="function"?Array.isArray:function isArray(val){return objToString.call(val)==="[object Array]"};var isArrayLike=function isArrayLike(val){return val!=null&&(isArray(val)||val!=="function"&&isNumber(val.length))};var arrayEach=function arrayEach(iterator,array){for(var i=0;i<array.length;i+=1){if(iterator(array[i],i,array)===false){break}}};var baseEach=function baseEach(iterator,object){var ks=keys(object);for(var i=0;i<ks.length;i+=1){if(iterator(object[ks[i]],ks[i],object)===false){break}}};var each=function each(iterator,collection){return(isArrayLike(collection)?arrayEach:baseEach).call(this,iterator,collection)};module.exports=each},{"@ndhoule/keys":10}],7:[function(require,module,exports){"use strict";var each=require("@ndhoule/each");var every=function every(predicate,collection){if(typeof predicate!=="function"){throw new TypeError("`predicate` must be a function but was a "+typeof predicate)}var result=true;each(function(val,key,collection){result=!!predicate(val,key,collection);if(!result){return false}},collection);return result};module.exports=every},{"@ndhoule/each":6}],8:[function(require,module,exports){"use strict";var each=require("@ndhoule/each");var foldl=function foldl(iterator,accumulator,collection){if(typeof iterator!=="function"){throw new TypeError("Expected a function but received a "+typeof iterator)}each(function(val,i,collection){accumulator=iterator(accumulator,val,i,collection)},collection);return accumulator};module.exports=foldl},{"@ndhoule/each":6}],9:[function(require,module,exports){"use strict";var each=require("@ndhoule/each");var strIndexOf=String.prototype.indexOf;var sameValueZero=function sameValueZero(value1,value2){if(value1===value2){return value1!==0||1/value1===1/value2}return value1!==value1&&value2!==value2};var includes=function includes(searchElement,collection){var found=false;if(typeof collection==="string"){return strIndexOf.call(collection,searchElement)!==-1}each(function(value){if(sameValueZero(value,searchElement)){found=true;return false}},collection);return found};module.exports=includes},{"@ndhoule/each":6}],10:[function(require,module,exports){"use strict";var hop=Object.prototype.hasOwnProperty;var strCharAt=String.prototype.charAt;var toStr=Object.prototype.toString;var charAt=function(str,index){return strCharAt.call(str,index)};var has=function has(context,prop){return hop.call(context,prop)};var isString=function isString(val){return toStr.call(val)==="[object String]"};var isArrayLike=function isArrayLike(val){return val!=null&&(typeof val!=="function"&&typeof val.length==="number")};var indexKeys=function indexKeys(target,pred){pred=pred||has;var results=[];for(var i=0,len=target.length;i<len;i+=1){if(pred(target,i)){results.push(String(i))}}return results};var objectKeys=function objectKeys(target,pred){pred=pred||has;var results=[];for(var key in target){if(pred(target,key)){results.push(String(key))}}return results};var keys=function keys(source){if(source==null){return[]}if(isString(source)){return indexKeys(source,charAt)}if(isArrayLike(source)){return indexKeys(source,has)}return objectKeys(source)};module.exports=keys},{}],11:[function(require,module,exports){"use strict";var each=require("@ndhoule/each");var map=function map(iterator,collection){if(typeof iterator!=="function"){throw new TypeError("Expected a function but received a "+typeof iterator)}var result=[];each(function(val,i,collection){result.push(iterator(val,i,collection))},collection);return result};module.exports=map},{"@ndhoule/each":6}],12:[function(require,module,exports){"use strict";var max=Math.max;var rest=function rest(collection){if(collection==null||!collection.length){return[]}var results=new Array(max(collection.length-2,0));for(var i=1;i<collection.length;i+=1){results[i-1]=collection[i]}return results};module.exports=rest},{}],13:[function(require,module,exports){"use strict";var bind=require("component-bind");var debug=require("debug");var defaults=require("@ndhoule/defaults");var extend=require("extend");var slug=require("slug-component");var protos=require("./protos");var statics=require("./statics");function createIntegration(name){function Integration(options){if(options&&options.addIntegration){return options.addIntegration(Integration)}this.debug=debug("analytics:integration:"+slug(name));var clonedOpts={};extend(true,clonedOpts,options);this.options=defaults(clonedOpts||{},this.defaults);this._queue=[];this.once("ready",bind(this,this.flush));Integration.emit("construct",this);this.ready=bind(this,this.ready);this._wrapInitialize();this._wrapPage();this._wrapTrack()}Integration.prototype.defaults={};Integration.prototype.globals=[];Integration.prototype.templates={};Integration.prototype.name=name;extend(Integration,statics);extend(Integration.prototype,protos);return Integration}module.exports=createIntegration},{"./protos":14,"./statics":15,"@ndhoule/defaults":4,"component-bind":19,debug:22,extend:25,"slug-component":31}],14:[function(require,module,exports){"use strict";var Emitter=require("component-emitter");var after=require("@ndhoule/after");var each=require("@ndhoule/each");var events=require("analytics-events");var every=require("@ndhoule/every");var fmt=require("@segment/fmt");var foldl=require("@ndhoule/foldl");var is=require("is");var loadIframe=require("load-iframe");var loadScript=require("@segment/load-script");var nextTick=require("next-tick");var normalize=require("to-no-case");var has=Object.prototype.hasOwnProperty;var noop=function noop(){};var onerror=window.onerror;var onload=null;Emitter(exports);exports.initialize=function(){var ready=this.ready;nextTick(ready)};exports.loaded=function(){return false};exports.page=function(page){};exports.track=function(track){};exports.map=function(options,key){var normalizedComparator=normalize(key);var mappingType=getMappingType(options);if(mappingType==="unknown"){return[]}return foldl(function(matchingValues,val,key){var compare;var result;if(mappingType==="map"){compare=key;result=val}if(mappingType==="array"){compare=val;result=val}if(mappingType==="mixed"){compare=val.key;result=val.value}if(normalize(compare)===normalizedComparator){matchingValues.push(result)}return matchingValues},[],options)};exports.invoke=function(method){if(!this[method])return;var args=Array.prototype.slice.call(arguments,1);if(!this._ready)return this.queue(method,args);this.debug("%s with %o",method,args);return this[method].apply(this,args)};exports.queue=function(method,args){this._queue.push({method:method,args:args})};exports.flush=function(){this._ready=true;var self=this;each(function(call){self[call.method].apply(self,call.args)},this._queue);this._queue.length=0};exports.reset=function(){for(var i=0;i<this.globals.length;i++){window[this.globals[i]]=undefined}window.onerror=onerror;window.onload=onload};exports.load=function(name,locals,callback){if(typeof name==="function"){callback=name;locals=null;name=null}if(name&&typeof name==="object"){callback=locals;locals=name;name=null}if(typeof locals==="function"){callback=locals;locals=null}name=name||"library";locals=locals||{};locals=this.locals(locals);var template=this.templates[name];if(!template)throw new Error(fmt('template "%s" not defined.',name));var attrs=render(template,locals);callback=callback||noop;var self=this;var el;switch(template.type){case"img":attrs.width=1;attrs.height=1;el=loadImage(attrs,callback);break;case"script":el=loadScript(attrs,function(err){if(!err)return callback();self.debug('error loading "%s" error="%s"',self.name,err)});delete attrs.src;each(function(val,key){el.setAttribute(key,val)},attrs);break;case"iframe":el=loadIframe(attrs,callback);break;default:}return el};exports.locals=function(locals){locals=locals||{};var cache=Math.floor((new Date).getTime()/36e5);if(!locals.hasOwnProperty("cache"))locals.cache=cache;each(function(val,key){if(!locals.hasOwnProperty(key))locals[key]=val},this.options);return locals};exports.ready=function(){this.emit("ready")};exports._wrapInitialize=function(){var initialize=this.initialize;this.initialize=function(){this.debug("initialize");this._initialized=true;var ret=initialize.apply(this,arguments);this.emit("initialize");return ret}};exports._wrapPage=function(){if(this._assumesPageview)return this.page=after(2,this.page)};exports._wrapTrack=function(){var t=this.track;this.track=function(track){var event=track.event();var called;var ret;for(var method in events){if(has.call(events,method)){var regexp=events[method];if(!this[method])continue;if(!regexp.test(event))continue;ret=this[method].apply(this,arguments);called=true;break}}if(!called)ret=t.apply(this,arguments);return ret}};function getMappingType(mapping){if(is.array(mapping)){return every(isMixed,mapping)?"mixed":"array"}if(is.object(mapping))return"map";return"unknown"}function isMixed(item){if(!is.object(item))return false;if(!is.string(item.key))return false;if(!has.call(item,"value"))return false;return true}function loadImage(attrs,fn){fn=fn||function(){};var img=new Image;img.onerror=error(fn,"failed to load pixel",img);img.onload=function(){fn()};img.src=attrs.src;img.width=1;img.height=1;return img}function error(fn,message,img){return function(e){e=e||window.event;var err=new Error(message);err.event=e;err.source=img;fn(err)}}function render(template,locals){return foldl(function(attrs,val,key){attrs[key]=val.replace(/\{\{\ *(\w+)\ *\}\}/g,function(_,$1){return locals[$1]});return attrs},{},template.attrs)}},{"@ndhoule/after":2,"@ndhoule/each":6,"@ndhoule/every":7,"@ndhoule/foldl":8,"@segment/fmt":16,"@segment/load-script":17,"analytics-events":18,"component-emitter":20,is:26,"load-iframe":27,"next-tick":29,"to-no-case":32}],15:[function(require,module,exports){"use strict";var Emitter=require("component-emitter");var domify=require("domify");var each=require("@ndhoule/each");var includes=require("@ndhoule/includes");Emitter(exports);exports.option=function(key,value){this.prototype.defaults[key]=value;return this};exports.mapping=function(name){this.option(name,[]);this.prototype[name]=function(key){return this.map(this.options[name],key)};return this};exports.global=function(key){this.prototype.globals.push(key);return this};exports.assumesPageview=function(){this.prototype._assumesPageview=true;return this};exports.readyOnLoad=function(){this.prototype._readyOnLoad=true;return this};exports.readyOnInitialize=function(){this.prototype._readyOnInitialize=true;return this};exports.tag=function(name,tag){if(tag==null){tag=name;name="library"}this.prototype.templates[name]=objectify(tag);return this};function objectify(str){str=str.replace(' src="',' data-src="');var el=domify(str);var attrs={};each(function(attr){var name=attr.name==="data-src"?"src":attr.name;if(!includes(attr.name+"=",str))return;attrs[name]=attr.value},el.attributes);return{type:el.tagName.toLowerCase(),attrs:attrs}}},{"@ndhoule/each":6,"@ndhoule/includes":9,"component-emitter":20,domify:24}],16:[function(require,module,exports){(function(global){"use strict";var toString=global.JSON&&typeof JSON.stringify==="function"?JSON.stringify:String;function fmt(str){var args=Array.prototype.slice.call(arguments,1);var j=0;return str.replace(/%([a-z])/gi,function(match,f){return fmt[f]?fmt[f](args[j++]):match+f})}fmt.o=toString;fmt.s=String;fmt.d=parseInt;module.exports=fmt}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],17:[function(require,module,exports){"use strict";var onload=require("script-onload");var tick=require("next-tick");var type=require("component-type");function loadScript(options,cb){if(!options){throw new Error("Can't load nothing...")}if(type(options)==="string"){options={src:options}}var https=document.location.protocol==="https:"||document.location.protocol==="chrome-extension:";if(options.src&&options.src.indexOf("//")===0){options.src=(https?"https:":"http:")+options.src}if(https&&options.https){options.src=options.https}else if(!https&&options.http){options.src=options.http}var script=document.createElement("script");script.type="text/javascript";script.async=true;script.src=options.src;if(type(cb)==="function"){onload(script,cb)}tick(function(){var firstScript=document.getElementsByTagName("script")[0];firstScript.parentNode.insertBefore(script,firstScript)});return script}module.exports=loadScript},{"component-type":21,"next-tick":29,"script-onload":30}],18:[function(require,module,exports){"use strict";var map=require("@ndhoule/map");var foldl=require("@ndhoule/foldl");var eventMap={videoPlaybackStarted:[{object:"video playback",action:"started"}],videoPlaybackPaused:[{object:"video playback",action:"paused"}],videoPlaybackInterrupted:[{object:"video playback",action:"interrupted"}],videoPlaybackResumed:[{object:"video playback",action:"resumed"}],videoPlaybackCompleted:[{object:"video playback",action:"completed"}],videoPlaybackBufferStarted:[{object:"video playback buffer",action:"started"}],videoPlaybackBufferCompleted:[{object:"video playback buffer",action:"completed"}],videoPlaybackSeekStarted:[{object:"video playback seek",action:"started"}],videoPlaybackSeekCompleted:[{object:"video playback seek",action:"completed"}],videoContentStarted:[{object:"video content",action:"started"}],videoContentPlaying:[{object:"video content",action:"playing"}],videoContentCompleted:[{object:"video content",action:"completed"}],videoAdStarted:[{object:"video ad",action:"started"}],videoAdPlaying:[{object:"video ad",action:"playing"}],videoAdCompleted:[{object:"video ad",action:"completed"}],promotionViewed:[{object:"promotion",action:"viewed"}],promotionClicked:[{object:"promotion",action:"clicked"}],productsSearched:[{object:"products",action:"searched"}],productListViewed:[{object:"product list",action:"viewed"},{object:"product category",action:"viewed"}],productListFiltered:[{object:"product list",action:"filtered"}],productClicked:[{object:"product",action:"clicked"}],productViewed:[{object:"product",action:"viewed"}],productAdded:[{object:"product",action:"added"}],productRemoved:[{object:"product",action:"removed"}],cartViewed:[{object:"cart",action:"viewed"}],orderUpdated:[{object:"order",action:"updated"}],orderCompleted:[{object:"order",action:"completed"}],orderRefunded:[{object:"order",action:"refunded"}],orderCancelled:[{object:"order",action:"cancelled"}],paymentInfoEntered:[{object:"payment info",action:"entered"}],checkoutStarted:[{object:"checkout",action:"started"}],checkoutStepViewed:[{object:"checkout step",action:"viewed"}],checkoutStepCompleted:[{object:"checkout step",action:"completed"}],couponEntered:[{object:"coupon",action:"entered"}],couponApplied:[{object:"coupon",action:"applied"}],couponDenied:[{object:"coupon",action:"denied"}],couponRemoved:[{object:"coupon",action:"removed"}],productAddedToWishlist:[{object:"product",action:"added to wishlist"}],productRemovedFromWishlist:[{object:"product",action:"removed from wishlist"}],productAddedFromWishlistToCart:[{object:"product",action:"added to cart from wishlist"},{object:"product",action:"added from wishlist to cart"}],productShared:[{object:"product",action:"shared"}],cartShared:[{object:"cart",action:"shared"}],productReviewed:[{object:"product",action:"reviewed"}],applicationInstalled:[{object:"application",action:"installed"}],applicationUpdated:[{object:"application",action:"updated"}],applicationOpened:[{object:"application",action:"opened"}],applicationBackgrounded:[{object:"application",action:"backgrounded"}],applicationUninstalled:[{object:"application",action:"uninstalled"}],applicationCrashed:[{object:"application",action:"crashed"}],installAttributed:[{object:"install",action:"attributed"}],deepLinkOpened:[{object:"deep link",action:"opened"}],pushNotificationReceived:[{object:"push notification",action:"received"}],pushNotificationTapped:[{object:"push notification",action:"tapped"}],pushNotificationBounced:[{object:"push notification",action:"bounced"}],emailBounced:[{object:"email",action:"bounced"}],emailDelivered:[{object:"email",action:"delivered"}],emailLinkClicked:[{object:"email link",action:"clicked"}],emailMarkedAsSpam:[{object:"email",action:"marked as spam"}],emailOpened:[{object:"email",action:"opened"}],unsubscribed:[{object:"",action:"unsubscribed"}]};module.exports=foldl(function transform(ret,pairs,method){var values=map(function(pair){return map(function(permutation){var flattened=[].concat.apply([],map(function(words){return words.split(" ")},permutation));return"^[ _]?"+flattened.join("[ _]?")+"[ _]?"},[[pair.action,pair.object],[pair.object,pair.action]]).join("|")},pairs);var conjoined=values.join("|")+"$";ret[method]=new RegExp(conjoined,"i");return ret},{},eventMap)},{"@ndhoule/foldl":8,"@ndhoule/map":11}],19:[function(require,module,exports){var slice=[].slice;module.exports=function(obj,fn){if("string"==typeof fn)fn=obj[fn];if("function"!=typeof fn)throw new Error("bind() requires a function");var args=slice.call(arguments,2);return function(){return fn.apply(obj,args.concat(slice.call(arguments)))}}},{}],20:[function(require,module,exports){if(typeof module!=="undefined"){module.exports=Emitter}function Emitter(obj){if(obj)return mixin(obj)}function mixin(obj){for(var key in Emitter.prototype){obj[key]=Emitter.prototype[key]}return obj}Emitter.prototype.on=Emitter.prototype.addEventListener=function(event,fn){this._callbacks=this._callbacks||{};(this._callbacks["$"+event]=this._callbacks["$"+event]||[]).push(fn);return this};Emitter.prototype.once=function(event,fn){function on(){this.off(event,on);fn.apply(this,arguments)}on.fn=fn;this.on(event,on);return this};Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(event,fn){this._callbacks=this._callbacks||{};if(0==arguments.length){this._callbacks={};return this}var callbacks=this._callbacks["$"+event];if(!callbacks)return this;if(1==arguments.length){delete this._callbacks["$"+event];return this}var cb;for(var i=0;i<callbacks.length;i++){cb=callbacks[i];if(cb===fn||cb.fn===fn){callbacks.splice(i,1);break}}return this};Emitter.prototype.emit=function(event){this._callbacks=this._callbacks||{};var args=[].slice.call(arguments,1),callbacks=this._callbacks["$"+event];if(callbacks){callbacks=callbacks.slice(0);for(var i=0,len=callbacks.length;i<len;++i){callbacks[i].apply(this,args)}}return this};Emitter.prototype.listeners=function(event){this._callbacks=this._callbacks||{};return this._callbacks["$"+event]||[]};Emitter.prototype.hasListeners=function(event){return!!this.listeners(event).length}},{}],21:[function(require,module,exports){var toString=Object.prototype.toString;module.exports=function(val){switch(toString.call(val)){case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array";case"[object Error]":return"error"}if(val===null)return"null";if(val===undefined)return"undefined";if(val!==val)return"nan";if(val&&val.nodeType===1)return"element";if(isBuffer(val))return"buffer";val=val.valueOf?val.valueOf():Object.prototype.valueOf.apply(val);return typeof val};function isBuffer(obj){return!!(obj!=null&&(obj._isBuffer||obj.constructor&&typeof obj.constructor.isBuffer==="function"&&obj.constructor.isBuffer(obj)))}},{}],22:[function(require,module,exports){(function(process){exports=module.exports=require("./debug");exports.log=log;exports.formatArgs=formatArgs;exports.save=save;exports.load=load;exports.useColors=useColors;exports.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:localstorage();exports.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function useColors(){if(typeof window!=="undefined"&&window.process&&window.process.type==="renderer"){return true}return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}exports.formatters.j=function(v){try{return JSON.stringify(v)}catch(err){return"[UnexpectedJSONParseError]: "+err.message}};function formatArgs(args){var useColors=this.useColors;args[0]=(useColors?"%c":"")+this.namespace+(useColors?" %c":" ")+args[0]+(useColors?"%c ":" ")+"+"+exports.humanize(this.diff);if(!useColors)return;var c="color: "+this.color;args.splice(1,0,c,"color: inherit");var index=0;var lastC=0;args[0].replace(/%[a-zA-Z%]/g,function(match){if("%%"===match)return;index++;if("%c"===match){lastC=index}});args.splice(lastC,0,c)}function log(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function save(namespaces){try{if(null==namespaces){exports.storage.removeItem("debug")}else{exports.storage.debug=namespaces}}catch(e){}}function load(){var r;try{r=exports.storage.debug}catch(e){}if(!r&&typeof process!=="undefined"&&"env"in process){r=process.env.DEBUG}return r}exports.enable(load());function localstorage(){try{return window.localStorage}catch(e){}}}).call(this,require("_process"))},{"./debug":23,_process:183}],23:[function(require,module,exports){exports=module.exports=createDebug.debug=createDebug["default"]=createDebug;exports.coerce=coerce;exports.disable=disable;exports.enable=enable;exports.enabled=enabled;exports.humanize=require("ms");exports.names=[];exports.skips=[];exports.formatters={};var prevTime;function selectColor(namespace){var hash=0,i;for(i in namespace){hash=(hash<<5)-hash+namespace.charCodeAt(i);hash|=0}return exports.colors[Math.abs(hash)%exports.colors.length]}function createDebug(namespace){function debug(){if(!debug.enabled)return;var self=debug;var curr=+new Date;var ms=curr-(prevTime||curr);self.diff=ms;self.prev=prevTime;self.curr=curr;prevTime=curr;var args=new Array(arguments.length);for(var i=0;i<args.length;i++){args[i]=arguments[i]}args[0]=exports.coerce(args[0]);if("string"!==typeof args[0]){args.unshift("%O")}var index=0;args[0]=args[0].replace(/%([a-zA-Z%])/g,function(match,format){if(match==="%%")return match;index++;var formatter=exports.formatters[format];if("function"===typeof formatter){var val=args[index];match=formatter.call(self,val);args.splice(index,1);index--}return match});exports.formatArgs.call(self,args);var logFn=debug.log||exports.log||console.log.bind(console);logFn.apply(self,args)}debug.namespace=namespace;debug.enabled=exports.enabled(namespace);debug.useColors=exports.useColors();debug.color=selectColor(namespace);if("function"===typeof exports.init){exports.init(debug)}return debug}function enable(namespaces){exports.save(namespaces);exports.names=[];exports.skips=[];var split=(typeof namespaces==="string"?namespaces:"").split(/[\s,]+/);var len=split.length;for(var i=0;i<len;i++){if(!split[i])continue;namespaces=split[i].replace(/\*/g,".*?");if(namespaces[0]==="-"){exports.skips.push(new RegExp("^"+namespaces.substr(1)+"$"))}else{exports.names.push(new RegExp("^"+namespaces+"$"))}}}function disable(){exports.enable("")}function enabled(name){var i,len;for(i=0,len=exports.skips.length;i<len;i++){if(exports.skips[i].test(name)){return false}}for(i=0,len=exports.names.length;i<len;i++){if(exports.names[i].test(name)){return true}}return false}function coerce(val){if(val instanceof Error)return val.stack||val.message;return val}},{ms:28}],24:[function(require,module,exports){module.exports=parse;var innerHTMLBug=false;var bugTestDiv;if(typeof document!=="undefined"){bugTestDiv=document.createElement("div");bugTestDiv.innerHTML='  <link/><table></table><a href="/a">a</a><input type="checkbox"/>';innerHTMLBug=!bugTestDiv.getElementsByTagName("link").length;bugTestDiv=undefined}var map={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:innerHTMLBug?[1,"X<div>","</div>"]:[0,"",""]};map.td=map.th=[3,"<table><tbody><tr>","</tr></tbody></table>"];map.option=map.optgroup=[1,'<select multiple="multiple">',"</select>"];map.thead=map.tbody=map.colgroup=map.caption=map.tfoot=[1,"<table>","</table>"];map.polyline=map.ellipse=map.polygon=map.circle=map.text=map.line=map.path=map.rect=map.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];function parse(html,doc){if("string"!=typeof html)throw new TypeError("String expected");if(!doc)doc=document;var m=/<([\w:]+)/.exec(html);if(!m)return doc.createTextNode(html);html=html.replace(/^\s+|\s+$/g,"");var tag=m[1];if(tag=="body"){var el=doc.createElement("html");el.innerHTML=html;return el.removeChild(el.lastChild)}var wrap=map[tag]||map._default;var depth=wrap[0];var prefix=wrap[1];var suffix=wrap[2];var el=doc.createElement("div")
;el.innerHTML=prefix+html+suffix;while(depth--)el=el.lastChild;if(el.firstChild==el.lastChild){return el.removeChild(el.firstChild)}var fragment=doc.createDocumentFragment();while(el.firstChild){fragment.appendChild(el.removeChild(el.firstChild))}return fragment}},{}],25:[function(require,module,exports){"use strict";var hasOwn=Object.prototype.hasOwnProperty;var toStr=Object.prototype.toString;var isArray=function isArray(arr){if(typeof Array.isArray==="function"){return Array.isArray(arr)}return toStr.call(arr)==="[object Array]"};var isPlainObject=function isPlainObject(obj){if(!obj||toStr.call(obj)!=="[object Object]"){return false}var hasOwnConstructor=hasOwn.call(obj,"constructor");var hasIsPrototypeOf=obj.constructor&&obj.constructor.prototype&&hasOwn.call(obj.constructor.prototype,"isPrototypeOf");if(obj.constructor&&!hasOwnConstructor&&!hasIsPrototypeOf){return false}var key;for(key in obj){}return typeof key==="undefined"||hasOwn.call(obj,key)};module.exports=function extend(){var options,name,src,copy,copyIsArray,clone;var target=arguments[0];var i=1;var length=arguments.length;var deep=false;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2}if(target==null||typeof target!=="object"&&typeof target!=="function"){target={}}for(;i<length;++i){options=arguments[i];if(options!=null){for(name in options){src=target[name];copy=options[name];if(target!==copy){if(deep&&copy&&(isPlainObject(copy)||(copyIsArray=isArray(copy)))){if(copyIsArray){copyIsArray=false;clone=src&&isArray(src)?src:[]}else{clone=src&&isPlainObject(src)?src:{}}target[name]=extend(deep,clone,copy)}else if(typeof copy!=="undefined"){target[name]=copy}}}}}return target}},{}],26:[function(require,module,exports){"use strict";var objProto=Object.prototype;var owns=objProto.hasOwnProperty;var toStr=objProto.toString;var symbolValueOf;if(typeof Symbol==="function"){symbolValueOf=Symbol.prototype.valueOf}var bigIntValueOf;if(typeof BigInt==="function"){bigIntValueOf=BigInt.prototype.valueOf}var isActualNaN=function(value){return value!==value};var NON_HOST_TYPES={boolean:1,number:1,string:1,undefined:1};var base64Regex=/^([A-Za-z0-9+\/]{4})*([A-Za-z0-9+\/]{4}|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{2}==)$/;var hexRegex=/^[A-Fa-f0-9]+$/;var is={};is.a=is.type=function(value,type){return typeof value===type};is.defined=function(value){return typeof value!=="undefined"};is.empty=function(value){var type=toStr.call(value);var key;if(type==="[object Array]"||type==="[object Arguments]"||type==="[object String]"){return value.length===0}if(type==="[object Object]"){for(key in value){if(owns.call(value,key)){return false}}return true}return!value};is.equal=function equal(value,other){if(value===other){return true}var type=toStr.call(value);var key;if(type!==toStr.call(other)){return false}if(type==="[object Object]"){for(key in value){if(!is.equal(value[key],other[key])||!(key in other)){return false}}for(key in other){if(!is.equal(value[key],other[key])||!(key in value)){return false}}return true}if(type==="[object Array]"){key=value.length;if(key!==other.length){return false}while(key--){if(!is.equal(value[key],other[key])){return false}}return true}if(type==="[object Function]"){return value.prototype===other.prototype}if(type==="[object Date]"){return value.getTime()===other.getTime()}return false};is.hosted=function(value,host){var type=typeof host[value];return type==="object"?!!host[value]:!NON_HOST_TYPES[type]};is.instance=is["instanceof"]=function(value,constructor){return value instanceof constructor};is.nil=is["null"]=function(value){return value===null};is.undef=is.undefined=function(value){return typeof value==="undefined"};is.args=is.arguments=function(value){var isStandardArguments=toStr.call(value)==="[object Arguments]";var isOldArguments=!is.array(value)&&is.arraylike(value)&&is.object(value)&&is.fn(value.callee);return isStandardArguments||isOldArguments};is.array=Array.isArray||function(value){return toStr.call(value)==="[object Array]"};is.args.empty=function(value){return is.args(value)&&value.length===0};is.array.empty=function(value){return is.array(value)&&value.length===0};is.arraylike=function(value){return!!value&&!is.bool(value)&&owns.call(value,"length")&&isFinite(value.length)&&is.number(value.length)&&value.length>=0};is.bool=is["boolean"]=function(value){return toStr.call(value)==="[object Boolean]"};is["false"]=function(value){return is.bool(value)&&Boolean(Number(value))===false};is["true"]=function(value){return is.bool(value)&&Boolean(Number(value))===true};is.date=function(value){return toStr.call(value)==="[object Date]"};is.date.valid=function(value){return is.date(value)&&!isNaN(Number(value))};is.element=function(value){return value!==undefined&&typeof HTMLElement!=="undefined"&&value instanceof HTMLElement&&value.nodeType===1};is.error=function(value){return toStr.call(value)==="[object Error]"};is.fn=is["function"]=function(value){var isAlert=typeof window!=="undefined"&&value===window.alert;if(isAlert){return true}var str=toStr.call(value);return str==="[object Function]"||str==="[object GeneratorFunction]"||str==="[object AsyncFunction]"};is.number=function(value){return toStr.call(value)==="[object Number]"};is.infinite=function(value){return value===Infinity||value===-Infinity};is.decimal=function(value){return is.number(value)&&!isActualNaN(value)&&!is.infinite(value)&&value%1!==0};is.divisibleBy=function(value,n){var isDividendInfinite=is.infinite(value);var isDivisorInfinite=is.infinite(n);var isNonZeroNumber=is.number(value)&&!isActualNaN(value)&&is.number(n)&&!isActualNaN(n)&&n!==0;return isDividendInfinite||isDivisorInfinite||isNonZeroNumber&&value%n===0};is.integer=is["int"]=function(value){return is.number(value)&&!isActualNaN(value)&&value%1===0};is.maximum=function(value,others){if(isActualNaN(value)){throw new TypeError("NaN is not a valid value")}else if(!is.arraylike(others)){throw new TypeError("second argument must be array-like")}var len=others.length;while(--len>=0){if(value<others[len]){return false}}return true};is.minimum=function(value,others){if(isActualNaN(value)){throw new TypeError("NaN is not a valid value")}else if(!is.arraylike(others)){throw new TypeError("second argument must be array-like")}var len=others.length;while(--len>=0){if(value>others[len]){return false}}return true};is.nan=function(value){return!is.number(value)||value!==value};is.even=function(value){return is.infinite(value)||is.number(value)&&value===value&&value%2===0};is.odd=function(value){return is.infinite(value)||is.number(value)&&value===value&&value%2!==0};is.ge=function(value,other){if(isActualNaN(value)||isActualNaN(other)){throw new TypeError("NaN is not a valid value")}return!is.infinite(value)&&!is.infinite(other)&&value>=other};is.gt=function(value,other){if(isActualNaN(value)||isActualNaN(other)){throw new TypeError("NaN is not a valid value")}return!is.infinite(value)&&!is.infinite(other)&&value>other};is.le=function(value,other){if(isActualNaN(value)||isActualNaN(other)){throw new TypeError("NaN is not a valid value")}return!is.infinite(value)&&!is.infinite(other)&&value<=other};is.lt=function(value,other){if(isActualNaN(value)||isActualNaN(other)){throw new TypeError("NaN is not a valid value")}return!is.infinite(value)&&!is.infinite(other)&&value<other};is.within=function(value,start,finish){if(isActualNaN(value)||isActualNaN(start)||isActualNaN(finish)){throw new TypeError("NaN is not a valid value")}else if(!is.number(value)||!is.number(start)||!is.number(finish)){throw new TypeError("all arguments must be numbers")}var isAnyInfinite=is.infinite(value)||is.infinite(start)||is.infinite(finish);return isAnyInfinite||value>=start&&value<=finish};is.object=function(value){return toStr.call(value)==="[object Object]"};is.primitive=function isPrimitive(value){if(!value){return true}if(typeof value==="object"||is.object(value)||is.fn(value)||is.array(value)){return false}return true};is.hash=function(value){return is.object(value)&&value.constructor===Object&&!value.nodeType&&!value.setInterval};is.regexp=function(value){return toStr.call(value)==="[object RegExp]"};is.string=function(value){return toStr.call(value)==="[object String]"};is.base64=function(value){return is.string(value)&&(!value.length||base64Regex.test(value))};is.hex=function(value){return is.string(value)&&(!value.length||hexRegex.test(value))};is.symbol=function(value){return typeof Symbol==="function"&&toStr.call(value)==="[object Symbol]"&&typeof symbolValueOf.call(value)==="symbol"};is.bigint=function(value){return typeof BigInt==="function"&&toStr.call(value)==="[object BigInt]"&&typeof bigIntValueOf.call(value)==="bigint"};module.exports=is},{}],27:[function(require,module,exports){var is=require("is");var onload=require("script-onload");var tick=require("next-tick");module.exports=function loadIframe(options,fn){if(!options)throw new Error("Cant load nothing...");if(is.string(options))options={src:options};var https=document.location.protocol==="https:"||document.location.protocol==="chrome-extension:";if(options.src&&options.src.indexOf("//")===0){options.src=https?"https:"+options.src:"http:"+options.src}if(https&&options.https)options.src=options.https;else if(!https&&options.http)options.src=options.http;var iframe=document.createElement("iframe");iframe.src=options.src;iframe.width=options.width||1;iframe.height=options.height||1;iframe.style.display="none";if(is.fn(fn)){onload(iframe,fn)}tick(function(){var firstScript=document.getElementsByTagName("script")[0];firstScript.parentNode.insertBefore(iframe,firstScript)});return iframe}},{is:26,"next-tick":29,"script-onload":30}],28:[function(require,module,exports){var s=1e3;var m=s*60;var h=m*60;var d=h*24;var y=d*365.25;module.exports=function(val,options){options=options||{};var type=typeof val;if(type==="string"&&val.length>0){return parse(val)}else if(type==="number"&&isNaN(val)===false){return options.long?fmtLong(val):fmtShort(val)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(val))};function parse(str){str=String(str);if(str.length>100){return}var match=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);if(!match){return}var n=parseFloat(match[1]);var type=(match[2]||"ms").toLowerCase();switch(type){case"years":case"year":case"yrs":case"yr":case"y":return n*y;case"days":case"day":case"d":return n*d;case"hours":case"hour":case"hrs":case"hr":case"h":return n*h;case"minutes":case"minute":case"mins":case"min":case"m":return n*m;case"seconds":case"second":case"secs":case"sec":case"s":return n*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return undefined}}function fmtShort(ms){if(ms>=d){return Math.round(ms/d)+"d"}if(ms>=h){return Math.round(ms/h)+"h"}if(ms>=m){return Math.round(ms/m)+"m"}if(ms>=s){return Math.round(ms/s)+"s"}return ms+"ms"}function fmtLong(ms){return plural(ms,d,"day")||plural(ms,h,"hour")||plural(ms,m,"minute")||plural(ms,s,"second")||ms+" ms"}function plural(ms,n,name){if(ms<n){return}if(ms<n*1.5){return Math.floor(ms/n)+" "+name}return Math.ceil(ms/n)+" "+name+"s"}},{}],29:[function(require,module,exports){(function(process){"use strict";var callable,byObserver;callable=function(fn){if(typeof fn!=="function")throw new TypeError(fn+" is not a function");return fn};byObserver=function(Observer){var node=document.createTextNode(""),queue,i=0;new Observer(function(){var data;if(!queue)return;data=queue;queue=null;if(typeof data==="function"){data();return}data.forEach(function(fn){fn()})}).observe(node,{characterData:true});return function(fn){callable(fn);if(queue){if(typeof queue==="function")queue=[queue,fn];else queue.push(fn);return}queue=fn;node.data=i=++i%2}};module.exports=function(){if(typeof process!=="undefined"&&process&&typeof process.nextTick==="function"){return process.nextTick}if(typeof document==="object"&&document){if(typeof MutationObserver==="function"){return byObserver(MutationObserver)}if(typeof WebKitMutationObserver==="function"){return byObserver(WebKitMutationObserver)}}if(typeof setImmediate==="function"){return function(cb){setImmediate(callable(cb))}}if(typeof setTimeout==="function"){return function(cb){setTimeout(callable(cb),0)}}return null}()}).call(this,require("_process"))},{_process:183}],30:[function(require,module,exports){module.exports=function(el,fn){return el.addEventListener?add(el,fn):attach(el,fn)};function add(el,fn){el.addEventListener("load",function(_,e){fn(null,e)},false);el.addEventListener("error",function(e){var err=new Error('script error "'+el.src+'"');err.event=e;fn(err)},false)}function attach(el,fn){el.attachEvent("onreadystatechange",function(e){if(!/complete|loaded/.test(el.readyState))return;fn(null,e)});el.attachEvent("onerror",function(e){var err=new Error('failed to load the script "'+el.src+'"');err.event=e||window.event;fn(err)})}},{}],31:[function(require,module,exports){module.exports=function(str,options){options||(options={});return str.toLowerCase().replace(options.replace||/[^a-z0-9]/g," ").replace(/^ +| +$/g,"").replace(/ +/g,options.separator||"-")}},{}],32:[function(require,module,exports){module.exports=toNoCase;var hasSpace=/\s/;var hasSeparator=/[\W_]/;function toNoCase(string){if(hasSpace.test(string))return string.toLowerCase();if(hasSeparator.test(string))return(unseparate(string)||string).toLowerCase();return uncamelize(string).toLowerCase()}var separatorSplitter=/[\W_]+(.|$)/g;function unseparate(string){return string.replace(separatorSplitter,function(m,next){return next?" "+next:""})}var camelSplitter=/(.)([A-Z]+)/g;function uncamelize(string){return string.replace(camelSplitter,function(m,previous,uppers){return previous+" "+uppers.toLowerCase().split("").join(" ")})}},{}],33:[function(require,module,exports){"use strict";var integration=require("@segment/analytics.js-integration");var each=require("@ndhoule/each");var find=require("obj-case");var reject=require("reject");var extend=require("extend");var GoogleAdWordsNew=module.exports=integration("Google Global Site Tag").option("accountId","").option("conversionId","").option("sendPageView",true).option("conversionLinker",true).option("clickConversions",[]).option("pageLoadConversions",[]).option("defaultPageConversion","").tag('<script src="https://www.googletagmanager.com/gtag/js?id=AW-740685679">');GoogleAdWordsNew.prototype.initialize=function(){var self=this;this.ready();this.analytics.on("invoke",function(msg){var action=msg.action();var listener="on"+msg.action();self.debug("%s %o",action,msg);if(self[listener])self[listener](msg);self.ready()})};GoogleAdWordsNew.prototype.loaded=function(){return window.dataLayer.push!==Array.prototype.push};GoogleAdWordsNew.prototype.page=function(page){var self=this;var config={};if(this.options.sendPageView===false)config.send_page_view=self.options.sendPageView;if(this.options.conversionLinker===false)config.conversion_linker=self.options.conversionLinker;window.dataLayer=window.dataLayer||[];window.gtag=function(){window.dataLayer.push(arguments)};this.load(function(){window.gtag("js",new Date);window.gtag("config",self.options.accountId,config)})};GoogleAdWordsNew.prototype.track=function(track){var self=this;var eventName=track.event();if(eventName==="Purchase Completed"){this.purchaseCompleted(track)}else if(eventName==="Lead Captured"){this.leadCaptured(track)}};GoogleAdWordsNew.prototype.leadCaptured=function(track){return window.gtag("event","generate_lead",{value:track.properties().value,currency:track.properties().currency||"USD",email:track.properties().email,source:track.properties().source})};GoogleAdWordsNew.prototype.purchaseCompleted=function(track){var inputProducts=[];if(!track.properties().products.length){inputProducts.push(track.properties().products)}else{inputProducts=track.properties().products}var products=[];for(var i=0;i<inputProducts.length;i++){var product=inputProducts[i];products.push({id:product.product_id,name:product.name,price:product.price,quantity:product.quantity})}window.gtag("event","purchase",{send_to:this.options.conversionId,items:JSON.stringify(products),value:Number(track.properties().total),currency:track.properties().currency||"USD"})};function matchConversion(mappedConversions,segmentEvent){var ret={};each(function(setting){var conversion=setting.value;if(segmentEvent.toLowerCase()===conversion.event.toLowerCase()){ret.id=conversion.id;if(conversion.accountId)ret.override=conversion.accountId}},mappedConversions);return ret}},{"@ndhoule/each":38,"@segment/analytics.js-integration":45,extend:58,"obj-case":63,reject:64}],34:[function(require,module,exports){arguments[4][2][0].apply(exports,arguments)},{"@ndhoule/arity":35,dup:2}],35:[function(require,module,exports){arguments[4][3][0].apply(exports,arguments)},{dup:3}],36:[function(require,module,exports){arguments[4][4][0].apply(exports,arguments)},{"@ndhoule/drop":37,"@ndhoule/rest":44,dup:4}],37:[function(require,module,exports){arguments[4][5][0].apply(exports,arguments)},{dup:5}],38:[function(require,module,exports){arguments[4][6][0].apply(exports,arguments)},{"@ndhoule/keys":42,dup:6}],39:[function(require,module,exports){arguments[4][7][0].apply(exports,arguments)},{"@ndhoule/each":38,dup:7}],40:[function(require,module,exports){arguments[4][8][0].apply(exports,arguments)},{"@ndhoule/each":38,dup:8}],41:[function(require,module,exports){arguments[4][9][0].apply(exports,arguments)},{"@ndhoule/each":38,dup:9}],42:[function(require,module,exports){arguments[4][10][0].apply(exports,arguments)},{dup:10}],43:[function(require,module,exports){arguments[4][11][0].apply(exports,arguments)},{"@ndhoule/each":38,dup:11}],44:[function(require,module,exports){arguments[4][12][0].apply(exports,arguments)},{dup:12}],45:[function(require,module,exports){arguments[4][13][0].apply(exports,arguments)},{"./protos":46,"./statics":47,"@ndhoule/defaults":36,"component-bind":52,debug:55,dup:13,extend:48,"slug-component":66}],46:[function(require,module,exports){arguments[4][14][0].apply(exports,arguments)},{"@ndhoule/after":34,"@ndhoule/each":38,"@ndhoule/every":39,"@ndhoule/foldl":40,"@segment/fmt":49,"@segment/load-script":50,"analytics-events":51,"component-emitter":53,dup:14,is:59,"load-iframe":60,"next-tick":62,"to-no-case":67}],47:[function(require,module,exports){arguments[4][15][0].apply(exports,arguments)},{"@ndhoule/each":38,"@ndhoule/includes":41,"component-emitter":53,domify:57,dup:15}],48:[function(require,module,exports){arguments[4][25][0].apply(exports,arguments)},{dup:25}],49:[function(require,module,exports){arguments[4][16][0].apply(exports,arguments)},{dup:16}],50:[function(require,module,exports){arguments[4][17][0].apply(exports,arguments)},{"component-type":54,dup:17,"next-tick":62,"script-onload":65}],51:[function(require,module,exports){arguments[4][18][0].apply(exports,arguments)},{"@ndhoule/foldl":40,"@ndhoule/map":43,dup:18}],52:[function(require,module,exports){arguments[4][19][0].apply(exports,arguments)},{dup:19}],53:[function(require,module,exports){arguments[4][20][0].apply(exports,arguments)},{dup:20}],54:[function(require,module,exports){arguments[4][21][0].apply(exports,arguments)},{dup:21}],55:[function(require,module,exports){arguments[4][22][0].apply(exports,arguments)},{"./debug":56,_process:183,dup:22}],56:[function(require,module,exports){arguments[4][23][0].apply(exports,arguments)},{dup:23,ms:61}],57:[function(require,module,exports){arguments[4][24][0].apply(exports,arguments)},{dup:24}],58:[function(require,module,exports){"use strict";var hasOwn=Object.prototype.hasOwnProperty;var toStr=Object.prototype.toString;var defineProperty=Object.defineProperty;var gOPD=Object.getOwnPropertyDescriptor;var isArray=function isArray(arr){if(typeof Array.isArray==="function"){return Array.isArray(arr)}return toStr.call(arr)==="[object Array]"};var isPlainObject=function isPlainObject(obj){if(!obj||toStr.call(obj)!=="[object Object]"){return false}var hasOwnConstructor=hasOwn.call(obj,"constructor");var hasIsPrototypeOf=obj.constructor&&obj.constructor.prototype&&hasOwn.call(obj.constructor.prototype,"isPrototypeOf");if(obj.constructor&&!hasOwnConstructor&&!hasIsPrototypeOf){return false}var key;for(key in obj){}return typeof key==="undefined"||hasOwn.call(obj,key)};var setProperty=function setProperty(target,options){if(defineProperty&&options.name==="__proto__"){defineProperty(target,options.name,{enumerable:true,configurable:true,value:options.newValue,writable:true})}else{target[options.name]=options.newValue}};var getProperty=function getProperty(obj,name){if(name==="__proto__"){if(!hasOwn.call(obj,name)){return void 0}else if(gOPD){return gOPD(obj,name).value}}return obj[name]};module.exports=function extend(){var options,name,src,copy,copyIsArray,clone;var target=arguments[0];var i=1;var length=arguments.length;var deep=false;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2}if(target==null||typeof target!=="object"&&typeof target!=="function"){target={}}for(;i<length;++i){options=arguments[i];if(options!=null){for(name in options){src=getProperty(target,name);copy=getProperty(options,name);if(target!==copy){if(deep&&copy&&(isPlainObject(copy)||(copyIsArray=isArray(copy)))){if(copyIsArray){copyIsArray=false;clone=src&&isArray(src)?src:[]}else{clone=src&&isPlainObject(src)?src:{}}setProperty(target,{name:name,newValue:extend(deep,clone,copy)})}else if(typeof copy!=="undefined"){setProperty(target,{name:name,newValue:copy})}}}}}return target}},{}],59:[function(require,module,exports){arguments[4][26][0].apply(exports,arguments)},{dup:26}],60:[function(require,module,exports){arguments[4][27][0].apply(exports,arguments)},{dup:27,is:59,"next-tick":62,"script-onload":65}],61:[function(require,module,exports){arguments[4][28][0].apply(exports,arguments)},{dup:28}],62:[function(require,module,exports){arguments[4][29][0].apply(exports,arguments)},{_process:183,dup:29}],63:[function(require,module,exports){var identity=function(_){return _};module.exports=multiple(find);module.exports.find=module.exports;module.exports.replace=function(obj,key,val,options){multiple(replace).call(this,obj,key,val,options);return obj};module.exports.del=function(obj,key,options){multiple(del).call(this,obj,key,null,options);return obj};function multiple(fn){return function(obj,path,val,options){normalize=options&&isFunction(options.normalizer)?options.normalizer:defaultNormalize;path=normalize(path);var key;var finished=false;while(!finished)loop();function loop(){for(key in obj){var normalizedKey=normalize(key);if(0===path.indexOf(normalizedKey)){var temp=path.substr(normalizedKey.length);if(temp.charAt(0)==="."||temp.length===0){path=temp.substr(1);var child=obj[key];if(null==child){finished=true;return}if(!path.length){finished=true;return}obj=child;return}}}key=undefined;finished=true}if(!key)return;if(null==obj)return obj;return fn(obj,key,val)}}function find(obj,key){if(obj.hasOwnProperty(key))return obj[key]}function del(obj,key){if(obj.hasOwnProperty(key))delete obj[key];return obj}function replace(obj,key,val){if(obj.hasOwnProperty(key))obj[key]=val;return obj}function defaultNormalize(path){return path.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}function isFunction(val){return typeof val==="function"}},{}],64:[function(require,module,exports){var type=require("type-component");module.exports=reject;function reject(obj,fn){fn=fn||compact;return"array"==type(obj)?reject.array(obj,fn):reject.object(obj,fn)}reject.array=function(arr,fn){var ret=[];for(var i=0;i<arr.length;++i){if(!fn(arr[i],i))ret[ret.length]=arr[i]}return ret};reject.object=function(obj,fn){var ret={};for(var k in obj){if(obj.hasOwnProperty(k)&&!fn(obj[k],k)){ret[k]=obj[k]}}return ret};reject.types=reject.type=function(obj,types){if(!Array.isArray(types))types=[types];return reject(obj,function(value){return-1!=types.indexOf(type(value))})};function compact(value){return null==value}},{"type-component":68}],65:[function(require,module,exports){arguments[4][30][0].apply(exports,arguments)},{dup:30}],66:[function(require,module,exports){arguments[4][31][0].apply(exports,arguments)},{dup:31}],67:[function(require,module,exports){arguments[4][32][0].apply(exports,arguments)},{dup:32}],68:[function(require,module,exports){var toString=Object.prototype.toString;module.exports=function(val){switch(toString.call(val)){case"[object Function]":return"function";case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array"}if(val===null)return"null";if(val===undefined)return"undefined";if(val===Object(val))return"object";return typeof val}},{}],69:[function(require,module,exports){"use strict";var integration=require("@segment/analytics.js-integration");var localstorage=require("yields-store");var protocol=require("@segment/protocol");var utm=require("@segment/utm-params");var ads=require("@segment/ad-params");var cookie=require("component-cookie");var clone=require("component-clone");var uuid=require("uuid");var top=require("@segment/top-domain");var extend=require("@segment/extend");var options={maxage:31536e6,secure:false,path:"/"};var SendGrid=module.exports=integration("SendGrid").option("eventKey","").option("inputHost","sg-input.ag.labs.sendgrid.com");exports.storage=function(){return protocol()==="file:"||protocol()==="chrome-extension:"?localstorage:cookie};exports.global=window;SendGrid.prototype.initialize=function(){var self=this;this.ready();this.analytics.on("invoke",function(msg){var action=msg.action();var listener="on"+msg.action();self.debug("%s %o",action,msg);if(self[listener])self[listener](msg);self.ready()})};SendGrid.prototype.loaded=function(){return true};SendGrid.prototype.onpage=function(page){this.send("/page",page.json())};SendGrid.prototype.onidentify=function(identify){this.send("/identify",identify.json())};SendGrid.prototype.ongroup=function(group){this.send("/group",group.json())};SendGrid.prototype.ontrack=function(track){var json=track.json();delete json.traits;this.send("/track",json)};SendGrid.prototype.onalias=function(alias){var json=alias.json();var user=this.analytics.user();json.previousId=json.previousId||json.from||user.id()||user.anonymousId();json.userId=json.userId||json.to;delete json.from;delete json.to;this.send("/alias",json)};SendGrid.prototype.normalize=function(msg){this.debug("normalize %o",msg);var user=this.analytics.user();var global=exports.global;var query=global.location.search;var ctx=msg.context=msg.context||msg.options||{};delete msg.options;msg.eventKey=this.options.eventKey;ctx.userAgent=navigator.userAgent;if(!ctx.library)ctx.library={name:"analytics.js",version:this.analytics.VERSION};if(query)ctx.campaign=utm(query);this.referrerId(query,ctx);msg.userId=msg.userId||user.id();msg.anonymousId=user.anonymousId();msg.messageId=uuid();this.debug("normalized %o",msg);return msg};SendGrid.prototype.send=function(path,msg,fn){var url=scheme()+"//"+this.options.inputHost+"/v1"+path;var headers={"Content-Type":"text/plain","x-api-key":this.options.eventKey};fn=fn||noop;var self=this;msg=this.normalize(msg);var req=new XMLHttpRequest;req.withCredentials=true;req.onerror=fn;req.onreadystatechange=function(err,res){self.debug("sent %O, received %O",msg,arguments);if(err)return fn(err);res.url=url;fn(null,res)};req.open("POST",url,true);for(var k in headers){req.setRequestHeader(k,headers[k])}req.send(JSON.stringify(msg))};SendGrid.prototype.cookie=function(name,val){var store=exports.storage();if(arguments.length===1)return store(name);var global=exports.global;var href=global.location.href;var domain="."+top(href);if(domain===".")domain="";this.debug("store domain %s -> %s",href,domain);var opts=clone(options);opts.domain=domain;this.debug("store %s, %s, %o",name,val,opts);store(name,val,opts);if(store(name))return;delete opts.domain;this.debug("fallback store %s, %s, %o",name,val,opts);store(name,val,opts)};SendGrid.prototype.referrerId=function(query,ctx){var stored=this.cookie("s:context.referrer");var ad;if(stored)stored=json.parse(stored);if(query)ad=ads(query);ad=ad||stored;if(!ad)return;ctx.referrer=extend(ctx.referrer||{},ad);this.cookie("s:context.referrer",json.stringify(ad))};function scheme(){return"https:"}function noop(){}},{"@segment/ad-params":83,"@segment/analytics.js-integration":84,"@segment/extend":88,"@segment/protocol":92,"@segment/top-domain":93,"@segment/utm-params":94,"component-clone":96,"component-cookie":97,uuid:120,"yields-store":125}],70:[function(require,module,exports){arguments[4][2][0].apply(exports,arguments)},{"@ndhoule/arity":71,dup:2}],71:[function(require,module,exports){arguments[4][3][0].apply(exports,arguments)},{dup:3}],72:[function(require,module,exports){"use strict";var type=require("component-type");var clone=function clone(obj){var t=type(obj);if(t==="object"){var copy={};for(var key in obj){if(obj.hasOwnProperty(key)){copy[key]=clone(obj[key])}}return copy}if(t==="array"){var copy=new Array(obj.length);for(var i=0,l=obj.length;i<l;i++){copy[i]=clone(obj[i])}return copy}if(t==="regexp"){var flags="";flags+=obj.multiline?"m":"";flags+=obj.global?"g":"";flags+=obj.ignoreCase?"i":"";return new RegExp(obj.source,flags)}if(t==="date"){return new Date(obj.getTime())}return obj};module.exports=clone},{"component-type":73}],73:[function(require,module,exports){arguments[4][21][0].apply(exports,arguments)},{dup:21}],74:[function(require,module,exports){arguments[4][4][0].apply(exports,arguments)},{"@ndhoule/drop":75,"@ndhoule/rest":82,dup:4}],75:[function(require,module,exports){arguments[4][5][0].apply(exports,arguments)},{dup:5}],76:[function(require,module,exports){arguments[4][6][0].apply(exports,arguments)},{"@ndhoule/keys":81,dup:6}],77:[function(require,module,exports){arguments[4][7][0].apply(exports,arguments)},{"@ndhoule/each":76,dup:7}],78:[function(require,module,exports){"use strict";var has=Object.prototype.hasOwnProperty;var extend=function extend(dest){var sources=Array.prototype.slice.call(arguments,1);for(var i=0;i<sources.length;i+=1){for(var key in sources[i]){if(has.call(sources[i],key)){dest[key]=sources[i][key]}}}return dest};module.exports=extend},{}],79:[function(require,module,exports){arguments[4][8][0].apply(exports,arguments)},{"@ndhoule/each":76,dup:8}],80:[function(require,module,exports){arguments[4][9][0].apply(exports,arguments)},{"@ndhoule/each":76,dup:9}],81:[function(require,module,exports){arguments[4][10][0].apply(exports,arguments)},{dup:10}],82:[function(require,module,exports){arguments[4][12][0].apply(exports,arguments)},{dup:12}],83:[function(require,module,exports){"use strict";var parse=require("component-querystring").parse;var QUERYIDS={btid:"dataxu",urid:"millennial-media"};function ads(query){var params=parse(query);for(var key in params){if(params.hasOwnProperty(key)){for(var id in QUERYIDS){if(QUERYIDS.hasOwnProperty(id)){if(key===id){return{id:params[key],type:QUERYIDS[id]}}}}}}}module.exports=ads},{"component-querystring":105}],84:[function(require,module,exports){"use strict";var bind=require("component-bind");var clone=require("@ndhoule/clone");var debug=require("debug");var defaults=require("@ndhoule/defaults");var extend=require("@ndhoule/extend");var slug=require("slug-component");var protos=require("./protos");var statics=require("./statics");function createIntegration(name){function Integration(options){if(options&&options.addIntegration){return options.addIntegration(Integration)}this.debug=debug("analytics:integration:"+slug(name));this.options=defaults(clone(options)||{},this.defaults);this._queue=[];this.once("ready",bind(this,this.flush));Integration.emit("construct",this);this.ready=bind(this,this.ready);this._wrapInitialize();this._wrapPage();this._wrapTrack()}Integration.prototype.defaults={};Integration.prototype.globals=[]
;Integration.prototype.templates={};Integration.prototype.name=name;extend(Integration,statics);extend(Integration.prototype,protos);return Integration}module.exports=createIntegration},{"./protos":85,"./statics":86,"@ndhoule/clone":72,"@ndhoule/defaults":74,"@ndhoule/extend":78,"component-bind":95,debug:108,"slug-component":116}],85:[function(require,module,exports){"use strict";var Emitter=require("component-emitter");var after=require("@ndhoule/after");var each=require("@ndhoule/each");var events=require("analytics-events");var every=require("@ndhoule/every");var fmt=require("@segment/fmt");var foldl=require("@ndhoule/foldl");var is=require("is");var loadIframe=require("load-iframe");var loadScript=require("@segment/load-script");var nextTick=require("next-tick");var normalize=require("to-no-case");var has=Object.prototype.hasOwnProperty;var noop=function noop(){};var onerror=window.onerror;var onload=null;Emitter(exports);exports.initialize=function(){var ready=this.ready;nextTick(ready)};exports.loaded=function(){return false};exports.page=function(page){};exports.track=function(track){};exports.map=function(options,key){var normalizedComparator=normalize(key);var mappingType=getMappingType(options);if(mappingType==="unknown"){return[]}return foldl(function(matchingValues,val,key){var compare;var result;if(mappingType==="map"){compare=key;result=val}if(mappingType==="array"){compare=val;result=val}if(mappingType==="mixed"){compare=val.key;result=val.value}if(normalize(compare)===normalizedComparator){matchingValues.push(result)}return matchingValues},[],options)};exports.invoke=function(method){if(!this[method])return;var args=Array.prototype.slice.call(arguments,1);if(!this._ready)return this.queue(method,args);var ret;try{this.debug("%s with %o",method,args);ret=this[method].apply(this,args)}catch(e){this.debug("error %o calling %s with %o",e,method,args)}return ret};exports.queue=function(method,args){if(method==="page"&&this._assumesPageview&&!this._initialized){return this.page.apply(this,args)}this._queue.push({method:method,args:args})};exports.flush=function(){this._ready=true;var self=this;each(function(call){self[call.method].apply(self,call.args)},this._queue);this._queue.length=0};exports.reset=function(){for(var i=0;i<this.globals.length;i++){window[this.globals[i]]=undefined}window.onerror=onerror;window.onload=onload};exports.load=function(name,locals,callback){if(typeof name==="function"){callback=name;locals=null;name=null}if(name&&typeof name==="object"){callback=locals;locals=name;name=null}if(typeof locals==="function"){callback=locals;locals=null}name=name||"library";locals=locals||{};locals=this.locals(locals);var template=this.templates[name];if(!template)throw new Error(fmt('template "%s" not defined.',name));var attrs=render(template,locals);callback=callback||noop;var self=this;var el;switch(template.type){case"img":attrs.width=1;attrs.height=1;el=loadImage(attrs,callback);break;case"script":el=loadScript(attrs,function(err){if(!err)return callback();self.debug('error loading "%s" error="%s"',self.name,err)});delete attrs.src;each(function(val,key){el.setAttribute(key,val)},attrs);break;case"iframe":el=loadIframe(attrs,callback);break;default:}return el};exports.locals=function(locals){locals=locals||{};var cache=Math.floor((new Date).getTime()/36e5);if(!locals.hasOwnProperty("cache"))locals.cache=cache;each(function(val,key){if(!locals.hasOwnProperty(key))locals[key]=val},this.options);return locals};exports.ready=function(){this.emit("ready")};exports._wrapInitialize=function(){var initialize=this.initialize;this.initialize=function(){this.debug("initialize");this._initialized=true;var ret=initialize.apply(this,arguments);this.emit("initialize");return ret};if(this._assumesPageview)this.initialize=after(2,this.initialize)};exports._wrapPage=function(){var page=this.page;this.page=function(){if(this._assumesPageview&&!this._initialized){return this.initialize.apply(this,arguments)}return page.apply(this,arguments)}};exports._wrapTrack=function(){var t=this.track;this.track=function(track){var event=track.event();var called;var ret;for(var method in events){if(has.call(events,method)){var regexp=events[method];if(!this[method])continue;if(!regexp.test(event))continue;ret=this[method].apply(this,arguments);called=true;break}}if(!called)ret=t.apply(this,arguments);return ret}};function getMappingType(mapping){if(is.array(mapping)){return every(isMixed,mapping)?"mixed":"array"}if(is.object(mapping))return"map";return"unknown"}function isMixed(item){if(!is.object(item))return false;if(!is.string(item.key))return false;if(!has.call(item,"value"))return false;return true}function loadImage(attrs,fn){fn=fn||function(){};var img=new Image;img.onerror=error(fn,"failed to load pixel",img);img.onload=function(){fn()};img.src=attrs.src;img.width=1;img.height=1;return img}function error(fn,message,img){return function(e){e=e||window.event;var err=new Error(message);err.event=e;err.source=img;fn(err)}}function render(template,locals){return foldl(function(attrs,val,key){attrs[key]=val.replace(/\{\{\ *(\w+)\ *\}\}/g,function(_,$1){return locals[$1]});return attrs},{},template.attrs)}},{"@ndhoule/after":70,"@ndhoule/each":76,"@ndhoule/every":77,"@ndhoule/foldl":79,"@segment/fmt":89,"@segment/load-script":90,"analytics-events":87,"component-emitter":103,is:111,"load-iframe":112,"next-tick":114,"to-no-case":118}],86:[function(require,module,exports){"use strict";var Emitter=require("component-emitter");var domify=require("domify");var each=require("@ndhoule/each");var includes=require("@ndhoule/includes");Emitter(exports);exports.option=function(key,value){this.prototype.defaults[key]=value;return this};exports.mapping=function(name){this.option(name,[]);this.prototype[name]=function(key){return this.map(this.options[name],key)};return this};exports.global=function(key){this.prototype.globals.push(key);return this};exports.assumesPageview=function(){this.prototype._assumesPageview=true;return this};exports.readyOnLoad=function(){this.prototype._readyOnLoad=true;return this};exports.readyOnInitialize=function(){this.prototype._readyOnInitialize=true;return this};exports.tag=function(name,tag){if(tag==null){tag=name;name="library"}this.prototype.templates[name]=objectify(tag);return this};function objectify(str){str=str.replace(' src="',' data-src="');var el=domify(str);var attrs={};each(function(attr){var name=attr.name==="data-src"?"src":attr.name;if(!includes(attr.name+"=",str))return;attrs[name]=attr.value},el.attributes);return{type:el.tagName.toLowerCase(),attrs:attrs}}},{"@ndhoule/each":76,"@ndhoule/includes":80,"component-emitter":103,domify:110}],87:[function(require,module,exports){module.exports={promotionViewed:/^[ _]?promotion[ _]?viewed?[ _]?$/i,viewedPromotion:/^[ _]?viewed[ _]?promotion?[ _]?$/i,promotionClicked:/^[ _]?promotion[ _]?clicked?[ _]?$/i,clickedPromotion:/^[ _]?clicked[ _]?promotion?[ _]?$/i,productsSearched:/^[ _]?products[ _]?searched[ _]?$/i,productListViewed:/^[ _]?product[ _]?list[ _]?viewed[ _]?$/i,productListFiltered:/^[ _]?product[ _]?list[ _]?filtered[ _]?$/i,viewedProductCategory:/^[ _]?viewed[ _]?product[ _]?category[ _]?$/i,viewedProductDetails:/^[ _]?viewed[ _]?product[ _]?details?[ _]?$/i,productClicked:/^[ _]?product[ _]?clicked[ _]?$/i,clickedProduct:/^[ _]?clicked[ _]?product[ _]?$/i,productViewed:/^[ _]?product[ _]?viewed[ _]?$/i,viewedProduct:/^[ _]?viewed[ _]?product[ _]?$/i,productAdded:/^[ _]?product[ _]?added[ _]?$/i,addedProduct:/^[ _]?added[ _]?product[ _]?$/i,productRemoved:/^[ _]?product[ _]?removed[ _]?$/i,removedProduct:/^[ _]?removed[ _]?product[ _]?$/i,cartViewed:/^[ _]?cart[ _]?viewed[ _]?$/i,orderStarted:/^[ _]?order[ _]?started[ _]?$/i,startedOrder:/^[ _]?started[ _]?order[ _]?$/i,orderUpdated:/^[ _]?order[ _]?updated[ _]?$/i,updatedOrder:/^[ _]?updated[ _]?order[ _]?$/i,orderCompleted:/^[ _]?order[ _]?completed[ _]?$/i,completedOrder:/^[ _]?completed[ _]?order[ _]?$/i,orderRefunded:/^[ _]?order[ _]?refunded[ _]?$/i,refundedOrder:/^[ _]?refunded[ _]?order[ _]?$/i,orderCancelled:/^[ _]?order[ _]?cancelled[ _]?$/i,paymentInfoAdded:/^[ _]?payment[ _]?info[ _]?added[ _]?$/i,checkoutStarted:/^[ _]?checkout[ _]?started[ _]?$/i,checkoutStepViewed:/^[ _]?checkout[ _]?step[ _]?viewed[ _]?$/i,viewedCheckoutStep:/^[ _]?viewed[ _]?checkout[ _]?step[ _]?$/i,checkoutStepCompleted:/^[ _]?checkout[ _]?step[ _]?completed[ _]?$/i,completedCheckoutStep:/^[ _]?completed[ _]?checkout[ _]?step[ _]?$/i,couponEntered:/^[ _]?coupon[ _]?entered[ _]?$/i,couponApplied:/^[ _]?coupon[ _]?applied[ _]?$/i,couponDenied:/^[ _]?coupon[ _]?denied[ _]?$/i,couponRemoved:/^[ _]?coupon[ _]?removed[ _]?$/i,productAddedToWishlist:/^[ _]?product[ _]?added[ _]?to[ _]?wishlist[ _]?$/i,wishlistProductRemoved:/^[ _]?wishlist[ _]?product[ _]?removed[ _]?$/i,wishlistProductAddedToCart:/^[ _]?wishlist[ _]?product[ _]?added[ _]?to[ _]?cart[ _]?$/i,productShared:/^[ _]?product[ _]?shared[ _]?$/i,cartShared:/^[ _]?cart[ _]?shared[ _]?$/i,productRemoved:/^[ _]?product[ _]?removed[ _]?$/i,applicationInstalled:/^[ _]?application[ _]?installed[ _]?$/i,applicationUpdated:/^[ _]?application[ _]?updated[ _]?$/i,applicationOpened:/^[ _]?application[ _]?opened[ _]?$/i,applicationBackgrounded:/^[ _]?application[ _]?backgrounded[ _]?$/i,applicationUninstalled:/^[ _]?application[ _]?uninstalled[ _]?$/i,installAttributed:/^[ _]?install[ _]?attributed[ _]?$/i,deepLinkOpened:/^[ _]?deep[ _]?link[ _]?opened[ _]?$/i,pushNotificationReceived:/^[ _]?push[ _]?notification[ _]?received[ _]?$/i,pushNotificationTapped:/^[ _]?push[ _]?notification[ _]?received[ _]?$/i,pushNotificationBounced:/^[ _]?push[ _]?notification[ _]?bounced[ _]?$/i}},{}],88:[function(require,module,exports){module.exports=function extend(object){var args=Array.prototype.slice.call(arguments,1);for(var i=0,source;source=args[i];i++){if(!source)continue;for(var property in source){object[property]=source[property]}}return object}},{}],89:[function(require,module,exports){arguments[4][16][0].apply(exports,arguments)},{dup:16}],90:[function(require,module,exports){arguments[4][17][0].apply(exports,arguments)},{"component-type":91,dup:17,"next-tick":114,"script-onload":115}],91:[function(require,module,exports){arguments[4][21][0].apply(exports,arguments)},{dup:21}],92:[function(require,module,exports){"use strict";var define=Object.defineProperty;var initialProtocol=window.location.protocol;var mockedProtocol;module.exports=function(protocol){if(arguments.length===0){return get()}return set(protocol)};module.exports.http=function(){set("http:")};module.exports.https=function(){set("https:")};module.exports.reset=function(){set(initialProtocol)};function get(){return mockedProtocol||window.location.protocol}function set(protocol){try{define(window.location,"protocol",{get:function(){return protocol}})}catch(err){mockedProtocol=protocol}}},{}],93:[function(require,module,exports){"use strict";var parse=require("component-url").parse;var cookie=require("component-cookie");function domain(url){var cookie=exports.cookie;var levels=exports.levels(url);for(var i=0;i<levels.length;++i){var cname="__tld__";var domain=levels[i];var opts={domain:"."+domain};cookie(cname,1,opts);if(cookie(cname)){cookie(cname,null,opts);return domain}}return""}domain.levels=function(url){var host=parse(url).hostname;var parts=host.split(".");var last=parts[parts.length-1];var levels=[];if(parts.length===4&&last===parseInt(last,10)){return levels}if(parts.length<=1){return levels}for(var i=parts.length-2;i>=0;--i){levels.push(parts.slice(i).join("."))}return levels};domain.cookie=cookie;exports=module.exports=domain},{"component-cookie":97,"component-url":107}],94:[function(require,module,exports){"use strict";var foldl=require("@ndhoule/foldl");var parse=require("component-querystring").parse;var has=Object.prototype.hasOwnProperty;function utm(query){if(query.charAt(0)==="?"){query=query.substring(1)}query=query.replace(/\?/g,"&");var param;var params=parse(query);var results={};for(var key in params){if(has.call(params,key)){if(key.substr(0,4)==="utm_"){param=key.substr(4);if(param==="campaign")param="name";results[param]=params[key]}}}return results}var allowedKeys={name:true,term:true,source:true,medium:true,content:true};function strict(query){return foldl(function(acc,val,key){if(has.call(allowedKeys,key))acc[key]=val;return acc},{},utm(query))}module.exports=utm;module.exports.strict=strict},{"@ndhoule/foldl":79,"component-querystring":105}],95:[function(require,module,exports){arguments[4][19][0].apply(exports,arguments)},{dup:19}],96:[function(require,module,exports){var type;try{type=require("component-type")}catch(_){type=require("type")}module.exports=clone;function clone(obj){switch(type(obj)){case"object":var copy={};for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){copy[key]=clone(obj[key])}}return copy;case"array":var copy=new Array(obj.length);for(var i=0,l=obj.length;i<l;i++){copy[i]=clone(obj[i])}return copy;case"regexp":var flags="";flags+=obj.multiline?"m":"";flags+=obj.global?"g":"";flags+=obj.ignoreCase?"i":"";return new RegExp(obj.source,flags);case"date":return new Date(obj.getTime());default:return obj}}},{"component-type":106,type:106}],97:[function(require,module,exports){var debug=require("debug")("cookie");module.exports=function(name,value,options){switch(arguments.length){case 3:case 2:return set(name,value,options);case 1:return get(name);default:return all()}};function set(name,value,options){options=options||{};var str=encode(name)+"="+encode(value);if(null==value)options.maxage=-1;if(options.maxage){options.expires=new Date(+new Date+options.maxage)}if(options.path)str+="; path="+options.path;if(options.domain)str+="; domain="+options.domain;if(options.expires)str+="; expires="+options.expires.toUTCString();if(options.secure)str+="; secure";document.cookie=str}function all(){var str;try{str=document.cookie}catch(err){if(typeof console!=="undefined"&&typeof console.error==="function"){console.error(err.stack||err)}return{}}return parse(str)}function get(name){return all()[name]}function parse(str){var obj={};var pairs=str.split(/ *; */);var pair;if(""==pairs[0])return obj;for(var i=0;i<pairs.length;++i){pair=pairs[i].split("=");obj[decode(pair[0])]=decode(pair[1])}return obj}function encode(value){try{return encodeURIComponent(value)}catch(e){debug("error `encode(%o)` - %o",value,e)}}function decode(value){try{return decodeURIComponent(value)}catch(e){debug("error `decode(%o)` - %o",value,e)}}},{debug:98}],98:[function(require,module,exports){exports=module.exports=require("./debug");exports.log=log;exports.formatArgs=formatArgs;exports.save=save;exports.load=load;exports.useColors=useColors;exports.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:localstorage();exports.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function useColors(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}exports.formatters.j=function(v){return JSON.stringify(v)};function formatArgs(){var args=arguments;var useColors=this.useColors;args[0]=(useColors?"%c":"")+this.namespace+(useColors?" %c":" ")+args[0]+(useColors?"%c ":" ")+"+"+exports.humanize(this.diff);if(!useColors)return args;var c="color: "+this.color;args=[args[0],c,"color: inherit"].concat(Array.prototype.slice.call(args,1));var index=0;var lastC=0;args[0].replace(/%[a-z%]/g,function(match){if("%%"===match)return;index++;if("%c"===match){lastC=index}});args.splice(lastC,0,c);return args}function log(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function save(namespaces){try{if(null==namespaces){exports.storage.removeItem("debug")}else{exports.storage.debug=namespaces}}catch(e){}}function load(){var r;try{r=exports.storage.debug}catch(e){}return r}exports.enable(load());function localstorage(){try{return window.localStorage}catch(e){}}},{"./debug":99}],99:[function(require,module,exports){exports=module.exports=debug;exports.coerce=coerce;exports.disable=disable;exports.enable=enable;exports.enabled=enabled;exports.humanize=require("ms");exports.names=[];exports.skips=[];exports.formatters={};var prevColor=0;var prevTime;function selectColor(){return exports.colors[prevColor++%exports.colors.length]}function debug(namespace){function disabled(){}disabled.enabled=false;function enabled(){var self=enabled;var curr=+new Date;var ms=curr-(prevTime||curr);self.diff=ms;self.prev=prevTime;self.curr=curr;prevTime=curr;if(null==self.useColors)self.useColors=exports.useColors();if(null==self.color&&self.useColors)self.color=selectColor();var args=Array.prototype.slice.call(arguments);args[0]=exports.coerce(args[0]);if("string"!==typeof args[0]){args=["%o"].concat(args)}var index=0;args[0]=args[0].replace(/%([a-z%])/g,function(match,format){if(match==="%%")return match;index++;var formatter=exports.formatters[format];if("function"===typeof formatter){var val=args[index];match=formatter.call(self,val);args.splice(index,1);index--}return match});if("function"===typeof exports.formatArgs){args=exports.formatArgs.apply(self,args)}var logFn=enabled.log||exports.log||console.log.bind(console);logFn.apply(self,args)}enabled.enabled=true;var fn=exports.enabled(namespace)?enabled:disabled;fn.namespace=namespace;return fn}function enable(namespaces){exports.save(namespaces);var split=(namespaces||"").split(/[\s,]+/);var len=split.length;for(var i=0;i<len;i++){if(!split[i])continue;namespaces=split[i].replace(/\*/g,".*?");if(namespaces[0]==="-"){exports.skips.push(new RegExp("^"+namespaces.substr(1)+"$"))}else{exports.names.push(new RegExp("^"+namespaces+"$"))}}}function disable(){exports.enable("")}function enabled(name){var i,len;for(i=0,len=exports.skips.length;i<len;i++){if(exports.skips[i].test(name)){return false}}for(i=0,len=exports.names.length;i<len;i++){if(exports.names[i].test(name)){return true}}return false}function coerce(val){if(val instanceof Error)return val.stack||val.message;return val}},{ms:100}],100:[function(require,module,exports){var s=1e3;var m=s*60;var h=m*60;var d=h*24;var y=d*365.25;module.exports=function(val,options){options=options||{};if("string"==typeof val)return parse(val);return options.long?long(val):short(val)};function parse(str){str=""+str;if(str.length>1e4)return;var match=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);if(!match)return;var n=parseFloat(match[1]);var type=(match[2]||"ms").toLowerCase();switch(type){case"years":case"year":case"yrs":case"yr":case"y":return n*y;case"days":case"day":case"d":return n*d;case"hours":case"hour":case"hrs":case"hr":case"h":return n*h;case"minutes":case"minute":case"mins":case"min":case"m":return n*m;case"seconds":case"second":case"secs":case"sec":case"s":return n*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}function short(ms){if(ms>=d)return Math.round(ms/d)+"d";if(ms>=h)return Math.round(ms/h)+"h";if(ms>=m)return Math.round(ms/m)+"m";if(ms>=s)return Math.round(ms/s)+"s";return ms+"ms"}function long(ms){return plural(ms,d,"day")||plural(ms,h,"hour")||plural(ms,m,"minute")||plural(ms,s,"second")||ms+" ms"}function plural(ms,n,name){if(ms<n)return;if(ms<n*1.5)return Math.floor(ms/n)+" "+name;return Math.ceil(ms/n)+" "+name+"s"}},{}],101:[function(require,module,exports){try{var type=require("type")}catch(err){var type=require("component-type")}var toFunction=require("to-function");var has=Object.prototype.hasOwnProperty;module.exports=function(obj,fn,ctx){fn=toFunction(fn);ctx=ctx||this;switch(type(obj)){case"array":return array(obj,fn,ctx);case"object":if("number"==typeof obj.length)return array(obj,fn,ctx);return object(obj,fn,ctx);case"string":return string(obj,fn,ctx)}};function string(obj,fn,ctx){for(var i=0;i<obj.length;++i){fn.call(ctx,obj.charAt(i),i)}}function object(obj,fn,ctx){for(var key in obj){if(has.call(obj,key)){fn.call(ctx,key,obj[key])}}}function array(obj,fn,ctx){for(var i=0;i<obj.length;++i){fn.call(ctx,obj[i],i)}}},{"component-type":102,"to-function":117,type:102}],102:[function(require,module,exports){var toString=Object.prototype.toString;module.exports=function(val){switch(toString.call(val)){case"[object Function]":return"function";case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array";case"[object String]":return"string"}if(val===null)return"null";if(val===undefined)return"undefined";if(val&&val.nodeType===1)return"element";if(val===Object(val))return"object";return typeof val}},{}],103:[function(require,module,exports){arguments[4][20][0].apply(exports,arguments)},{dup:20}],104:[function(require,module,exports){var globals=/\b(Array|Date|Object|Math|JSON)\b/g;module.exports=function(str,fn){var p=unique(props(str));if(fn&&"string"==typeof fn)fn=prefixed(fn);if(fn)return map(str,p,fn);return p};function props(str){return str.replace(/\.\w+|\w+ *\(|"[^"]*"|'[^']*'|\/([^\/]+)\//g,"").replace(globals,"").match(/[a-zA-Z_]\w*/g)||[]}function map(str,props,fn){var re=/\.\w+|\w+ *\(|"[^"]*"|'[^']*'|\/([^\/]+)\/|[a-zA-Z_]\w*/g;return str.replace(re,function(_){if("("==_[_.length-1])return fn(_);if(!~props.indexOf(_))return _;return fn(_)})}function unique(arr){var ret=[];for(var i=0;i<arr.length;i++){if(~ret.indexOf(arr[i]))continue;ret.push(arr[i])}return ret}function prefixed(str){return function(_){return str+_}}},{}],105:[function(require,module,exports){var trim=require("trim");var type=require("type");var pattern=/(\w+)\[(\d+)\]/;var encode=function(str){try{return encodeURIComponent(str)}catch(e){return str}};var decode=function(str){try{return decodeURIComponent(str.replace(/\+/g," "))}catch(e){return str}};exports.parse=function(str){if("string"!=typeof str)return{};str=trim(str);if(""==str)return{};if("?"==str.charAt(0))str=str.slice(1);var obj={};var pairs=str.split("&");for(var i=0;i<pairs.length;i++){var parts=pairs[i].split("=");var key=decode(parts[0]);var m;if(m=pattern.exec(key)){obj[m[1]]=obj[m[1]]||[];obj[m[1]][m[2]]=decode(parts[1]);continue}obj[parts[0]]=null==parts[1]?"":decode(parts[1])}return obj};exports.stringify=function(obj){if(!obj)return"";var pairs=[];for(var key in obj){var value=obj[key];if("array"==type(value)){for(var i=0;i<value.length;++i){pairs.push(encode(key+"["+i+"]")+"="+encode(value[i]))}continue}pairs.push(encode(key)+"="+encode(obj[key]))}return pairs.join("&")}},{trim:119,type:106}],106:[function(require,module,exports){var toString=Object.prototype.toString;module.exports=function(val){switch(toString.call(val)){case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array";case"[object Error]":return"error"}if(val===null)return"null";if(val===undefined)return"undefined";if(val!==val)return"nan";if(val&&val.nodeType===1)return"element";val=val.valueOf?val.valueOf():Object.prototype.valueOf.apply(val);return typeof val}},{}],107:[function(require,module,exports){exports.parse=function(url){var a=document.createElement("a");a.href=url;return{href:a.href,host:a.host||location.host,port:"0"===a.port||""===a.port?port(a.protocol):a.port,hash:a.hash,hostname:a.hostname||location.hostname,pathname:a.pathname.charAt(0)!="/"?"/"+a.pathname:a.pathname,protocol:!a.protocol||":"==a.protocol?location.protocol:a.protocol,search:a.search,query:a.search.slice(1)}};exports.isAbsolute=function(url){return 0==url.indexOf("//")||!!~url.indexOf("://")};exports.isRelative=function(url){return!exports.isAbsolute(url)};exports.isCrossDomain=function(url){url=exports.parse(url);var location=exports.parse(window.location.href);return url.hostname!==location.hostname||url.port!==location.port||url.protocol!==location.protocol};function port(protocol){switch(protocol){case"http:":return 80;case"https:":return 443;default:return location.port}}},{}],108:[function(require,module,exports){arguments[4][22][0].apply(exports,arguments)},{"./debug":109,_process:183,dup:22}],109:[function(require,module,exports){arguments[4][23][0].apply(exports,arguments)},{dup:23,ms:113}],110:[function(require,module,exports){arguments[4][24][0].apply(exports,arguments)},{dup:24}],111:[function(require,module,exports){arguments[4][26][0].apply(exports,arguments)},{dup:26}],112:[function(require,module,exports){arguments[4][27][0].apply(exports,arguments)},{dup:27,is:111,"next-tick":114,"script-onload":115}],113:[function(require,module,exports){arguments[4][28][0].apply(exports,arguments)},{dup:28}],114:[function(require,module,exports){arguments[4][29][0].apply(exports,arguments)},{_process:183,dup:29}],115:[function(require,module,exports){arguments[4][30][0].apply(exports,arguments)},{dup:30}],116:[function(require,module,exports){arguments[4][31][0].apply(exports,arguments)},{dup:31}],117:[function(require,module,exports){var expr;try{expr=require("props")}catch(e){expr=require("component-props")}module.exports=toFunction;function toFunction(obj){switch({}.toString.call(obj)){case"[object Object]":return objectToFunction(obj);case"[object Function]":return obj;case"[object String]":return stringToFunction(obj);case"[object RegExp]":return regexpToFunction(obj);default:return defaultToFunction(obj)}}function defaultToFunction(val){return function(obj){return val===obj}}function regexpToFunction(re){return function(obj){return re.test(obj)}}function stringToFunction(str){if(/^ *\W+/.test(str))return new Function("_","return _ "+str);return new Function("_","return "+get(str))}function objectToFunction(obj){var match={};for(var key in obj){match[key]=typeof obj[key]==="string"?defaultToFunction(obj[key]):toFunction(obj[key])}return function(val){if(typeof val!=="object")return false;for(var key in match){if(!(key in val))return false;if(!match[key](val[key]))return false}return true}}function get(str){var props=expr(str);if(!props.length)return"_."+str;var val,i,prop;for(i=0;i<props.length;i++){prop=props[i];val="_."+prop;val="('function' == typeof "+val+" ? "+val+"() : "+val+")";str=stripNested(prop,str,val)}return str}function stripNested(prop,str,val){return str.replace(new RegExp("(\\.)?"+prop,"g"),function($0,$1){return $1?$0:val})}},{"component-props":104,props:104}],118:[function(require,module,exports){arguments[4][32][0].apply(exports,arguments)},{dup:32}],119:[function(require,module,exports){exports=module.exports=trim;function trim(str){return str.replace(/^\s*|\s*$/g,"")}exports.left=function(str){return str.replace(/^\s*/,"")};exports.right=function(str){return str.replace(/\s*$/,"")}},{}],120:[function(require,module,exports){var v1=require("./v1");var v4=require("./v4");var uuid=v4;uuid.v1=v1;uuid.v4=v4;module.exports=uuid},{"./v1":123,"./v4":124}],121:[function(require,module,exports){var byteToHex=[];for(var i=0;i<256;++i){byteToHex[i]=(i+256).toString(16).substr(1)}function bytesToUuid(buf,offset){var i=offset||0;var bth=byteToHex;return[bth[buf[i++]],bth[buf[i++]],bth[buf[i++]],bth[buf[i++]],"-",bth[buf[i++]],bth[buf[i++]],"-",bth[buf[i++]],bth[buf[i++]],"-",bth[buf[i++]],bth[buf[i++]],"-",bth[buf[i++]],bth[buf[i++]],bth[buf[i++]],bth[buf[i++]],bth[buf[i++]],bth[buf[i++]]].join("")}module.exports=bytesToUuid},{}],122:[function(require,module,exports){var getRandomValues=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto);if(getRandomValues){var rnds8=new Uint8Array(16);module.exports=function whatwgRNG(){getRandomValues(rnds8);return rnds8}}else{var rnds=new Array(16);module.exports=function mathRNG(){for(var i=0,r;i<16;i++){if((i&3)===0)r=Math.random()*4294967296;rnds[i]=r>>>((i&3)<<3)&255}return rnds}}},{}],123:[function(require,module,exports){var rng=require("./lib/rng");var bytesToUuid=require("./lib/bytesToUuid");var _nodeId;var _clockseq;var _lastMSecs=0;var _lastNSecs=0;function v1(options,buf,offset){var i=buf&&offset||0;var b=buf||[];options=options||{};var node=options.node||_nodeId;var clockseq=options.clockseq!==undefined?options.clockseq:_clockseq;if(node==null||clockseq==null){var seedBytes=rng();if(node==null){node=_nodeId=[seedBytes[0]|1,seedBytes[1],seedBytes[2],seedBytes[3],seedBytes[4],seedBytes[5]]}if(clockseq==null){clockseq=_clockseq=(seedBytes[6]<<8|seedBytes[7])&16383}}var msecs=options.msecs!==undefined?options.msecs:(new Date).getTime();var nsecs=options.nsecs!==undefined?options.nsecs:_lastNSecs+1;var dt=msecs-_lastMSecs+(nsecs-_lastNSecs)/1e4;if(dt<0&&options.clockseq===undefined){clockseq=clockseq+1&16383}if((dt<0||msecs>_lastMSecs)&&options.nsecs===undefined){nsecs=0}if(nsecs>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}_lastMSecs=msecs;_lastNSecs=nsecs;_clockseq=clockseq;msecs+=122192928e5;var tl=((msecs&268435455)*1e4+nsecs)%4294967296;b[i++]=tl>>>24&255;b[i++]=tl>>>16&255;b[i++]=tl>>>8&255;b[i++]=tl&255;var tmh=msecs/4294967296*1e4&268435455;b[i++]=tmh>>>8&255;b[i++]=tmh&255;b[i++]=tmh>>>24&15|16;b[i++]=tmh>>>16&255;b[i++]=clockseq>>>8|128;b[i++]=clockseq&255;for(var n=0;n<6;++n){b[i+n]=node[n]}return buf?buf:bytesToUuid(b)}module.exports=v1},{"./lib/bytesToUuid":121,"./lib/rng":122}],124:[function(require,module,exports){var rng=require("./lib/rng");var bytesToUuid=require("./lib/bytesToUuid");function v4(options,buf,offset){var i=buf&&offset||0;if(typeof options=="string"){buf=options==="binary"?new Array(16):null;options=null}options=options||{};var rnds=options.random||(options.rng||rng)();rnds[6]=rnds[6]&15|64;rnds[8]=rnds[8]&63|128;if(buf){for(var ii=0;ii<16;++ii){buf[i+ii]=rnds[ii]}}return buf||bytesToUuid(rnds)}module.exports=v4},{"./lib/bytesToUuid":121,"./lib/rng":122}],125:[function(require,module,exports){var unserialize=require("unserialize");var each=require("each");var storage;try{storage=window.localStorage}catch(e){storage=null}module.exports=store;function store(key,value){var length=arguments.length;if(0==length)return all();if(2<=length)return set(key,value);if(1!=length)return;if(null==key)return storage.clear();if("string"==typeof key)return get(key);if("object"==typeof key)return each(key,set)}store.supported=!!storage;function set(key,val){return null==val?storage.removeItem(key):storage.setItem(key,JSON.stringify(val))}function get(key){return unserialize(storage.getItem(key))}function all(){var len=storage.length;var ret={};var key;while(0<=--len){key=storage.key(len);ret[key]=get(key)}return ret}},{each:101,unserialize:126}],126:[function(require,module,exports){module.exports=function(val){try{return JSON.parse(val)}catch(e){return val||undefined}}},{}],127:[function(require,module,exports){"use strict";var analytics=require("@segment/analytics.js-core");var Integrations=require("./integrations");module.exports=exports=analytics;analytics.require=require;exports.VERSION=require("../package.json").version;Object.keys(Integrations).forEach(function(name){analytics.use(Integrations[name])});var sendgrid_id="fdfb205d-27b2-4edf-9daa-2320544db8fb";analytics._user.defaults={persist:true,cookie:{key:"sg_user_id"},localStorage:{key:"sg_user_traits"}};var options={SendGrid:{eventKey:sendgrid_id,inputHost:"sg-input.ag.labs.sendgrid.com"}};var facebook_id="";if(facebook_id&&facebook_id.length>0){options["Facebook Pixel"]={};options["Facebook Pixel"].pixelId=facebook_id}var adwords_id="AW-740685679";var conversion_id="AW-740685679/ZDCSCJ7_954BEO_ul-EC";if(adwords_id&&adwords_id.length>0){options["Google Global Site Tag"]={};options["Google Global Site Tag"].accountId=adwords_id;options["Google Global Site Tag"].conversionId=conversion_id}
analytics.initialize(options);window.sendgrid.forEach(function(entry){var method=entry.m;var args=entry.args;if(typeof analytics[method]==="function"){analytics[method].apply(analytics,args)}})},{"../package.json":200,"./integrations":128,"@segment/analytics.js-core":146}],128:[function(require,module,exports){"use strict";module.exports={"facebook-pixel":require("../analytics.js-integration-facebook-pixel"),sendgrid:require("../analytics.js-integration-sendgrid"),"google-global-site-tag":require("../analytics.js-integration-google-global-site-tag")}},{"../analytics.js-integration-facebook-pixel":1,"../analytics.js-integration-google-global-site-tag":33,"../analytics.js-integration-sendgrid":69}],129:[function(require,module,exports){arguments[4][2][0].apply(exports,arguments)},{"@ndhoule/arity":130,dup:2}],130:[function(require,module,exports){arguments[4][3][0].apply(exports,arguments)},{dup:3}],131:[function(require,module,exports){arguments[4][72][0].apply(exports,arguments)},{"component-type":170,dup:72}],132:[function(require,module,exports){arguments[4][4][0].apply(exports,arguments)},{"@ndhoule/drop":133,"@ndhoule/rest":141,dup:4}],133:[function(require,module,exports){arguments[4][5][0].apply(exports,arguments)},{dup:5}],134:[function(require,module,exports){arguments[4][6][0].apply(exports,arguments)},{"@ndhoule/keys":138,dup:6}],135:[function(require,module,exports){arguments[4][78][0].apply(exports,arguments)},{dup:78}],136:[function(require,module,exports){arguments[4][8][0].apply(exports,arguments)},{"@ndhoule/each":134,dup:8}],137:[function(require,module,exports){arguments[4][9][0].apply(exports,arguments)},{"@ndhoule/each":134,dup:9}],138:[function(require,module,exports){arguments[4][10][0].apply(exports,arguments)},{dup:10}],139:[function(require,module,exports){arguments[4][11][0].apply(exports,arguments)},{"@ndhoule/each":134,dup:11}],140:[function(require,module,exports){"use strict";var objToString=Object.prototype.toString;var existy=function(val){return val!=null};var isArray=function(val){return objToString.call(val)==="[object Array]"};var isString=function(val){return typeof val==="string"||objToString.call(val)==="[object String]"};var isObject=function(val){return val!=null&&typeof val==="object"};var pick=function pick(props,object){if(!existy(object)||!isObject(object)){return{}}if(isString(props)){props=[props]}if(!isArray(props)){props=[]}var result={};for(var i=0;i<props.length;i+=1){if(isString(props[i])&&props[i]in object){result[props[i]]=object[props[i]]}}return result};module.exports=pick},{}],141:[function(require,module,exports){arguments[4][12][0].apply(exports,arguments)},{dup:12}],142:[function(require,module,exports){(function(global){"use strict";var _analytics=global.analytics;var Alias=require("segmentio-facade").Alias;var Emitter=require("component-emitter");var Group=require("segmentio-facade").Group;var Identify=require("segmentio-facade").Identify;var Page=require("segmentio-facade").Page;var Track=require("segmentio-facade").Track;var after=require("@ndhoule/after");var bindAll=require("bind-all");var clone=require("@ndhoule/clone");var cookie=require("./cookie");var debug=require("debug");var defaults=require("@ndhoule/defaults");var each=require("@ndhoule/each");var foldl=require("@ndhoule/foldl");var group=require("./group");var is=require("is");var isMeta=require("@segment/is-meta");var keys=require("@ndhoule/keys");var memory=require("./memory");var nextTick=require("next-tick");var normalize=require("./normalize");var on=require("component-event").bind;var pageDefaults=require("./pageDefaults");var pick=require("@ndhoule/pick");var prevent=require("@segment/prevent-default");var querystring=require("component-querystring");var store=require("./store");var user=require("./user");var type=require("component-type");function Analytics(){this._options({});this.Integrations={};this._integrations={};this._readied=false;this._timeout=300;this._user=user;this.log=debug("analytics.js");bindAll(this);var self=this;this.on("initialize",function(settings,options){if(options.initialPageview)self.page();self._parseQuery(window.location.search)})}Emitter(Analytics.prototype);Analytics.prototype.use=function(plugin){plugin(this);return this};Analytics.prototype.addIntegration=function(Integration){var name=Integration.prototype.name;if(!name)throw new TypeError("attempted to add an invalid integration");this.Integrations[name]=Integration;return this};Analytics.prototype.init=Analytics.prototype.initialize=function(settings,options){settings=settings||{};options=options||{};this._options(options);this._readied=false;var self=this;each(function(opts,name){var Integration=self.Integrations[name];if(!Integration)delete settings[name]},settings);each(function(opts,name){var Integration=self.Integrations[name];var integration=new Integration(clone(opts));self.log("initialize %o - %o",name,opts);self.add(integration)},settings);var integrations=this._integrations;user.load();group.load();var integrationCount=keys(integrations).length;var ready=after(integrationCount,function(){self._readied=true;self.emit("ready")});if(integrationCount<=0){ready()}this.failedInitializations=[];each(function(integration){if(options.initialPageview&&integration.options.initialPageview===false){integration.page=after(2,integration.page)}integration.analytics=self;integration.once("ready",ready);try{integration.initialize()}catch(e){var integrationName=integration.name;self.failedInitializations.push(integrationName);self.log("Error initializing %s integration: %o",integrationName,e);integration.ready()}},integrations);this.initialized=true;this.emit("initialize",settings,options);return this};Analytics.prototype.setAnonymousId=function(id){this.user().anonymousId(id);return this};Analytics.prototype.add=function(integration){this._integrations[integration.name]=integration;return this};Analytics.prototype.identify=function(id,traits,options,fn){if(is.fn(options))fn=options,options=null;if(is.fn(traits))fn=traits,options=null,traits=null;if(is.object(id))options=traits,traits=id,id=user.id();user.identify(id,traits);var msg=this.normalize({options:options,traits:user.traits(),userId:user.id()});this._invoke("identify",new Identify(msg));this.emit("identify",id,traits,options);this._callback(fn);return this};Analytics.prototype.user=function(){return user};Analytics.prototype.group=function(id,traits,options,fn){if(!arguments.length)return group;if(is.fn(options))fn=options,options=null;if(is.fn(traits))fn=traits,options=null,traits=null;if(is.object(id))options=traits,traits=id,id=group.id();group.identify(id,traits);var msg=this.normalize({options:options,traits:group.traits(),groupId:group.id()});this._invoke("group",new Group(msg));this.emit("group",id,traits,options);this._callback(fn);return this};Analytics.prototype.track=function(event,properties,options,fn){if(is.fn(options))fn=options,options=null;if(is.fn(properties))fn=properties,options=null,properties=null;var plan=this.options.plan||{};var events=plan.track||{};var msg=this.normalize({properties:properties,options:options,event:event});plan=events[event];if(plan){this.log("plan %o - %o",event,plan);if(plan.enabled===false){defaults(msg.integrations,{All:false,"Segment.io":true})}else{defaults(msg.integrations,plan.integrations||{})}}else{var defaultPlan=events.__default||{enabled:true};if(!defaultPlan.enabled){defaults(msg.integrations,{All:false,"Segment.io":true})}}this._invoke("track",new Track(msg));this.emit("track",event,properties,options);this._callback(fn);return this};Analytics.prototype.trackClick=Analytics.prototype.trackLink=function(links,event,properties){if(!links)return this;if(type(links)==="element")links=[links];var self=this;each(function(el){if(type(el)!=="element"){throw new TypeError("Must pass HTMLElement to `analytics.trackLink`.")}on(el,"click",function(e){var ev=is.fn(event)?event(el):event;var props=is.fn(properties)?properties(el):properties;var href=el.getAttribute("href")||el.getAttributeNS("http://www.w3.org/1999/xlink","href")||el.getAttribute("xlink:href");self.track(ev,props);if(href&&el.target!=="_blank"&&!isMeta(e)){prevent(e);self._callback(function(){window.location.href=href})}})},links);return this};Analytics.prototype.trackSubmit=Analytics.prototype.trackForm=function(forms,event,properties){if(!forms)return this;if(type(forms)==="element")forms=[forms];var self=this;each(function(el){if(type(el)!=="element")throw new TypeError("Must pass HTMLElement to `analytics.trackForm`.");function handler(e){prevent(e);var ev=is.fn(event)?event(el):event;var props=is.fn(properties)?properties(el):properties;self.track(ev,props);self._callback(function(){el.submit()})}var $=window.jQuery||window.Zepto;if($){$(el).submit(handler)}else{on(el,"submit",handler)}},forms);return this};Analytics.prototype.page=function(category,name,properties,options,fn){if(is.fn(options))fn=options,options=null;if(is.fn(properties))fn=properties,options=properties=null;if(is.fn(name))fn=name,options=properties=name=null;if(type(category)==="object")options=name,properties=category,name=category=null;if(type(name)==="object")options=properties,properties=name,name=null;if(type(category)==="string"&&type(name)!=="string")name=category,category=null;properties=clone(properties)||{};if(name)properties.name=name;if(category)properties.category=category;var defs=pageDefaults();defaults(properties,defs);var overrides=pick(keys(defs),properties);if(!is.empty(overrides)){options=options||{};options.context=options.context||{};options.context.page=overrides}var msg=this.normalize({properties:properties,category:category,options:options,name:name});this._invoke("page",new Page(msg));this.emit("page",category,name,properties,options);this._callback(fn);return this};Analytics.prototype.pageview=function(url){var properties={};if(url)properties.path=url;this.page(properties);return this};Analytics.prototype.alias=function(to,from,options,fn){if(is.fn(options))fn=options,options=null;if(is.fn(from))fn=from,options=null,from=null;if(is.object(from))options=from,from=null;var msg=this.normalize({options:options,previousId:from,userId:to});this._invoke("alias",new Alias(msg));this.emit("alias",to,from,options);this._callback(fn);return this};Analytics.prototype.ready=function(fn){if(is.fn(fn)){if(this._readied){nextTick(fn)}else{this.once("ready",fn)}}return this};Analytics.prototype.timeout=function(timeout){this._timeout=timeout};Analytics.prototype.debug=function(str){if(!arguments.length||str){debug.enable("analytics:"+(str||"*"))}else{debug.disable()}};Analytics.prototype._options=function(options){options=options||{};this.options=options;cookie.options(options.cookie);store.options(options.localStorage);user.options(options.user);group.options(options.group);return this};Analytics.prototype._callback=function(fn){if(is.fn(fn)){this._timeout?setTimeout(fn,this._timeout):nextTick(fn)}return this};Analytics.prototype._invoke=function(method,facade){var self=this;this.emit("invoke",facade);var failedInitializations=self.failedInitializations||[];each(function(integration,name){if(!facade.enabled(name))return;if(failedInitializations.indexOf(name)>=0){self.log("Skipping invokation of .%s method of %s integration. Integation failed to initialize properly.",method,name)}else{integration.invoke.call(integration,method,facade)}},this._integrations);return this};Analytics.prototype.push=function(args){var method=args.shift();if(!this[method])return;this[method].apply(this,args)};Analytics.prototype.reset=function(){this.user().logout();this.group().logout()};Analytics.prototype._parseQuery=function(query){var q=querystring.parse(query);var traits=pickPrefix("ajs_trait_",q);var props=pickPrefix("ajs_prop_",q);if(q.ajs_uid)this.identify(q.ajs_uid,traits);if(q.ajs_event)this.track(q.ajs_event,props);if(q.ajs_aid)user.anonymousId(q.ajs_aid);return this;function pickPrefix(prefix,object){var length=prefix.length;var sub;return foldl(function(acc,val,key){if(key.substr(0,length)===prefix){sub=key.substr(length);acc[sub]=val}return acc},{},object)}};Analytics.prototype.normalize=function(msg){msg=normalize(msg,keys(this._integrations));if(msg.anonymousId)user.anonymousId(msg.anonymousId);msg.anonymousId=user.anonymousId();msg.context.page=defaults(msg.context.page||{},pageDefaults());return msg};Analytics.prototype.noConflict=function(){window.analytics=_analytics;return this};module.exports=Analytics;module.exports.cookie=cookie;module.exports.memory=memory;module.exports.store=store}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./cookie":143,"./group":145,"./memory":147,"./normalize":148,"./pageDefaults":149,"./store":150,"./user":151,"@ndhoule/after":129,"@ndhoule/clone":131,"@ndhoule/defaults":132,"@ndhoule/each":134,"@ndhoule/foldl":136,"@ndhoule/keys":138,"@ndhoule/pick":140,"@segment/is-meta":154,"@segment/prevent-default":157,"bind-all":160,"component-emitter":165,"component-event":166,"component-querystring":168,"component-type":170,debug:172,is:175,"next-tick":181,"segmentio-facade":189}],143:[function(require,module,exports){"use strict";var bindAll=require("bind-all");var clone=require("@ndhoule/clone");var cookie=require("component-cookie");var debug=require("debug")("analytics.js:cookie");var defaults=require("@ndhoule/defaults");var json=require("json3");var topDomain=require("@segment/top-domain");function Cookie(options){this.options(options)}Cookie.prototype.options=function(options){if(arguments.length===0)return this._options;options=options||{};var domain="."+topDomain(window.location.href);if(domain===".")domain=null;this._options=defaults(options,{maxage:31536e6,path:"/",domain:domain});this.set("ajs:test",true);if(!this.get("ajs:test")){debug("fallback to domain=null");this._options.domain=null}this.remove("ajs:test")};Cookie.prototype.set=function(key,value){try{value=json.stringify(value);cookie(key,value,clone(this._options));return true}catch(e){return false}};Cookie.prototype.get=function(key){try{var value=cookie(key);value=value?json.parse(value):null;return value}catch(e){return null}};Cookie.prototype.remove=function(key){try{cookie(key,null,clone(this._options));return true}catch(e){return false}};module.exports=bindAll(new Cookie);module.exports.Cookie=Cookie},{"@ndhoule/clone":131,"@ndhoule/defaults":132,"@segment/top-domain":159,"bind-all":160,"component-cookie":162,debug:172,json3:176}],144:[function(require,module,exports){"use strict";var clone=require("@ndhoule/clone");var cookie=require("./cookie");var debug=require("debug")("analytics:entity");var defaults=require("@ndhoule/defaults");var extend=require("@ndhoule/extend");var memory=require("./memory");var store=require("./store");var isodateTraverse=require("@segment/isodate-traverse");module.exports=Entity;function Entity(options){this.options(options);this.initialize()}Entity.prototype.initialize=function(){cookie.set("ajs:cookies",true);if(cookie.get("ajs:cookies")){cookie.remove("ajs:cookies");this._storage=cookie;return}if(store.enabled){this._storage=store;return}debug("warning using memory store both cookies and localStorage are disabled");this._storage=memory};Entity.prototype.storage=function(){return this._storage};Entity.prototype.options=function(options){if(arguments.length===0)return this._options;this._options=defaults(options||{},this.defaults||{})};Entity.prototype.id=function(id){switch(arguments.length){case 0:return this._getId();case 1:return this._setId(id);default:}};Entity.prototype._getId=function(){var ret=this._options.persist?this.storage().get(this._options.cookie.key):this._id;return ret===undefined?null:ret};Entity.prototype._setId=function(id){if(this._options.persist){this.storage().set(this._options.cookie.key,id)}else{this._id=id}};Entity.prototype.properties=Entity.prototype.traits=function(traits){switch(arguments.length){case 0:return this._getTraits();case 1:return this._setTraits(traits);default:}};Entity.prototype._getTraits=function(){var ret=this._options.persist?store.get(this._options.localStorage.key):this._traits;return ret?isodateTraverse(clone(ret)):{}};Entity.prototype._setTraits=function(traits){traits=traits||{};if(this._options.persist){store.set(this._options.localStorage.key,traits)}else{this._traits=traits}};Entity.prototype.identify=function(id,traits){traits=traits||{};var current=this.id();if(current===null||current===id)traits=extend(this.traits(),traits);if(id)this.id(id);this.debug("identify %o, %o",id,traits);this.traits(traits);this.save()};Entity.prototype.save=function(){if(!this._options.persist)return false;cookie.set(this._options.cookie.key,this.id());store.set(this._options.localStorage.key,this.traits());return true};Entity.prototype.logout=function(){this.id(null);this.traits({});cookie.remove(this._options.cookie.key);store.remove(this._options.localStorage.key)};Entity.prototype.reset=function(){this.logout();this.options({})};Entity.prototype.load=function(){this.id(cookie.get(this._options.cookie.key));this.traits(store.get(this._options.localStorage.key))}},{"./cookie":143,"./memory":147,"./store":150,"@ndhoule/clone":131,"@ndhoule/defaults":132,"@ndhoule/extend":135,"@segment/isodate-traverse":155,debug:172}],145:[function(require,module,exports){"use strict";var Entity=require("./entity");var bindAll=require("bind-all");var debug=require("debug")("analytics:group");var inherit=require("inherits");Group.defaults={persist:true,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}};function Group(options){this.defaults=Group.defaults;this.debug=debug;Entity.call(this,options)}inherit(Group,Entity);module.exports=bindAll(new Group);module.exports.Group=Group},{"./entity":144,"bind-all":160,debug:172,inherits:173}],146:[function(require,module,exports){"use strict";var Analytics=require("./analytics");var analytics=new Analytics;analytics.require=require;analytics.VERSION=require("../package.json").version;module.exports=analytics},{"../package.json":152,"./analytics":142}],147:[function(require,module,exports){"use strict";var bindAll=require("bind-all");var clone=require("@ndhoule/clone");var has=Object.prototype.hasOwnProperty;module.exports=bindAll(new Memory);function Memory(){this.store={}}Memory.prototype.set=function(key,value){this.store[key]=clone(value);return true};Memory.prototype.get=function(key){if(!has.call(this.store,key))return;return clone(this.store[key])};Memory.prototype.remove=function(key){delete this.store[key];return true}},{"@ndhoule/clone":131,"bind-all":160}],148:[function(require,module,exports){"use strict";var debug=require("debug")("analytics.js:normalize");var defaults=require("@ndhoule/defaults");var each=require("@ndhoule/each");var includes=require("@ndhoule/includes");var map=require("@ndhoule/map");var type=require("component-type");var has=Object.prototype.hasOwnProperty;module.exports=normalize;var toplevel=["integrations","anonymousId","timestamp","context"];function normalize(msg,list){var lower=map(function(s){return s.toLowerCase()},list);var opts=msg.options||{};var integrations=opts.integrations||{};var providers=opts.providers||{};var context=opts.context||{};var ret={};debug("<-",msg);each(function(value,key){if(!integration(key))return;if(!has.call(integrations,key))integrations[key]=value;delete opts[key]},opts);delete opts.providers;each(function(value,key){if(!integration(key))return;if(type(integrations[key])==="object")return;if(has.call(integrations,key)&&typeof providers[key]==="boolean")return;integrations[key]=value},providers);each(function(value,key){if(includes(key,toplevel)){ret[key]=opts[key]}else{context[key]=opts[key]}},opts);delete msg.options;ret.integrations=integrations;ret.context=context;ret=defaults(ret,msg);debug("->",ret);return ret;function integration(name){return!!(includes(name,list)||name.toLowerCase()==="all"||includes(name.toLowerCase(),lower))}}},{"@ndhoule/defaults":132,"@ndhoule/each":134,"@ndhoule/includes":137,"@ndhoule/map":139,"component-type":170,debug:172}],149:[function(require,module,exports){"use strict";var canonical=require("@segment/canonical");var includes=require("@ndhoule/includes");var url=require("component-url");function pageDefaults(){return{path:canonicalPath(),referrer:document.referrer,search:location.search,title:document.title,url:canonicalUrl(location.search)}}function canonicalPath(){var canon=canonical();if(!canon)return window.location.pathname;var parsed=url.parse(canon);return parsed.pathname}function canonicalUrl(search){var canon=canonical();if(canon)return includes("?",canon)?canon:canon+search;var url=window.location.href;var i=url.indexOf("#");return i===-1?url:url.slice(0,i)}module.exports=pageDefaults},{"@ndhoule/includes":137,"@segment/canonical":153,"component-url":171}],150:[function(require,module,exports){"use strict";var bindAll=require("bind-all");var defaults=require("@ndhoule/defaults");var store=require("@segment/store");function Store(options){this.options(options)}Store.prototype.options=function(options){if(arguments.length===0)return this._options;options=options||{};defaults(options,{enabled:true});this.enabled=options.enabled&&store.enabled;this._options=options};Store.prototype.set=function(key,value){if(!this.enabled)return false;return store.set(key,value)};Store.prototype.get=function(key){if(!this.enabled)return null;return store.get(key)};Store.prototype.remove=function(key){if(!this.enabled)return false;return store.remove(key)};module.exports=bindAll(new Store);module.exports.Store=Store},{"@ndhoule/defaults":132,"@segment/store":158,"bind-all":160}],151:[function(require,module,exports){"use strict";var Entity=require("./entity");var bindAll=require("bind-all");var cookie=require("./cookie");var debug=require("debug")("analytics:user");var inherit=require("inherits");var rawCookie=require("component-cookie");var uuid=require("uuid");User.defaults={persist:true,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}};function User(options){this.defaults=User.defaults;this.debug=debug;Entity.call(this,options)}inherit(User,Entity);User.prototype.id=function(id){var prev=this._getId();var ret=Entity.prototype.id.apply(this,arguments);if(prev==null)return ret;if(prev!=id&&id)this.anonymousId(null);return ret};User.prototype.anonymousId=function(anonymousId){var store=this.storage();if(arguments.length){store.set("ajs_anonymous_id",anonymousId);return this}anonymousId=store.get("ajs_anonymous_id");if(anonymousId){return anonymousId}anonymousId=rawCookie("_sio");if(anonymousId){anonymousId=anonymousId.split("----")[0];store.set("ajs_anonymous_id",anonymousId);store.remove("_sio");return anonymousId}anonymousId=uuid.v4();store.set("ajs_anonymous_id",anonymousId);return store.get("ajs_anonymous_id")};User.prototype.logout=function(){Entity.prototype.logout.call(this);this.anonymousId(null)};User.prototype.load=function(){if(this._loadOldCookie())return;Entity.prototype.load.call(this)};User.prototype._loadOldCookie=function(){var user=cookie.get(this._options.cookie.oldKey);if(!user)return false;this.id(user.id);this.traits(user.traits);cookie.remove(this._options.cookie.oldKey);return true};module.exports=bindAll(new User);module.exports.User=User},{"./cookie":143,"./entity":144,"bind-all":160,"component-cookie":162,debug:172,inherits:173,uuid:199}],152:[function(require,module,exports){module.exports={_args:[["@segment/analytics.js-core@3.2.5","/Users/jchang/work/sendgridlabs/sendgrid-js"]],_from:"@segment/analytics.js-core@3.2.5",_id:"@segment/analytics.js-core@3.2.5",_inBundle:false,_integrity:"sha1-269R1OsXop8y6rX/8+ZVqH8j6lI=",_location:"/@segment/analytics.js-core",_phantomChildren:{},_requested:{type:"version",registry:true,raw:"@segment/analytics.js-core@3.2.5",name:"@segment/analytics.js-core",escapedName:"@segment%2fanalytics.js-core",scope:"@segment",rawSpec:"3.2.5",saveSpec:null,fetchSpec:"3.2.5"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/@segment/analytics.js-core/-/analytics.js-core-3.2.5.tgz",_spec:"3.2.5",_where:"/Users/jchang/work/sendgridlabs/sendgrid-js",author:{name:"Segment",email:"friends@segment.com"},bugs:{url:"https://github.com/segmentio/analytics.js-core/issues"},dependencies:{"@ndhoule/after":"^1.0.0","@ndhoule/clone":"^1.0.0","@ndhoule/defaults":"^2.0.1","@ndhoule/each":"^2.0.1","@ndhoule/extend":"^2.0.0","@ndhoule/foldl":"^2.0.1","@ndhoule/includes":"^2.0.1","@ndhoule/keys":"^2.0.0","@ndhoule/map":"^2.0.1","@ndhoule/pick":"^2.0.0","@segment/canonical":"^1.0.0","@segment/is-meta":"^1.0.0","@segment/isodate":"^1.0.2","@segment/isodate-traverse":"^1.0.1","@segment/prevent-default":"^1.0.0","@segment/store":"^1.3.20","@segment/top-domain":"^3.0.0","bind-all":"^1.0.0","component-cookie":"^1.1.2","component-emitter":"^1.2.1","component-event":"^0.1.4","component-querystring":"^2.0.0","component-type":"^1.2.1","component-url":"^0.2.1",debug:"^0.7.4",inherits:"^2.0.1",install:"^0.7.3",is:"^3.1.0",json3:"^3.3.2","new-date":"^1.0.0","next-tick":"^0.2.2","segmentio-facade":"^3.0.2",uuid:"^2.0.2"},description:"The hassle-free way to integrate analytics into any web application.",devDependencies:{"@segment/analytics.js-integration":"^3.2.0","@segment/eslint-config":"^3.1.1",browserify:"13.0.0","compat-trigger-event":"^1.0.0","component-each":"^0.2.6",eslint:"^2.9.0","eslint-plugin-mocha":"^2.2.0","eslint-plugin-require-path-exists":"^1.1.5",jquery:"^3.2.1",karma:"1.3.0","karma-browserify":"^5.0.4","karma-chrome-launcher":"^1.0.1","karma-coverage":"^1.0.0","karma-junit-reporter":"^1.0.0","karma-mocha":"1.0.1","karma-phantomjs-launcher":"^1.0.0","karma-sauce-launcher":"^1.0.0","karma-spec-reporter":"0.0.26",mocha:"^2.2.5","phantomjs-prebuilt":"^2.1.7",proclaim:"^3.4.1",sinon:"^1.7.3",watchify:"^3.7.0"},homepage:"https://github.com/segmentio/analytics.js-core#readme",keywords:["analytics","analytics.js","segment","segment.io"],license:"SEE LICENSE IN LICENSE",main:"lib/index.js",name:"@segment/analytics.js-core",repository:{type:"git",url:"git+https://github.com/segmentio/analytics.js-core.git"},scripts:{test:"make test"},version:"3.2.5"}},{}],153:[function(require,module,exports){"use strict";function canonical(){var tags=document.getElementsByTagName("link");for(var i=0,tag;tag=tags[i];i++){if(tag.getAttribute("rel")==="canonical"){return tag.getAttribute("href")}}}module.exports=canonical},{}],154:[function(require,module,exports){"use strict";function isMeta(e){if(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey){return true}var which=e.which;var button=e.button;if(!which&&button!==undefined){return!button&1&&!button&2&&button&4}else if(which===2){return true}return false}module.exports=isMeta},{}],155:[function(require,module,exports){"use strict";var type=require("component-type");var each=require("component-each");var isodate=require("@segment/isodate");module.exports=traverse;function traverse(input,strict){if(strict===undefined)strict=true;if(type(input)==="object")return object(input,strict);if(type(input)==="array")return array(input,strict);return input}function object(obj,strict){if(obj.length&&typeof obj.length==="number"&&!(obj.length-1 in obj)){obj.lengthNonArray=obj.length;delete obj.length}each(obj,function(key,val){if(isodate.is(val,strict)){obj[key]=isodate.parse(val)}else if(type(val)==="object"||type(val)==="array"){traverse(val,strict)}});if(obj.lengthNonArray){obj.length=obj.lengthNonArray;delete obj.lengthNonArray}return obj}function array(arr,strict){each(arr,function(val,x){if(type(val)==="object"){traverse(val,strict)}else if(isodate.is(val,strict)){arr[x]=isodate.parse(val)}});return arr}},{"@segment/isodate":156,"component-each":163,"component-type":170}],156:[function(require,module,exports){"use strict";var matcher=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;exports.parse=function(iso){var numericKeys=[1,5,6,7,11,12];var arr=matcher.exec(iso);var offset=0;if(!arr){return new Date(iso)}for(var i=0,val;val=numericKeys[i];i++){arr[val]=parseInt(arr[val],10)||0}arr[2]=parseInt(arr[2],10)||1;arr[3]=parseInt(arr[3],10)||1;arr[2]--;arr[8]=arr[8]?(arr[8]+"00").substring(0,3):0;if(arr[4]===" "){offset=(new Date).getTimezoneOffset()}else if(arr[9]!=="Z"&&arr[10]){offset=arr[11]*60+arr[12];if(arr[10]==="+"){offset=0-offset}}var millis=Date.UTC(arr[1],arr[2],arr[3],arr[5],arr[6]+offset,arr[7],arr[8]);return new Date(millis)};exports.is=function(string,strict){if(typeof string!=="string"){return false}if(strict&&/^\d{4}-\d{2}-\d{2}/.test(string)===false){return false}return matcher.test(string)}},{}],157:[function(require,module,exports){"use strict";function preventDefault(e){e=e||window.event;return e.preventDefault?e.preventDefault():e.returnValue=false}module.exports=preventDefault},{}],158:[function(require,module,exports){(function(global){"use strict";var JSON=require("json3");module.exports=function(){var store={},win=typeof window!="undefined"?window:global,doc=win.document,localStorageName="localStorage",scriptTag="script",storage;store.disabled=false;store.version="1.3.20";store.set=function(key,value){};store.get=function(key,defaultVal){};store.has=function(key){return store.get(key)!==undefined};store.remove=function(key){};store.clear=function(){};store.transact=function(key,defaultVal,transactionFn){if(transactionFn==null){transactionFn=defaultVal;defaultVal=null}if(defaultVal==null){defaultVal={}}var val=store.get(key,defaultVal);transactionFn(val);store.set(key,val)};store.getAll=function(){var ret={};store.forEach(function(key,val){ret[key]=val});return ret};store.forEach=function(){};store.serialize=function(value){return JSON.stringify(value)};store.deserialize=function(value){if(typeof value!="string"){return undefined}try{return JSON.parse(value)}catch(e){return value||undefined}};function isLocalStorageNameSupported(){try{return localStorageName in win&&win[localStorageName]}catch(err){return false}}if(isLocalStorageNameSupported()){storage=win[localStorageName];store.set=function(key,val){if(val===undefined){return store.remove(key)}storage.setItem(key,store.serialize(val));return val};store.get=function(key,defaultVal){var val=store.deserialize(storage.getItem(key));return val===undefined?defaultVal:val};store.remove=function(key){storage.removeItem(key)};store.clear=function(){storage.clear()};store.forEach=function(callback){for(var i=0;i<storage.length;i++){var key=storage.key(i);callback(key,store.get(key))}}}else if(doc&&doc.documentElement.addBehavior){var storageOwner,storageContainer;try{storageContainer=new ActiveXObject("htmlfile");storageContainer.open();storageContainer.write("<"+scriptTag+">document.w=window</"+scriptTag+'><iframe src="/favicon.ico"></iframe>');storageContainer.close();storageOwner=storageContainer.w.frames[0].document;storage=storageOwner.createElement("div")}catch(e){storage=doc.createElement("div");storageOwner=doc.body}var withIEStorage=function(storeFunction){return function(){var args=Array.prototype.slice.call(arguments,0);args.unshift(storage);storageOwner.appendChild(storage);storage.addBehavior("#default#userData");storage.load(localStorageName);var result=storeFunction.apply(store,args);storageOwner.removeChild(storage);return result}};var forbiddenCharsRegex=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");var ieKeyFix=function(key){return key.replace(/^d/,"___$&").replace(forbiddenCharsRegex,"___")};store.set=withIEStorage(function(storage,key,val){key=ieKeyFix(key);if(val===undefined){return store.remove(key)}storage.setAttribute(key,store.serialize(val));storage.save(localStorageName);return val});store.get=withIEStorage(function(storage,key,defaultVal){key=ieKeyFix(key);var val=store.deserialize(storage.getAttribute(key));return val===undefined?defaultVal:val})
;store.remove=withIEStorage(function(storage,key){key=ieKeyFix(key);storage.removeAttribute(key);storage.save(localStorageName)});store.clear=withIEStorage(function(storage){var attributes=storage.XMLDocument.documentElement.attributes;storage.load(localStorageName);for(var i=attributes.length-1;i>=0;i--){storage.removeAttribute(attributes[i].name)}storage.save(localStorageName)});store.forEach=withIEStorage(function(storage,callback){var attributes=storage.XMLDocument.documentElement.attributes;for(var i=0,attr;attr=attributes[i];++i){callback(attr.name,store.deserialize(storage.getAttribute(attr.name)))}})}try{var testKey="__storejs__";store.set(testKey,testKey);if(store.get(testKey)!=testKey){store.disabled=true}store.remove(testKey)}catch(e){store.disabled=true}store.enabled=!store.disabled;return store}()}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{json3:176}],159:[function(require,module,exports){arguments[4][93][0].apply(exports,arguments)},{"component-cookie":162,"component-url":171,dup:93}],160:[function(require,module,exports){"use strict";var bind=require("component-bind");function bindAll(obj){for(var key in obj){var val=obj[key];if(typeof val==="function"){obj[key]=bind(obj,obj[key])}}return obj}module.exports=bindAll},{"component-bind":161}],161:[function(require,module,exports){arguments[4][19][0].apply(exports,arguments)},{dup:19}],162:[function(require,module,exports){arguments[4][97][0].apply(exports,arguments)},{debug:172,dup:97}],163:[function(require,module,exports){arguments[4][101][0].apply(exports,arguments)},{"component-type":164,dup:101,"to-function":195,type:164}],164:[function(require,module,exports){arguments[4][102][0].apply(exports,arguments)},{dup:102}],165:[function(require,module,exports){arguments[4][20][0].apply(exports,arguments)},{dup:20}],166:[function(require,module,exports){var bind=window.addEventListener?"addEventListener":"attachEvent",unbind=window.removeEventListener?"removeEventListener":"detachEvent",prefix=bind!=="addEventListener"?"on":"";exports.bind=function(el,type,fn,capture){el[bind](prefix+type,fn,capture||false);return fn};exports.unbind=function(el,type,fn,capture){el[unbind](prefix+type,fn,capture||false);return fn}},{}],167:[function(require,module,exports){arguments[4][104][0].apply(exports,arguments)},{dup:104}],168:[function(require,module,exports){arguments[4][105][0].apply(exports,arguments)},{dup:105,trim:196,type:169}],169:[function(require,module,exports){arguments[4][106][0].apply(exports,arguments)},{dup:106}],170:[function(require,module,exports){arguments[4][21][0].apply(exports,arguments)},{dup:21}],171:[function(require,module,exports){arguments[4][107][0].apply(exports,arguments)},{dup:107}],172:[function(require,module,exports){module.exports=debug;function debug(name){if(!debug.enabled(name))return function(){};return function(fmt){fmt=coerce(fmt);var curr=new Date;var ms=curr-(debug[name]||curr);debug[name]=curr;fmt=name+" "+fmt+" +"+debug.humanize(ms);window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}}debug.names=[];debug.skips=[];debug.enable=function(name){try{localStorage.debug=name}catch(e){}var split=(name||"").split(/[\s,]+/),len=split.length;for(var i=0;i<len;i++){name=split[i].replace("*",".*?");if(name[0]==="-"){debug.skips.push(new RegExp("^"+name.substr(1)+"$"))}else{debug.names.push(new RegExp("^"+name+"$"))}}};debug.disable=function(){debug.enable("")};debug.humanize=function(ms){var sec=1e3,min=60*1e3,hour=60*min;if(ms>=hour)return(ms/hour).toFixed(1)+"h";if(ms>=min)return(ms/min).toFixed(1)+"m";if(ms>=sec)return(ms/sec|0)+"s";return ms+"ms"};debug.enabled=function(name){for(var i=0,len=debug.skips.length;i<len;i++){if(debug.skips[i].test(name)){return false}}for(var i=0,len=debug.names.length;i<len;i++){if(debug.names[i].test(name)){return true}}return false};function coerce(val){if(val instanceof Error)return val.stack||val.message;return val}try{if(window.localStorage)debug.enable(localStorage.debug)}catch(e){}},{}],173:[function(require,module,exports){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}else{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],174:[function(require,module,exports){module.exports=function isEmail(string){return/.+\@.+\..+/.test(string)}},{}],175:[function(require,module,exports){"use strict";var objProto=Object.prototype;var owns=objProto.hasOwnProperty;var toStr=objProto.toString;var symbolValueOf;if(typeof Symbol==="function"){symbolValueOf=Symbol.prototype.valueOf}var isActualNaN=function(value){return value!==value};var NON_HOST_TYPES={boolean:1,number:1,string:1,undefined:1};var base64Regex=/^([A-Za-z0-9+\/]{4})*([A-Za-z0-9+\/]{4}|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{2}==)$/;var hexRegex=/^[A-Fa-f0-9]+$/;var is={};is.a=is.type=function(value,type){return typeof value===type};is.defined=function(value){return typeof value!=="undefined"};is.empty=function(value){var type=toStr.call(value);var key;if(type==="[object Array]"||type==="[object Arguments]"||type==="[object String]"){return value.length===0}if(type==="[object Object]"){for(key in value){if(owns.call(value,key)){return false}}return true}return!value};is.equal=function equal(value,other){if(value===other){return true}var type=toStr.call(value);var key;if(type!==toStr.call(other)){return false}if(type==="[object Object]"){for(key in value){if(!is.equal(value[key],other[key])||!(key in other)){return false}}for(key in other){if(!is.equal(value[key],other[key])||!(key in value)){return false}}return true}if(type==="[object Array]"){key=value.length;if(key!==other.length){return false}while(key--){if(!is.equal(value[key],other[key])){return false}}return true}if(type==="[object Function]"){return value.prototype===other.prototype}if(type==="[object Date]"){return value.getTime()===other.getTime()}return false};is.hosted=function(value,host){var type=typeof host[value];return type==="object"?!!host[value]:!NON_HOST_TYPES[type]};is.instance=is["instanceof"]=function(value,constructor){return value instanceof constructor};is.nil=is["null"]=function(value){return value===null};is.undef=is.undefined=function(value){return typeof value==="undefined"};is.args=is.arguments=function(value){var isStandardArguments=toStr.call(value)==="[object Arguments]";var isOldArguments=!is.array(value)&&is.arraylike(value)&&is.object(value)&&is.fn(value.callee);return isStandardArguments||isOldArguments};is.array=Array.isArray||function(value){return toStr.call(value)==="[object Array]"};is.args.empty=function(value){return is.args(value)&&value.length===0};is.array.empty=function(value){return is.array(value)&&value.length===0};is.arraylike=function(value){return!!value&&!is.bool(value)&&owns.call(value,"length")&&isFinite(value.length)&&is.number(value.length)&&value.length>=0};is.bool=is["boolean"]=function(value){return toStr.call(value)==="[object Boolean]"};is["false"]=function(value){return is.bool(value)&&Boolean(Number(value))===false};is["true"]=function(value){return is.bool(value)&&Boolean(Number(value))===true};is.date=function(value){return toStr.call(value)==="[object Date]"};is.date.valid=function(value){return is.date(value)&&!isNaN(Number(value))};is.element=function(value){return value!==undefined&&typeof HTMLElement!=="undefined"&&value instanceof HTMLElement&&value.nodeType===1};is.error=function(value){return toStr.call(value)==="[object Error]"};is.fn=is["function"]=function(value){var isAlert=typeof window!=="undefined"&&value===window.alert;if(isAlert){return true}var str=toStr.call(value);return str==="[object Function]"||str==="[object GeneratorFunction]"||str==="[object AsyncFunction]"};is.number=function(value){return toStr.call(value)==="[object Number]"};is.infinite=function(value){return value===Infinity||value===-Infinity};is.decimal=function(value){return is.number(value)&&!isActualNaN(value)&&!is.infinite(value)&&value%1!==0};is.divisibleBy=function(value,n){var isDividendInfinite=is.infinite(value);var isDivisorInfinite=is.infinite(n);var isNonZeroNumber=is.number(value)&&!isActualNaN(value)&&is.number(n)&&!isActualNaN(n)&&n!==0;return isDividendInfinite||isDivisorInfinite||isNonZeroNumber&&value%n===0};is.integer=is["int"]=function(value){return is.number(value)&&!isActualNaN(value)&&value%1===0};is.maximum=function(value,others){if(isActualNaN(value)){throw new TypeError("NaN is not a valid value")}else if(!is.arraylike(others)){throw new TypeError("second argument must be array-like")}var len=others.length;while(--len>=0){if(value<others[len]){return false}}return true};is.minimum=function(value,others){if(isActualNaN(value)){throw new TypeError("NaN is not a valid value")}else if(!is.arraylike(others)){throw new TypeError("second argument must be array-like")}var len=others.length;while(--len>=0){if(value>others[len]){return false}}return true};is.nan=function(value){return!is.number(value)||value!==value};is.even=function(value){return is.infinite(value)||is.number(value)&&value===value&&value%2===0};is.odd=function(value){return is.infinite(value)||is.number(value)&&value===value&&value%2!==0};is.ge=function(value,other){if(isActualNaN(value)||isActualNaN(other)){throw new TypeError("NaN is not a valid value")}return!is.infinite(value)&&!is.infinite(other)&&value>=other};is.gt=function(value,other){if(isActualNaN(value)||isActualNaN(other)){throw new TypeError("NaN is not a valid value")}return!is.infinite(value)&&!is.infinite(other)&&value>other};is.le=function(value,other){if(isActualNaN(value)||isActualNaN(other)){throw new TypeError("NaN is not a valid value")}return!is.infinite(value)&&!is.infinite(other)&&value<=other};is.lt=function(value,other){if(isActualNaN(value)||isActualNaN(other)){throw new TypeError("NaN is not a valid value")}return!is.infinite(value)&&!is.infinite(other)&&value<other};is.within=function(value,start,finish){if(isActualNaN(value)||isActualNaN(start)||isActualNaN(finish)){throw new TypeError("NaN is not a valid value")}else if(!is.number(value)||!is.number(start)||!is.number(finish)){throw new TypeError("all arguments must be numbers")}var isAnyInfinite=is.infinite(value)||is.infinite(start)||is.infinite(finish);return isAnyInfinite||value>=start&&value<=finish};is.object=function(value){return toStr.call(value)==="[object Object]"};is.primitive=function isPrimitive(value){if(!value){return true}if(typeof value==="object"||is.object(value)||is.fn(value)||is.array(value)){return false}return true};is.hash=function(value){return is.object(value)&&value.constructor===Object&&!value.nodeType&&!value.setInterval};is.regexp=function(value){return toStr.call(value)==="[object RegExp]"};is.string=function(value){return toStr.call(value)==="[object String]"};is.base64=function(value){return is.string(value)&&(!value.length||base64Regex.test(value))};is.hex=function(value){return is.string(value)&&(!value.length||hexRegex.test(value))};is.symbol=function(value){return typeof Symbol==="function"&&toStr.call(value)==="[object Symbol]"&&typeof symbolValueOf.call(value)==="symbol"};module.exports=is},{}],176:[function(require,module,exports){(function(global){(function(){var isLoader=typeof define==="function"&&define.amd;var objectTypes={function:true,object:true};var freeExports=objectTypes[typeof exports]&&exports&&!exports.nodeType&&exports;var root=objectTypes[typeof window]&&window||this,freeGlobal=freeExports&&objectTypes[typeof module]&&module&&!module.nodeType&&typeof global=="object"&&global;if(freeGlobal&&(freeGlobal["global"]===freeGlobal||freeGlobal["window"]===freeGlobal||freeGlobal["self"]===freeGlobal)){root=freeGlobal}function runInContext(context,exports){context||(context=root["Object"]());exports||(exports=root["Object"]());var Number=context["Number"]||root["Number"],String=context["String"]||root["String"],Object=context["Object"]||root["Object"],Date=context["Date"]||root["Date"],SyntaxError=context["SyntaxError"]||root["SyntaxError"],TypeError=context["TypeError"]||root["TypeError"],Math=context["Math"]||root["Math"],nativeJSON=context["JSON"]||root["JSON"];if(typeof nativeJSON=="object"&&nativeJSON){exports.stringify=nativeJSON.stringify;exports.parse=nativeJSON.parse}var objectProto=Object.prototype,getClass=objectProto.toString,isProperty,forEach,undef;var isExtended=new Date(-0xc782b5b800cec);try{isExtended=isExtended.getUTCFullYear()==-109252&&isExtended.getUTCMonth()===0&&isExtended.getUTCDate()===1&&isExtended.getUTCHours()==10&&isExtended.getUTCMinutes()==37&&isExtended.getUTCSeconds()==6&&isExtended.getUTCMilliseconds()==708}catch(exception){}function has(name){if(has[name]!==undef){return has[name]}var isSupported;if(name=="bug-string-char-index"){isSupported="a"[0]!="a"}else if(name=="json"){isSupported=has("json-stringify")&&has("json-parse")}else{var value,serialized='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if(name=="json-stringify"){var stringify=exports.stringify,stringifySupported=typeof stringify=="function"&&isExtended;if(stringifySupported){(value=function(){return 1}).toJSON=value;try{stringifySupported=stringify(0)==="0"&&stringify(new Number)==="0"&&stringify(new String)=='""'&&stringify(getClass)===undef&&stringify(undef)===undef&&stringify()===undef&&stringify(value)==="1"&&stringify([value])=="[1]"&&stringify([undef])=="[null]"&&stringify(null)=="null"&&stringify([undef,getClass,null])=="[null,null,null]"&&stringify({a:[value,true,false,null,"\0\b\n\f\r\t"]})==serialized&&stringify(null,value)==="1"&&stringify([1,2],null,1)=="[\n 1,\n 2\n]"&&stringify(new Date(-864e13))=='"-271821-04-20T00:00:00.000Z"'&&stringify(new Date(864e13))=='"+275760-09-13T00:00:00.000Z"'&&stringify(new Date(-621987552e5))=='"-000001-01-01T00:00:00.000Z"'&&stringify(new Date(-1))=='"1969-12-31T23:59:59.999Z"'}catch(exception){stringifySupported=false}}isSupported=stringifySupported}if(name=="json-parse"){var parse=exports.parse;if(typeof parse=="function"){try{if(parse("0")===0&&!parse(false)){value=parse(serialized);var parseSupported=value["a"].length==5&&value["a"][0]===1;if(parseSupported){try{parseSupported=!parse('"\t"')}catch(exception){}if(parseSupported){try{parseSupported=parse("01")!==1}catch(exception){}}if(parseSupported){try{parseSupported=parse("1.")!==1}catch(exception){}}}}}catch(exception){parseSupported=false}}isSupported=parseSupported}}return has[name]=!!isSupported}if(!has("json")){var functionClass="[object Function]",dateClass="[object Date]",numberClass="[object Number]",stringClass="[object String]",arrayClass="[object Array]",booleanClass="[object Boolean]";var charIndexBuggy=has("bug-string-char-index");if(!isExtended){var floor=Math.floor;var Months=[0,31,59,90,120,151,181,212,243,273,304,334];var getDay=function(year,month){return Months[month]+365*(year-1970)+floor((year-1969+(month=+(month>1)))/4)-floor((year-1901+month)/100)+floor((year-1601+month)/400)}}if(!(isProperty=objectProto.hasOwnProperty)){isProperty=function(property){var members={},constructor;if((members.__proto__=null,members.__proto__={toString:1},members).toString!=getClass){isProperty=function(property){var original=this.__proto__,result=property in(this.__proto__=null,this);this.__proto__=original;return result}}else{constructor=members.constructor;isProperty=function(property){var parent=(this.constructor||constructor).prototype;return property in this&&!(property in parent&&this[property]===parent[property])}}members=null;return isProperty.call(this,property)}}forEach=function(object,callback){var size=0,Properties,members,property;(Properties=function(){this.valueOf=0}).prototype.valueOf=0;members=new Properties;for(property in members){if(isProperty.call(members,property)){size++}}Properties=members=null;if(!size){members=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"];forEach=function(object,callback){var isFunction=getClass.call(object)==functionClass,property,length;var hasProperty=!isFunction&&typeof object.constructor!="function"&&objectTypes[typeof object.hasOwnProperty]&&object.hasOwnProperty||isProperty;for(property in object){if(!(isFunction&&property=="prototype")&&hasProperty.call(object,property)){callback(property)}}for(length=members.length;property=members[--length];hasProperty.call(object,property)&&callback(property));}}else if(size==2){forEach=function(object,callback){var members={},isFunction=getClass.call(object)==functionClass,property;for(property in object){if(!(isFunction&&property=="prototype")&&!isProperty.call(members,property)&&(members[property]=1)&&isProperty.call(object,property)){callback(property)}}}}else{forEach=function(object,callback){var isFunction=getClass.call(object)==functionClass,property,isConstructor;for(property in object){if(!(isFunction&&property=="prototype")&&isProperty.call(object,property)&&!(isConstructor=property==="constructor")){callback(property)}}if(isConstructor||isProperty.call(object,property="constructor")){callback(property)}}}return forEach(object,callback)};if(!has("json-stringify")){var Escapes={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"};var leadingZeroes="000000";var toPaddedString=function(width,value){return(leadingZeroes+(value||0)).slice(-width)};var unicodePrefix="\\u00";var quote=function(value){var result='"',index=0,length=value.length,useCharIndex=!charIndexBuggy||length>10;var symbols=useCharIndex&&(charIndexBuggy?value.split(""):value);for(;index<length;index++){var charCode=value.charCodeAt(index);switch(charCode){case 8:case 9:case 10:case 12:case 13:case 34:case 92:result+=Escapes[charCode];break;default:if(charCode<32){result+=unicodePrefix+toPaddedString(2,charCode.toString(16));break}result+=useCharIndex?symbols[index]:value.charAt(index)}}return result+'"'};var serialize=function(property,object,callback,properties,whitespace,indentation,stack){var value,className,year,month,date,time,hours,minutes,seconds,milliseconds,results,element,index,length,prefix,result;try{value=object[property]}catch(exception){}if(typeof value=="object"&&value){className=getClass.call(value);if(className==dateClass&&!isProperty.call(value,"toJSON")){if(value>-1/0&&value<1/0){if(getDay){date=floor(value/864e5);for(year=floor(date/365.2425)+1970-1;getDay(year+1,0)<=date;year++);for(month=floor((date-getDay(year,0))/30.42);getDay(year,month+1)<=date;month++);date=1+date-getDay(year,month);time=(value%864e5+864e5)%864e5;hours=floor(time/36e5)%24;minutes=floor(time/6e4)%60;seconds=floor(time/1e3)%60;milliseconds=time%1e3}else{year=value.getUTCFullYear();month=value.getUTCMonth();date=value.getUTCDate();hours=value.getUTCHours();minutes=value.getUTCMinutes();seconds=value.getUTCSeconds();milliseconds=value.getUTCMilliseconds()}value=(year<=0||year>=1e4?(year<0?"-":"+")+toPaddedString(6,year<0?-year:year):toPaddedString(4,year))+"-"+toPaddedString(2,month+1)+"-"+toPaddedString(2,date)+"T"+toPaddedString(2,hours)+":"+toPaddedString(2,minutes)+":"+toPaddedString(2,seconds)+"."+toPaddedString(3,milliseconds)+"Z"}else{value=null}}else if(typeof value.toJSON=="function"&&(className!=numberClass&&className!=stringClass&&className!=arrayClass||isProperty.call(value,"toJSON"))){value=value.toJSON(property)}}if(callback){value=callback.call(object,property,value)}if(value===null){return"null"}className=getClass.call(value);if(className==booleanClass){return""+value}else if(className==numberClass){return value>-1/0&&value<1/0?""+value:"null"}else if(className==stringClass){return quote(""+value)}if(typeof value=="object"){for(length=stack.length;length--;){if(stack[length]===value){throw TypeError()}}stack.push(value);results=[];prefix=indentation;indentation+=whitespace;if(className==arrayClass){for(index=0,length=value.length;index<length;index++){element=serialize(index,value,callback,properties,whitespace,indentation,stack);results.push(element===undef?"null":element)}result=results.length?whitespace?"[\n"+indentation+results.join(",\n"+indentation)+"\n"+prefix+"]":"["+results.join(",")+"]":"[]"}else{forEach(properties||value,function(property){var element=serialize(property,value,callback,properties,whitespace,indentation,stack);if(element!==undef){results.push(quote(property)+":"+(whitespace?" ":"")+element)}});result=results.length?whitespace?"{\n"+indentation+results.join(",\n"+indentation)+"\n"+prefix+"}":"{"+results.join(",")+"}":"{}"}stack.pop();return result}};exports.stringify=function(source,filter,width){var whitespace,callback,properties,className;if(objectTypes[typeof filter]&&filter){if((className=getClass.call(filter))==functionClass){callback=filter}else if(className==arrayClass){properties={};for(var index=0,length=filter.length,value;index<length;value=filter[index++],(className=getClass.call(value),className==stringClass||className==numberClass)&&(properties[value]=1));}}if(width){if((className=getClass.call(width))==numberClass){if((width-=width%1)>0){for(whitespace="",width>10&&(width=10);whitespace.length<width;whitespace+=" ");}}else if(className==stringClass){whitespace=width.length<=10?width:width.slice(0,10)}}return serialize("",(value={},value[""]=source,value),callback,properties,whitespace,"",[])}}if(!has("json-parse")){var fromCharCode=String.fromCharCode;var Unescapes={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"};var Index,Source;var abort=function(){Index=Source=null;throw SyntaxError()};var lex=function(){var source=Source,length=source.length,value,begin,position,isSigned,charCode;while(Index<length){charCode=source.charCodeAt(Index);switch(charCode){case 9:case 10:case 13:case 32:Index++;break;case 123:case 125:case 91:case 93:case 58:case 44:value=charIndexBuggy?source.charAt(Index):source[Index];Index++;return value;case 34:for(value="@",Index++;Index<length;){charCode=source.charCodeAt(Index);if(charCode<32){abort()}else if(charCode==92){charCode=source.charCodeAt(++Index);switch(charCode){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:value+=Unescapes[charCode];Index++;break;case 117:begin=++Index;for(position=Index+4;Index<position;Index++){charCode=source.charCodeAt(Index);if(!(charCode>=48&&charCode<=57||charCode>=97&&charCode<=102||charCode>=65&&charCode<=70)){abort()}}value+=fromCharCode("0x"+source.slice(begin,Index));break;default:abort()}}else{if(charCode==34){break}charCode=source.charCodeAt(Index);begin=Index;while(charCode>=32&&charCode!=92&&charCode!=34){charCode=source.charCodeAt(++Index)}value+=source.slice(begin,Index)}}if(source.charCodeAt(Index)==34){Index++;return value}abort();default:begin=Index;if(charCode==45){isSigned=true;charCode=source.charCodeAt(++Index)}if(charCode>=48&&charCode<=57){if(charCode==48&&(charCode=source.charCodeAt(Index+1),charCode>=48&&charCode<=57)){abort()}isSigned=false;for(;Index<length&&(charCode=source.charCodeAt(Index),charCode>=48&&charCode<=57);Index++);if(source.charCodeAt(Index)==46){position=++Index;for(;position<length&&(charCode=source.charCodeAt(position),charCode>=48&&charCode<=57);position++);if(position==Index){abort()}Index=position}charCode=source.charCodeAt(Index);if(charCode==101||charCode==69){charCode=source.charCodeAt(++Index);if(charCode==43||charCode==45){Index++}for(position=Index;position<length&&(charCode=source.charCodeAt(position),charCode>=48&&charCode<=57);position++);if(position==Index){abort()}Index=position}return+source.slice(begin,Index)}if(isSigned){abort()}if(source.slice(Index,Index+4)=="true"){Index+=4;return true}else if(source.slice(Index,Index+5)=="false"){Index+=5;return false}else if(source.slice(Index,Index+4)=="null"){Index+=4;return null}abort()}}return"$"};var get=function(value){var results,hasMembers;if(value=="$"){abort()}if(typeof value=="string"){if((charIndexBuggy?value.charAt(0):value[0])=="@"){return value.slice(1)}if(value=="["){results=[];for(;;hasMembers||(hasMembers=true)){value=lex();if(value=="]"){break}if(hasMembers){if(value==","){value=lex();if(value=="]"){abort()}}else{abort()}}if(value==","){abort()}results.push(get(value))}return results}else if(value=="{"){results={};for(;;hasMembers||(hasMembers=true)){value=lex();if(value=="}"){break}if(hasMembers){if(value==","){value=lex();if(value=="}"){abort()}}else{abort()}}if(value==","||typeof value!="string"||(charIndexBuggy?value.charAt(0):value[0])!="@"||lex()!=":"){abort()}results[value.slice(1)]=get(lex())}return results}abort()}return value};var update=function(source,property,callback){var element=walk(source,property,callback);if(element===undef){delete source[property]}else{source[property]=element}};var walk=function(source,property,callback){var value=source[property],length;if(typeof value=="object"&&value){if(getClass.call(value)==arrayClass){for(length=value.length;length--;){update(value,length,callback)}}else{forEach(value,function(property){update(value,property,callback)})}}return callback.call(source,property,value)};exports.parse=function(source,callback){var result,value;Index=0;Source=""+source;result=get(lex());if(lex()!="$"){abort()}Index=Source=null;return callback&&getClass.call(callback)==functionClass?walk((value={},value[""]=result,value),"",callback):result}}}exports["runInContext"]=runInContext;return exports}if(freeExports&&!isLoader){runInContext(root,freeExports)}else{var nativeJSON=root.JSON,previousJSON=root["JSON3"],isRestored=false;var JSON3=runInContext(root,root["JSON3"]={noConflict:function(){if(!isRestored){isRestored=true;root.JSON=nativeJSON;root["JSON3"]=previousJSON;nativeJSON=previousJSON=null}return JSON3}});root.JSON={parse:JSON3.parse,stringify:JSON3.stringify}}if(isLoader){define(function(){return JSON3})}}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],177:[function(require,module,exports){"use strict";var is=require("is");var isodate=require("@segment/isodate");var milliseconds=require("./milliseconds");var seconds=require("./seconds");module.exports=function newDate(val){if(is.date(val))return val;if(is.number(val))return new Date(toMs(val));if(isodate.is(val)){return isodate.parse(val)}if(milliseconds.is(val)){return milliseconds.parse(val)}if(seconds.is(val)){return seconds.parse(val)}return new Date(val)};function toMs(num){if(num<315576e5)return num*1e3;return num}},{"./milliseconds":178,"./seconds":179,"@segment/isodate":180,is:175}],178:[function(require,module,exports){"use strict";var matcher=/\d{13}/;exports.is=function(string){return matcher.test(string)};exports.parse=function(millis){millis=parseInt(millis,10);return new Date(millis)}},{}],179:[function(require,module,exports){"use strict";var matcher=/\d{10}/;exports.is=function(string){return matcher.test(string)};exports.parse=function(seconds){var millis=parseInt(seconds,10)*1e3;return new Date(millis)}},{}],180:[function(require,module,exports){"use strict";var matcher=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;exports.parse=function(iso){var numericKeys=[1,5,6,7,11,12];var arr=matcher.exec(iso);var offset=0;if(!arr){return new Date(iso)}for(var i=0,val;val=numericKeys[i];i++){arr[val]=parseInt(arr[val],10)||0}arr[2]=parseInt(arr[2],10)||1;arr[3]=parseInt(arr[3],10)||1;arr[2]--;arr[8]=arr[8]?(arr[8]+"00").substring(0,3):0;if(arr[4]===" "){offset=(new Date).getTimezoneOffset()}else if(arr[9]!=="Z"&&arr[10]){offset=arr[11]*60+arr[12];if(arr[10]==="+"){offset=0-offset}}var millis=Date.UTC(arr[1],arr[2],arr[3],arr[5],arr[6]+offset,arr[7],arr[8]);return new Date(millis)};exports.is=function(string,strict){if(strict&&/^\d{4}-\d{2}-\d{2}/.test(string)===false){return false}return matcher.test(string)}},{}],181:[function(require,module,exports){arguments[4][29][0].apply(exports,arguments)},{_process:183,dup:29}],182:[function(require,module,exports){arguments[4][63][0].apply(exports,arguments)},{dup:63}],183:[function(require,module,exports){var process=module.exports={};var cachedSetTimeout;var cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{if(typeof setTimeout==="function"){cachedSetTimeout=setTimeout}else{cachedSetTimeout=defaultSetTimout}}catch(e){cachedSetTimeout=defaultSetTimout}try{if(typeof clearTimeout==="function"){cachedClearTimeout=clearTimeout}else{cachedClearTimeout=defaultClearTimeout}}catch(e){cachedClearTimeout=defaultClearTimeout}})();function runTimeout(fun){if(cachedSetTimeout===setTimeout){return setTimeout(fun,0)}if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout){cachedSetTimeout=setTimeout;return setTimeout(fun,0)}try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout){return clearTimeout(marker)}if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout){cachedClearTimeout=clearTimeout;return clearTimeout(marker)}try{return cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}var queue=[];var draining=false;var currentQueue;var queueIndex=-1;function cleanUpNextTick(){if(!draining||!currentQueue){return}draining=false;if(currentQueue.length){queue=currentQueue.concat(queue)}else{queueIndex=-1}if(queue.length){drainQueue()}}function drainQueue(){if(draining){return}var timeout=runTimeout(cleanUpNextTick);draining=true;var len=queue.length;while(len){currentQueue=queue;queue=[];while(++queueIndex<len){if(currentQueue){currentQueue[queueIndex].run()}}queueIndex=-1;len=queue.length}currentQueue=null;draining=false;runClearTimeout(timeout)}process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1){for(var i=1;i<arguments.length;i++){args[i-1]=arguments[i]}}queue.push(new Item(fun,args));if(queue.length===1&&!draining){runTimeout(drainQueue)}};function Item(fun,array){this.fun=fun;this.array=array}Item.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=true;process.env={};process.argv=[];process.version="";process.versions={};function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.prependListener=noop;process.prependOnceListener=noop;process.listeners=function(name){return[]};process.binding=function(name){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported")};process.umask=function(){return 0}},{}],184:[function(require,module,exports){"use strict";var get=require("obj-case");module.exports=function(proto){proto.zip=trait("postalCode","zip");proto.country=trait("country");proto.street=trait("street");proto.state=trait("state");proto.city=trait("city");proto.region=trait("region");function trait(a,b){return function(){var traits=this.traits();var props=this.properties?this.properties():{};return get(traits,"address."+a)||get(traits,a)||(b?get(traits,"address."+b):null)||(b?get(traits,b):null)||get(props,"address."+a)||get(props,a)||(b?get(props,"address."+b):null)||(b?get(props,b):null)}}}},{"obj-case":182}],185:[function(require,module,exports){"use strict";var inherit=require("./utils").inherit;var Facade=require("./facade");function Alias(dictionary,opts){
Facade.call(this,dictionary,opts)}inherit(Alias,Facade);Alias.prototype.action=function(){return"alias"};Alias.prototype.type=Alias.prototype.action;Alias.prototype.previousId=function(){return this.field("previousId")||this.field("from")};Alias.prototype.from=Alias.prototype.previousId;Alias.prototype.userId=function(){return this.field("userId")||this.field("to")};Alias.prototype.to=Alias.prototype.userId;module.exports=Alias},{"./facade":186,"./utils":194}],186:[function(require,module,exports){"use strict";var address=require("./address");var clone=require("./utils").clone;var isEnabled=require("./is-enabled");var newDate=require("new-date");var objCase=require("obj-case");var traverse=require("@segment/isodate-traverse");var type=require("./utils").type;function Facade(obj,opts){opts=opts||{};if(!("clone"in opts))opts.clone=true;if(opts.clone)obj=clone(obj);if(!("traverse"in opts))opts.traverse=true;if(!("timestamp"in obj))obj.timestamp=new Date;else obj.timestamp=newDate(obj.timestamp);if(opts.traverse)traverse(obj);this.opts=opts;this.obj=obj}address(Facade.prototype);Facade.prototype.proxy=function(field){var fields=field.split(".");field=fields.shift();var obj=this[field]||this.field(field);if(!obj)return obj;if(typeof obj==="function")obj=obj.call(this)||{};if(fields.length===0)return this.opts.clone?transform(obj):obj;obj=objCase(obj,fields.join("."));return this.opts.clone?transform(obj):obj};Facade.prototype.field=function(field){var obj=this.obj[field];return this.opts.clone?transform(obj):obj};Facade.proxy=function(field){return function(){return this.proxy(field)}};Facade.field=function(field){return function(){return this.field(field)}};Facade.multi=function(path){return function(){var multi=this.proxy(path+"s");if(type(multi)==="array")return multi;var one=this.proxy(path);if(one)one=[this.opts.clone?clone(one):one];return one||[]}};Facade.one=function(path){return function(){var one=this.proxy(path);if(one)return one;var multi=this.proxy(path+"s");if(type(multi)==="array")return multi[0]}};Facade.prototype.json=function(){var ret=this.opts.clone?clone(this.obj):this.obj;if(this.type)ret.type=this.type();return ret};Facade.prototype.options=function(integration){var obj=this.obj.options||this.obj.context||{};var options=this.opts.clone?clone(obj):obj;if(!integration)return options;if(!this.enabled(integration))return;var integrations=this.integrations();var value=integrations[integration]||objCase(integrations,integration);if(typeof value!=="object")value=objCase(this.options(),integration);return typeof value==="object"?value:{}};Facade.prototype.context=Facade.prototype.options;Facade.prototype.enabled=function(integration){var allEnabled=this.proxy("options.providers.all");if(typeof allEnabled!=="boolean")allEnabled=this.proxy("options.all");if(typeof allEnabled!=="boolean")allEnabled=this.proxy("integrations.all");if(typeof allEnabled!=="boolean")allEnabled=true;var enabled=allEnabled&&isEnabled(integration);var options=this.integrations();if(options.providers&&options.providers.hasOwnProperty(integration)){enabled=options.providers[integration]}if(options.hasOwnProperty(integration)){var settings=options[integration];if(typeof settings==="boolean"){enabled=settings}else{enabled=true}}return!!enabled};Facade.prototype.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()};Facade.prototype.active=function(){var active=this.proxy("options.active");if(active===null||active===undefined)active=true;return active};Facade.prototype.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")};Facade.prototype.sessionId=Facade.prototype.anonymousId;Facade.prototype.groupId=Facade.proxy("options.groupId");Facade.prototype.traits=function(aliases){var ret=this.proxy("options.traits")||{};var id=this.userId();aliases=aliases||{};if(id)ret.id=id;for(var alias in aliases){var value=this[alias]==null?this.proxy("options.traits."+alias):this[alias]();if(value==null)continue;ret[aliases[alias]]=value;delete ret[alias]}return ret};Facade.prototype.library=function(){var library=this.proxy("options.library");if(!library)return{name:"unknown",version:null};if(typeof library==="string")return{name:library,version:null};return library};Facade.prototype.device=function(){var device=this.proxy("context.device");if(type(device)!=="object")device={};var library=this.library().name;if(device.type)return device;if(library.indexOf("ios")>-1)device.type="ios";if(library.indexOf("android")>-1)device.type="android";return device};Facade.prototype.userAgent=Facade.proxy("context.userAgent");Facade.prototype.timezone=Facade.proxy("context.timezone");Facade.prototype.timestamp=Facade.field("timestamp");Facade.prototype.channel=Facade.field("channel");Facade.prototype.ip=Facade.proxy("context.ip");Facade.prototype.userId=Facade.field("userId");function transform(obj){return clone(obj)}module.exports=Facade},{"./address":184,"./is-enabled":190,"./utils":194,"@segment/isodate-traverse":155,"new-date":177,"obj-case":182}],187:[function(require,module,exports){"use strict";var inherit=require("./utils").inherit;var isEmail=require("is-email");var newDate=require("new-date");var Facade=require("./facade");function Group(dictionary,opts){Facade.call(this,dictionary,opts)}inherit(Group,Facade);Group.prototype.action=function(){return"group"};Group.prototype.type=Group.prototype.action;Group.prototype.groupId=Facade.field("groupId");Group.prototype.created=function(){var created=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(created)return newDate(created)};Group.prototype.email=function(){var email=this.proxy("traits.email");if(email)return email;var groupId=this.groupId();if(isEmail(groupId))return groupId};Group.prototype.traits=function(aliases){var ret=this.properties();var id=this.groupId();aliases=aliases||{};if(id)ret.id=id;for(var alias in aliases){var value=this[alias]==null?this.proxy("traits."+alias):this[alias]();if(value==null)continue;ret[aliases[alias]]=value;delete ret[alias]}return ret};Group.prototype.name=Facade.proxy("traits.name");Group.prototype.industry=Facade.proxy("traits.industry");Group.prototype.employees=Facade.proxy("traits.employees");Group.prototype.properties=function(){return this.field("traits")||this.field("properties")||{}};module.exports=Group},{"./facade":186,"./utils":194,"is-email":174,"new-date":177}],188:[function(require,module,exports){"use strict";var Facade=require("./facade");var get=require("obj-case");var inherit=require("./utils").inherit;var isEmail=require("is-email");var newDate=require("new-date");var trim=require("trim");var type=require("./utils").type;function Identify(dictionary,opts){Facade.call(this,dictionary,opts)}inherit(Identify,Facade);Identify.prototype.action=function(){return"identify"};Identify.prototype.type=Identify.prototype.action;Identify.prototype.traits=function(aliases){var ret=this.field("traits")||{};var id=this.userId();aliases=aliases||{};if(id)ret.id=id;for(var alias in aliases){var value=this[alias]==null?this.proxy("traits."+alias):this[alias]();if(value==null)continue;ret[aliases[alias]]=value;if(alias!==aliases[alias])delete ret[alias]}return ret};Identify.prototype.email=function(){var email=this.proxy("traits.email");if(email)return email;var userId=this.userId();if(isEmail(userId))return userId};Identify.prototype.created=function(){var created=this.proxy("traits.created")||this.proxy("traits.createdAt");if(created)return newDate(created)};Identify.prototype.companyCreated=function(){var created=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(created){return newDate(created)}};Identify.prototype.companyName=function(){return this.proxy("traits.company.name")};Identify.prototype.name=function(){var name=this.proxy("traits.name");if(typeof name==="string"){return trim(name)}var firstName=this.firstName();var lastName=this.lastName();if(firstName&&lastName){return trim(firstName+" "+lastName)}};Identify.prototype.firstName=function(){var firstName=this.proxy("traits.firstName");if(typeof firstName==="string"){return trim(firstName)}var name=this.proxy("traits.name");if(typeof name==="string"){return trim(name).split(" ")[0]}};Identify.prototype.lastName=function(){var lastName=this.proxy("traits.lastName");if(typeof lastName==="string"){return trim(lastName)}var name=this.proxy("traits.name");if(typeof name!=="string"){return}var space=trim(name).indexOf(" ");if(space===-1){return}return trim(name.substr(space+1))};Identify.prototype.uid=function(){return this.userId()||this.username()||this.email()};Identify.prototype.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")};Identify.prototype.age=function(){var date=this.birthday();var age=get(this.traits(),"age");if(age!=null)return age;if(type(date)!=="date")return;var now=new Date;return now.getFullYear()-date.getFullYear()};Identify.prototype.avatar=function(){var traits=this.traits();return get(traits,"avatar")||get(traits,"photoUrl")||get(traits,"avatarUrl")};Identify.prototype.position=function(){var traits=this.traits();return get(traits,"position")||get(traits,"jobTitle")};Identify.prototype.username=Facade.proxy("traits.username");Identify.prototype.website=Facade.one("traits.website");Identify.prototype.websites=Facade.multi("traits.website");Identify.prototype.phone=Facade.one("traits.phone");Identify.prototype.phones=Facade.multi("traits.phone");Identify.prototype.address=Facade.proxy("traits.address");Identify.prototype.gender=Facade.proxy("traits.gender");Identify.prototype.birthday=Facade.proxy("traits.birthday");module.exports=Identify},{"./facade":186,"./utils":194,"is-email":174,"new-date":177,"obj-case":182,trim:196}],189:[function(require,module,exports){"use strict";var Facade=require("./facade");Facade.Alias=require("./alias");Facade.Group=require("./group");Facade.Identify=require("./identify");Facade.Track=require("./track");Facade.Page=require("./page");Facade.Screen=require("./screen");module.exports=Facade},{"./alias":185,"./facade":186,"./group":187,"./identify":188,"./page":191,"./screen":192,"./track":193}],190:[function(require,module,exports){"use strict";var disabled={Salesforce:true};module.exports=function(integration){return!disabled[integration]}},{}],191:[function(require,module,exports){"use strict";var inherit=require("./utils").inherit;var Facade=require("./facade");var Track=require("./track");var isEmail=require("is-email");function Page(dictionary,opts){Facade.call(this,dictionary,opts)}inherit(Page,Facade);Page.prototype.action=function(){return"page"};Page.prototype.type=Page.prototype.action;Page.prototype.category=Facade.field("category");Page.prototype.name=Facade.field("name");Page.prototype.title=Facade.proxy("properties.title");Page.prototype.path=Facade.proxy("properties.path");Page.prototype.url=Facade.proxy("properties.url");Page.prototype.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")};Page.prototype.properties=function(aliases){var props=this.field("properties")||{};var category=this.category();var name=this.name();aliases=aliases||{};if(category)props.category=category;if(name)props.name=name;for(var alias in aliases){var value=this[alias]==null?this.proxy("properties."+alias):this[alias]();if(value==null)continue;props[aliases[alias]]=value;if(alias!==aliases[alias])delete props[alias]}return props};Page.prototype.email=function(){var email=this.proxy("context.traits.email")||this.proxy("properties.email");if(email)return email;var userId=this.userId();if(isEmail(userId))return userId};Page.prototype.fullName=function(){var category=this.category();var name=this.name();return name&&category?category+" "+name:name};Page.prototype.event=function(name){return name?"Viewed "+name+" Page":"Loaded a Page"};Page.prototype.track=function(name){var json=this.json();json.event=this.event(name);json.timestamp=this.timestamp();json.properties=this.properties();return new Track(json,this.opts)};module.exports=Page},{"./facade":186,"./track":193,"./utils":194,"is-email":174}],192:[function(require,module,exports){"use strict";var inherit=require("./utils").inherit;var Page=require("./page");var Track=require("./track");function Screen(dictionary,opts){Page.call(this,dictionary,opts)}inherit(Screen,Page);Screen.prototype.action=function(){return"screen"};Screen.prototype.type=Screen.prototype.action;Screen.prototype.event=function(name){return name?"Viewed "+name+" Screen":"Loaded a Screen"};Screen.prototype.track=function(name){var json=this.json();json.event=this.event(name);json.timestamp=this.timestamp();json.properties=this.properties();return new Track(json,this.opts)};module.exports=Screen},{"./page":191,"./track":193,"./utils":194}],193:[function(require,module,exports){"use strict";var inherit=require("./utils").inherit;var type=require("./utils").type;var Facade=require("./facade");var Identify=require("./identify");var isEmail=require("is-email");var get=require("obj-case");function Track(dictionary,opts){Facade.call(this,dictionary,opts)}inherit(Track,Facade);Track.prototype.action=function(){return"track"};Track.prototype.type=Track.prototype.action;Track.prototype.event=Facade.field("event");Track.prototype.value=Facade.proxy("properties.value");Track.prototype.category=Facade.proxy("properties.category");Track.prototype.id=Facade.proxy("properties.id");Track.prototype.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")};Track.prototype.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")};Track.prototype.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")};Track.prototype.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")};Track.prototype.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")};Track.prototype.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")};Track.prototype.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")};Track.prototype.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")};Track.prototype.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")};Track.prototype.sku=Facade.proxy("properties.sku");Track.prototype.tax=Facade.proxy("properties.tax");Track.prototype.name=Facade.proxy("properties.name");Track.prototype.price=Facade.proxy("properties.price");Track.prototype.total=Facade.proxy("properties.total");Track.prototype.repeat=Facade.proxy("properties.repeat");Track.prototype.coupon=Facade.proxy("properties.coupon");Track.prototype.shipping=Facade.proxy("properties.shipping");Track.prototype.discount=Facade.proxy("properties.discount");Track.prototype.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")};Track.prototype.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")};Track.prototype.description=Facade.proxy("properties.description");Track.prototype.plan=Facade.proxy("properties.plan");Track.prototype.subtotal=function(){var subtotal=get(this.properties(),"subtotal");var total=this.total()||this.revenue();if(subtotal)return subtotal;if(!total)return 0;if(this.total()){var n=this.tax();if(n)total-=n;n=this.shipping();if(n)total-=n;n=this.discount();if(n)total+=n}return total};Track.prototype.products=function(){var props=this.properties();var products=get(props,"products");return type(products)==="array"?products:[]};Track.prototype.quantity=function(){var props=this.obj.properties||{};return props.quantity||1};Track.prototype.currency=function(){var props=this.obj.properties||{};return props.currency||"USD"};Track.prototype.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")};Track.prototype.query=Facade.proxy("options.query");Track.prototype.properties=function(aliases){var ret=this.field("properties")||{};aliases=aliases||{};for(var alias in aliases){var value=this[alias]==null?this.proxy("properties."+alias):this[alias]();if(value==null)continue;ret[aliases[alias]]=value;delete ret[alias]}return ret};Track.prototype.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()};Track.prototype.email=function(){var email=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(email)return email;var userId=this.userId();if(isEmail(userId))return userId};Track.prototype.revenue=function(){var revenue=this.proxy("properties.revenue");var event=this.event();var orderCompletedRegExp=/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i;if(!revenue&&event&&event.match(orderCompletedRegExp)){revenue=this.proxy("properties.total")}return currency(revenue)};Track.prototype.cents=function(){var revenue=this.revenue();return typeof revenue!=="number"?this.value()||0:revenue*100};Track.prototype.identify=function(){var json=this.json();json.traits=this.traits();return new Identify(json,this.opts)};function currency(val){if(!val)return;if(typeof val==="number"){return val}if(typeof val!=="string"){return}val=val.replace(/\$/g,"");val=parseFloat(val);if(!isNaN(val)){return val}}module.exports=Track},{"./facade":186,"./identify":188,"./utils":194,"is-email":174,"obj-case":182}],194:[function(require,module,exports){"use strict";exports.inherit=require("inherits");exports.clone=require("@ndhoule/clone");exports.type=require("type-component")},{"@ndhoule/clone":131,inherits:173,"type-component":197}],195:[function(require,module,exports){arguments[4][117][0].apply(exports,arguments)},{"component-props":167,dup:117,props:167}],196:[function(require,module,exports){arguments[4][119][0].apply(exports,arguments)},{dup:119}],197:[function(require,module,exports){arguments[4][68][0].apply(exports,arguments)},{dup:68}],198:[function(require,module,exports){(function(global){var rng;var crypto=global.crypto||global.msCrypto;if(crypto&&crypto.getRandomValues){var _rnds8=new Uint8Array(16);rng=function whatwgRNG(){crypto.getRandomValues(_rnds8);return _rnds8}}if(!rng){var _rnds=new Array(16);rng=function(){for(var i=0,r;i<16;i++){if((i&3)===0)r=Math.random()*4294967296;_rnds[i]=r>>>((i&3)<<3)&255}return _rnds}}module.exports=rng}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],199:[function(require,module,exports){var _rng=require("./rng");var _byteToHex=[];var _hexToByte={};for(var i=0;i<256;i++){_byteToHex[i]=(i+256).toString(16).substr(1);_hexToByte[_byteToHex[i]]=i}function parse(s,buf,offset){var i=buf&&offset||0,ii=0;buf=buf||[];s.toLowerCase().replace(/[0-9a-f]{2}/g,function(oct){if(ii<16){buf[i+ii++]=_hexToByte[oct]}});while(ii<16){buf[i+ii++]=0}return buf}function unparse(buf,offset){var i=offset||0,bth=_byteToHex;return bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]}var _seedBytes=_rng();var _nodeId=[_seedBytes[0]|1,_seedBytes[1],_seedBytes[2],_seedBytes[3],_seedBytes[4],_seedBytes[5]];var _clockseq=(_seedBytes[6]<<8|_seedBytes[7])&16383;var _lastMSecs=0,_lastNSecs=0;function v1(options,buf,offset){var i=buf&&offset||0;var b=buf||[];options=options||{};var clockseq=options.clockseq!==undefined?options.clockseq:_clockseq;var msecs=options.msecs!==undefined?options.msecs:(new Date).getTime();var nsecs=options.nsecs!==undefined?options.nsecs:_lastNSecs+1;var dt=msecs-_lastMSecs+(nsecs-_lastNSecs)/1e4;if(dt<0&&options.clockseq===undefined){clockseq=clockseq+1&16383}if((dt<0||msecs>_lastMSecs)&&options.nsecs===undefined){nsecs=0}if(nsecs>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}_lastMSecs=msecs;_lastNSecs=nsecs;_clockseq=clockseq;msecs+=122192928e5;var tl=((msecs&268435455)*1e4+nsecs)%4294967296;b[i++]=tl>>>24&255;b[i++]=tl>>>16&255;b[i++]=tl>>>8&255;b[i++]=tl&255;var tmh=msecs/4294967296*1e4&268435455;b[i++]=tmh>>>8&255;b[i++]=tmh&255;b[i++]=tmh>>>24&15|16;b[i++]=tmh>>>16&255;b[i++]=clockseq>>>8|128;b[i++]=clockseq&255;var node=options.node||_nodeId;for(var n=0;n<6;n++){b[i+n]=node[n]}return buf?buf:unparse(b)}function v4(options,buf,offset){var i=buf&&offset||0;if(typeof options=="string"){buf=options=="binary"?new Array(16):null;options=null}options=options||{};var rnds=options.random||(options.rng||_rng)();rnds[6]=rnds[6]&15|64;rnds[8]=rnds[8]&63|128;if(buf){for(var ii=0;ii<16;ii++){buf[i+ii]=rnds[ii]}}return buf||unparse(rnds)}var uuid=v4;uuid.v1=v1;uuid.v4=v4;uuid.parse=parse;uuid.unparse=unparse;module.exports=uuid},{"./rng":198}],200:[function(require,module,exports){module.exports={name:"@segment/analytics.js",author:"Segment <friends@segment.com>",version:"2.11.0",description:"The hassle-free way to integrate analytics into any web application.",keywords:["analytics","analytics.js","segment","segment.io"],main:"analytics.js",scripts:{build:"make build",clean:"make clean",test:"make test"},repository:{type:"git",url:"https://github.com/segmentio/analytics.js.git"},license:"SEE LICENSE IN LICENSE",bugs:{url:"https://github.com/segmentio/analytics.js/issues"},homepage:"https://github.com/segmentio/analytics.js#readme",dependencies:{"@segment/analytics.js-core":"^3.0.0","@segment/analytics.js-integration":"^3.1.0"},devDependencies:{"@segment/eslint-config":"^3.1.1",browserify:"^13.0.1",eslint:"^2.9.0","eslint-plugin-mocha":"^2.2.0","eslint-plugin-require-path-exists":"^1.1.5","uglify-js":"^2.6.4"}}},{}]},{},[127])(127)});