forked from segmentio/analytics.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
analytics.min.js
1 lines (1 loc) · 45.8 KB
/
analytics.min.js
1
(function umd(require){if(typeof exports==="object"){module.exports=require("1")}else if(typeof define==="function"&&(define.amd||define.cmd)){define(function(){return require("1")})}else{this["analytics"]=require("1")}})(function outer(modules,cache,entries){var global=function(){return this}();function require(name){if(cache[name])return cache[name].exports;if(modules[name])return call(name,require);throw new Error('cannot find module "'+name+'"')}function call(id,require){var m=cache[id]={exports:{}};var mod=modules[id];var name=mod[2];var fn=mod[0];var threw=true;try{fn.call(m.exports,function(req){var dep=modules[id][1][req];return require(dep||req)},m,m.exports,outer,modules,cache,entries);threw=false}finally{if(threw){delete cache[id]}else if(name){cache[name]=cache[id]}}return cache[id].exports}for(var id in entries){if(entries[id]){global[entries[id]]=require(id)}else{require(id)}}require.duo=true;require.cache=cache;require.modules=modules;return require}({1:[function(require,module,exports){var analytics=require("segmentio/analytics.js-core");var Integrations=require("./integrations");var each=require("each");module.exports=exports=analytics;analytics.require=require;exports.VERSION=require("../bower.json").version;each(Integrations,function(name,Integration){analytics.use(Integration)})},{"./integrations":2,each:3,"../bower.json":4}],2:[function(require,module,exports){"use strict";module.exports={segmentio:require("analytics.js-integration-segmentio")}},{"analytics.js-integration-segmentio":5}],5:[function(require,module,exports){var ads=require("ad-params");var clone=require("clone");var cookie=require("cookie");var extend=require("extend");var integration=require("analytics.js-integration");var json=require("segmentio/[email protected]");var localstorage=require("store");var protocol=require("protocol");var send=require("send-json");var topDomain=require("top-domain");var utm=require("utm-params");var uuid=require("uuid");var cookieOptions={maxage:31536e6,secure:false,path:"/"};var Segment=exports=module.exports=integration("Segment.io").option("apiKey","");exports.storage=function(){return protocol()==="file:"||protocol()==="chrome-extension:"?localstorage:cookie};exports.global=window;Segment.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()})};Segment.prototype.loaded=function(){return true};Segment.prototype.onpage=function(page){this.send("/p",page.json())};Segment.prototype.onidentify=function(identify){this.send("/i",identify.json())};Segment.prototype.ongroup=function(group){this.send("/g",group.json())};Segment.prototype.ontrack=function(track){var json=track.json();delete json.traits;this.send("/t",json)};Segment.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("/a",json)};Segment.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.writeKey=this.options.apiKey;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();msg.sentAt=new Date;this.debug("normalized %o",msg);return msg};Segment.prototype.send=function(path,msg,fn){var url=scheme()+"//api.segment.io/v1"+path;var headers={"Content-Type":"text/plain"};fn=fn||noop;var self=this;msg=this.normalize(msg);send(url,msg,headers,function(err,res){self.debug("sent %O, received %O",msg,arguments);if(err)return fn(err);res.url=url;fn(null,res)})};Segment.prototype.cookie=function(name,val){var store=Segment.storage();if(arguments.length===1)return store(name);var global=exports.global;var href=global.location.href;var domain="."+topDomain(href);if(domain===".")domain="";this.debug("store domain %s -> %s",href,domain);var opts=clone(cookieOptions);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)};Segment.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 protocol()==="http:"?"http:":"https:"}function noop(){}},{"ad-params":6,clone:7,cookie:8,extend:9,"analytics.js-integration":10,"segmentio/[email protected]":11,store:12,protocol:13,"send-json":14,"top-domain":15,"utm-params":16,uuid:17}],6:[function(require,module,exports){var parse=require("querystring").parse;module.exports=ads;var QUERYIDS={btid:"dataxu",urid:"millennial-media"};function ads(query){var params=parse(query);for(var key in params){for(var id in QUERYIDS){if(key===id){return{id:params[key],type:QUERYIDS[id]}}}}}},{querystring:18}],18:[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:19,type:20}],19:[function(require,module,exports){exports=module.exports=trim;function trim(str){if(str.trim)return str.trim();return str.replace(/^\s*|\s*$/g,"")}exports.left=function(str){if(str.trimLeft)return str.trimLeft();return str.replace(/^\s*/,"")};exports.right=function(str){if(str.trimRight)return str.trimRight();return str.replace(/\s*$/,"")}},{}],20:[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}},{}],7:[function(require,module,exports){var type;try{type=require("type")}catch(e){type=require("type-component")}module.exports=clone;function clone(obj){switch(type(obj)){case"object":var copy={};for(var key in obj){if(obj.hasOwnProperty(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}}},{type:21}],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)))}},{}],8:[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(){return parse(document.cookie)}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)}}},{}],9:[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}},{}],10:[function(require,module,exports){var bind=require("bind");var clone=require("clone");var debug=require("debug");var defaults=require("defaults");var extend=require("extend");var slug=require("slug");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},{bind:22,clone:7,debug:23,defaults:24,extend:25,slug:26,"./protos":27,"./statics":28}],22:[function(require,module,exports){var bind=require("bind"),bindAll=require("bind-all");module.exports=exports=bind;exports.all=bindAll;exports.methods=bindMethods;function bindMethods(obj,methods){methods=[].slice.call(arguments,1);for(var i=0,method;method=methods[i];i++){obj[method]=bind(obj,obj[method])}return obj}},{bind:29}],29:[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)))}}},{}],23:[function(require,module,exports){if("undefined"==typeof window){module.exports=require("./lib/debug")}else{module.exports=require("./debug")}},{"./lib/debug":30,"./debug":31}],30:[function(require,module,exports){var tty=require("tty");module.exports=debug;var names=[],skips=[];(process.env.DEBUG||"").split(/[\s,]+/).forEach(function(name){name=name.replace("*",".*?");if(name[0]==="-"){skips.push(new RegExp("^"+name.substr(1)+"$"))}else{names.push(new RegExp("^"+name+"$"))}});var colors=[6,2,3,4,5,1];var prev={};var prevColor=0;var isatty=tty.isatty(2);function color(){return colors[prevColor++%colors.length]}function humanize(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"}function debug(name){function disabled(){}disabled.enabled=false;var match=skips.some(function(re){return re.test(name)});if(match)return disabled;match=names.some(function(re){return re.test(name)});if(!match)return disabled;var c=color();function colored(fmt){fmt=coerce(fmt);var curr=new Date;var ms=curr-(prev[name]||curr);prev[name]=curr;fmt=" [9"+c+"m"+name+" "+"[3"+c+"m[90m"+fmt+"[3"+c+"m"+" +"+humanize(ms)+"[0m";console.error.apply(this,arguments)}function plain(fmt){fmt=coerce(fmt);fmt=(new Date).toUTCString()+" "+name+" "+fmt;console.error.apply(this,arguments)}colored.enabled=plain.enabled=true;return isatty||process.env.DEBUG_COLORS?colored:plain}function coerce(val){if(val instanceof Error)return val.stack||val.message;return val}},{}],31:[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){}},{}],24:[function(require,module,exports){"use strict";var defaults=function(dest,src,recursive){for(var prop in src){if(recursive&&dest[prop]instanceof Object&&src[prop]instanceof Object){dest[prop]=defaults(dest[prop],src[prop],true)}else if(!(prop in dest)){dest[prop]=src[prop]}}return dest};module.exports=defaults},{}],25:[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}},{}],26:[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||"-")}},{}],27:[function(require,module,exports){var Emitter=require("emitter");var after=require("after");var each=require("each");var events=require("analytics-events");var fmt=require("fmt");var foldl=require("foldl");var loadIframe=require("load-iframe");var loadScript=require("load-script");var normalize=require("to-no-case");var nextTick=require("next-tick");var type=require("type");function noop(){}var has=Object.prototype.hasOwnProperty;var onerror=window.onerror;var onload=null;var setInterval=window.setInterval;var setTimeout=window.setTimeout;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(events,event){var normalizedEvent=normalize(event);return foldl(function(matchingEvents,val,key,events){if(type(events)==="array"){if(!val.key)return matchingEvents;key=val.key;val=val.value}if(normalize(key)===normalizedEvent){matchingEvents.push(val)}return matchingEvents},[],events)};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(this._queue,function(call){self[call.method].apply(self,call.args)});this._queue.length=0};exports.reset=function(){for(var i=0;i<this.globals.length;i++){window[this.globals[i]]=undefined}window.setTimeout=setTimeout;window.setInterval=setInterval;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(attrs,function(key,val){el.setAttribute(key,val)});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(this.options,function(key,val){if(!locals.hasOwnProperty(key))locals[key]=val});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 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)}},{emitter:32,after:33,each:34,"analytics-events":35,fmt:36,foldl:37,"load-iframe":38,"load-script":39,"to-no-case":40,"next-tick":41,type:42}],32:[function(require,module,exports){var index=require("indexof");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){var self=this;this._callbacks=this._callbacks||{};function on(){self.off(event,on);fn.apply(this,arguments)}fn._off=on;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 i=index(callbacks,fn._off||fn);if(~i)callbacks.splice(i,1);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}},{indexof:43}],43:[function(require,module,exports){module.exports=function(arr,obj){if(arr.indexOf)return arr.indexOf(obj);for(var i=0;i<arr.length;++i){if(arr[i]===obj)return i}return-1}},{}],33:[function(require,module,exports){module.exports=function after(times,func){if(times<=0)return func();return function(){if(--times<1){return func.apply(this,arguments)}}}},{}],34:[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)}}},{type:42,"component-type":42,"to-function":44}],42:[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}},{}],44:[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})}},{props:45,"component-props":45}],45:[function(require,module,exports){var globals=/\b(this|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+_}}},{}],35:[function(require,module,exports){module.exports={removedProduct:/^[ _]?removed[ _]?product[ _]?$/i,viewedProduct:/^[ _]?viewed[ _]?product[ _]?$/i,viewedProductCategory:/^[ _]?viewed[ _]?product[ _]?category[ _]?$/i,addedProduct:/^[ _]?added[ _]?product[ _]?$/i,completedOrder:/^[ _]?completed[ _]?order[ _]?$/i,startedOrder:/^[ _]?started[ _]?order[ _]?$/i,updatedOrder:/^[ _]?updated[ _]?order[ _]?$/i,refundedOrder:/^[ _]?refunded?[ _]?order[ _]?$/i,viewedProductDetails:/^[ _]?viewed[ _]?product[ _]?details?[ _]?$/i,clickedProduct:/^[ _]?clicked[ _]?product[ _]?$/i,viewedPromotion:/^[ _]?viewed[ _]?promotion?[ _]?$/i,clickedPromotion:/^[ _]?clicked[ _]?promotion?[ _]?$/i,viewedCheckoutStep:/^[ _]?viewed[ _]?checkout[ _]?step[ _]?$/i,completedCheckoutStep:/^[ _]?completed[ _]?checkout[ _]?step[ _]?$/i}},{}],36:[function(require,module,exports){var toString=window.JSON?JSON.stringify:function(_){return String(_)};module.exports=fmt;fmt.o=toString;fmt.s=String;fmt.d=parseInt;function fmt(str){var args=[].slice.call(arguments,1);var j=0;return str.replace(/%([a-z])/gi,function(_,f){return fmt[f]?fmt[f](args[j++]):_+f})}},{}],37:[function(require,module,exports){"use strict";var each;try{each=require("@ndhoule/each")}catch(e){each=require("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},{each:46}],46:[function(require,module,exports){"use strict";var keys;try{keys=require("@ndhoule/keys")}catch(e){keys=require("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},{keys:47}],47:[function(require,module,exports){"use strict";var strCharAt=String.prototype.charAt;var charAt=function(str,index){return strCharAt.call(str,index)};var hop=Object.prototype.hasOwnProperty;var toStr=Object.prototype.toString;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};module.exports=function keys(source){if(source==null){return[]}if(isString(source)){return indexKeys(source,charAt)}if(isArrayLike(source)){return indexKeys(source,has)}return objectKeys(source)}},{}],38:[function(require,module,exports){var onload=require("script-onload");var tick=require("next-tick");var type=require("type");module.exports=function loadIframe(options,fn){if(!options)throw new Error("Cant load nothing...");if("string"==type(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("function"==type(fn)){onload(iframe,fn)}tick(function(){var firstScript=document.getElementsByTagName("script")[0];firstScript.parentNode.insertBefore(iframe,firstScript)});return iframe}},{"script-onload":48,"next-tick":41,type:21}],48:[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)})}},{}],41:[function(require,module,exports){"use strict";if(typeof setImmediate=="function"){module.exports=function(f){setImmediate(f)}}else if(typeof process!="undefined"&&typeof process.nextTick=="function"){module.exports=process.nextTick}else if(typeof window=="undefined"||window.ActiveXObject||!window.postMessage){module.exports=function(f){setTimeout(f)}}else{var q=[];window.addEventListener("message",function(){var i=0;while(i<q.length){try{q[i++]()}catch(e){q=q.slice(i);window.postMessage("tic!","*");throw e}}q.length=0},true);module.exports=function(fn){if(!q.length)window.postMessage("tic!","*");q.push(fn)}}},{}],39:[function(require,module,exports){var onload=require("script-onload");var tick=require("next-tick");var type=require("type");module.exports=function loadScript(options,fn){if(!options)throw new Error("Cant load nothing...");if("string"==type(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 script=document.createElement("script");script.type="text/javascript";script.async=true;script.src=options.src;if("function"==type(fn)){onload(script,fn)}tick(function(){var firstScript=document.getElementsByTagName("script")[0];firstScript.parentNode.insertBefore(script,firstScript)});return script}},{"script-onload":48,"next-tick":41,type:21}],40:[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).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(" ")})}},{}],28:[function(require,module,exports){var Emitter=require("emitter");var domify=require("domify");var each=require("each");var includes=require("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(str){return this.map(this.options[name],str)};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(el.attributes,function(attr){var name=attr.name==="data-src"?"src":attr.name;if(!includes(attr.name+"=",str))return;attrs[name]=attr.value});return{type:el.tagName.toLowerCase(),attrs:attrs}}},{emitter:32,domify:49,each:34,includes:50}],49:[function(require,module,exports){module.exports=parse;var div=document.createElement("div");div.innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>';var innerHTMLBug=!div.getElementsByTagName("link").length;div=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}},{}],50:[function(require,module,exports){"use strict";var each;try{each=require("@ndhoule/each")}catch(e){each=require("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},{each:46}],11:[function(require,module,exports){var json=window.JSON||{};var stringify=json.stringify;var parse=json.parse;module.exports=parse&&stringify?JSON:require("json-fallback")},{"json-fallback":51}],51:[function(require,module,exports){(function(){"use strict";var JSON=module.exports={};function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var cx,escapable,gap,indent,meta,rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){if(typeof rep[i]==="string"){k=rep[i];v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else if(typeof space==="string"){indent=space}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}})()},{}],12:[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}},{unserialize:52,each:34}],52:[function(require,module,exports){module.exports=function(val){try{return JSON.parse(val)}catch(e){return val||undefined}}},{}],13:[function(require,module,exports){var define=Object.defineProperty;var initialProtocol=window.location.protocol;var mockedProtocol;module.exports=function(protocol){if(arguments.length===0)return get();else 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}}},{}],14:[function(require,module,exports){var encode=require("base64-encode");var cors=require("has-cors");var jsonp=require("jsonp");var JSON=require("json");exports=module.exports=cors?json:base64;exports.callback="callback";exports.prefix="data";exports.json=json;exports.base64=base64;exports.type=cors?"xhr":"jsonp";function json(url,obj,headers,fn){if(3==arguments.length)fn=headers,headers={};var req=new XMLHttpRequest;req.onerror=fn;req.onreadystatechange=done;req.open("POST",url,true);for(var k in headers)req.setRequestHeader(k,headers[k]);req.send(JSON.stringify(obj));function done(){if(4==req.readyState)return fn(null,req)}}function base64(url,obj,_,fn){if(3==arguments.length)fn=_;var prefix=exports.prefix;obj=encode(JSON.stringify(obj));obj=encodeURIComponent(obj);url+="?"+prefix+"="+obj;jsonp(url,{param:exports.callback},function(err,obj){if(err)return fn(err);fn(null,{url:url,body:obj})})}},{"base64-encode":53,"has-cors":54,jsonp:55,json:11}],53:[function(require,module,exports){var utf8Encode=require("utf8-encode");var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";module.exports=encode;function encode(input){var output="";var chr1,chr2,chr3,enc1,enc2,enc3,enc4;var i=0;input=utf8Encode(input);while(i<input.length){chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=(chr1&3)<<4|chr2>>4;enc3=(chr2&15)<<2|chr3>>6;enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64}else if(isNaN(chr3)){enc4=64}output=output+keyStr.charAt(enc1)+keyStr.charAt(enc2)+keyStr.charAt(enc3)+keyStr.charAt(enc4)}return output}},{"utf8-encode":56}],56:[function(require,module,exports){module.exports=encode;function encode(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c)}else if(c>127&&c<2048){utftext+=String.fromCharCode(c>>6|192);utftext+=String.fromCharCode(c&63|128)}else{utftext+=String.fromCharCode(c>>12|224);utftext+=String.fromCharCode(c>>6&63|128);utftext+=String.fromCharCode(c&63|128)}}return utftext}},{}],54:[function(require,module,exports){try{module.exports=typeof XMLHttpRequest!=="undefined"&&"withCredentials"in new XMLHttpRequest}catch(err){module.exports=false}},{}],55:[function(require,module,exports){var debug=require("debug")("jsonp");module.exports=jsonp;var count=0;function noop(){}function jsonp(url,opts,fn){if("function"==typeof opts){fn=opts;opts={}}if(!opts)opts={};var prefix=opts.prefix||"__jp";var param=opts.param||"callback";var timeout=null!=opts.timeout?opts.timeout:6e4;var enc=encodeURIComponent;var target=document.getElementsByTagName("script")[0]||document.head;var script;var timer;var id=prefix+count++;if(timeout){timer=setTimeout(function(){cleanup();if(fn)fn(new Error("Timeout"))},timeout)}function cleanup(){script.parentNode.removeChild(script);window[id]=noop}window[id]=function(data){debug("jsonp got",data);if(timer)clearTimeout(timer);cleanup();if(fn)fn(null,data)};url+=(~url.indexOf("?")?"&":"?")+param+"="+enc(id);url=url.replace("?&","?");debug('jsonp req "%s"',url);script=document.createElement("script");script.src=url;target.parentNode.insertBefore(script,target)}},{}],15:[function(require,module,exports){var parse=require("url").parse;module.exports=domain;var regexp=/[a-z0-9][a-z0-9\-]*[a-z0-9]\.[a-z\.]{2,6}$/i;function domain(url){var host=parse(url).hostname;var match=host.match(regexp);return match?match[0]:""}},{url:57}],57:[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}}},{}],16:[function(require,module,exports){var parse=require("querystring").parse;module.exports=utm;function utm(query){if("?"==query.charAt(0))query=query.substring(1);var query=query.replace(/\?/g,"&");var params=parse(query);var param;var ret={};for(var key in params){if(~key.indexOf("utm_")){param=key.substr(4);if("campaign"==param)param="name";ret[param]=params[key]}}return ret}},{querystring:18}],17:[function(require,module,exports){module.exports=function uuid(a){return a?(a^Math.random()*16>>a/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,uuid)}},{}],3:[function(require,module,exports){var type=require("type");var has=Object.prototype.hasOwnProperty;module.exports=function(obj,fn){switch(type(obj)){case"array":return array(obj,fn);case"object":if("number"==typeof obj.length)return array(obj,fn);return object(obj,fn);case"string":return string(obj,fn)}};function string(obj,fn){for(var i=0;i<obj.length;++i){fn(obj.charAt(i),i)}}function object(obj,fn){for(var key in obj){if(has.call(obj,key)){fn(key,obj[key])}}}function array(obj,fn){for(var i=0;i<obj.length;++i){fn(obj[i],i)}}},{type:21}],4:[function(require,module,exports){module.exports={name:"analytics",version:"2.11.0",main:"analytics.js",dependencies:{},devDependencies:{}}},{}]},{},{1:""}));