window.Time=window.Time||{},window.s_time=window.s_time||{},Time.Tracking={last_article_id:0,reset:function(){for(var props=[3,5,7,8,9,16,26,28,30,32,14,27,10,15,65,33,34,67,12,68,69,70],i=0;i-1?(s_time.channel="money",s_time.prop64="v2-money"):(s_time.channel="time",s_time.prop64="v2"),s_time.prop8=article.id,s_time.pageName=article.friendly_title,post_type){case"post":article.list_gallery_style?s_time.prop7=article.listFormat:s_time.prop7=article.format,article_classes=article.classes.split(" "),article_classes.indexOf("non-metered")>-1?s_time.prop71="free":article_classes.indexOf("metered")>-1?s_time.prop71="metered":article_classes.indexOf("gated")>-1&&(s_time.prop71="gated");break;case"page":s_time.prop7="page";break;case"money_article":s_time.prop7="article";break;case"section front":s_time.prop7=s_time.pageName=post_type}if(this.isset(article.format)&&(s_time.pageName=article.format+"|"+s_time.pageName),s_time.prop14=article.url,this.isset(article.time)&&(article.time.published&&"string"==typeof article.time.published?s_time.prop26=article.time.published.substring(0,10):console.error("time-tracking -- no publish date",article)),this.isset(article.section)&&(s_time.prop70=article.section.name,this.isset(article.section.name)&&(s_time.prop16=this.map_section(article.section.name),s_time.pageName=article.section.name+"|"+s_time.pageName,s_time.prop30=article.section.name)),this.isset(article.friendly_title)&&(s_time.prop30=article.friendly_title),this.isset(article.tag)&&(s_time.prop5=article.tag.name),s_time.prop68=article.chapter,this.isset(article.topic)&&(s_time.prop69=article.topic.name,article.topic.is_vault&&(s_time.prop55="archive")),this.isset(article.authors)){for(var i=0,ln=article.authors.length;i0&&(this.isset(s_time.prop65)?s_time.prop65+="|cmtray":s_time.prop65="cmtray"),this.isset(article.tags)&&(s_time.prop67=article.tags),this.isset(article.Partner_Module)&&"Select"!==article.Partner_Module.partner?s_time.prop53=article.Partner_Module.partner:s_time.prop53=null,this.isset(article.hub_meta)&&this.isset(article.hub_meta.name)&&(s_time.prop68=article.hub_meta.name),this.isset(article.collection_meta)&&(franchise_value=article.collection_meta.franchise_value,franchise_value?(s_time.prop12=franchise_value,"money101"!==franchise_value&&"roadtowealth"!==franchise_value&&"nextgenerationleaders"!==franchise_value&&(s_time.prop8=franchise_value)):this.isset(article.collection_meta.name)&&(s_time.prop12=article.collection_meta.name)),"time_collection_post"!==post_type&&"money_collectionpost"!==post_type&&"money_collection"!==post_type&&"time_collection"!==post_type||(s_time.prop7="collections",s_time.pageName=s_time.prop16+"|"+s_time.prop7+"|"+article.friendly_title,this.isset(article.collection_byline)&&(s_time.prop28=article.collection_byline),this.isset(s_time.prop28)||(s_time.prop28="TIME Staff"),this.isset(article.format)&&"collection_intro"===article.format&&(franchise_value=article.franchise_value,franchise_value?s_time.prop12=franchise_value:s_time.prop12=article.friendly_title)),article.special_feature_value&&(s_time.prop12=article.special_feature_value),article.magazine_article&&(s_time.prop3="magazine",article.paid&&(s_time.prop34="walled magazine",Time.authenticated?s_time.setPaidFullPV="true":(s_time.setFreeTeaserPV="true",s_time.prop33=s_time.prop26+"|"+s_time.prop30))),this.isset(article.post_type)&&article.post_type.indexOf("money")>-1){var page_var="money_collection"===post_type||"money_collectionpost"===post_type?article.friendly_title:s_time.prop30;s_time.prop16="money",s_time.pageName=s_time.prop16+"|"+s_time.prop7+"|"+page_var,s_time.prop69=article.topic?article.topic.slug:"",s_time.prop70=article.section?article.section.name:""}if(this.isset(s_time.pageName)&&(s_time.pageName=s_time.pageName.toLowerCase()),this.isset(article.userAction))switch(article.userAction){case"gallery":"gallery"!==article.format&&(s_time.prop7="embedded gallery");break;case"viewasgallery":s_time.prop7="gallery";break;case"viewaslist":s_time.prop7="list"}if(this.isset(article.gallery))switch(article.gallery.size){case"vertical":s_time.prop7="vertical gallery"}firePV?(console.log("time-tracking -- trigger omniture pageview",s_time),Time.trigger("analytics:pageview",s_time)):console.log("time-tracking -- s_time populated not firing pageview yet",s_time)},isset:function(thing){return"undefined"!=typeof thing&&""!==thing&&null!==thing},map_section:function(section){switch(section=section.toLowerCase()){case"u.s.":return"us";case"trending":return"newsfeed";case"business":return"biztech";case"tech":return"techland";case"health":return"healthland";case"science":return"scihealth";case"culture":return"arts";case"opinion":return"opinions";default:return section}}},jQuery(document).ready(function($){$("body").on("click","[data-event]",function(e){var srcEl=$(e.srcElement);"undefined"==typeof omniTrackEv||srcEl.is("[data-event-info]")||omniTrackEv($(this).attr("data-event"))})});; (function(){var e;try{window.localStorage||(window.localStorage={isPolyfill:!0,getItem:function(sKey){return sKey&&this.hasOwnProperty(sKey)?unescape(document.cookie.replace(new RegExp("(?:^|.*;\\s*)"+escape(sKey).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*"),"$1")):null},key:function(nKeyId){return unescape(document.cookie.replace(/\s*\=(?:.(?!;))*$/,"").split(/\s*\=(?:[^;](?!;))*[^;]?;\s*/)[nKeyId])},setItem:function(sKey,sValue){if(sKey)return document.cookie=escape(sKey)+"="+escape(sValue)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/",this.length=document.cookie.match(/\=/g).length},length:0,removeItem:function(sKey){if(sKey&&this.hasOwnProperty(sKey))return document.cookie=escape(sKey)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/",this.length-=1},hasOwnProperty:function(sKey){return new RegExp("(?:^|;\\s*)"+escape(sKey).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(document.cookie)}})}catch(_error){e=_error,"undefined"!=typeof console&&null!==console&&console.error(e)}}).call(this);; window.MutationObserver=window.MutationObserver||window.WebKitMutationObserver||function(r){function w(a){this.g=[],this.k=a}function H(a){!function c(){var d=a.takeRecords();d.length&&a.k(d,a),a.f=setTimeout(c,w._period)}()}function t(a){var c,b={type:null,target:null,addedNodes:[],removedNodes:[],previousSibling:null,nextSibling:null,attributeName:null,attributeNamespace:null,oldValue:null};for(c in a)b[c]!==r&&a[c]!==r&&(b[c]=a[c]);return b}function I(a,b){var c=B(a,b);return function(d){var n,g=d.length;b.a&&c.a&&A(d,a,c.a,b.d),(b.b||b.e)&&(n=J(d,a,c,b)),(n||d.length!==g)&&(c=B(a,b))}}function A(a,b,c,d){for(var h,m,g={},n=b.attributes,C=n.length;C--;)h=n[C],m=h.name,d&&d[m]===r||(h.value!==c[m]&&a.push(t({type:"attributes",target:b,attributeName:m,oldValue:c[m],attributeNamespace:h.namespaceURI})),g[m]=!0);for(m in c)g[m]||a.push(t({target:b,type:"attributes",attributeName:m,oldValue:c[m]}))}function J(a,b,c,d){function g(b,c,g,h,y){var r=b.length-1;y=-~((r-y)/2);for(var f,k,e;e=b.pop();)f=g[e.h],k=h[e.i],d.b&&y&&Math.abs(e.h-e.i)>=r&&(a.push(t({type:"childList",target:c,addedNodes:[f],removedNodes:[f],nextSibling:f.nextSibling,previousSibling:f.previousSibling})),y--),d.a&&k.a&&A(a,f,k.a,d.d),d.c&&3===f.nodeType&&f.nodeValue!==k.c&&a.push(t({type:"characterData",target:f})),d.e&&n(f,k)}function n(b,c){for(var f,k,e,l,u,x=b.childNodes,p=c.b,y=x.length,w=p?p.length:0,z=0,v=0,q=0;vother&&!othIsNull||!valIsReflexive||valIsNull&&!othIsUndef&&othIsReflexive||valIsUndef&&othIsReflexive)return 1;if(value-1;);return index}function charsRightIndex(string,chars){for(var index=string.length;index--&&chars.indexOf(string.charAt(index))>-1;);return index}function compareAscending(object,other){return baseCompareAscending(object.criteria,other.criteria)||object.index-other.index}function compareMultiple(object,other,orders){for(var index=-1,objCriteria=object.criteria,othCriteria=other.criteria,length=objCriteria.length,ordersLength=orders.length;++index=ordersLength?result:result*(orders[index]?1:-1)}return object.index-other.index}function deburrLetter(letter){return deburredLetters[letter]}function escapeHtmlChar(chr){return htmlEscapes[chr]}function escapeStringChar(chr){return"\\"+stringEscapes[chr]}function indexOfNaN(array,fromIndex,fromRight){for(var length=array.length,index=fromIndex+(fromRight?0:-1);fromRight?index--:++index=9&&charCode<=13||32==charCode||160==charCode||5760==charCode||6158==charCode||charCode>=8192&&(charCode<=8202||8232==charCode||8233==charCode||8239==charCode||8287==charCode||12288==charCode||65279==charCode)}function replaceHolders(array,placeholder){for(var index=-1,length=array.length,resIndex=-1,result=[];++indexdata.index:index-1?data.count++>=limit:!iteratee(value)))continue outer}}else{var computed=iteratee(value);if(type==LAZY_MAP_FLAG)value=computed;else if(!computed){if(type==LAZY_FILTER_FLAG)continue outer;break outer}}}result[resIndex++]=value}return result}function MapCache(){this.__data__={}}function mapDelete(key){return this.has(key)&&delete this.__data__[key]}function mapGet(key){return"__proto__"==key?undefined:this.__data__[key]}function mapHas(key){return"__proto__"!=key&&hasOwnProperty.call(this.__data__,key)}function mapSet(key,value){return"__proto__"!=key&&(this.__data__[key]=value),this}function SetCache(values){var length=values?values.length:0;for(this.data={hash:nativeCreate(null),set:new Set};length--;)this.push(values[length])}function cacheIndexOf(cache,value){var data=cache.data,result="string"==typeof value||isObject(value)?data.set.has(value):data.hash[value];return result?0:-1}function cachePush(value){var data=this.data;"string"==typeof value||isObject(value)?data.set.add(value):data.hash[value]=!0}function arrayCopy(source,array){var index=-1,length=source.length;for(array||(array=Array(length));++index=200?createCache(values):null,valuesLength=values.length;cache&&(indexOf=cacheIndexOf,isCommon=!1,values=cache);outer:for(;++indexlength?0:length+start),end=end===undefined||end>length?length:+end||0,end<0&&(end+=length),length=start>end?0:end>>>0,start>>>=0;startlength?0:length+start),end=end===undefined||end>length?length:+end||0,end<0&&(end+=length),length=start>end?0:end-start>>>0,start>>>=0;for(var result=Array(length);++index=200,seen=isLarge?createCache():null,result=[];seen?(indexOf=cacheIndexOf,isCommon=!1):(isLarge=!1,seen=iteratee?[]:result);outer:for(;++index>>1,computed=array[mid];(retHighest?computed<=value:computed2?sources[length-2]:undefined,guard=length>2?sources[2]:undefined,thisArg=length>1?sources[length-1]:undefined;for("function"==typeof customizer?(customizer=bindCallback(customizer,thisArg,5),length-=2):(customizer="function"==typeof thisArg?thisArg:undefined,length-=customizer?1:0),guard&&isIterateeCall(sources[0],sources[1],guard)&&(customizer=length<3?undefined:customizer,length=1);++index-1?collection[index]:undefined}return baseFind(collection,predicate,eachFunc)}}function createFindIndex(fromRight){return function(array,predicate,thisArg){return array&&array.length?(predicate=getCallback(predicate,thisArg,3),baseFindIndex(array,predicate,fromRight)):-1}}function createFindKey(objectFunc){return function(object,predicate,thisArg){ return predicate=getCallback(predicate,thisArg,3),baseFind(object,predicate,objectFunc,!0)}}function createFlow(fromRight){return function(){for(var wrapper,length=arguments.length,index=fromRight?length:-1,leftIndex=0,funcs=Array(length);fromRight?index--:++index=length||!nativeIsFinite(length))return"";var padLength=length-strLength;return chars=null==chars?" ":chars+"",repeat(chars,ceil(padLength/chars.length)).slice(0,padLength)}function createPartialWrapper(func,bitmask,thisArg,partials){function wrapper(){for(var argsIndex=-1,argsLength=arguments.length,leftIndex=-1,leftLength=partials.length,args=Array(argsLength+leftLength);++leftIndexarrLength))return!1;for(;++index-1&&value%1==0&&value-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isStrictComparable(value){return value===value&&!isObject(value)}function mergeData(data,source){var bitmask=data[1],srcBitmask=source[1],newBitmask=bitmask|srcBitmask,isCommon=newBitmask-1;)splice.call(array,fromIndex,1);return array}function remove(array,predicate,thisArg){var result=[];if(!array||!array.length)return result;var index=-1,indexes=[],length=array.length;for(predicate=getCallback(predicate,thisArg,3);++index-1:getIndexOf(collection,target,fromIndex)>-1)}function map(collection,iteratee,thisArg){var func=isArray(collection)?arrayMap:baseMap;return iteratee=getCallback(iteratee,thisArg,3),func(collection,iteratee)}function pluck(collection,path){return map(collection,property(path))}function reject(collection,predicate,thisArg){var func=isArray(collection)?arrayFilter:baseFilter;return predicate=getCallback(predicate,thisArg,3),func(collection,function(value,index,collection){return!predicate(value,index,collection)})}function sample(collection,n,guard){if(guard?isIterateeCall(collection,n,guard):null==n){collection=toIterable(collection);var length=collection.length;return length>0?collection[baseRandom(0,length-1)]:undefined}var index=-1,result=toArray(collection),length=result.length,lastIndex=length-1;for(n=nativeMin(n<0?0:+n||0,length);++index0&&(result=func.apply(this,arguments)),n<=1&&(func=null),result}}function debounce(func,wait,options){function cancel(){timeoutId&&clearTimeout(timeoutId),maxTimeoutId&&clearTimeout(maxTimeoutId),maxTimeoutId=timeoutId=trailingCall=undefined}function delayed(){var remaining=wait-(now()-stamp);if(remaining<=0||remaining>wait){maxTimeoutId&&clearTimeout(maxTimeoutId);var isCalled=trailingCall;maxTimeoutId=timeoutId=trailingCall=undefined,isCalled&&(lastCalled=now(),result=func.apply(thisArg,args),timeoutId||maxTimeoutId||(args=thisArg=null))}else timeoutId=setTimeout(delayed,remaining)}function maxDelayed(){timeoutId&&clearTimeout(timeoutId),maxTimeoutId=timeoutId=trailingCall=undefined,(trailing||maxWait!==wait)&&(lastCalled=now(),result=func.apply(thisArg,args),timeoutId||maxTimeoutId||(args=thisArg=null))}function debounced(){if(args=arguments,stamp=now(),thisArg=this,trailingCall=trailing&&(timeoutId||!leading),maxWait===!1)var leadingCall=leading&&!timeoutId;else{maxTimeoutId||leading||(lastCalled=stamp);var remaining=maxWait-(stamp-lastCalled),isCalled=remaining<=0||remaining>maxWait;isCalled?(maxTimeoutId&&(maxTimeoutId=clearTimeout(maxTimeoutId)),lastCalled=stamp,result=func.apply(thisArg,args)):maxTimeoutId||(maxTimeoutId=setTimeout(maxDelayed,remaining))}return isCalled&&timeoutId?timeoutId=clearTimeout(timeoutId):timeoutId||wait===maxWait||(timeoutId=setTimeout(delayed,wait)),leadingCall&&(isCalled=!0,result=func.apply(thisArg,args)),!isCalled||timeoutId||maxTimeoutId||(args=thisArg=null),result}var args,maxTimeoutId,result,stamp,thisArg,timeoutId,trailingCall,lastCalled=0,maxWait=!1,trailing=!0;if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);if(wait=wait<0?0:+wait||0,options===!0){var leading=!0;trailing=!1}else isObject(options)&&(leading=options.leading,maxWait="maxWait"in options&&nativeMax(+options.maxWait||0,wait),trailing="trailing"in options?options.trailing:trailing);return debounced.cancel=cancel,debounced}function memoize(func,resolver){if("function"!=typeof func||resolver&&"function"!=typeof resolver)throw new TypeError(FUNC_ERROR_TEXT);var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key))return cache.get(key);var result=func.apply(this,args);return memoized.cache=cache.set(key,result),result};return memoized.cache=new memoize.Cache,memoized}function negate(predicate){if("function"!=typeof predicate)throw new TypeError(FUNC_ERROR_TEXT);return function(){return!predicate.apply(this,arguments)}}function once(func){return before(2,func)}function restParam(func,start){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return start=nativeMax(start===undefined?func.length-1:+start||0,0),function(){for(var args=arguments,index=-1,length=nativeMax(args.length-start,0),rest=Array(length);++indexother}function gte(value,other){return value>=other}function isArguments(value){return isObjectLike(value)&&isArrayLike(value)&&objToString.call(value)==argsTag}function isBoolean(value){return value===!0||value===!1||isObjectLike(value)&&objToString.call(value)==boolTag}function isDate(value){return isObjectLike(value)&&objToString.call(value)==dateTag}function isElement(value){return!!value&&1===value.nodeType&&isObjectLike(value)&&objToString.call(value).indexOf("Element")>-1}function isEmpty(value){return null==value||(isArrayLike(value)&&(isArray(value)||isString(value)||isArguments(value)||isObjectLike(value)&&isFunction(value.splice))?!value.length:!keys(value).length)}function isEqual(value,other,customizer,thisArg){customizer="function"==typeof customizer?bindCallback(customizer,thisArg,3):undefined;var result=customizer?customizer(value,other):undefined;return result===undefined?baseIsEqual(value,other,customizer):!!result}function isError(value){return isObjectLike(value)&&"string"==typeof value.message&&objToString.call(value)==errorTag}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function isMatch(object,source,customizer,thisArg){return customizer="function"==typeof customizer?bindCallback(customizer,thisArg,3):undefined,baseIsMatch(object,getMatchData(source),customizer)}function isNaN(value){return isNumber(value)&&value!=+value}function isNative(value){return null!=value&&(objToString.call(value)==funcTag?reIsNative.test(fnToString.call(value)):isObjectLike(value)&&reIsHostCtor.test(value))}function isNull(value){return null===value}function isNumber(value){return"number"==typeof value||isObjectLike(value)&&objToString.call(value)==numberTag}function isRegExp(value){return isObjectLike(value)&&objToString.call(value)==regexpTag}function isString(value){return"string"==typeof value||isObjectLike(value)&&objToString.call(value)==stringTag}function isTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[objToString.call(value)]}function isUndefined(value){return value===undefined; }function lt(value,other){return value0;++index=nativeMin(start,end)&&value=0&&string.indexOf(target,position)==position}function escape(string){return string=baseToString(string),string&&reHasUnescapedHtml.test(string)?string.replace(reUnescapedHtml,escapeHtmlChar):string}function escapeRegExp(string){return string=baseToString(string),string&&reHasRegExpChars.test(string)?string.replace(reRegExpChars,"\\$&"):string}function pad(string,length,chars){string=baseToString(string),length=+length;var strLength=string.length;if(strLength>=length||!nativeIsFinite(length))return string;var mid=(length-strLength)/2,leftLength=floor(mid),rightLength=ceil(mid);return chars=createPadding("",rightLength,chars),chars.slice(0,leftLength)+string+chars}function parseInt(string,radix,guard){return guard&&isIterateeCall(string,radix,guard)&&(radix=0),nativeParseInt(string,radix)}function repeat(string,n){var result="";if(string=baseToString(string),n=+n,n<1||!string||!nativeIsFinite(n))return result;do n%2&&(result+=string),n=floor(n/2),string+=string;while(n);return result}function startsWith(string,target,position){return string=baseToString(string),position=null==position?0:nativeMin(position<0?0:+position||0,string.length),string.lastIndexOf(target,position)==position}function template(string,options,otherOptions){var settings=lodash.templateSettings;otherOptions&&isIterateeCall(string,options,otherOptions)&&(options=otherOptions=null),string=baseToString(string),options=assignWith(baseAssign({},otherOptions||options),settings,assignOwnDefaults);var isEscaping,isEvaluating,imports=assignWith(baseAssign({},options.imports),settings.imports,assignOwnDefaults),importsKeys=keys(imports),importsValues=baseValues(imports,importsKeys),index=0,interpolate=options.interpolate||reNoMatch,source="__p += '",reDelimiters=RegExp((options.escape||reNoMatch).source+"|"+interpolate.source+"|"+(interpolate===reInterpolate?reEsTemplate:reNoMatch).source+"|"+(options.evaluate||reNoMatch).source+"|$","g"),sourceURL="//# sourceURL="+("sourceURL"in options?options.sourceURL:"lodash.templateSources["+ ++templateCounter+"]")+"\n";string.replace(reDelimiters,function(match,escapeValue,interpolateValue,esTemplateValue,evaluateValue,offset){return interpolateValue||(interpolateValue=esTemplateValue),source+=string.slice(index,offset).replace(reUnescapedString,escapeStringChar),escapeValue&&(isEscaping=!0,source+="' +\n__e("+escapeValue+") +\n'"),evaluateValue&&(isEvaluating=!0,source+="';\n"+evaluateValue+";\n__p += '"),interpolateValue&&(source+="' +\n((__t = ("+interpolateValue+")) == null ? '' : __t) +\n'"),index=offset+match.length,match}),source+="';\n";var variable=options.variable;variable||(source="with (obj) {\n"+source+"\n}\n"),source=(isEvaluating?source.replace(reEmptyStringLeading,""):source).replace(reEmptyStringMiddle,"$1").replace(reEmptyStringTrailing,"$1;"),source="function("+(variable||"obj")+") {\n"+(variable?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(isEscaping?", __e = _.escape":"")+(isEvaluating?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+source+"return __p\n}";var result=attempt(function(){return Function(importsKeys,sourceURL+"return "+source).apply(undefined,importsValues)});if(result.source=source,isError(result))throw result;return result}function trim(string,chars,guard){var value=string;return(string=baseToString(string))?(guard?isIterateeCall(value,chars,guard):null==chars)?string.slice(trimmedLeftIndex(string),trimmedRightIndex(string)+1):(chars+="",string.slice(charsLeftIndex(string,chars),charsRightIndex(string,chars)+1)):string}function trimLeft(string,chars,guard){var value=string;return string=baseToString(string),string?(guard?isIterateeCall(value,chars,guard):null==chars)?string.slice(trimmedLeftIndex(string)):string.slice(charsLeftIndex(string,chars+"")):string}function trimRight(string,chars,guard){var value=string;return string=baseToString(string),string?(guard?isIterateeCall(value,chars,guard):null==chars)?string.slice(0,trimmedRightIndex(string)+1):string.slice(0,charsRightIndex(string,chars+"")+1):string}function trunc(string,options,guard){guard&&isIterateeCall(string,options,guard)&&(options=null);var length=DEFAULT_TRUNC_LENGTH,omission=DEFAULT_TRUNC_OMISSION;if(null!=options)if(isObject(options)){var separator="separator"in options?options.separator:separator;length="length"in options?+options.length||0:length,omission="omission"in options?baseToString(options.omission):omission}else length=+options||0;if(string=baseToString(string),length>=string.length)return string;var end=length-omission.length;if(end<1)return omission;var result=string.slice(0,end);if(null==separator)return result+omission;if(isRegExp(separator)){if(string.slice(end).search(separator)){var match,newEnd,substring=string.slice(0,end);for(separator.global||(separator=RegExp(separator.source,(reFlags.exec(separator)||"")+"g")),separator.lastIndex=0;match=separator.exec(substring);)newEnd=match.index;result=result.slice(0,null==newEnd?end:newEnd)}}else if(string.indexOf(separator,end)!=end){var index=result.lastIndexOf(separator);index>-1&&(result=result.slice(0,index))}return result+omission}function unescape(string){return string=baseToString(string),string&&reHasEscapedHtml.test(string)?string.replace(reEscapedHtml,unescapeHtmlChar):string}function words(string,pattern,guard){return guard&&isIterateeCall(string,pattern,guard)&&(pattern=null),string=baseToString(string),string.match(pattern||reWords)||[]}function callback(func,thisArg,guard){return guard&&isIterateeCall(func,thisArg,guard)&&(thisArg=null),isObjectLike(func)?matches(func):baseCallback(func,thisArg)}function constant(value){return function(){return value}}function identity(value){return value}function matches(source){return baseMatches(baseClone(source,!0))}function matchesProperty(path,srcValue){return baseMatchesProperty(path,baseClone(srcValue,!0))}function mixin(object,source,options){if(null==options){var isObj=isObject(source),props=isObj?keys(source):null,methodNames=props&&props.length?baseFunctions(source,props):null;(methodNames?methodNames.length:isObj)||(methodNames=!1,options=source,source=object,object=this)}methodNames||(methodNames=baseFunctions(source,keys(source)));var chain=!0,index=-1,isFunc=isFunction(object),length=methodNames.length;options===!1?chain=!1:isObject(options)&&"chain"in options&&(chain=options.chain);for(;++index>>1,FLOAT64_BYTES_PER_ELEMENT=Float64Array?Float64Array.BYTES_PER_ELEMENT:0,MAX_SAFE_INTEGER=9007199254740991,metaMap=WeakMap&&new WeakMap,realNames={},support=lodash.support={};!function(x){var Ctor=function(){this.x=x},props=[];Ctor.prototype={valueOf:x,y:x};for(var key in new Ctor)props.push(key);try{support.dom=11===document.createDocumentFragment().nodeType}catch(e){support.dom=!1}}(1,0),lodash.templateSettings={escape:reEscape,evaluate:reEvaluate,interpolate:reInterpolate,variable:"",imports:{_:lodash}};var baseCreate=function(){function object(){}return function(prototype){if(isObject(prototype)){object.prototype=prototype;var result=new object;object.prototype=null}return result||{}}}(),baseEach=createBaseEach(baseForOwn),baseEachRight=createBaseEach(baseForOwnRight,!0),baseFor=createBaseFor(),baseForRight=createBaseFor(!0),baseSetData=metaMap?function(func,data){return metaMap.set(func,data),func}:identity;bufferSlice||(bufferClone=ArrayBuffer&&Uint8Array?function(buffer){var byteLength=buffer.byteLength,floatLength=Float64Array?floor(byteLength/FLOAT64_BYTES_PER_ELEMENT):0,offset=floatLength*FLOAT64_BYTES_PER_ELEMENT,result=new ArrayBuffer(byteLength);if(floatLength){var view=new Float64Array(result,0,floatLength);view.set(new Float64Array(buffer,0,floatLength))}return byteLength!=offset&&(view=new Uint8Array(result,offset),view.set(new Uint8Array(buffer,offset))),result}:constant(null));var createCache=nativeCreate&&Set?function(values){return new SetCache(values)}:constant(null),getData=metaMap?function(func){return metaMap.get(func)}:noop,getLength=baseProperty("length"),setData=function(){var count=0,lastCalled=0;return function(key,value){var stamp=now(),remaining=HOT_SPAN-(stamp-lastCalled);if(lastCalled=stamp,remaining>0){if(++count>=HOT_COUNT)return key}else count=0;return baseSetData(key,value)}}(),difference=restParam(function(array,values){return isArrayLike(array)?baseDifference(array,baseFlatten(values,!1,!0)):[]}),findIndex=createFindIndex(),findLastIndex=createFindIndex(!0),intersection=restParam(function(arrays){for(var othLength=arrays.length,othIndex=othLength,caches=Array(length),indexOf=getIndexOf(),isCommon=indexOf==baseIndexOf,result=[];othIndex--;){var value=arrays[othIndex]=isArrayLike(value=arrays[othIndex])?value:[];caches[othIndex]=isCommon&&value.length>=120?createCache(othIndex&&value):null}var array=arrays[0],index=-1,length=array?array.length:0,seen=caches[0];outer:for(;++index2?arrays[length-2]:undefined,thisArg=length>1?arrays[length-1]:undefined;return length>2&&"function"==typeof iteratee?length-=2:(iteratee=length>1&&"function"==typeof thisArg?(--length,thisArg):undefined,thisArg=undefined),arrays.length=length,unzipWith(arrays,iteratee,thisArg)}),at=restParam(function(collection,props){return baseAt(collection,baseFlatten(props))}),countBy=createAggregator(function(result,value,key){hasOwnProperty.call(result,key)?++result[key]:result[key]=1}),find=createFind(baseEach),findLast=createFind(baseEachRight,!0),forEach=createForEach(arrayEach,baseEach),forEachRight=createForEach(arrayEachRight,baseEachRight),groupBy=createAggregator(function(result,value,key){hasOwnProperty.call(result,key)?result[key].push(value):result[key]=[value]}),indexBy=createAggregator(function(result,value,key){result[key]=value}),invoke=restParam(function(collection,path,args){var index=-1,isFunc="function"==typeof path,isProp=isKey(path),result=isArrayLike(collection)?Array(collection.length):[];return baseEach(collection,function(value){var func=isFunc?path:isProp&&null!=value?value[path]:null;result[++index]=func?func.apply(value,args):invokePath(value,path,args)}),result}),partition=createAggregator(function(result,value,key){result[key?0:1].push(value)},function(){return[[],[]]}),reduce=createReduce(arrayReduce,baseEach),reduceRight=createReduce(arrayReduceRight,baseEachRight),sortByAll=restParam(function(collection,iteratees){if(null==collection)return[];var guard=iteratees[2];return guard&&isIterateeCall(iteratees[0],iteratees[1],guard)&&(iteratees.length=1),baseSortByOrder(collection,baseFlatten(iteratees),[])}),now=nativeNow||function(){return(new Date).getTime()},bind=restParam(function(func,thisArg,partials){var bitmask=BIND_FLAG;if(partials.length){var holders=replaceHolders(partials,bind.placeholder);bitmask|=PARTIAL_FLAG}return createWrapper(func,bitmask,thisArg,partials,holders)}),bindAll=restParam(function(object,methodNames){methodNames=methodNames.length?baseFlatten(methodNames):functions(object);for(var index=-1,length=methodNames.length;++index"'`]/g,reHasEscapedHtml=RegExp(reEscapedHtml.source),reHasUnescapedHtml=RegExp(reUnescapedHtml.source),reEscape=/<%-([\s\S]+?)%>/g,reEvaluate=/<%([\s\S]+?)%>/g,reInterpolate=/<%=([\s\S]+?)%>/g,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,reRegExpChars=/[.*+?^${}()|[\]\/\\]/g,reHasRegExpChars=RegExp(reRegExpChars.source),reComboMark=/[\u0300-\u036f\ufe20-\ufe23]/g,reEscapeChar=/\\(\\)?/g,reEsTemplate=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,reFlags=/\w*$/,reHasHexPrefix=/^0[xX]/,reIsHostCtor=/^\[object .+?Constructor\]$/,reIsUint=/^\d+$/,reLatin1=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,reNoMatch=/($^)/,reUnescapedString=/['\n\r\u2028\u2029\\]/g,reWords=function(){var upper="[A-Z\\xc0-\\xd6\\xd8-\\xde]",lower="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(upper+"+(?="+upper+lower+")|"+upper+"?"+lower+"|"+upper+"+|[0-9]+","g")}(),whitespace=" \t\v\f \ufeff\n\r\u2028\u2029 ᠎              ",contextProps=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","document","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","window"],templateCounter=-1,typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[stringTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0,cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[mapTag]=cloneableTags[setTag]=cloneableTags[weakMapTag]=!1;var debounceOptions={leading:!1,maxWait:0,trailing:!1},deburredLetters={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},htmlEscapes={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},htmlUnescapes={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},objectTypes={function:!0,object:!0},stringEscapes={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},freeExports=objectTypes[typeof exports]&&exports&&!exports.nodeType&&exports,freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module,freeGlobal=freeExports&&freeModule&&"object"==typeof global&&global&&global.Object&&global,freeSelf=objectTypes[typeof self]&&self&&self.Object&&self,freeWindow=objectTypes[typeof window]&&window&&window.Object&&window,moduleExports=freeModule&&freeModule.exports===freeExports&&freeExports,root=freeGlobal||freeWindow!==(this&&this.window)&&freeWindow||freeSelf||this,_=runInContext();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(root._=_,define(function(){return _})):freeExports&&freeModule?moduleExports?(freeModule.exports=_)._=_:freeExports._=_:root._=_}.call(this),function(root,factory){if("function"==typeof define&&define.amd)define(["underscore","jquery","exports"],function(_,$,exports){root.Backbone=factory(root,exports,_,$)});else if("undefined"!=typeof exports){var _=require("underscore");factory(root,exports,_)}else root.Backbone=factory(root,{},root._,root.jQuery||root.Zepto||root.ender||root.$)}(this,function(root,Backbone,_,$){var previousBackbone=root.Backbone,array=[],slice=(array.push,array.slice);array.splice;Backbone.VERSION="1.1.2",Backbone.$=$,Backbone.noConflict=function(){return root.Backbone=previousBackbone,this},Backbone.emulateHTTP=!1,Backbone.emulateJSON=!1;var Events=Backbone.Events={on:function(name,callback,context){if(!eventsApi(this,"on",name,[callback,context])||!callback)return this;this._events||(this._events={});var events=this._events[name]||(this._events[name]=[]);return events.push({callback:callback,context:context,ctx:context||this}),this},once:function(name,callback,context){if(!eventsApi(this,"once",name,[callback,context])||!callback)return this;var self=this,once=_.once(function(){self.off(name,once),callback.apply(this,arguments)});return once._callback=callback,this.on(name,once,context)},off:function(name,callback,context){var retain,ev,events,names,i,l,j,k;if(!this._events||!eventsApi(this,"off",name,[callback,context]))return this;if(!name&&!callback&&!context)return this._events=void 0,this;for(names=name?[name]:_.keys(this._events),i=0,l=names.length;i").attr(attrs);this.setElement($el,!1)}}}),Backbone.sync=function(method,model,options){var type=methodMap[method];_.defaults(options||(options={}),{emulateHTTP:Backbone.emulateHTTP,emulateJSON:Backbone.emulateJSON});var params={type:type,dataType:"json"};if(options.url||(params.url=_.result(model,"url")||urlError()),null!=options.data||!model||"create"!==method&&"update"!==method&&"patch"!==method||(params.contentType="application/json",params.data=JSON.stringify(options.attrs||model.toJSON(options))),options.emulateJSON&&(params.contentType="application/x-www-form-urlencoded",params.data=params.data?{model:params.data}:{}),options.emulateHTTP&&("PUT"===type||"DELETE"===type||"PATCH"===type)){params.type="POST",options.emulateJSON&&(params.data._method=type);var beforeSend=options.beforeSend;options.beforeSend=function(xhr){if(xhr.setRequestHeader("X-HTTP-Method-Override",type),beforeSend)return beforeSend.apply(this,arguments)}}"GET"===params.type||options.emulateJSON||(params.processData=!1),"PATCH"===params.type&&noXhrPatch&&(params.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var xhr=options.xhr=Backbone.ajax(_.extend(params,options));return model.trigger("request",model,xhr,options),xhr};var noXhrPatch=!("undefined"==typeof window||!window.ActiveXObject||window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent),methodMap={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};Backbone.ajax=function(){return Backbone.$.ajax.apply(Backbone.$,arguments)};var Router=Backbone.Router=function(options){options||(options={}),options.routes&&(this.routes=options.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},optionalParam=/\((.*?)\)/g,namedParam=/(\(\?)?:\w+/g,splatParam=/\*\w+/g,escapeRegExp=/[\-{}\[\]+?.,\\\^$|#\s]/g;_.extend(Router.prototype,Events,{initialize:function(){},route:function(route,name,callback){_.isRegExp(route)||(route=this._routeToRegExp(route)),_.isFunction(name)&&(callback=name,name=""),callback||(callback=this[name]);var router=this;return Backbone.history.route(route,function(fragment){var args=router._extractParameters(route,fragment);router.execute(callback,args),router.trigger.apply(router,["route:"+name].concat(args)),router.trigger("route",name,args),Backbone.history.trigger("route",router,name,args)}),this},execute:function(callback,args){callback&&callback.apply(this,args)},navigate:function(fragment,options){return Backbone.history.navigate(fragment,options),this},_bindRoutes:function(){if(this.routes){this.routes=_.result(this,"routes");for(var route,routes=_.keys(this.routes);null!=(route=routes.pop());)this.route(route,this.routes[route])}},_routeToRegExp:function(route){return route=route.replace(escapeRegExp,"\\$&").replace(optionalParam,"(?:$1)?").replace(namedParam,function(match,optional){return optional?match:"([^/?]+)"}).replace(splatParam,"([^?]*?)"),new RegExp("^"+route+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(route,fragment){var params=route.exec(fragment).slice(1);return _.map(params,function(param,i){return i===params.length-1?param||null:param?decodeURIComponent(param):null})}});var History=Backbone.History=function(){this.handlers=[],_.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},routeStripper=/^[#\/]|\s+$/g,rootStripper=/^\/+|\/+$/g,isExplorer=/msie [\w.]+/,trailingSlash=/\/$/,pathStripper=/#.*$/;History.started=!1,_.extend(History.prototype,Events,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(window){var match=(window||this).location.href.match(/#(.*)$/);return match?match[1]:""},getFragment:function(fragment,forcePushState){if(null==fragment)if(this._hasPushState||!this._wantsHashChange||forcePushState){fragment=decodeURI(this.location.pathname+this.location.search);var root=this.root.replace(trailingSlash,"");fragment.indexOf(root)||(fragment=fragment.slice(root.length))}else fragment=this.getHash();return fragment.replace(routeStripper,"")},start:function(options){if(History.started)throw new Error("Backbone.history has already been started");History.started=!0,this.options=_.extend({root:"/"},this.options,options),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var fragment=this.getFragment(),docMode=document.documentMode,oldIE=isExplorer.exec(navigator.userAgent.toLowerCase())&&(!docMode||docMode<=7);if(this.root=("/"+this.root+"/").replace(rootStripper,"/"),oldIE&&this._wantsHashChange){var frame=Backbone.$('