// Copyright (c) 2023 VigLink
/*
 VigLink JavaScript Library -- http://www.viglink.com

 Permission is hereby granted to create derivative works, but only for use
 with the VigLink web service.

 Includes:

 Sizzle CSS Selector Engine v1.10.20-pre
 http://sizzlejs.com/

 Copyright 2013 jQuery Foundation, Inc. and other contributors
 Released under the MIT license
 http://jquery.org/license

 Date: 2014-05-22
*/
(function(l){var a={_breaker:{},_start:null,each:function(){var b,c=function(c,d){return c===a._breaker||!!d&&a.elapsed()>b};return function(e,d,f){var h=a.type(e);if(1===arguments.length)b=arguments[0];else if(f=a.extend({timeout:!1},f),"object"===h&&e.hasOwnProperty)for(k in e){if(e.hasOwnProperty(k)&&c(d(e[k],k),f.timeout))break}else if(e){var k=0;for(h=e.length;k<h&&!c(d(e[k],k),f.timeout);k++);}}}(),extend:function(a){var b,e,d=arguments.length;a=a||{};for(b=1;b<d;b++){var f=arguments[b];if(void 0!==
f&&null!==f)for(e in f){var h=f[e];a!==h&&void 0!==h&&(a[e]=h)}}return a},noop:function(){},type:function(){var a=function(a,b){try{return("function"===typeof window[b]||"object"===typeof window[b])&&a instanceof window[b]}catch(d){}return!1};return function(b){return b=null===b?"null":void 0===b?"undefined":a(b,"HTMLElement")||"object"===typeof b&&1===b.nodeType&&"string"===typeof b.nodeName?"element":b==b.window?"window":a(b,"HTMLDocument")||"object"===typeof b&&("defaultView"in b||"parentWindow"in
b)?"document":Object.prototype.toString.call(b).slice(8,-1).toLowerCase()}}()};a.extend(a,{addClass:function(b,c){a.hasClass(b,c)||(b.className=(b.className?b.className+" ":"")+c)},all:function(b,c){var e="array"===a.type(b)?[]:{};a.each(b,function(b,f){c(b,f)&&("array"===a.type(e)?e.push(b):e[f]=b)});return e},ancestors:function(a){for(var b=[a];(a=a.parentNode)&&1===a.nodeType;)b.push(a);return b},apiCallback:function(b,c){return function(e){"string"===a.type(e)&&(e={response:[e]});b.apply(c,e.response.concat(e.data))}},
attributes:function(b,c){var e;c=c||{};for(e in c)"function"===a.type(b.setAttribute)?b.setAttribute(e,c[e]):b["class"===e?"className":e]=c[e]},attrValues:function(a,c,e){return(c=a[c])&&c.split?c.split(e||" "):[]},batchable:function(b,c){c=c||a.noop;var e=function(){return a.extend({batch:!0,timeout:100},c())},d=a.traits.cors&&a.traits.json,f=[],h=null,k=function(){null!==h&&(clearTimeout(h),h=null);1===f.length?b.apply(null,f[0].arguments):1<f.length&&b.apply(null,f);f=[]},Y=function(){f.push({arguments:a.toArray(arguments),
batch:!0});d&&e().batch?null===h&&(h=setTimeout(a.entryPoint(a.bind(function(){k()},this)),e().timeout)):k()};a.extend(Y,{flush:k,now:b});return Y},batchArgs:function(b,c){return a.map(b,function(a){return void 0===c?a.arguments:a.arguments[c]})},batchCallType:function(b){var c;return a.reduce(null,b,function(a,b){c=b[0];return null!==a&&c!==a?"batch":c})},batched:function(b){b=a.toArray(b);if("array"===a.type(b))return a.all(b,function(b){return"object"===a.type(b)&&b.batch&&"array"===a.type(b.arguments)}).length===
b.length},bind:function(a,c){return function(){return a.apply(c,arguments)}},cache:function(){var b={},c="vglnk_"+(new Date).getTime(),e=0;return function(d,f,h){d&&"string"!==a.type(d)||(h=f,f=d,d=b);var k=d[c];if(k||void 0!==h)return k||(k=++e),b[k]||(d[c]=k,b[k]={}),void 0!==h&&(b[k][f]=h),"string"===typeof f?b[k][f]:b[k]}}(),canonicalizeHostname:function(){var b={};return function(c){"string"===typeof c&&(c=a.createA(c));try{return b[c.hostname]||(b[c.hostname]=c.hostname?c.hostname.toString().toLowerCase().replace(/^www\./,
"").replace(/:.*$/,""):""),b[c.hostname]}catch(e){return""}}}(),clone:function(b){return a.extend({},b)},commonParams:function(b,c){c=c||{};var e={drKey:c.key?null:c.dr_key,key:c.key,libId:c.library_id,subId:c.sub_id};"click"!==b&&"ping"!==b||a.extend(e,{cuid:c.cuid,loc:window.document.location.href,gppConsent:a._gppConsent().gppConsent,gdprConsent:a.consent().gdprConsent,ccpaConsent:a.consent().ccpaConsent,gdprApplies:a.consent().gdprApplies,v:1},e);return e},contains:function(b,c,e){return!!a.find(b,
function(a){return a===c},e)},context:function(b){"element"===a.type(b)&&(b=b.ownerDocument);"document"===a.type(b)&&(b=b.defaultView||b.parentWindow);if("window"===a.type(b))return b},contextIsAncestor:function(a,c){for(a=a.self;a.parent&&a.parent!==a;)if(a=a.parent,a===c)return!0;return!1},cors:function(b,c,e){var d=new window.XMLHttpRequest;d.onreadystatechange=function(){if(4===d.readyState&&200===d.status){var b;if(e)e(d.responseText);else if("string"===a.type(d.responseText)&&(b=d.responseText.match(/^\s*(?:\/\*\*\/)?([^(\s]+)\s*\((.*)\);?\s*$/))){var c=
b[1].replace(/(^\s+|\s+$)/g,"");b=a.fromJSON("["+b[2]+"]");window[c].apply(window,b)}}};try{return d.open("POST",b),d.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),d.withCredentials=!0,d.send(c),!0}catch(f){return!1}},createA:function(b,c){return a.createEl("a",{href:b,target:c})},createEl:function(b,c,e,d){b=(d||document).createElement(b);a.attributes(b,c);a.css(b,e);return b},css:function(b,c){var e;if("object"===a.type(c))for(e in c)try{b.style[e]=c[e]}catch(k){}else try{var d=
window.getComputedStyle(b);var f=a.toArray(arguments).slice(1);var h=a.reduce({},f,function(a,b){a[b]=d.getPropertyValue(b);return a});return 1===f.length?h[f[0]]:h}catch(k){return}return b},destructing:function(a){return function(a){var b=!1,c;return function(){b||(c=a.apply(null,arguments),b=!0);return c}}(a)},elapsed:function(a){return(a=a||this._start)?(new Date).getTime()-a.getTime():0},entryPoint:function(b){return a.exceptionLogger(function(){a._start=new Date;a.observer.pause();var c=b.apply(this,
arguments);a.observer.resume();return c})},escapeRegExp:function(){var a;return function(b){a=a||/([.*+?^${}()|[\]\\])/g;return b.replace(a,"\\$1")}}(),eventLink:function(a){var b=a.target||a.srcElement;do{try{var e=b.nodeType}catch(d){break}if(1===e&&(a=b.tagName.toUpperCase(),"A"===a||"AREA"===a))return b;b=b.parentNode}while(b)},every:function(b,c){return!a.some(b,function(a){return!c(a)})},exceptionLogger:function(){var b=!1,c=a.noop;return function(a,d){if(void 0!==d)b=d,c=a;else return function(){if(b)try{return a.apply(this,
arguments)}catch(f){c(f)}else return a.apply(this,arguments)}}}(),find:function(b,c,e){var d;a.each(b,function(b,e){if(c(b,e))return d=b,a._breaker},e);return d},generateNodeFilter:function(){var b=function(a,b){var e;b=","+b.join(",")+",";var d=0;for(e=a.length;d<e;d++)if(c(a[d],b))return!0;return!1},c=function(a,b){return-1!==b.indexOf(","+a+",")};return function(e){e=a.extend({custom:null,classes:[],rels:[],selectors:[],tags:[]},e);e.tags.length&&(e.tags=","+e.tags.join(",").toLowerCase()+",");
a.isArray(e.selectors)&&(e.selectors=e.selectors.join(","));e.selectors&&e.selectors.length&&a.select(e.selectors);return function(d,f,h){f=a.extend({ancestors:!0,self:!0},f);h=a.extend({},h);var k={passed:!0},g=function(d,f,h,k){var m;if(m=e.tags&&e.tags.length)m=e.tags,m=c(d.nodeName.toLowerCase(),m);if(m=!m){if(m=e.classes&&e.classes.length){m=e.classes;var r=a.attrValues(d,"className");m=b(m,r)}m=!m}if(m){if(m=e.rels&&e.rels.length)m=e.rels,r=a.attrValues(d,"rel"),m=c(d.nodeName.toLowerCase(),
",a,")&&b(m,r);m=!m}return m&&!("function"===a.type(e.custom)&&e.custom(d,f,h,k))};if(f.self&&!g(d,!0,k,h))return!1;if(f.ancestors)for(;d.parentNode;)if(d=d.parentNode,1===d.nodeType&&!g(d,!1,k,h))return!1;return k.passed}}}(),fromJSON:function(b){if(a.traits.json)try{return window.JSON.parse(b)}catch(c){}},fromQuery:function(b){"?"===b.substr(0,1)&&(b=b.substr(1));b=b.split("&");var c={};a.each(b,function(a){a=a.split("=");c[decodeURIComponent(a[0])]=decodeURIComponent(a[1])});return c},geometry:function(){var b,
c=arguments.length,e=Infinity,d=Infinity,f=-Infinity,h=-Infinity;for(b=0;b<c;b++){var k=a.position(arguments[b]);e=Math.min(e,k.x);d=Math.min(d,k.y);f=Math.max(f,k.x+arguments[b].offsetWidth);h=Math.max(h,k.y+arguments[b].offsetHeight)}return{x:e,y:d,w:f-e,h:h-d,x1:e,y1:d,x2:f,y2:h}},getActualHref:function(b){return a.cache(b,"href")||b.href},isMobileDeeplinkingAffiliatorParamExists:function(a){return(new URL(a)).searchParams.has("mobileDeeplinkingAffiliator")},buildMobileDeeplinkingPageUrl:function(a){var b=
new URL("https://cdn.viglink.com/api/redirect-mobile-deeplink"),e=(new URL(a)).searchParams;b.searchParams.set("url",a);b.searchParams.set("affiliator",e.get("mobileDeeplinkingAffiliator"));return b.toString()},hasAttrValue:function(b,c,e,d){return c?a.contains(a.attrValues(b,c,d),e):!1},hasClass:function(b,c){return a.hasAttrValue(b,"className",c)},hasRel:function(b,c){return a.hasAttrValue(b,"rel",c)},isArray:function(b){return"array"===a.type(b)},isDefaultPrevented:function(a){return a.isDefaultPrevented&&
a.isDefaultPrevented()||!1===a.returnValue||!0===a.defaultPrevented},isInDom:function(a){return!(!a||!a.offsetParent)},isVisible:function(a){return!(!a.offsetHeight&&!a.offsetWidth&&a.getClientRects&&!a.getClientRects().length)},jsonp:function(b){var c=document.getElementsByTagName("script")[0];b=a.createEl("script",{type:"text/javascript",src:b});c.parentNode.insertBefore(b,c)},links:function(){var b=["http:","https:"],c=function(c,d){return a.all(c,function(c){return c.href&&(!d.filter_by_scheme||
a.contains(b,c.protocol))&&(!d.filter_homepages||"/"!==c.pathname)&&(!d.filter_internal||c.hostname!==a.context(c).location.hostname)})};return function(b,d,f){d=d||"";f=a.extend({filter_homepages:!0,filter_internal:!0,filter_by_scheme:!0},f);d=a.map(d.split(","),function(a){return a+" a[href]"}).join(",");return c(a.withScope(b,d,{ancestors:!1,consolidate:!0}),f)}}(),map:function(b,c,e){return a.reduce([],b,function(a,b,e){a.push(c(b,e));return a},e)},matches:function(b,c){if("element"!==a.type(b))return!1;
try{return this.Sizzle.matchesSelector(b,c)}catch(e){return!0}},mergeable:function(b){var c=function(){return a.extend({batchable:!0,batchFn:a.noop,nonBatchFn:a.noop,timeout:100},b())};return a.batchable(function(){a.batched(arguments)?c().batchable?a.each(a.batchArgs(arguments),function(a){c().batchFn.apply(this,a)}):c().nonBatchFn.apply(this,arguments):c().nonBatchFn.apply(this,arguments)},function(){return{batch:!0,timeout:c().timeout}})},mergeParams:function(b){var c,e,d=arguments.length,f=function(d,
e){c=b[e];b.hasOwnProperty(e)&&a.isArray(d)&&a.isArray(c)?b[e]=a.unique(c.concat(d)):b[e]=d};for(e=1;e<d;e++){var h=arguments[e];a.each(h,f)}return a.prune(b)},nodesOfType:function(b){var c=a.toArray(arguments).slice(1);return a.all(b,function(b){return a.contains(c,b.nodeType)})},on:function(){var b;return function(c,e,d){if(1===arguments.length)b=c;else{if(2===arguments.length){if(!b)return;d=e;e=c;c=b}else var f=a.toArray(arguments).slice(3,arguments.length);try{var h=c["on"+e]}catch(Y){}"function"===
typeof h&&(c["on"+e]=a.bind(function(b){b=b||window.event;var d=h.apply(c,arguments);this.exceptionLogger(function(){return b?(void 0!==d&&!1!==b.returnValue&&(b.returnValue=d),a.isDefaultPrevented(b)&&"function"===a.type(b.preventDefault)&&b.preventDefault(),b.returnValue):d})()},this));var k=a.entryPoint(function(){if(b.enabled())return d.apply(null,a.toArray(arguments).concat(f||[]))});c.addEventListener?c.addEventListener(e,k,!1):c.attachEvent&&c.attachEvent("on"+e,k)}}}(),packageArgs:function(){return a.toArray(arguments)},
position:function(b,c){var e=0,d=0,f=0,h=0;c=c||document;if(!a.isInDom(b))return!1;var k=b;do e+=k.offsetLeft,d+=k.offsetTop,k=k.offsetParent;while(k);k=b;do f+=k.scrollLeft,h+=k.scrollTop,k=k.parentNode;while(k&&k!==c.body);return{x:e-f,y:d-h}},preventDefault:function(a){a.preventDefault&&a.preventDefault();return a.returnValue=!1},prune:function(b){a.each(b,function(a,e){null!==a&&void 0!==a||delete b[e]});return b},ready:function(){var b=!1,c=[],e=!1,d,f;document.addEventListener?d=function(){document.removeEventListener("DOMContentLoaded",
d,!1);g()}:document.attachEvent&&(f=function(){"complete"===document.readyState&&(document.detachEvent("onreadystatechange",f),g())});var h=function(){if(!b){b=!0;if("interactive"===document.readyState||"complete"===document.readyState)return g();if(document.addEventListener)document.addEventListener("DOMContentLoaded",d,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",f);var c=!1;try{c=null===window.frameElement}catch(m){}document.documentElement.doScroll&&c&&k()}a.on(window,
"load",g)}};var k=function(){if(!e){try{document.documentElement.doScroll("left")}catch(r){setTimeout(a.entryPoint(k),1);return}g()}};var g=function(){if(!e){if(!document.body)return setTimeout(a.entryPoint(g),13);e=!0;c&&(a.each(c,function(a){a()}),c=null)}};return function(a){h();e?a():c.push(a)}}(),reduce:function(b,c,e,d){a.each(c,function(a,c){b=e(b,a,c)},d);return b},reformatKeys:function(b){var c,e=function(a){return"_"+a.toLowerCase()};for(c in b){var d=c.replace(/([A-Z])/g,e);"object"===
a.type(b[c])&&(b[c]=a.reformatKeys(b[c]));d!==c&&(b[d]=b[c],delete b[c])}return b},removeClass:function(b,c){if(a.hasClass(b,c)){var e,d=a.attrValues(b,"className");var f=0;for(e=d.length;f<e;f++)d[f]===c&&delete d[f];b.className=d.join(" ")}},request:function(b,c,e){var d=a.uniqid("vglnk_"),f=a.toArray(arguments).slice(3,arguments.length),h=function(b,c,d){var e={},f=!!c.length,h=!0===d||!1===d;if(f||h)b=a.createA(b),f&&(e.search="?"+c),h&&(c=b.protocol||a.context(b).location.protocol||"http:",e.protocol=
c.replace(/s?:$/,function(){return d?"s:":":"})),b=a.extend(b,e).href;return b};var k=function(b,c){var d={},e=a.commonParams();d[c]={};a.each(b,function(a,b){b in e?d[b]=a:d[c][b]=a});d[c]=a.toJSON(d[c]);return a.prune(d)};e=a.extend({fn:a.noop,json_payload:null,jsonp:!0,"return":!1,ssl:null,timeout:null},e);if("string"===typeof e.fn){var g=window[e.fn];d=e.fn}else"function"===typeof e.fn&&(g=e.fn);if("function"===a.type(g)){var r=a.entryPoint(a.destructing(function(){if(e.json_payload){var b=e.json_payload;
var h=a.fromJSON(c[b]);c=a.extend(c,h);delete c[b]}g({response:a.toArray(arguments),data:f,args:c});window[d]&&(window[d]=void 0)}));null!==e.timeout&&setTimeout(r,e.timeout)}e.json_payload&&a.traits.cors&&(c=k(c,e.json_payload));!0===e.jsonp&&(window[d]=r,c=a.extend({format:"jsonp",jsonp:d},c));k=a.toQuery(c);return e["return"]?h(b,k,e.ssl):a.traits.json&&a.traits.cors&&a.cors(h(b,"",e.ssl),k,e.jsonp?null:r)?!0:a.jsonp(h(b,k,e.ssl))},rootContext:function(b){var c=b=this.context(b);try{for(;b&&b.parent!==
b;)b=b.parent}catch(e){}return a.find([b,c.top,c],function(b){return"window"===a.type(b)})},select:function(){try{return this.Sizzle.apply(this.Sizzle,arguments)}catch(b){return[]}},some:function(b,c){return!!a.find(b,function(a){return c(a)})},stopPropagation:function(a){a&&a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0},time:function(){return(new Date).getTime()},toArray:function(a){if(a&&void 0!==a.length)try{return Array.prototype.slice.call(a,0)}catch(f){var b,e=[];var d=0;for(b=a.length;d<
b;d++)e[d]=a[d];return e}},toJSON:function(b){if(a.traits.json)try{return window.JSON.stringify(b)}catch(c){}},toQuery:function(b){var c="";a.each(a.prune(b),function(a,b){c+="&"+encodeURIComponent(b)+"="+encodeURIComponent(a)});return c.substr(1)},updateUrl:function(b,c){return a.extend(a.createA(b),c).href},uniqid:function(){var a=0;return function(b){return(b||"")+(new Date).getTime()+a++}}(),unique:function(b){return a.reduce([],b,function(b,e){a.contains(b,e)||b.push(e);return b})},unlink:function(a){var b,
e=document.createDocumentFragment();if(a.parentNode){for(;null!==(b=a.firstChild);)e.appendChild(b);a.parentNode.insertBefore(e,a);a.parentNode.removeChild(a)}},withScope:function(){var b=function(b,e,d){if(d.self&&a.contains(e,b,{timeout:!0}))return b;if(d.ancestors)return a.find(a.ancestors(b).slice(0),function(b){return a.contains(e,b,{timeout:!0})},{timeout:!0})};return function(c,e,d){var f,h=a.select(e);d=a.extend({ancestors:!0,consolidate:!1,descendants:!0,self:!0},d);d.descendants&&(f=a.map(h,
function(b){return[b,a.ancestors(b)]},{timeout:!0}));c=a.all(a.map(c,function(c){var e,k=[];(e=b(c,h,d))?k.push(e):1===c.nodeType&&d.descendants&&a.each(f,function(b){var d=b[0];a.contains(b[1],c,{timeout:!0})&&k.push(d)},{timeout:!0});return[c,k]},{timeout:!0}),function(a){return 0<a[1].length},{timeout:!0});return d.consolidate?a.unique(a.reduce([],c,function(a,b){return a.concat(b[1])},{timeout:!0})):c}}()});var p=function(){var b=a.find(a.toArray(arguments),function(b){return"function"===a.type(b)});
b&&(a.Sizzle=b())};p.amd=!0;(function(a){function b(a,b,c,d){var e,n,f,v;(b?b.ownerDocument||b:G)!==E&&Q(b);b=b||E;c=c||[];if(!a||"string"!==typeof a)return c;if(1!==(v=b.nodeType)&&9!==v)return[];if(H&&!d){if(e=pa.exec(a))if(f=e[1])if(9===v)if((n=b.getElementById(f))&&n.parentNode){if(n.id===f)return c.push(n),c}else return c;else{if(b.ownerDocument&&(n=b.ownerDocument.getElementById(f))&&W(b,n)&&n.id===f)return c.push(n),c}else{if(e[2])return M.apply(c,b.getElementsByTagName(a)),c;if((f=e[3])&&
B.getElementsByClassName&&b.getElementsByClassName)return M.apply(c,b.getElementsByClassName(f)),c}if(B.qsa&&(!F||!F.test(a))){n=e=D;f=b;var h=9===v&&a;if(1===v&&"object"!==b.nodeName.toLowerCase()){v=Z(a);(e=b.getAttribute("id"))?n=e.replace(qa,"\\$&"):b.setAttribute("id",n);n="[id='"+n+"'] ";for(f=v.length;f--;)v[f]=n+C(v[f]);f=fa.test(a)&&z(b.parentNode)||b;h=v.join(",")}if(h)try{return M.apply(c,f.querySelectorAll(h)),c}catch(Ea){}finally{e||b.removeAttribute("id")}}}return ra(a.replace(aa,"$1"),
b,c,d)}function e(){function a(c,d){b.push(c+" ")>x.cacheLength&&delete a[b.shift()];return a[c+" "]=d}var b=[];return a}function d(a){a[D]=!0;return a}function f(a){var b=E.createElement("div");try{return!!a(b)}catch(v){return!1}finally{b.parentNode&&b.parentNode.removeChild(b)}}function h(a,b){var c=a.split("|");for(a=a.length;a--;)x.attrHandle[c[a]]=b}function k(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||-2147483648)-(~a.sourceIndex||-2147483648);if(d)return d;if(c)for(;c=
c.nextSibling;)if(c===b)return-1;return a?1:-1}function g(a){return function(b){return"input"===b.nodeName.toLowerCase()&&b.type===a}}function r(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function m(a){return d(function(b){b=+b;return d(function(c,d){for(var e,n=a([],c.length,b),f=n.length;f--;)c[e=n[f]]&&(c[e]=!(d[e]=c[e]))})})}function z(a){return a&&"undefined"!==typeof a.getElementsByTagName&&a}function l(){}function C(a){for(var b=0,c=
a.length,d="";b<c;b++)d+=a[b].value;return d}function u(a,b,c){var d=b.dir,e=c&&"parentNode"===d,n=sa++;return b.first?function(b,c,n){for(;b=b[d];)if(1===b.nodeType||e)return a(b,c,n)}:function(b,c,f){var v,h=[I,n];if(f)for(;b=b[d];){if((1===b.nodeType||e)&&a(b,c,f))return!0}else for(;b=b[d];)if(1===b.nodeType||e){var k=b[D]||(b[D]={});if((v=k[d])&&v[0]===I&&v[1]===n)return h[2]=v[2];k[d]=h;if(h[2]=a(b,c,f))return!0}}}function y(a){return 1<a.length?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,
c,d))return!1;return!0}:a[0]}function ba(a,b,c,d,e){for(var n,f=[],v=0,h=a.length,k=null!=b;v<h;v++)if(n=a[v])if(!c||c(n,d,e))f.push(n),k&&b.push(v);return f}function A(a,c,e,f,h,k){f&&!f[D]&&(f=A(f));h&&!h[D]&&(h=A(h,k));return d(function(d,n,v,k){var m,P=[],g=[],r=n.length,y;if(!(y=d)){y=c||"*";for(var u=v.nodeType?[v]:v,T=[],z=0,l=u.length;z<l;z++)b(y,u[z],T);y=T}y=!a||!d&&c?y:ba(y,P,a,v,k);u=e?h||(d?a:r||f)?[]:n:y;e&&e(y,u,v,k);if(f){var C=ba(u,g);f(C,[],v,k);for(v=C.length;v--;)if(m=C[v])u[g[v]]=
!(y[g[v]]=m)}if(d){if(h||a){if(h){C=[];for(v=u.length;v--;)(m=u[v])&&C.push(y[v]=m);h(null,u=[],C,k)}for(v=u.length;v--;)(m=u[v])&&-1<(C=h?R.call(d,m):P[v])&&(d[C]=!(n[C]=m))}}else u=ba(u===n?u.splice(r,u.length):u),h?h(null,n,u,k):M.apply(n,u)})}function w(a){var b,c,d=a.length,e=x.relative[a[0].type];var n=e||x.relative[" "];for(var f=e?1:0,h=u(function(a){return a===b},n,!0),k=u(function(a){return-1<R.call(b,a)},n,!0),m=[function(a,c,d){return!e&&(d||c!==ca)||((b=c).nodeType?h(a,c,d):k(a,c,d))}];f<
d;f++)if(n=x.relative[a[f].type])m=[u(y(m),n)];else{n=x.filter[a[f].type].apply(null,a[f].matches);if(n[D]){for(c=++f;c<d&&!x.relative[a[c].type];c++);return A(1<f&&y(m),1<f&&C(a.slice(0,f-1).concat({value:" "===a[f-2].type?"*":""})).replace(aa,"$1"),n,f<c&&w(a.slice(f,c)),c<d&&w(a=a.slice(c)),c<d&&C(a))}m.push(n)}return y(m)}function q(a,c){var e=0<c.length,f=0<a.length,n=function(d,n,v,h,k){var m,P,g,r=0,u="0",y=d&&[],z=[],T=ca,l=d||f&&x.find.TAG("*",k),C=I+=null==T?1:Math.random()||.1,oa=l.length;
for(k&&(ca=n!==E&&n);u!==oa&&null!=(m=l[u]);u++){if(f&&m){for(P=0;g=a[P++];)if(g(m,n,v)){h.push(m);break}k&&(I=C)}e&&((m=!g&&m)&&r--,d&&y.push(m))}r+=u;if(e&&u!==r){for(P=0;g=c[P++];)g(y,z,n,v);if(d){if(0<r)for(;u--;)y[u]||z[u]||(z[u]=ta.call(h));z=ba(z)}M.apply(h,z);k&&!d&&0<z.length&&1<r+c.length&&b.uniqueSort(h)}k&&(I=C,ca=T);return y};return e?d(n):n}var t,ca,N,V,E,J,H,F,S,da,W,D="sizzle"+-new Date,G=a.document,I=0,sa=0,ja=e(),ka=e(),la=e(),ha=function(a,b){a===b&&(V=!0);return 0},ua={}.hasOwnProperty,
O=[],ta=O.pop,va=O.push,M=O.push,ma=O.slice,R=O.indexOf||function(a){for(var b=0,c=this.length;b<c;b++)if(this[b]===a)return b;return-1},aa=/^[\x20\t\r\n\f]+|((?:^|[^\\])(?:\\.)*)[\x20\t\r\n\f]+$/g,wa=/^[\x20\t\r\n\f]*,[\x20\t\r\n\f]*/,xa=/^[\x20\t\r\n\f]*([>+~]|[\x20\t\r\n\f])[\x20\t\r\n\f]*/,ya=/=[\x20\t\r\n\f]*([^\]'"]*?)[\x20\t\r\n\f]*\]/g,za=/:((?:\\.|[\w-]|[^\x00-\xa0])+)(?:\((('((?:\\.|[^\\'])*)'|"((?:\\.|[^\\"])*)")|((?:\\.|[^\\()[\]]|\[[\x20\t\r\n\f]*((?:\\.|[\w-]|[^\x00-\xa0])+)(?:[\x20\t\r\n\f]*([*^$|!~]?=)[\x20\t\r\n\f]*(?:'((?:\\.|[^\\'])*)'|"((?:\\.|[^\\"])*)"|((?:\\.|[\w-]|[^\x00-\xa0])+))|)[\x20\t\r\n\f]*\])*)|.*)\)|)/,
Aa=/^(?:\\.|[\w-]|[^\x00-\xa0])+$/,ea={ID:/^#((?:\\.|[\w-]|[^\x00-\xa0])+)/,CLASS:/^\.((?:\\.|[\w-]|[^\x00-\xa0])+)/,TAG:/^((?:\\.|[\w-]|[^\x00-\xa0])+|[*])/,ATTR:/^\[[\x20\t\r\n\f]*((?:\\.|[\w-]|[^\x00-\xa0])+)(?:[\x20\t\r\n\f]*([*^$|!~]?=)[\x20\t\r\n\f]*(?:'((?:\\.|[^\\'])*)'|"((?:\\.|[^\\"])*)"|((?:\\.|[\w-]|[^\x00-\xa0])+))|)[\x20\t\r\n\f]*\]/,PSEUDO:/^:((?:\\.|[\w-]|[^\x00-\xa0])+)(?:\((('((?:\\.|[^\\'])*)'|"((?:\\.|[^\\"])*)")|((?:\\.|[^\\()[\]]|\[[\x20\t\r\n\f]*((?:\\.|[\w-]|[^\x00-\xa0])+)(?:[\x20\t\r\n\f]*([*^$|!~]?=)[\x20\t\r\n\f]*(?:'((?:\\.|[^\\'])*)'|"((?:\\.|[^\\"])*)"|((?:\\.|[\w-]|[^\x00-\xa0])+))|)[\x20\t\r\n\f]*\])*)|.*)\)|)/,
CHILD:/^:(only|first|last|nth|nth-last)-(child|of-type)(?:\([\x20\t\r\n\f]*(even|odd|(([+-]|)(\d*)n|)[\x20\t\r\n\f]*(?:([+-]|)[\x20\t\r\n\f]*(\d+)|))[\x20\t\r\n\f]*\)|)/i,bool:/^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$/i,needsContext:/^[\x20\t\r\n\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\([\x20\t\r\n\f]*((?:-\d)?\d*)[\x20\t\r\n\f]*\)|)(?=[^-]|$)/i},Ba=/^(?:input|select|textarea|button)$/i,Ca=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,
pa=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,fa=/[+~]/,qa=/'|\\/g,K=/\\([\da-f]{1,6}[\x20\t\r\n\f]?|([\x20\t\r\n\f])|.)/ig,L=function(a,b,c){a="0x"+b-65536;return a!==a||c?b:0>a?String.fromCharCode(a+65536):String.fromCharCode(a>>10|55296,a&1023|56320)};try{M.apply(O=ma.call(G.childNodes),G.childNodes),O[G.childNodes.length].nodeType}catch(n){M={apply:O.length?function(a,b){va.apply(a,ma.call(b))}:function(a,b){for(var c=a.length,d=0;a[c++]=b[d++];);a.length=c-1}}}var B=b.support={};var Da=b.isXML=function(a){return(a=
a&&(a.ownerDocument||a).documentElement)?"HTML"!==a.nodeName:!1};var Q=b.setDocument=function(a){var b=a?a.ownerDocument||a:G;a=b.defaultView;if(b===E||9!==b.nodeType||!b.documentElement)return E;E=b;J=b.documentElement;H=!Da(b);a&&a!==a.top&&(a.addEventListener?a.addEventListener("unload",function(){Q()},!1):a.attachEvent&&a.attachEvent("onunload",function(){Q()}));B.attributes=f(function(a){a.className="i";return!a.getAttribute("className")});B.getElementsByTagName=f(function(a){a.appendChild(b.createComment(""));
return!a.getElementsByTagName("*").length});B.getElementsByClassName=X.test(b.getElementsByClassName)&&f(function(a){a.innerHTML="<div class='a'></div><div class='a i'></div>";a.firstChild.className="i";return 2===a.getElementsByClassName("i").length});B.getById=f(function(a){J.appendChild(a).id=D;return!b.getElementsByName||!b.getElementsByName(D).length});B.getById?(x.find.ID=function(a,b){if("undefined"!==typeof b.getElementById&&H)return(a=b.getElementById(a))&&a.parentNode?[a]:[]},x.filter.ID=
function(a){var b=a.replace(K,L);return function(a){return a.getAttribute("id")===b}}):(delete x.find.ID,x.filter.ID=function(a){var b=a.replace(K,L);return function(a){return(a="undefined"!==typeof a.getAttributeNode&&a.getAttributeNode("id"))&&a.value===b}});x.find.TAG=B.getElementsByTagName?function(a,b){if("undefined"!==typeof b.getElementsByTagName)return b.getElementsByTagName(a)}:function(a,b){var c=[],d=0;b=b.getElementsByTagName(a);if("*"===a){for(;a=b[d++];)1===a.nodeType&&c.push(a);return c}return b};
x.find.CLASS=B.getElementsByClassName&&function(a,b){if("undefined"!==typeof b.getElementsByClassName&&H)return b.getElementsByClassName(a)};S=[];F=[];if(B.qsa=X.test(b.querySelectorAll))f(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>";a.querySelectorAll("[msallowclip^='']").length&&F.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")");a.querySelectorAll("[selected]").length||F.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)");
a.querySelectorAll(":checked").length||F.push(":checked")}),f(function(a){var c=b.createElement("input");c.setAttribute("type","hidden");a.appendChild(c).setAttribute("name","D");a.querySelectorAll("[name=d]").length&&F.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?=");a.querySelectorAll(":enabled").length||F.push(":enabled",":disabled");a.querySelectorAll("*,:x");F.push(",.*:")});(B.matchesSelector=X.test(da=J.matches||J.webkitMatchesSelector||J.mozMatchesSelector||J.oMatchesSelector||J.msMatchesSelector))&&
f(function(a){B.disconnectedMatch=da.call(a,"div");da.call(a,"[s!='']:x");S.push("!=",":((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:[\\x20\\t\\r\\n\\f]*([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+))|)[\\x20\\t\\r\\n\\f]*\\])*)|.*)\\)|)")});F=F.length&&new RegExp(F.join("|"));S=S.length&&new RegExp(S.join("|"));
W=(a=X.test(J.compareDocumentPosition))||X.test(J.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a;b=b&&b.parentNode;return a===b||!!(b&&1===b.nodeType&&(c.contains?c.contains(b):a.compareDocumentPosition&&a.compareDocumentPosition(b)&16))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1};ha=a?function(a,c){if(a===c)return V=!0,0;var d=!a.compareDocumentPosition-!c.compareDocumentPosition;if(d)return d;d=(a.ownerDocument||a)===(c.ownerDocument||c)?a.compareDocumentPosition(c):
1;return d&1||!B.sortDetached&&c.compareDocumentPosition(a)===d?a===b||a.ownerDocument===G&&W(G,a)?-1:c===b||c.ownerDocument===G&&W(G,c)?1:N?R.call(N,a)-R.call(N,c):0:d&4?-1:1}:function(a,c){if(a===c)return V=!0,0;var d=0,e=a.parentNode,f=c.parentNode,n=[a],h=[c];if(!e||!f)return a===b?-1:c===b?1:e?-1:f?1:N?R.call(N,a)-R.call(N,c):0;if(e===f)return k(a,c);for(;a=a.parentNode;)n.unshift(a);for(a=c;a=a.parentNode;)h.unshift(a);for(;n[d]===h[d];)d++;return d?k(n[d],h[d]):n[d]===G?-1:h[d]===G?1:0};return b};
b.matches=function(a,c){return b(a,null,null,c)};b.matchesSelector=function(a,c){(a.ownerDocument||a)!==E&&Q(a);c=c.replace(ya,"='$1']");if(!(!B.matchesSelector||!H||S&&S.test(c)||F&&F.test(c)))try{var d=da.call(a,c);if(d||B.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(T){}return 0<b(c,E,null,[a]).length};b.contains=function(a,b){(a.ownerDocument||a)!==E&&Q(a);return W(a,b)};b.attr=function(a,b){(a.ownerDocument||a)!==E&&Q(a);var c=x.attrHandle[b.toLowerCase()];c=c&&ua.call(x.attrHandle,
b.toLowerCase())?c(a,b,!H):void 0;return void 0!==c?c:B.attributes||!H?a.getAttribute(b):(c=a.getAttributeNode(b))&&c.specified?c.value:null};b.error=function(a){throw Error("Syntax error, unrecognized expression: "+a);};b.uniqueSort=function(a){var b,c=[],d=0,e=0;V=!B.detectDuplicates;N=!B.sortStable&&a.slice(0);a.sort(ha);if(V){for(;b=a[e++];)b===a[e]&&(d=c.push(e));for(;d--;)a.splice(c[d],1)}N=null;return a};var ia=b.getText=function(a){var b="",c=0;var d=a.nodeType;if(!d)for(;d=a[c++];)b+=ia(d);
else if(1===d||9===d||11===d){if("string"===typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)b+=ia(a)}else if(3===d||4===d)return a.nodeValue;return b};var x=b.selectors={cacheLength:50,createPseudo:d,match:ea,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){a[1]=a[1].replace(K,L);a[3]=(a[3]||a[4]||a[5]||"").replace(K,L);"~="===a[2]&&(a[3]=
" "+a[3]+" ");return a.slice(0,4)},CHILD:function(a){a[1]=a[1].toLowerCase();"nth"===a[1].slice(0,3)?(a[3]||b.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&b.error(a[0]);return a},PSEUDO:function(a){var b,c=!a[6]&&a[2];if(ea.CHILD.test(a[0]))return null;a[3]?a[2]=a[4]||a[5]||"":c&&za.test(c)&&(b=Z(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b));return a.slice(0,3)}},filter:{TAG:function(a){var b=
a.replace(K,L).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=ja[a+" "];return b||(b=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+a+"([\\x20\\t\\r\\n\\f]|$)"),ja(a,function(a){return b.test("string"===typeof a.className&&a.className||"undefined"!==typeof a.getAttribute&&a.getAttribute("class")||"")}))},ATTR:function(a,c,d){return function(e){e=b.attr(e,a);if(null==e)return"!="===c;if(!c)return!0;e+="";return"="===c?e===
d:"!="===c?e!==d:"^="===c?d&&0===e.indexOf(d):"*="===c?d&&-1<e.indexOf(d):"$="===c?d&&e.slice(-d.length)===d:"~="===c?-1<(" "+e+" ").indexOf(d):"|="===c?e===d||e.slice(0,d.length+1)===d+"-":!1}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),h="last"!==a.slice(-4),k="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,m){var n;c=f!==h?"nextSibling":"previousSibling";var g=b.parentNode,u=k&&b.nodeName.toLowerCase();m=!m&&!k;if(g){if(f){for(;c;){for(n=b;n=n[c];)if(k?
n.nodeName.toLowerCase()===u:1===n.nodeType)return!1;var r=c="only"===a&&!r&&"nextSibling"}return!0}r=[h?g.firstChild:g.lastChild];if(h&&m){m=g[D]||(g[D]={});var y=m[a]||[];var z=y[0]===I&&y[1];var l=y[0]===I&&y[2];for(n=z&&g.childNodes[z];n=++z&&n&&n[c]||(l=z=0)||r.pop();)if(1===n.nodeType&&++l&&n===b){m[a]=[I,z,l];break}}else if(m&&(y=(b[D]||(b[D]={}))[a])&&y[0]===I)l=y[1];else for(;(n=++z&&n&&n[c]||(l=z=0)||r.pop())&&((k?n.nodeName.toLowerCase()!==u:1!==n.nodeType)||!++l||(m&&((n[D]||(n[D]={}))[a]=
[I,l]),n!==b)););l-=e;return l===d||0===l%d&&0<=l/d}}},PSEUDO:function(a,c){var e=x.pseudos[a]||x.setFilters[a.toLowerCase()]||b.error("unsupported pseudo: "+a);if(e[D])return e(c);if(1<e.length){var f=[a,a,"",c];return x.setFilters.hasOwnProperty(a.toLowerCase())?d(function(a,b){for(var d,f=e(a,c),h=f.length;h--;)d=R.call(a,f[h]),a[d]=!(b[d]=f[h])}):function(a){return e(a,0,f)}}return e}},pseudos:{not:d(function(a){var b=[],c=[],e=na(a.replace(aa,"$1"));return e[D]?d(function(a,b,c,d){d=e(a,null,
d,[]);for(var f=a.length;f--;)if(c=d[f])a[f]=!(b[f]=c)}):function(a,d,f){b[0]=a;e(b,null,f,c);return!c.pop()}}),has:d(function(a){return function(c){return 0<b(a,c).length}}),contains:d(function(a){a=a.replace(K,L);return function(b){return-1<(b.textContent||b.innerText||ia(b)).indexOf(a)}}),lang:d(function(a){Aa.test(a||"")||b.error("unsupported lang: "+a);a=a.replace(K,L).toLowerCase();return function(b){var c;do if(c=H?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),
c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===J},focus:function(a){return a===E.activeElement&&(!E.hasFocus||E.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return!1===a.disabled},disabled:function(a){return!0===a.disabled},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){a.parentNode&&
a.parentNode.selectedIndex;return!0===a.selected},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(6>a.nodeType)return!1;return!0},parent:function(a){return!x.pseudos.empty(a)},header:function(a){return Ca.test(a.nodeName)},input:function(a){return Ba.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===
b.toLowerCase())},first:m(function(){return[0]}),last:m(function(a,b){return[b-1]}),eq:m(function(a,b,c){return[0>c?c+b:c]}),even:m(function(a,b){for(var c=0;c<b;c+=2)a.push(c);return a}),odd:m(function(a,b){for(var c=1;c<b;c+=2)a.push(c);return a}),lt:m(function(a,b,c){for(b=0>c?c+b:c;0<=--b;)a.push(b);return a}),gt:m(function(a,b,c){for(c=0>c?c+b:c;++c<b;)a.push(c);return a})}};x.pseudos.nth=x.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})x.pseudos[t]=g(t);for(t in{submit:!0,
reset:!0})x.pseudos[t]=r(t);l.prototype=x.filters=x.pseudos;x.setFilters=new l;var Z=b.tokenize=function(a,c){var d,e,f,h,m;if(h=ka[a+" "])return c?0:h.slice(0);h=a;var k=[];for(m=x.preFilter;h;){if(!g||(d=wa.exec(h)))d&&(h=h.slice(d[0].length)||h),k.push(e=[]);var g=!1;if(d=xa.exec(h))g=d.shift(),e.push({value:g,type:d[0].replace(aa," ")}),h=h.slice(g.length);for(f in x.filter)!(d=ea[f].exec(h))||m[f]&&!(d=m[f](d))||(g=d.shift(),e.push({value:g,type:f,matches:d}),h=h.slice(g.length));if(!g)break}return c?
h.length:h?b.error(a):ka(a,k).slice(0)};var na=b.compile=function(a,b){var c,d=[],e=[],f=la[a+" "];if(!f){b||(b=Z(a));for(c=b.length;c--;)f=w(b[c]),f[D]?d.push(f):e.push(f);f=la(a,q(e,d));f.selector=a}return f};var ra=b.select=function(a,b,c,d){var e,f,h,m="function"===typeof a&&a,k=!d&&Z(a=m.selector||a);c=c||[];if(1===k.length){var g=k[0]=k[0].slice(0);if(2<g.length&&"ID"===(f=g[0]).type&&B.getById&&9===b.nodeType&&H&&x.relative[g[1].type]){b=(x.find.ID(f.matches[0].replace(K,L),b)||[])[0];if(!b)return c;
m&&(b=b.parentNode);a=a.slice(g.shift().value.length)}for(e=ea.needsContext.test(a)?0:g.length;e--;){f=g[e];if(x.relative[h=f.type])break;if(h=x.find[h])if(d=h(f.matches[0].replace(K,L),fa.test(g[0].type)&&z(b.parentNode)||b)){g.splice(e,1);a=d.length&&C(g);if(!a)return M.apply(c,d),c;break}}}(m||na(a,k))(d,b,!H,c,fa.test(a)&&z(b.parentNode)||b);return c};B.sortStable=D.split("").sort(ha).join("")===D;B.detectDuplicates=!!V;Q();B.sortDetached=f(function(a){return a.compareDocumentPosition(E.createElement("div"))&
1});f(function(a){a.innerHTML="<a href='#'></a>";return"#"===a.firstChild.getAttribute("href")})||h("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)});B.attributes&&f(function(a){a.innerHTML="<input/>";a.firstChild.setAttribute("value","");return""===a.firstChild.getAttribute("value")})||h("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue});f(function(a){return null==a.getAttribute("disabled")})||h("checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
function(a,b,c){var d;if(!c)return!0===a[b]?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null});"function"===typeof p&&p.amd?p(function(){return b}):"undefined"!==typeof module&&module.exports?module.exports=b:a.Sizzle=b})(window);a.browser=function(){var b,c={},e=navigator.userAgent.toLowerCase().replace(/\s*[()]\s*/g,"; ").replace(/(\/[\w.]+)\s+/g,"$1; ").replace(/;\s*$/,"").split(/;\s*/);a.each(e,function(a){b=(/[\/ :]([^\/ :]+)$/.exec(a)||[])[1];c[b?a.substr(0,a.length-b.length-
1).replace(/\d*$/,""):a]=b||!0});return{aol:c.aol,blackberry:c.blackberry,firefox:c.firefox,ie:!(!c.msie&&!c.trident),ios:!(!c.applewebkit||!c.mobile),opera:c.opera,playstation:c.playstation,version:parseFloat(c.version||c.crios||c.msie||c.rv||c.firefox)||!1}}();a.page=function(){var b,c=a.rootContext(window);c={description:function(){return a.map(a.select("meta[name='description' i]").slice(0,1),function(a){return a.getAttribute("content")})[0]}(),font_size:function(){var b=a.css(document.body,"font-size");
if(b)return parseFloat(b)}(),referrer:c.document.referrer,title:c.document.title};for(b in c)c[b]=c[b]||null;return c}();a.harmony={PASSIVE:1,UNSAFE_QUIRKSMODE_EVENTS:.5,COMMERCIAL_LINK_EVENTS:.1,LINK_EVENTS:-1,AGGRESSIVE:-1};a.harmony.DEFAULT=0;a.pii=function(){var b={email:/[A-Z0-9._%+-]+(?:%(?:25)*40|@)[A-Z0-9.-]+\.[A-Z]{2,4}/,numeric:/\d([^0-9A-Z]{0,4}\d){6,18}/},c={contains:function(a,b){return this.regexp(b).test(a)},redact:function(a,b){return a.replace(this.regexp(b),"___")},regexp:function(c){c=
a.extend({},c);var d=a.map(a.all(b,function(a,b){return!1!==c[b]}),function(a){return a.source});return new RegExp("(\\b"+d.join("\\b|\\b")+"\\b)","gi")},transmits:function(a,b){return this.contains(a+" "+document.referrer,b||{numeric:!1})}};return{contains:a.bind(c.contains,c),redact:a.bind(c.redact,c),transmits:a.bind(c.transmits,c)}}();a.platforms=function(){var b={NONE:{id:"full",scope:"body",spec:{selector:"body"}},bbp:{spec:{parser:/^post-(\d+)$/,selector:"div[id^='post-']"},scope:"li .post"},
hdlr:{spec:{parser:/^post_(\d+)$/,selector:"div[id^='post_']"},scope:".post-content-area"},ipb:{spec:{parser:/^post_id_(\d+)$/,selector:"div[id^='post_id_']"},scope:".post_body .post"},phpb:{spec:{parser:/^p(\d+)$/,selector:"div.post[id^='p']"},scope:".postbody .content,.postbody .signature"},ubb:{spec:{parser:/^number(\d+)$/,parse_el:"span[id^=number]",selector:"a[name^='Post'] ~ table"},scope:".post_inner *[id^='body'],.post_inner .signature"},vb3:{spec:{parser:/^post_message_(\d+)$/,selector:"div[id^='post_message_'], table[id^='post_message_'],section[id^='post_message_']"},
scope:"div[id^='post_message_'],div[id^='post_message_'] ~ div:not([class])"},vb4:{spec:{parser:/^post_(\d+)$/,selector:"li[id^='post_']"},scope:".post-content,.postbody .content,.postbody .signature,ul.conversation-list .list-item-body"},wppr:{spec:{attributes:["id","className"],parser:/(?:^|\s)post-(\d+)(?:\s|$)/,selector:"article[class*='post-'], div[id^='post-']"}}},c={getPostId:function(b){var c;if(this===a.platforms.NONE)return" ";var e=this.spec.parse_el?a.select(this.spec.parse_el,b)[0]:b;
a.find(this.spec.attributes||["id"],a.bind(function(a){c=e[a]?e[a].match(this.spec.parser):null;return!!c},this));if(c)return c[1]},getPostIds:function(b){var c=[];a.each(this.getPosts(b),a.bind(function(b){(b=this.getPostId(b))&&!a.contains(c,b)&&c.push(b)},this));return c.length?c:null},getPosts:function(b){var c=[];!b&&document&&document.body&&(b=[document.body]);b&&this.spec&&(c=a.withScope(b,this.spec.selector,{consolidate:!0}));return c}};a.each(b,function(e,d){e.id=e.id||d;a.each(c,function(b,
c){e[c]=a.bind(b,e)});b[d]=e});b.DEFAULT_POST_ID=" ";b.findById=function(b){return a.find(a.platforms,function(a){return a.id===b})};return b}();a.observer=function(){var b,c=[],e=0,d=function(){b||(b=new MutationObserver(a.entryPoint(function(b){var d=[];a.each(b,function(b){var c=[];"characterData"===b.type?b.target&&(c=[b.target]):"attributes"===b.type?c=[b.target]:b.addedNodes&&b.addedNodes.length&&(c=a.toArray(b.addedNodes));c.length&&(d=d.concat(c))});0<d.length&&a.each(c,function(a){a.callback(d)})})))},
f=function(c){var f={attributes:!1,characterData:!1,childList:!1,subtree:!0};e||(d(),c.opts.attributes&&(f=a.extend(f,{attributes:!0}),"array"===a.type(c.opts.attributes)&&(f=a.extend(f,{attributeFilter:c.opts.attributes}))),c.opts.content&&(f=a.extend(f,{characterData:!0,childList:!0})),b.observe(c.context,f))};return{start:function(b,d,e){b.document&&(b=b.document);d=a.extend({attributes:!1,content:!0},d);a.traits.mutation&&a.contains(["document","element"],a.type(b))&&(b={callback:e,context:b,
opts:d},c.push(b),f(b))},pause:function(){e++;b&&b.disconnect()},resume:function(){e--;a.each(c,f)}}}();a.traits={basicCompatibility:!(a.browser.blackberry||a.browser.playstation),beacon:!!window.navigator.sendBeacon&&!!window.Blob,cors:window.XMLHttpRequest&&void 0!==(new window.XMLHttpRequest).withCredentials,crossWindowCommunication:!a.browser.ios,fastRegexp:!a.browser.firefox,json:!!window.JSON&&!!window.JSON.stringify&&!!window.JSON.parse,jsRedirectSetsReferrer:a.browser.aol||!(a.browser.ie||
a.browser.opera),mutation:window.MutationObserver&&!a.browser.ie,performanceTimingApi:!!(window.performance&&window.performance.mark&&window.performance.measure&&window.performance.now&&window.performance.getEntriesByName),performanceNavigationTiming:!!(window.performance&&window.performance.getEntriesByType&&window.performance.getEntriesByType("navigation")&&window.performance.getEntriesByType("navigation")[0]&&window.performance.getEntriesByType("navigation")[0].domInteractive),referrerPolicy:!a.browser.ie,
quirksMode:!window.addEventListener,windowLevelHandlers:!!window.addEventListener};a.consent=function(){var b,c,e,d,f,h,k,g,r={configureGdprAndCcpaConsent:function(){this.lookupGdprConsent(function(a){2===d&&(b=a.tcString,e="boolean"===typeof a.gdprApplies?a.gdprApplies:!0);f&&window.removeEventListener("message",f,!1)},function(){});this.configureCcpaConsent()},callCmpFromSafeFrame:function(a,b,c,d){window.$sf.ext.register(1,1,function(a,e){"cmpReturn"===a?c(e[b]):d()});window.$sf.ext.cmp(a)},callCmpWhileInIframe:function(a,
b,c){var e={},h=Math.random().toString(),m={};m.__tcfapiCall={command:a,parameter:null,callId:h};m.__tcfapiCall.version=d;e[h]=c;b.postMessage(m,"*");k=function(a){var b={};try{b="string"===typeof a.data?JSON.parse(a.data):a.data}catch(U){}if(b.__tcfapiReturn&&b.__tcfapiReturn.callId&&(a=b.__tcfapiReturn,"function"===typeof e[a.callId]))e[a.callId](a.returnValue,a.success)};window.addEventListener("message",k,!1);f=k},lookupGdprConsent:function(a,b){var c=function(c,d){d&&"string"===typeof c.tcString?
"tcloaded"===c.eventStatus||"useractioncomplete"===c.eventStatus?a(c):"cmpuishown"===c.eventStatus&&0<c.tcString.length&&!0===c.purposeOneTreatment?a(c):b("Consent string is not available"):b("CMP unable to register callback function. Please check CMP setup.")},e=function(){for(var a=window,b,c;!b;){try{if("function"===typeof a.__tcfapi){d=2;c=a.__tcfapi;b=a;break}}catch(U){}try{if(a.frames.__tcfapiLocator){d=2;b=a;break}}catch(U){}if(a===window.top)break;if("undefined"!==typeof a&&"undefined"!==
typeof a.parent)a=a.parent;else break}return[b,c]}(),f=e[0];e=e[1];if(!f)return b("CMP not found");"function"===typeof e?2===d&&e("addEventListener",d,c):2===d&&this.callCmpWhileInIframe("addEventListener",f,c)},configureCcpaConsent:function(){this.lookupCcpaConsent(function(a){c=a.uspData;h&&window.removeEventListener("message",h,!1)},function(){})},lookupCcpaConsent:function(a,b){var c=window,d,e=(new Date).getTime(),f={uspData:"",success:!1},m=function(c,d){f.uspData=c&&c.uspString||"";(f.success=
d)?a(f):b()};try{var k=window.__uspapi||window.top.__uspapi}catch(U){b(U)}if("function"===typeof k)k("getUSPData",1,m);else{for(;!d;){try{c.frames.__uspapiLocator&&(d=c)}catch(U){b(U);return}if(c===window.top){b();return}c=c.parent}k={__uspapiCall:{command:"getUSPData",version:1,parameter:null,callId:e}};d.postMessage(k,"*");g=function(c){c.data&&c.data.__uspapiReturn&&c.data.__uspapiReturn.callId===e&&(c.data.__uspapiReturn.success?a(c.data.__uspapiReturn.returnValue):b())};window.addEventListener("message",
g,!1);h=g}}};a.exceptionLogger(a.bind(r.configureGdprAndCcpaConsent,r))();return function(){return{gdprConsent:b,ccpaConsent:c,gdprApplies:e}}}();a._gppConsent=function(){var b,c,e,d={configureGppConsent:function(){this.lookupGppConsent(function(a){b=a.gppString;c&&window.removeEventListener("message",c,!1)},function(){c&&window.removeEventListener("message",c,!1)})},callCmpWhileInIframe:function(a,b,d){var f={},h=Math.random().toString(),m={};m.__gppCall={command:a,parameter:null,callId:h};f[h]=
d;b.postMessage(m,"*");e=function(a){var b={};try{b="string"===typeof a.data?JSON.parse(a.data):a.data}catch(C){}if(b.__gppReturn&&b.__gppReturn.callId&&(a=b.__gppReturn,"function"===typeof f[a.callId]))f[a.callId](a.returnValue)};window.addEventListener("message",e,!1);c=e},lookupGppConsent:function(a,b){var c=function(c){c&&c.gppString?a(c):b("Consent string is not available")},d=function(){for(var a=window,b,c;!b;){try{if("function"===typeof a.__gpp){c=a.__gpp;b=a;break}}catch(C){}try{if(a.frames.__gppLocator){b=
a;break}}catch(C){}if(a===window.top)break;if("undefined"!==typeof a&&"undefined"!==typeof a.parent)a=a.parent;else break}return[b,c]}(),e=d[0];d=d[1];if(!e)return b("CMP not found");"function"===typeof d?c(d("getGPPData")):this.callCmpWhileInIframe("getGPPData",e,c)}};a.exceptionLogger(a.bind(d.configureGppConsent,d))();return function(){a.exceptionLogger(a.bind(d.configureGppConsent,d))();return{gppConsent:b}}}();var g,t,w,A;var q={EVENT_LEVEL_LINK:1,EVENT_LEVEL_TOP:2,PLUGIN_MANUAL:1,TYPE_ACCEPTABLE:"l",
allowed:function(){var b;return function(){b||(b=a.generateNodeFilter({classes:["novig"],rels:["novig"],selectors:g.exclude_scope,tags:"applet embed noscript object head img input link meta param select button iframe option script style svg textarea title".split(" "),custom:function(b,e,d,f){if(!g.whitelist||f.skipWhitelist)return!1;if(e)d.passed=!1;else if(d.passed)return!1;e=q.whitelistNodes();d.passed=d.passed||e&&e.length&&a.contains(e,b);return!1}}));return b.apply(q,arguments)}}(),api:function(){var b=
function(){var b={optimize:"content",domains:"content"};return function(c,d,f){var h=a.toArray(arguments).slice(3,arguments.length),k=b[c];k&&(f=a.extend({},f,{json_payload:k}));k=e(f);var m=d;m=a.extend(a.commonParams(c,g),m);m.subId&&m.key!==g.key&&(m.subId=null);return{data:h,method:c,opts:k,params:m}}}(),c=function(b){var c={},d={};a.each(b,function(b){var f=b[0],h=b[1],k=b[2]||{};b=a.toArray(b).slice(3,b.length);d[f]=a.mergeParams(d[f]||a.commonParams(f,g),h);c[f]=c[f]||[];c[f].push({data:b,
opts:e(k)})});return{calls:c,params:d}},e=function(b){b=b||{};"function"===a.type(b.fn)&&(b.fn=function(c){return function(d){var e=d.response?d.response[0]:null;if("object"===a.type(e)&&"array"===a.type(e.crawl)&&"object"===a.type(A.crawler)&&"function"===a.type(A.crawler.crawl)){var f=a.map(e.crawl,function(a){return a+""});delete e.crawl;A.crawler.crawl(f)}return c.apply(b,arguments)}}(b.fn));return b},d=function(b){var c=b.opts.base_url||g.api_url,d=b.opts.path||"/"+b.method;delete b.opts.base_url;
return a.request.apply(a,[c+d,b.params,b.opts].concat(b.data))},f=function(b,c,d){a.each(c,function(c){c&&c.opts&&c.opts.fn&&b&&c.opts.fn({response:a.packageArgs(b),data:c.data,args:d})})};var h=function(){var b=function(b){var c=b.data[0].params,d=b.data[0].calls;b=a.fromJSON(b.response[0])||{};a.each(b,function(b,e){var h=c[e];e=d[e];var k;"string"===a.type(b)&&(k=b.match(/^[^(]+\((.*)\);?\s*$/))&&(b=a.fromJSON(k[1]));f(b,e,h)})};return function(e){e=c(e,!0);d({data:e,method:"batch",params:a.extend(a.commonParams("batch",
g),e.params),opts:{json_payload:"batch",jsonp:!1,fn:a.bind(b,window)}})}}();var k=function(e,h,k){var g=c(e,!1);e=a.reduce({},g.calls[k],function(a,b){return{jsonp:a.jsonp||!b.opts||!1!==b.opts.jsonp,ssl:a.ssl||!b.opts||!1!==b.opts.ssl}});return d(b(h,g.params[h],{fn:function(a){f(a.response[0],g.calls[h],g.params[h])},jsonp:e.jsonp,ssl:e.ssl},g))};var l=function(){return d(b.apply(this,arguments))};return a.batchable(function(){if(a.batched(arguments)){var b=a.batchArgs(arguments);var c=a.batchCallType(b);
return"batch"===c?h.call(this,b):k.call(this,b,c)}return l.apply(this,arguments)},function(){return{batch:g.batch_calls,timeout:g.batch_call_timeout}})}(),addEventListener:function(a,c){this.fire(a,c)},click:function(){var b=function(b,c){if("_self"===c)return b;if(a.traits.crossWindowCommunication&&a.traits.jsRedirectSetsReferrer)return b=b.open("",c),b.focus(),b},c=function(b){var c=b.previousSibling,e=b.nextSibling,h=["",b.textContent,""],k=function(a,b){for(var c=a.data;(a=a[b+"Sibling"])&&3===
a.nodeType;)c+=a.data;return c},g=function(a,b,c){a=a.replace(/\s+/g," ");b=b.replace(/\s+/g," ");c=c.replace(/\s+/g," ");a=a.replace(/^\s+/,"");" "===b.substr(0,1)&&(b=b.substr(1),a+=" "!==a.substr(a.length-1,1)?" ":"");" "===b.substr(b.length-1,1)&&(b=b.substr(0,b.length-1),c=(" "!==c.substr(0,1)?" ":"")+c);c=c.replace(/\s+$/,"");return[a,b,c]};void 0!==h[1]&&(h[0]=c&&3===c.nodeType?k(c,"previous"):"",h[2]=e&&3===e.nodeType?k(e,"next"):"",h=g.apply(this,h),""!==h[0]&&""!==h[2]&&(h[0]=h[0].split(" ").reverse().slice(0,
10+(" "===h[0].substr(h[0].length-1,1)?1:0)).reverse().join(" "),h[2]=h[2].split(" ").slice(0,10).join(" "),b={type:"context",itype:(a.cache(b,"params")||{}).type,before:h[0],after:h[2],txt:h[1],loc:window.document.location.href,out:a.getActualHref(b),v:2},q.log("info",a.toQuery(b))))};return function(e,d){var f={},h=a.context(e)||window;d=e.target||d;d=!d||d===h.name||"_top"===d&&h.top===h||"_parent"===d&&h.parent===h?"_self":d;var k=b(h,d);if("_self"===d||a.traits.crossWindowCommunication&&a.traits.jsRedirectSetsReferrer)try{if(void 0===
k.document)throw!0;var l="jsonp"}catch(z){l="go"}else l="go";var r=a.destructing(a.apiCallback(function(){this.eventTimer.stop("clk");var b=a.toArray(arguments);b.unshift(e,k,d);this.onApiClick.apply(this,b)},this));a.cache(this,"link","string"===typeof e?e:a.getActualHref(e));if("string"===typeof e&&(e=a.createA(e,d),!this.processLink(e))||!g.enabled)return r();!a.traits.referrerPolicy&&this.isPrivate(e)&&(l="go");var m=this.clickParams(e,l);this.eventTimer.start("clk");g.log_context&&c(e);if("go"===
l)m=this.redirectUrl(m,f),this.redirect(m,h,k,d);else if(k===h)this.api.now("click",m,a.extend(f,{fn:r,timeout:g.click_timeout}));else{if(a.contextIsAncestor(h,k))return this.redirect(a.getActualHref(e),h,k,d);r=a.entryPoint(r);setTimeout(function(){r()},g.click_timeout);k.document.open();k.callback=r;k.document.write("<html><head><title>"+a.getActualHref(e)+'</title><script type="text/javascript" src="'+this.api.now("click",m,a.extend(f,{fn:"callback","return":!0}))+'">\x3c/script></head></html>');
k.document.close()}}}(),clickParams:function(b,c){b=a.extend(a.cache(b,"params"),a.cache("opt_params"),{format:c,out:a.getActualHref(b),reaf:g.reaffiliate||null,ref:a.page.referrer||null,rewrit:a.cache(b,"rewrit"),title:a.page.title,txt:b.innerHTML});128<b.txt.length&&(b.txt=b.txt.replace(/<[^>]+>/g,""),b.txt=128<b.txt.length?b.txt.substr(0,125)+"...":b.txt);return b},enabled:function(){g.enabled&&w!==window&&window.vglnk&&(window.vglnk.key||"function"===typeof window.vglnk)&&(g.enabled=!1);return g.enabled},
expose:function(){return function(b,c){if((c=c||this[b])&&!A[b]){var e=A;c="function"===a.type(c)?a.entryPoint(a.bind(c,q)):c;e[b]=c}}}(),fire:function(){var b={};return function(c,e){c=c.toLowerCase();var d=b[c]||{fired:!1,listeners:[]};"function"===typeof e?d.fired?setTimeout(function(){e({type:c})},0):d.listeners.push(e):(d.fired=!0,a.each(d.listeners,function(a){"function"===typeof a&&a({type:c})}),d.listeners=[]);b[c]=d}}(),handleRightClick:function(b,c){if(g.rewrite_modified&&b&&c)switch(c){case "setup":a.cache(b,
"href")||a.cache(b,"href",b.href);b.href=this.redirectUrl(this.clickParams(b,"go"));setTimeout(a.entryPoint(a.bind(function(){this.handleRightClick(b,"teardown")},this)),0);break;case "teardown":a.cache(b,"href")&&(b.href=a.cache(b,"href"))}},harmony:function(a){return g.harmony_level<=a},init:function(){var b=function(){var b=a.rootContext(window),e=!0===b.__v5k;b.__v5k=!0;return!e};return function(){var c=this;t={};if(b()){try{c.initLibEvents(),c.initNamespace(),c.initOptions()}catch(e){}a.exceptionLogger(a.bind(c.logException,
c),!g.dev);a.each(g.script_timeout);return a.entryPoint(function(){c.initProcessors();c.initDRApi();c.initApi();c.enabled()&&(c.initLegacyCallbacks(),setTimeout(function(){c.ping()},2E3))})()}}}(),initApi:function(){var b,c={};if(window.vglnk)for(b in window.vglnk)"_plugin"===b.substr(-7)&&(c[b]=window.vglnk[b]);A=w[l]=a.noop;this.expose("click");this.expose("link",a.bind(function(b){"element"===a.type(b)&&b.href&&(this.initContext(a.context(b)),this.processLink(b))},this));this.expose("open",a.bind(this.click,
this));this.expose("$",a.clone(a));this.expose("allowed");this.expose("api");this.expose("apiNow",a.bind(this.api.now,this.api));this.expose("harmony");this.expose("isBlacklisted");this.expose("isCommercial");this.expose("initLinks");this.expose("opt");this.expose("platform");this.expose("sendLinks");this.expose("clickParams",function(){return a.extend(a.commonParams("click",g),q.clickParams.apply(q,arguments))});this.expose("registerProcessor",function(){if(0<arguments.length)return q.registerProcessor.apply(q,
arguments)});a.extend(A,A===window.vglnk?c:{})},initContext:function(){var b=[];return function(c){if(void 0===c)return b;c&&!a.contains(b,c)&&(b.push(c),this.initLinks(c),this.initEvents(c))}}(),initDomObserver:function(b,c){a.observer.start(b,c,a.batchable(function(b){a.batched(arguments)&&(b=a.reduce([],a.batchArgs(arguments,0),function(a,b){return a.concat(b)}));g.whitelist&&q.whitelistNodes(!0);b=a.all(a.unique(b),function(a){return!!a.parentNode&&q.allowed(a)});0<b.length&&(q.processLinks(a.links(b)),
a.each(t,function(a,c){a.opts.mode!==q.PLUGIN_MANUAL&&q.runPlugin(c,b)}))},function(){return{batch:g.batch_mutation,timeout:g.batch_mutation_timeout}}))},initDRApi:function(){var b=!1;window.DrivingRevenue=a.entryPoint(a.destructing(a.bind(function(){b=!0;g.dr_key=window.DR_id;this.enabled()&&this.ping()},this)));a.on("DOMReady",function(){if(!b)try{delete window.DrivingRevenue}catch(c){window.DrivingRevenue=void 0}})},initEvents:function(b){var c=a.traits.windowLevelHandlers?b:b.document,e=function(c){c=
c||b.event;(c=a.eventLink(c))&&!a.cache(c,"evented")&&(f(q.EVENT_LEVEL_LINK,c),a.cache(c,"evented",!0))},d=function(b,c){return function(){var d=[b].concat(a.toArray(arguments));c.apply(q,d)}},f=function(b,c){a.on(c,"click",d(b,q.onClick));a.on(c,"contextmenu",d(b,q.onContextmenu))};if(g.dynamic)a.on("DOMReady",function(){q.initDomObserver(b);g.dynamic_scope&&a.each(a.select(g.dynamic_scope,b.document),function(a){q.initDomObserver(a,{attributes:["class","id","style"],content:!1})})});a.on(c,"copy",
a.bind(q.onCopy,q));a.on(c,"mousedown",e);a.on("DOMReady",function(){a.each(b.document.links,function(b){a.on(b,"mousedown",e)})});a.traits.quirksMode&&!q.harmony(a.harmony.UNSAFE_QUIRKSMODE_EVENTS)||f(q.EVENT_LEVEL_TOP,c)},initLegacyOptions:function(){var a,c={DR_id:"dr_key",vglnk_api_key:"key",vglnk_cuid:"cuid",vglnk_domain:"api_url",vglnk_reaf:"reaffiliate",vglnk_subid:"sub_id"};for(a in c)void 0!==window[a]&&(A[c[a]]=window[a],"vglnk_domain"===a&&(A[c[a]]+="/api"))},initLegacyCallbacks:function(){var b,
c={vl_cB:a.bind(this.onApiClick,this),vl_disable:function(){g.enabled=!1}};for(b in c)window[b]=c[b]},initLibEvents:function(){a.on(q);a.ready(a.bind(function(){this.fire("DOMReady")},this))},initLinks:function(b){var c=a.bind(function(b){this.processLinks(a.toArray(b.document.links))},this);void 0===b?a.each(this.initContext(),c):c(b)},initNamespace:function(){window.vglnk&&window.vglnk.key&&(l="vglnk");var a=window,c=l.split(".");for(l=c.pop();0<c.length;){var e=c.shift();a[e]=a[e]||{};a=a[e]}w=
a;A=w[l]=w[l]||{}},initOptions:function(){var b;this.initLegacyOptions();g=a.extend(this.publicOptions({anywhere_url:"https://redirect.viglink.com",api_url:"https://api.viglink.com/api",asset_url:"https://cdn.viglink.com/api",cuid:null,data_observer:!1,dev:!1,dr_key:null,enabled:a.traits.basicCompatibility,key:null,link_urls:!0,partner:null,platform:a.platforms.NONE.id,reaffiliate:!1,sub_id:null,sync_url:"https://api.viglink.com/api",whitelist:!1,blacklist_domains:null,commercial_domains:null,harmony_level:a.harmony.DEFAULT,
link_target:null,private_domains:null,rewrite_any:!0,rewrite_modified:!1,rewrite_original:!0}),g,A,{batch_calls:!0,batch_call_timeout:100,batch_links:!1,batch_mutation:!0,batch_mutation_timeout:250,click_timeout:1E3,debug:!1,debug_performance:!1,declare_handler:!1,dynamic:!0,dynamic_scope:null,exclude_scope:null,hop_timeout:2E3,insert_host:"i.viglink.com",library_id:null,links_merge_timeout:75,links_version:"3.2",log_context:!0,nofollow:{},norewrite:{},script_timeout:2E3,testing_js:[],time:!1,time_log_timeout:3E3,
plugins:{crawler:{},harmony:{},link_affiliation:{},modified_clicks:{}}});g.sync_url=g.sync_url||g.api_url;for(b in g)"_plugin"===b.substr(-7)&&delete g[b]},initPlugins:function(){var b,c=1,e={link_affiliation:"convert",link_optimization:"optimize",page_harmony:"harmony",partner_integration:"partners",product_linker:"insert",product_widget:"spotlight"},d=["spotlight"],f=["harmony"],h=function(a){return function(a){return function(){delete t[a].opts.mode;c=1;clearTimeout(b);l()}}(a)},k=function(b){var c;
a.find(e,function(a,b){return"insert"===a&&(c=b)});b[c]||(b[c]={enabled:!0,key:g.key,link_phrases:!1});b[c].link_urls=g.link_urls;return b},l=function(){var d={_ran:!1,init:a.noop,initDocuments:a.noop,initNodes:a.noop,"public":{}},e=function(b,c){b.setup=b.setup||(window.vglnk?window.vglnk[c+"_plugin"]:null);"function"===a.type(b.setup)&&(b.initDocuments||(b=a.extend(b,d,b.setup(a.reformatKeys(b.opts),a.clone(a),A,h(g.key))),b["public"]&&q.expose(c,b["public"],!1)),b.opts.mode!==q.PLUGIN_MANUAL&&
q.runPlugin(c))},h=function(b){var c=function(){if(b){var c=a.toArray(arguments);c.unshift("custom",b);q.log.apply(this,c)}};c.eventTimer=q.eventTimer;return c},k=function(a){return!a._ran};b=null;a.each(f,function(a){var b=t[a];b&&!b._ran&&e(b,a)});a.each(a.all(t,k),e);a.find(t,k)&&(b=setTimeout(a.entryPoint(l),Math.min(Math.max(Math.pow(2,++c),100),5E3)))},r=function(){setTimeout(function(){q.api.flush()},100);l();a.on("DOMReady",function(){setTimeout(q.api.flush,0)})};return function(b){b=k(b);
a.each(b,a.bind(function(b,c){c=e[c]||c;"object"===typeof b&&!1!==b.enabled&&(t[c]={opts:b},a.contains(d,c)&&a.jsonp(this.opt("asset_url")+"/plugins/"+c+".js"),this.opt("data_observer")&&"convert"!==c&&"partners"!==c?b.mode=this.PLUGIN_MANUAL:b.mode===this.PLUGIN_MANUAL&&this.expose("init_"+c,h(c)))},this));r()}}(),initProcessors:function(){this.registerProcessor(function(b){var c=a.createA(g.api_url);"/api/click"!==b.pathname||b.hostname!==c.hostname&&!b.hostname.match(/(^|\.)(api|cdn|apicdn)\.viglink\.com$/)||
(c=a.fromQuery(b.search),void 0!==c.out&&(b.href=c.out,delete c.out,a.cache(b,"params",c)))});this.registerProcessor(function(b){g.nofollow[b.href]&&!a.hasRel(b,"nofollow")&&(b.rel=(b.rel?b.rel+" ":"")+"nofollow")});this.registerProcessor(function(b){g.declare_handler&&a.attributes(b,{"data-hl":"viglink"})});this.registerProcessor(function(b){window.IPBoard&&window.IPBoard.prototype&&window.IPBoard.prototype.delegate&&a.hasRel(b,"external")&&(b.rel=b.rel.replace(/(^| )external( |$)/,""),b.target=
"_blank")});this.registerProcessor(function(){a.each(a.select(".vl_disclosure"),function(b){var c=a.createEl(b.tagName,{height:0,visibility:"hidden"});document.body.appendChild(c);var e=a.css(c,"display");document.body.removeChild(c);a.css(b,{display:e})})})},isAuctionLink:function(b){return!0===a.cache(b,"auctioned")},isBlacklisted:function(b){return"object"===a.type(g.blacklist_domains)&&g.blacklist_domains[a.canonicalizeHostname(b)]},isCommercial:function(b){return this.loadedCommercial()&&g.commercial_domains[a.canonicalizeHostname(b)]},
isPrivate:function(b){if("array"!==a.type(g.private_domains))return!1;var c=a.canonicalizeHostname(b);return a.find(g.private_domains,function(b){return(new RegExp("(^|\\.)"+a.escapeRegExp(b)+"$","i")).test(c)})},isRewritable:function(){var b=a.canonicalizeHostname(document.location),c=a.generateNodeFilter({classes:["norewrite"],rels:["norewrite","noskim"],custom:function(c,d){if(!d)return!1;d=a.canonicalizeHostname(c);var e="";try{e=c.protocol,d.charAt(0)}catch(Y){return!0}e=!(""!==d&&e.match(/^https?:$/i)&&
!g.norewrite[d]);var h;if(h=!e){h=a.cache(c,"type");var k=a.cache(c,"params")||{};h=!(h||k.type)}h&&(e=b===d||!g.rewrite_original||!g.rewrite_any&&!q.isCommercial(c));return e}});return function(a){return c(a)}}(),loadedCommercial:function(){return"object"===a.type(g.commercial_domains)},log:function(b,c,e,d){var f=a.toQuery({libId:g.library_id,nocache:a.uniqid()});var h="pixel.gif";if("custom"===b)f+="&"+a.toQuery({key:c,type:e}),a.each("array"===a.type(d)?d:[d],function(b){a.each(["e","i","o"],
function(a){delete b[a]});f+="&"+a.toQuery(b)});else{f+="&"+a.toQuery({key:g.key,drKey:g.key?null:g.dr_key,subId:g.sub_id});if("time"===b&&a.traits.json)h="time.gif",b={e:a.toJSON(c),v:2};else if("exception"===b)b={e:c,o:e};else if("info"===b)b={i:c};else return;f+="&"+a.toQuery(b)}h=g.api_url+"/"+h+"?"+f;a.pii.transmits(h)||(a.createEl("img").src=h)},eventTimer:function(){var b,c=!1,e={},d=function(b,c){return function(){if(a.traits[c])return b.apply(this,arguments)}},f=function(b,c){return function(){if(a.reduce(!1,
c,function(a,b){return a||g[b]}))return b.apply(this,arguments)}},h=a.batchable(function(){var b=a.batched(arguments)?a.batchArgs(arguments):[arguments];b=a.map(b,function(b){return a.prune({event:b[0],time:b[1],total:b[2]})});b.length&&q.log("time",b)},function(){return{timeout:g.time_log_timeout}}),k=f(h,["time"]);h=function(a){window.performance.mark("viglink-"+a+"-start")};var l=a.traits.performanceNavigationTiming?window.performance.getEntriesByType("navigation")[0].domInteractive:0;a.traits.performanceTimingApi&&
(b=window.performance.now());return{force:d(h,"performanceTimingApi"),start:d(f(h,["debug_performance","time"]),"performanceTimingApi"),stop:d(f(function(d,f){var h=e[d]||0;var g="viglink-"+d;var m="viglink-"+d+"-start",u="viglink-"+d+"-stop";window.performance.mark(u);window.performance.measure(g,m,u);g=window.performance.getEntriesByName(g,"measure");g=g.slice(h);e[d]=h+g.length;f||a.each(g,function(a){k(d,a.duration,a.startTime-l)});c||(c=!0,k("load",b-l,b-l))},["debug_performance","time"]),"performanceTimingApi")}}(),
logException:function(b){if(g.debug){var c={link:a.cache(this,"link"),loc:window.document.location.href,UA:navigator.userAgent};"string"===typeof b?c.message=b:c=a.extend(c,b);this.log("exception",b,a.toQuery(c))}},onApiClick:function(b,c,e,d,f){var h=(a.isMobileDeeplinkingAffiliatorParamExists(d)?a.buildMobileDeeplinkingPageUrl(d):d)||a.getActualHref(b),k=a.bind(function(){this.redirect(h,a.context(b),c,e)},this);"object"===typeof f&&(f.tracking||f.image)?(d=a.createEl(f.tracking?"iframe":"img",
{src:f.tracking||f.image},{height:0,width:0,visibility:"hidden"}),document.body.appendChild(d),setTimeout(a.entryPoint(k),f.timeout||g.hop_timeout)):k()},onApiPing:function(b,c,e,d,f,h){g.rewrite_original=!1;f=a.reformatKeys(f||{});var k,l;d=function(b){var c={},d=function(b){a.isArray(b)?c[b[0]]=b[1]:c[b]=1};a.isArray(b)&&a.each(b,d);return c};a.exceptionLogger(function(){a.canonicalizeHostname(window.location).match(/(^|\.)cnn\.com$/)&&(g.exclude_scope="#optanon,.OUTBRAIN,*[class*=outbrain],*[class*=partner],*[class*=sponsored]")})();
a.exceptionLogger(function(){a.canonicalizeHostname(window.location).match(/^(www\.)?msn\.com$/)&&(g.dynamic_scope=".gallery-container > .gallerydata,section.gallery:first-child ~ .gallerydata",g.exclude_scope="*[class^=stb-],.sticky-footer",g.declare_handler=!0)})();var r=a.extend(g.plugins,f.plugins);g=a.extend(g,f);delete g.plugins;g.click_timeout=c;g.library_id=b;this.eventTimer.stop("png");"array"===a.type(g.testing_js)&&0<g.testing_js.length&&a.each(g.testing_js,function(b){a.jsonp(b)});a.extend(g.nofollow,
d(h));a.extend(g.norewrite,d(e));for(k in g)"on"===k.toLowerCase().substr(0,2)&&2<k.length&&"function"===a.type(g[k])&&(a.on(q,k.toLowerCase().substr(2),a.bind(g[k],window)),delete g[k]);this.initPlugins(r);this.initContext(window);(l=a.rootContext(window))&&l!==window&&this.initContext(l);this.fire("libready")},onClick:function(b,c){c=c||window.event;var e=c.ctrlKey||c.metaKey||c.altKey||c.shiftKey;var d=c.which&&1===c.which||0===c.button,f=a.eventLink(c);if(f&&d&&!e&&!a.isDefaultPrevented(c)&&this.allowed(f)&&
this.isRewritable(f)&&!this.isAuctionLink(f)&&this.shouldHandleClick(b,f)){if(a.traits.beacon&&g.data_observer)return e=a.createA(this.api.now("click",this.clickParams(f),{"return":!0})),b=e.href.split("?")[0],e=new window.Blob([e.search],{type:"application/x-www-form-urlencoded"}),navigator.sendBeacon(b,e),c;this.click(f);return a.preventDefault(c)}},onContextmenu:function(b,c){(c=a.eventLink(c||window.event))&&this.allowed(c)&&this.isRewritable(c)&&!this.isAuctionLink(c)&&this.shouldHandleClick(b,
c)&&this.handleRightClick(c,"setup")},onCopy:function(b){var c,e=[];if(window.getSelection){var d=window.getSelection();b=0;for(c=d.rangeCount;b<c;b++){try{var f=d.getRangeAt(b).toString().replace(/((^)\s+|\s+$|\r)/g,"").replace(/\s*\n\s*/g,"\n")}catch(h){}0<f.length&&128>=f.length&&e.push(f)}}a.each(e,function(b){q.log("info",a.toQuery({type:"selection",txt:b,loc:location.href}))})},opt:function(a,c){void 0!==c&&void 0!==this.publicOptions()[a]&&(g[a]=c);return g[a]},ping:function(){var b=!1;return function(){if(!b&&
(g.key||g.dr_key)){var c={ref:document.referrer||null,v:2};b=!0;a.pii.transmits(this.api.now("ping",c,{"return":!0}))||(this.eventTimer.force("png"),g.batch_calls=!1,c.type=this.TYPE_ACCEPTABLE,this.api.now("ping",c,{fn:a.apiCallback(this.onApiPing,this)}))}}}(),platform:function(){return a.platforms.findById(g.platform)||a.platforms.NONE},processLink:function(b){var c=a.cache(b,"processors")||{},e=this.allowed(b),d=this.isRewritable(b);a.each(this.registerProcessor(),function(f){if(f.opts.any||g.rewrite_any||
q.loadedCommercial()){if(!c[f.id]&&e&&(d||f.opts.any)){var h;f.opts.scope&&"body"!==f.opts.scope&&(h=a.some([f.opts.scope+" a",f.opts.scope],function(c){return a.matches(b,c)}));!1!==h&&f.fn(b)}c[f.id]=!0}});a.cache(b,"processors",c);return b},processLinks:function(b){a.each(b,a.bind(this.processLink,this))},publicOptions:function(){var b={};return function(c){"object"===a.type(c)&&(b=c);return a.extend({},b)}}(),redirect:function(b,c,e,d){var f=function(b,c,d){var e=[];if(a.traits.referrerPolicy){var f=
function(a){var b=c.document.createElement("meta");b.name="referrer";b.content=a;c.document.getElementsByTagName("head")[0].appendChild(b)};q.isPrivate(b)&&(e=[f("no-referrer"),f("never")]);d();try{a.each(e,function(a){a.parentNode.removeChild(a)})}catch(z){}}else d()};c=c||window.top;a.traits.crossWindowCommunication||e?a.traits.jsRedirectSetsReferrer?setTimeout(a.entryPoint(function(){e&&e!==c?a.contextIsAncestor(c,e)?e.location=b:e.location.replace(b):f(b,c,function(){c.location=b})}),0):("_blank"===
d&&(d=a.uniqid("win_")),d=a.createA(b,d),d.rel="norewrite",c.document.body.appendChild(d),d.click(),d.parentNode.removeChild(d)):(d=c.open(b,d),d.focus())},redirectUrl:function(b,c){c=c||{};return this.api.now("click",b,a.extend(c,{base_url:g.anywhere_url,path:"/"},{"return":!0}))},runPlugin:function(b,c){var e=window.document,d=t[b];if(d&&d.initDocuments){if(c)d.initNodes(c);else if(d.init(),"function"===a.type(d.initDocuments)&&"document"===a.type(e)&&d.initDocuments([e]),"function"===a.type(d.initNodes)&&
"element"===a.type(e.body))a.on("DOMReady",function(){d.initNodes([e.body])});d._ran=!0}},registerProcessor:function(){var b=!1,c=[],e=function(d,e){if(void 0===d)return c;"function"===a.type(d)&&(e=a.extend({any:!1,scope:null},e),c.push({fn:d,id:a.uniqid(),opts:e}),b&&this.initLinks())};e(function(){b=!0},{any:!0});return e}(),sendLinks:a.mergeable(function(){return{batchFn:q.api,nonBatchFn:q.api.now,batchable:g.batch_links,timeout:g.links_merge_timeout}}),shouldHandleClick:function(b,c){var e=!0,
d="inserted"===a.cache(c,"type");b===this.EVENT_LEVEL_LINK&&(e=this.harmony(a.harmony.LINK_EVENTS)||(this.isCommercial(c)||d)&&this.harmony(a.harmony.COMMERCIAL_LINK_EVENTS));return e},whitelistNodes:function(){var b;return function(c){if(!b||c)b=a.select(".allowvig");return b}}()};(function(){var a=document.createElement("script");a.type="text/javascript";a.async=!0;a.src="https://comparisons.sovrn.com/js/loader.min.js";a.onload=function(){m101.init({externalPartner:12})};var c=document.getElementsByTagName("script")[0];
c.parentNode.insertBefore(a,c)})();q.init();try{delete window.vglnk_self}catch(b){}})("undefined"===typeof vglnk_self?"vglnk":vglnk_self);window.vglnk=window.vglnk||{};
window.vglnk.convert_plugin=function(l,a,p){var g={},t;l=a.extend({any:!0,convert_minimum_bid:!1,check_exp_domains:!0},l);var w={getDomains:function(){var l=[];a.each(g,function(a,b){2!==g[b]&&(l.push(b),g[b]=2)});0<l.length&&p.apiNow("domains",{domains:l.join("|"),v:"2"},{fn:a.apiCallback(w.onDomainApi,w)})},init:function(){p.opt("link_target",l.link_target);p.opt("rewrite_any",l.any);p.opt("rewrite_original",!0);(t=!p.opt("data_observer")&&(!l.any||p.harmony(a.harmony.COMMERCIAL_LINK_EVENTS)||l.convert_minimum_bid||
l.check_exp_domains))&&p.registerProcessor(a.bind(function(a){this.initDomainLookup();this.saveDomain(a)},this),{any:!0})},initDomainLookup:function(){var g=!1;return function(){g||(g=!0,a.on("DOMReady",a.bind(this.getDomains,this)))}}(),onDomainApi:function(){var g=a.destructing(function(){p.initLinks()});return function(l){var b=p.opt("blacklist_domains"),c=p.opt("commercial_domains")||{},e=a.destructing(function(){b=b||{}});a.each(l.results,function(a,f){c[f]=!0;a.unlink&&(e(),b[f]=!0)});p.opt("commercial_domains",
c);p.opt("blacklist_domains",b);g()}}(),saveDomain:function(l){l=a.canonicalizeHostname(l);g[l]=g[l]||1},unlinkBlacklisted:function(g){p.isBlacklisted(g)&&a.unlink(g)}};return{init:a.bind(w.init,w),initNodes:function(){w.getDomains()}}};window.vglnk=window.vglnk||{};
window.vglnk.crawler_plugin=function(l,a,p){var g=[],t=p.platform();l={crawl:function(l){t&&"array"===a.type(l)&&0!==l.length&&(l=a.all(l,function(l){return!a.contains(g,l)}),l=this.findPostsById(l),a.each(l,a.bind(function(a){a.content=this.redact(a.el.innerHTML.replace(/(^\s+|\s+$)/g,""));delete a.el},this)),l=a.all(l,function(a){return!(!a.content||!a.id)}),0<l.length&&this.processPosts(l))},findPostsById:function(g){return a.all(a.map(t.getPosts(),function(a){return{el:a,id:t.getPostId(a)}}),
function(l){return a.contains(g,l.id)})},processPosts:function(l){l=a.map(l,function(a){g.push(a.id);return{c:a.content,i:a.id}});p.api("content",{content:a.toJSON({ct:l,pt:t.id,u:window.document.location.href})},{jsonp:!1})},redact:function(g){return a.pii.redact(g)}};return{"public":{crawl:a.bind(l.crawl,l)}}};window.vglnk=window.vglnk||{};window.vglnk.modified_clicks_plugin=function(l,a,p){return{init:function(){p.opt("rewrite_modified",!0)}}};window.vglnk=window.vglnk||{};
window.vglnk.privacy_plugin=function(l,a,p){return{init:function(){l.domains&&p.opt("private_domains",l.domains)}}};window.vglnk=window.vglnk||{};
window.vglnk.dr_search_box_plugin=function(l,a,p){l=a.extend({key:null},l);var g={init:function(l){a.each(this.getDRSearchForms(l),function(l){if(!a.cache(l,"evented")){var p=g.getInput(l),q=function(){p.value||a.css(p,{"background-image":"url(http://cdn.viglink.com/images/ebay_watermark.gif)"})};a.cache(l,"evented",!0);l.onsubmit=null;p.onfocus=null;p.onblur=null;a.on(p,"focus",function(){a.css(p,{"background-image":"none"})});a.on(p,"blur",q);q();a.on(l,"submit",function(a){g.onSubmit(a,l)})}})},
getDRSearchForms:function(l){var p=[];a.each(l,function(l){"element"===a.type(l)&&a.each(l.getElementsByTagName("form"),function(a){g.getInput(a)&&a.id.match(/^DR-ebay-search(CSS|2)?$/i)&&p.push(a)})});return p},getInput:function(a){return a.p||a.q2},onSubmit:function(t,w){t=t||window.event;w="http://shop.ebay.com/i.html?"+a.toQuery({_nkw:g.getInput(w).value});w=a.createA(w,"_blank");a.cache(w,"params",{key:l.key});p.click(w);return a.preventDefault(t)}};if(l.key)return{init:a.bind(g.init,g),initNodes:function(a){g.init(a)}}};
window.vglnk=window.vglnk||{};window.vglnk.harmony_plugin=function(l,a,p){l=a.extend({level:a.harmony.DEFAULT},l);return{init:function(){var a=parseFloat(l.level,10);isFinite(a)&&p.opt("harmony_level",a)}}};window.vglnk=window.vglnk||{};
window.vglnk.optimize_plugin=function(l,a){l=a.extend({exclude_page_title:null,exclude_link_text:null},l);return{init:function(){var p={opt:!0};null!==l.exclude_page_title&&a.extend(p,{optExTitle:l.exclude_page_title});null!==l.exclude_link_text&&a.extend(p,{optExText:l.exclude_link_text});a.cache("opt_params",p)}}};window.vglnk=window.vglnk||{};
window.vglnk.insert_plugin=function(l,a,p,g){var t,w=null,A=!1,q=null;l=a.extend({cat:null,dynamic_sample_rate:1,heading_threshold:2,insertion_order:"api",key:null,link_headings:!1,link_phrases:!0,link_target:null,link_urls:!0,manual_mode:1===l.mode,per_page:null,per_phrase:5,proximity:null,same_proximity:100,scope:null,ui:!0},l);"api"!==l.insertion_order&&"dom"!==l.insertion_order&&(l.insertion_order="api");if(l.key){var b=p.platform();var c={cache:function(){var b,c,e=function(){b={};c={}},g=function(d,
e){var f=c,h=b,g={};e=e||[a.platforms.DEFAULT_POST_ID];e=a.all(a.unique(a.map(e,function(a){return f[a]})),function(a){return null!==a});a.find(e,function(b){if(h[b]&&h[b].data&&h[b].order){if(d)return g[d]=h[b].data[d],!0;a.each(h[b].order,function(a){var c=h[b].data[a];g[a]||(g[a]=c)})}});return d?g[d]:g},p=function(d,e,f,h){var g=b,k=c;f=f||"-";h=h||[a.platforms.DEFAULT_POST_ID];g[f]=g[f]||{data:{},order:[]};g[f].data[d]||(g[f].data[d]=e,g[f].order.push(d));a.each(h,function(a){k[a]=f});return!0},
r=function(b,c,d,e){var f=a.all(a.toArray(arguments),function(a){return!!a});"array"===a.type(f[f.length-1])&&(e=f.pop());b=f[0];c=f[1];if(1>=f.length)return g(b,e);if(2<=f.length)return p(b,c,d,e)};l.manual_mode&&a.extend(r,{reset:e});e();return r}(),enabled:function(){return l.link_phrases||l.link_urls},focusLink:function(b){b.id||(b.id=a.uniqid("vl-link-"));location.href.hash="#"+b.id;window.scrollBy(0,-150)},getPartnerParams:function(){var a,b,c=p.opt("partner"),e={};for(a in c)break;if(a)for(b in c[a])e[a+
"_"+b]=c[a][b];return e},getPhrases:function(d,e){g.eventTimer.start("ins");p.api("insert",a.extend(c.getPartnerParams(),{cat:l.cat,i:e?e.join("|"):null,mode:l.mode,pt:b.id,ps:l.product_source,u:window.document.location.href,v:"2.0"}),{fn:a.apiCallback(c.onInsertApi,c)},d,e)},hasCalled:function(){var b={},c=Math.random()<l.dynamic_sample_rate,e=function(b){return c&&a.isArray(b)?a.map(b,function(a){return e(a)}):c&&b===a.platforms.DEFAULT_POST_ID?window.document.location.href:b},g=function(c){c=e(c);
return a.isArray(c)&&c.length?a.all(c,function(a){return b[a]}).length===c.length:!!b[a.platforms.DEFAULT_POST_ID]},p=function(c){c=e(c);a.isArray(c)&&c.length?a.each(c,function(a){b[a]=!0}):b[a.platforms.DEFAULT_POST_ID]=!0};return function(a,b){return b?p(a):g(a)}}(),init:function(){g.eventTimer.start("insert-init-run");l.scope=l.scope||b.scope;l.link_urls&&(t=/(?:(?:\b(https?:\/\/)|(?:^|\s)\W*(www\d{0,3}\.|(?:[a-z0-9-]+\.)+[a-z]{2,4}\/))((?:[^\s()<>]+|\((?:[^\s()<>]|(?:\([^\s()<>]+\)))*\))+(?:\((?:[^\s()<>]|(?:\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))|(?:^|\s)\W*((?:[a-z0-9-]+\.)+com\b\/?)(?!\.[a-z0-9-]+))/i)},
initLink:function(){return function(b,c,e){var d=l.link_target;if(d="U"===c.type?p.opt("link_target"):d||e)b.target=d;b.href||(b.href=c.url);b.rel="nofollow";a.cache(b,"params",{exp:w,iid:c.iid,key:l.key,mid:c.mid,type:c.type||null});if(!0===c.auc){c=a.fromQuery(b.search);if(e=c.u||c.out)delete c.format,delete c.out,delete c.u,a.extend(c,p.clickParams(b),{out:e}),b.search="?"+a.toQuery(c);a.cache(b,"auctioned",!0)}a.cache(b,"href",b.href);p.link(b)}}(),insertLinks:function(){var b=a.generateNodeFilter({classes:["nolinks",
"atma-nolink","atma-nolinks"],tags:["map"],custom:function(b){return a.matches(b,"a")&&!!b.href}}),e=function(b,c,d,e){var f={phrase_to_nodes:{},regexp_cache:{},stats:{}};a.each(c,function(a){k(b,a,d,e,f)},{timeout:!0});"api"===l.insertion_order&&h(d,f);return f.stats},h=function(b,c){var d=r(b);d.push("&!UNLINKED!&");a.each(d,function(d){(d=c.phrase_to_nodes[d])&&a.each(d,function(a){z(a,a.data,b,c)})})},k=function(a,c,d,e,f){if(p.allowed(c,{},{skipWhitelist:!0})&&b(c,{ancestors:!e,self:!0}))if(3===
c.nodeType)q(a,c,d,f);else if(1===c.nodeType)for(c=c.firstChild;c;)e=c.nextSibling,k(a,c,d,!0,f),c=e},q=function(){var b=function(b,c){var d=[];a.each(b,function(b){if(c[b])var e=c[b];else e=a.escapeRegExp(b).split(" ").join("\\s+"),e=new RegExp("(?:^|[\\s\"'\\(])("+e+")(?=\\s|\\W*$|\\W{2})","i"),c[b]=e;d.push(e)});l.link_urls&&t&&d.push(t);return d},d=function(b,d){d=r(d);b=c.normalizePhrase(b);return a.all(d,function(a){return-1!==b.indexOf(a)})};return function(e,f,h,g){var k=!1,u=g.phrase_to_nodes,
y=g.regexp_cache;if(f.parentNode&&(!p.opt("whitelist")||p.allowed(f)))if(f.data&&(k=e.test(f.data.replace(/\s+/," "))),k&&"dom"===l.insertion_order)m(e,f,h,g);else if(k&&"api"===l.insertion_order){var q=d(f.data,h);e=b(q,y);var r=[f];a.each(e,function(b){var d=[];a.each(r,function(e){for(var f,h,g,l,k;e&&e.data&&""!==e.data&&(!a.traits.fastRegexp&&(g=e.data.match(/^\s+/))||(g=e.data.match(b)))&&g.input!==f;)f=g.input,h=g.slice(1).join(""),l=c.normalizePhrase(h),h=w(e,g),h.previous&&h.previous.data&&
d.push(h.previous),e=h.next,k=a.contains(q,l)?l:"&!UNLINKED!&",l=u,h=h.match,l[k]||(l[k]=[]),l[k].push(h);e&&!g&&d.push(e)},{timeout:!0});r=d})}}}(),r=function(b){b=c.cache(b);return a.map(b,function(a,b){return b})},m=function(b,c,d,e){for(var f,h,g;c&&c.data&&""!==c.data&&(!a.traits.fastRegexp&&(g=c.data.match(/^\s+/))||(g=c.data.match(b)))&&g.input!==f;)f=g.input,h=g.slice(1).join(""),c=w(c,g),z(c.match,h,d,e),c=c.next},z=function(){var b=function(b,c){if(b&&"U"===b.type)return!0;b=!b||!l.per_phrase||
!c[b.phrase]||c[b.phrase].count<l.per_phrase;c=!l.per_page&&0!==l.per_page||a.reduce(0,c,function(a,b){return a+("U"!==b.type?b.count:0)})<l.per_page;return b&&c},d=function(b,d,e){var f=!!p.opt("dynamic_scope"),h=function(){var d;if(!e.phrase)return!0;if(l.proximity||l.same_proximity){var f=a.geometry(g);a.find(c.cache(b),function(b){var h;if(b.links){if((h=c.normalizePhrase(b.phrase)===c.normalizePhrase(e.phrase))&&!l.same_proximity||!h&&!l.proximity)return!1;var g=h?Math.max(l.same_proximity,l.proximity):
l.proximity;b.links=a.all(b.links,function(b){var c=a.isInDom(b.el);!d&&c&&(d=a.find(b.segments,function(b){b=b.geometry;b=a.extend({},b);b.x1-=g;b.y1-=g;b.x2+=g;b.y2+=g;if(b.x1<f.x2&&b.x2>f.x1&&b.y1<f.y2&&b.y2>f.y1)return!0}));return c});return d}})}return!d};if(!d.parentNode)return!1;var g=a.createEl("span");d.parentNode.insertBefore(g,d);g.appendChild(d);return function(a){g.parentNode.insertBefore(d,g);g.parentNode.removeChild(g);return a}((!f||a.isVisible(g))&&h())};return function(e,f,h,g){g=
g.stats;var k=c.normalizePhrase(f);k=f?c.cache(k,h):null;f&&!k&&(k={url:f.match(/^https?:\/\//i)?f:"http://"+f,type:"U"});if(h=k&&k.url.match(/https?:\/\//i)&&f&&b(k,g)&&d(h,e,k)){var m;l.link_headings||!(m=a.css(e.parentElement,"font-size"))?h=!0:(m=parseFloat(m),h=0>=m||m/a.page.font_size<l.heading_threshold)}if(h&&(h=k,m=a.createEl("a"),m.innerHTML=f.replace(/([a-z0-9]+ *|[^a-z0-9]+)/ig,"<span>$1</span>"),m.className="vglnk",a.cache(m,"type","inserted"),a.cache(m,"phrase",f),l.ui&&"U"!==h.type&&
(m.title="Link added by VigLink"),c.initLink(m,h),!a.cache(m,"unlinked")&&!p.isBlacklisted(m))){f=e.parentNode;f.insertBefore(m,e);f.removeChild(e);e=k;f={el:m,segments:[]};var q=m.getElementsByTagName("span"),r={els:[]};m=0;for(h=q.length;m<h;m++){var u=q[m];void 0===t||u.offsetTop===t.offsetTop?r.els.push(u):(f.segments.push(r),r={els:[u]});var t=u}r.geometry=a.geometry.apply(a,r.els);f.segments.push(r);e.links=e.links||[];e.links.push(f);t=k.phrase||k.url;g[t]=g[t]||{count:0,iid:k.iid,imp:k.imp,
phrase:k.phrase,url:k.url,type:k.type};g[t].count++}}}(),w=function(a,b){var c=b.slice(1).join("");b=b.index+b[0].length-c.length;0<b?b=a.splitText(b):(b=a,a=null);c=b.length<=c.length?null:b.splitText(c.length);return{previous:a,match:b,next:c}};return function(d,f){var h,k={};g.eventTimer.start("insert-run");if(h=c.regexp(f))(d=a.all(d,b))&&d.length&&(k=e(h,d,f,!1)),l.link_phrases&&c.sendInsertedTerms(k);g.eventTimer.stop("insert-run",!0);A||(A=!0,g.eventTimer.stop("insert-init-run",!0))}}(),insertManually:function(){var b=
!1,f=a.clone(l),h=function(b){return a.map(b,function(a,b){return{iid:"00000000",phrase:b,type:"0",url:a}})};return function(d,g,p){var k=!1;e.init();if(l.manual_mode&&!b){b=!0;var q=g=g||{};l.same_proximity=q.same_proximity||l.same_proximity;l.proximity=q.proximity||l.proximity;l.per_page=q.per_page||l.per_page;l.per_phrase=q.per_phrase||l.per_phrase;q=g.target_node||document.body;d=h(d);c.loadPhrases(d,null,[q]);l=f;c.cache.reset();k=!0;b=!1}"function"===a.type(p)&&p(k,q)}}(),loadPhrases:function(b,
e,h,g){a.each(b,function(a){a.phrase&&a.url&&a.iid&&(a.phrase=c.normalizePhrase(a.phrase),c.cache(a.phrase,{auc:a.auc,count:0,iid:a.iid,imp:e,phrase:a.phrase,mid:a.mid,url:a.url,type:a.type||""},e,g))});c.hasCalled(g,!0);this.insertLinks(h,g)},normalizePhrase:function(a){return a.toLowerCase().replace(/(^\s+|\s+$)/g,"").split(/\s+/).join(" ")},onInsertApi:function(b,c,e){g.eventTimer.stop("ins");"object"===a.type(b)&&(w=b.exp,q=b.imp_id,b.results&&this.loadPhrases(b.results,q,c,e))},regexp:function(b){b=
c.cache(b);b=a.map(b,function(b,c){return a.escapeRegExp(c).split(" ").join("\\s+")});if(0<b.length){var d="(?:^|[\\s\"'\\(])("+b.join("|")+")(?=\\s|\\W*$|\\W{2})";d=new RegExp(t?"(?:"+d+"|"+t.source+")":d,"i")}return d||t},sendInsertedTerms:function(b){b=a.map(b,function(a,b){return{count:a.count,phrase:b,iid:a.iid,impId:a.imp,url:a.url,type:a.type}});b.length&&p.apiNow("inserted",{cat:l.cat,exp:w,terms:a.toJSON(b),u:window.document.location.href,v:"2.0"})}};var e={init:a.destructing(a.bind(c.init,
c)),initNodes:function(d){var e=[],g=[],k=[];c.enabled()&&(l.scope?(a.each(d,function(b){var c=a.withScope([b],l.scope,{ancestors:!0,consolidate:!0,descendants:!1,self:!0});c.length?(k.push(b),g=g.concat(c)):(b=a.withScope([b],l.scope,{ancestors:!1,consolidate:!0,descendants:!0,self:!1}),b.length&&(k=k.concat(b),g=g.concat(b)))},{timeout:!0}),k=a.unique(k),g=a.unique(g)):g=k=d,p.opt("dynamic_scope")&&(k=a.all(k,function(b){return!a.matches(b,":has(a.vglnk)")},{timeout:!0})),k.length&&(g.length&&(e=
b.getPostIds(g)),l.link_phrases&&!c.hasCalled(e)?c.getPhrases(k,e):c.insertLinks(k,e)))}};l.manual_mode&&a.extend(e,{"public":{run:c.insertManually}});return e}};window.vglnk=window.vglnk||{};
window.vglnk.partners_plugin=function(l,a,p){l=a.extend({log_links:!0,log_status:!1,pai_type:null,sync_type:null,scope:"body"},l);var g={initLinkLogger:function(){p.registerProcessor(function(g){p.sendLinks("optimize",{desc:a.page.description,links:[g.href],mode:["P"],title:a.page.title,u:a.context(g).document.location.href,ver:p.opt("links_version")},{jsonp:!1})},{scope:l.scope})},logStatus:function(g){a.createEl("img").src=a.updateUrl(p.opt("sync_url"),{pathname:"/api/sync/status.gif",search:"?"+
a.toQuery({st:g})})},run:function(){l.log_links&&!p.opt("data_observer")&&g.initLinkLogger();l.pai_type?g.sync("partner",l.pai_type):l.sync_type&&g.sync(l.sync_type)},sync:function(){return function(t,w){var A="pixel";if("partner"===t)if(a.isArray(w)&&w.length){var q={partner_id:w.shift(),gdprApplies:a.consent().gdprApplies,gdprConsent:a.consent().gdprConsent,ccpaConsent:a.consent().ccpaConsent,gppConsent:a._gppConsent().gppConsent};var b="/api/sync.gif"}else return;else if(a.contains(["pixel","script"],
t))w=null,q={key:p.opt("key"),gdprApplies:a.consent().gdprApplies,gdprConsent:a.consent().gdprConsent,ccpaConsent:a.consent().ccpaConsent,gppConsent:a._gppConsent().gppConsent},"pixel"===t?b="/api/sync.gif":(A="script",b="/api/sync.js");else return;q=a.updateUrl(p.opt("sync_url"),{pathname:b,search:"?"+a.toQuery(q)});l.log_status&&g.logStatus("bg");"script"===A?(g.sync("pixel",w),a.jsonp(q)):(A=a.createEl("img"),a.on(A,"load",function(){var a=w;l.log_status&&g.logStatus("su");a&&g.sync(t,a)}),a.on(A,
"error",function(){var a=w;l.log_status&&g.logStatus("fa");a&&g.sync(t,a)}),A.src=q)}}()};return{init:function(){g.run()}}};
