You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
75 lines
34 KiB
JavaScript
75 lines
34 KiB
JavaScript
7 years ago
|
(function(){/*
|
||
|
|
||
|
SPF
|
||
|
(c) 2012-2016 Google Inc.
|
||
|
https://ajax.googleapis.com/ajax/libs/spf/2.4.0/LICENSE
|
||
|
*/
|
||
|
function k(a,b,c){var d=Array.prototype.slice.call(arguments,2);return function(){var c=d.slice();c.push.apply(c,arguments);return a.apply(b,c)}}function aa(a,b){if(a){var c=Array.prototype.slice.call(arguments,1);try{return a.apply(null,c)}catch(d){return d}}}function n(a,b){if(document.createEvent){var c=document.createEvent("CustomEvent");c.initCustomEvent(a,!0,!0,b);return document.dispatchEvent(c)}return!0}
|
||
|
var p=window.performance&&window.performance.timing&&window.performance.now?function(){return window.performance.timing.navigationStart+window.performance.now()}:function(){return(new Date).getTime()};function ba(){};function q(a,b){if(a.forEach)a.forEach(b,void 0);else for(var c=0,d=a.length;c<d;c++)c in a&&b.call(void 0,a[c],c,a)}function ca(a,b){if(a.every)return a.every(b,void 0);for(var c=0,d=a.length;c<d;c++)if(c in a&&!b.call(void 0,a[c],c,a))return!1;return!0}function da(a,b){if(a.some)return a.some(b,void 0);for(var c=0,d=a.length;c<d;c++)if(c in a&&b.call(void 0,a[c],c,a))return!0;return!1}
|
||
|
function ea(a,b){if(a.filter)return a.filter(b,void 0);var c=[];q(a,function(a,e,f){b.call(void 0,a,e,f)&&c.push(a)});return c}function fa(a,b){if(a.map)return a.map(b,void 0);var c=[];c.length=a.length;q(a,function(a,e,f){c[e]=b.call(void 0,a,e,f)});return c}function r(a){return"[object Array]"==Object.prototype.toString.call(a)?a:[a]};function t(a,b){return v[a]=b}var v=window._spf_state||{};window._spf_state=v;function w(a,b){var c=a.length-b.length;return 0<=c&&a.indexOf(b,c)==c}function ga(a){return"[object String]"==Object.prototype.toString.call(a)}var ha=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^\s+|\s+$/g,"")};function x(a,b){a=a.split(b);var c=1==a.length;return[a[0],c?"":b,c?"":a.slice(1).join(b)]};function ia(a){a.data&&ga(a.data)&&0==a.data.lastIndexOf("spf:",0)&&ja(a.data.substring(4))}function ja(a){var b=y[a];b&&(delete y[a],b())}function ka(a){window.addEventListener?window.addEventListener("message",a,!1):window.attachEvent&&window.attachEvent("onmessage",a)}function la(a){window.removeEventListener?window.removeEventListener("message",a,!1):window.detachEvent&&window.detachEvent("onmessage",a)}
|
||
|
var ma=function(){function a(){b=!1}if(!window.postMessage)return!1;var b=!0;ka(a);window.postMessage("","*");la(a);return b}(),y={};"async-defers"in v||t("async-defers",y);y=v["async-defers"];ma&&("async-listener"in v&&la(v["async-listener"]),ka(ia),t("async-listener",ia));var na={"animation-class":"spf-animate","animation-duration":425,"cache-lifetime":6E5,"cache-max":50,"cache-unified":!1,"link-class":"spf-link","nolink-class":"spf-nolink","navigate-limit":20,"navigate-lifetime":864E5,"reload-identifier":null,"request-timeout":0,"url-identifier":"?spf=__type__"},z={};"config"in v||t("config",z);z=v.config;function oa(a){var b=A();a in b&&delete b[a]}function pa(){var a=A();for(b in a)qa(a[b])||delete a[b];a=A();var b=parseInt(z["cache-max"],10);b=isNaN(b)?Infinity:b;b=Object.keys(a).length-b;if(!(0>=b))for(var c=0;c<b;c++){var d=Infinity,e;for(e in a)if(a[e].count<d){var f=e;d=a[e].count}delete a[f]}}function qa(a){if(!(a&&"data"in a))return!1;var b=a.life,b=isNaN(b)?Infinity:b;a=a.time;return p()-a<b}function ra(a){var b=parseInt(v["cache-counter"],10)||0;b++;t("cache-counter",b);a.count=b}
|
||
|
function A(a){return!a&&"cache-storage"in v?v["cache-storage"]:t("cache-storage",a||{})};function sa(a){return a.classList?a.classList:a.className&&a.className.match(/\S+/g)||[]}function ta(a,b){if(b){if(a.classList)return a.classList.contains(b);a=sa(a);return da(a,function(a){return a==b})}return!1}function B(a,b){b&&(a.classList?a.classList.add(b):ta(a,b)||(a.className+=" "+b))}function C(a,b){if(b)if(a.classList)a.classList.remove(b);else{var c=sa(a),c=ea(c,function(a){return a!=b});a.className=c.join(" ")}};function ua(a){var b=document.body;b.dataset?b.dataset.spfName=a:b.setAttribute("data-"+"spfName".replace(/([A-Z])/g,"-$1").toLowerCase(),a)};function va(a,b){b=b||document;return b.querySelectorAll?b.querySelectorAll(a):[]}function wa(a,b,c){for(;a;){if(b(a))return a;if(c&&a==c)break;a=a.parentNode}return null}function xa(a,b,c){b=b||document;var d=b.createElement("iframe");d.id=a||"";d.src='javascript:""';d.style.display="none";c&&(d.onload=k(c,null,d));b.body.appendChild(d);return d};function ya(a,b,c){var d=null,e=window.history.state;if(e){var d={},f;for(f in e)d[f]=e[f]}if(b)for(f in d=d||{},b)d[f]=b[f];za(!0,a,d,c)}function za(a,b,c,d){if(b||c){b=b||window.location.href;c=c||{};var e=p();t("history-timestamp",e);c["spf-timestamp"]=e;if(a)Aa(c,b);else if(a=Ba().contentWindow.history.pushState,"function"==typeof a)a.call(window.history,c,"",b);else throw Error("history.pushState is not a function.");t("history-url",b);d&&(d=v["history-callback"])&&d(b,c)}}
|
||
|
function Ca(a){var b=window.location.href;if(v["history-ignore-pop"])t("history-ignore-pop",!1);else if(a.state){a=a.state;var c=a["spf-timestamp"];b==v["history-url"]?(t("history-timestamp",c),Aa(a,b)):(a["spf-back"]=c<parseInt(v["history-timestamp"],10),a["spf-current"]=v["history-url"],t("history-timestamp",c),t("history-url",b),(c=v["history-callback"])&&c(b,a))}}
|
||
|
function Aa(a,b){var c=Ba().contentWindow.history.replaceState;if("function"==typeof c)c.call(window.history,a,"",b);else throw Error("history.replaceState is not a function");}function Ba(){var a=document.getElementById("history-iframe");a||(a=xa("history-iframe"));return a};function Da(a,b){a&&b&&(a in E||(E[a]=[]),E[a].push(b))}function Ea(a,b){a in E&&b&&ca(E[a],function(a,d,e){return a==b?(e[d]=null,!1):!0})}function Ga(a){a in E&&q(E[a],function(a,c,d){d[c]=null;a&&a()})}var E={};"ps-s"in v||t("ps-s",E);E=v["ps-s"];function F(a,b,c){var d=G[a];return a&&b?(d||(d=G[a]={items:[],o:0,m:0,A:1}),d.items.push({D:b,B:c||0})):d&&d.items.length||0}function H(a,b){var c=G[a];if(c){var d=!!c.o||!!c.m;0<c.A&&(b||!d)&&Ha(a,b)}}function I(a){(a=G[a])&&a.A--}function J(a,b){var c=G[a];c&&(c.A++,H(a,b))}function Ia(a){var b=G[a];b&&(Ja(b),delete G[a])}function Ha(a,b){var c=G[a];if(c&&(Ja(c),0<c.A&&c.items.length)){var d=c.items[0];d&&(a=k(function(a,b){b();a()},null,k(Ha,null,a,b)),b?(c.items.shift(),a(d.D)):Ka(c,d,a))}}
|
||
|
function Ka(a,b,c){b.B?(c=k(c,null,ba),a.m=setTimeout(c,b.B),b.B=0):(a.items.shift(),c=k(c,null,b.D),(b=(b=z["advanced-task-scheduler"])&&b.addTask)?a.o=b(c):a.m=setTimeout(c,0))}function Ja(a){if(a.o){var b=z["advanced-task-scheduler"];(b=b&&b.cancelTask)&&b(a.o);a.o=0}a.m&&(clearTimeout(a.m),a.m=0)}var G={};function K(a){var b=document.createElement("a");b.href=a;b.href=b.href;a={href:b.href,protocol:b.protocol,host:b.host,hostname:b.hostname,port:b.port,pathname:b.pathname,search:b.search,hash:b.hash,username:b.username,password:b.password};a.origin=a.protocol+"//"+a.host;a.pathname&&"/"==a.pathname[0]||(a.pathname="/"+a.pathname);return a}function L(a,b){a=K(a);return b?a.href:x(a.href,"#")[0]}
|
||
|
function La(a,b){var c=x(a,"#");a=c[0];q(b,function(b){a=a.replace(new RegExp("([?&])"+b+"(?:=[^&]*)?(?:(?=[&])|$)","g"),function(a,b){return"?"==b?b:""})});w(a,"?")&&(a=a.slice(0,-1));return a+c[1]+c[2]}function Ma(a){var b=z["advanced-persistent-parameters"]||"",c=x(a,"#");a=c[0];var d=-1!=a.indexOf("?")?"&":"?";return a+(b?d+b:"")+c[1]+c[2]};function Na(a,b,c,d){var e="js"==a;b=M(a,b);var f=c||"^"+b,g=N(a,f),l;c&&(l=O[N(a,c)])&&b!=l&&(n(e?"spfjsbeforeunload":"spfcssbeforeunload",{name:c,url:l}),e=l,delete O[N(a,c)],e&&delete P[N(a,e)],delete E[N(a,c)],Da(g,k(Oa,null,a,c,l)));if((e=P[N(a,b)])&&f!=e){delete O[N(a,e)];delete P[N(a,b)];var h=N(a,e);h&&g&&h in E&&(E[g]=(E[g]||[]).concat(E[h]),delete E[h])}P[N(a,b)]=f;O[N(a,f)]=b;Da(g,d);d=k(Pa,null,a);Q[N(a,b,void 0)]?(e&&f!=e&&(a=Qa(a,b))&&a.setAttribute("name",c||""),d()):(a=Ra(a,b,d,void 0,
|
||
|
void 0,l))&&c&&a.setAttribute("name",c)}function Sa(a,b){var c=O[N(a,b)];delete O[N(a,b)];c&&delete P[N(a,c)];delete E[N(a,b)];Oa(a,b,c)}function Oa(a,b,c){c&&(n("js"==a?"spfjsunload":"spfcssunload",{name:b,url:c}),Ta(a,c))}function Pa(a){var b=N(a,""),c;for(c in E)0==c.indexOf(b)&&ca(c.substring(b.length).split("|"),k(Ua,null,a))&&Ga(c)}
|
||
|
function Ra(a,b,c,d,e,f){function g(){Q[N(a,b,e)]&&(Q[N(a,b,e)]=2);l&&m&&m.parentNode&&h==document&&m.parentNode.removeChild(m);c&&setTimeout(c,0);return null}var l="js"==a;b=M(a,b);Q[N(a,b,e)]=1;var h=d||document,m=h.createElement(l?"script":"link");if(!b)return g();d=R(b);m.className=N(a,d);"onload"in m?m.onerror=m.onload=g:m.onreadystatechange=function(){/^c|loade/.test(m.readyState)&&g()};d=h.getElementsByTagName("head")[0]||h.body;l?(m.async=!0,m.src=b,d.insertBefore(m,d.firstChild)):(m.rel=
|
||
|
"stylesheet",m.href=b,(f=f?Qa(a,f,d):null)?d.insertBefore(m,f):d.appendChild(m));return m}function Ta(a,b){b=M(a,b);var c=Qa(a,b,void 0);c&&c.parentNode&&c.parentNode.removeChild(c);delete Q[N(a,b)]}function Qa(a,b,c){b=R(b);return va("."+N(a,b),c)[0]}
|
||
|
function Va(a){var b="js"==a,c=[];q(va(b?"script[src]":'link[rel~="stylesheet"]'),function(d){var e=b?d.src:d.href,e=M(a,e);if(!Q[N(a,e,void 0)]){Q[N(a,e,void 0)]=2;var f=R(e);B(d,N(a,f));if(f=d.getAttribute("name"))P[N(a,e)]=f,O[N(a,f)]=e;c.push(d)}})}
|
||
|
function Wa(a,b,c){if(b&&(b=M(a,b),c||!Q[N(a,b,void 0)]))if(c&&"img"==a)Xa(b);else{var d=R(b),e=N(a,d),f=N(a,"prefetch"),d=document.getElementById(f);if(!d)d=xa(f,null,function(a){a.title=f;H(f,!0)});else if(!c&&d.contentWindow.document.getElementById(e))return;a=k(Ya,null,d,a,b,e,f);d.title?a():F(f,a)}}
|
||
|
function Ya(a,b,c,d,e){var f="js"==b,g="css"==b;a=a.contentWindow.document;var l=a.getElementById(d);l&&l.parentNode.removeChild(l);f?(l=a.createElement("object"),Za?a.createElement("script").src=c:l.data=c,l.id=d,a.body.appendChild(l)):g?(l=Ra(b,c,null,a,e),l.id=d):(l=a.createElement("img"),Za&&(c=c+"#"+p()),l.src=c,l.id=d,a.body.appendChild(l))}function Xa(a){var b=new Image;Za&&(a=a+"#"+p());b.src=a}
|
||
|
function $a(a,b,c){for(var d="js"==a,e=O[N(a,c)],f=b.replace(/\s/g,""),f=f||"",g=0,l=0,h=f.length;l<h;++l)g=31*g+f.charCodeAt(l),g%=4294967296;f="hash-"+g;O[N(a,c)]=f;!ab(a,f)&&(b=bb(a,b))&&(Q[N(a,f,void 0)]=2,b&&!d&&(d=R(f),b.className=N(a,d),b.setAttribute("name",c)),(e=e&&e[0])&&Ta(a,e))}
|
||
|
function bb(a,b){b=ha(b);if(!b)return null;var c=document.getElementsByTagName("head")[0]||document.body;"js"==a?(a=document.createElement("script"),a.text=b,c.appendChild(a),c.removeChild(a)):(a=document.createElement("style"),c.appendChild(a),"styleSheet"in a?a.styleSheet.cssText=b:a.appendChild(document.createTextNode(b)));return a}
|
||
|
function M(a,b){var c="rsrc-p-"+a;if(b){var d=b.indexOf("//");if(0>d){if(0==b.lastIndexOf("hash-",0))return b;c=v[c]||"";if(ga(c))b=c+b;else for(var e in c)b=b.replace(e,c[e]);"img"!=a&&(b=0>b.indexOf("."+a)?b+"."+a:b);b=L(b)}else 0==d&&(b=L(b))}return b}function N(a,b,c){return a+"-"+b+(c?"-"+c:"")}function R(a){return a?String(a).replace(/[^\w]/g,""):""}function ab(a,b){a=Q[N(a,b,void 0)];return""==b||2==a}function Ua(a,b){b=O[N(a,b)];return void 0!=b&&ab(a,b)}var Q={},P={},O={},Za=-1!=navigator.userAgent.indexOf(" Trident/");
|
||
|
"rsrc-s"in v||t("rsrc-s",Q);Q=v["rsrc-s"];"rsrc-n"in v||t("rsrc-n",P);P=v["rsrc-n"];"rsrc-u"in v||t("rsrc-u",O);O=v["rsrc-u"];function cb(a){a=r(a);q(a,function(a){Wa("img",a,!0)})};function db(a,b,c){Na("js",a,b,c)}function eb(a){Sa("js",a)}function fb(a,b){Ra("js",a,b)}function gb(a){a=r(a);q(a,function(a){Wa("js",a)})}function hb(a,b,c){a=r(a);a=ea(a,function(a){return!!a});var d=[];q(a,function(a){void 0==O[N("js",a)]&&d.push(a)});var e=!d.length;if(b){var f=ca(a,k(Ua,null,"js"));e&&f?b():(a=N("js",a.sort().join("|")),Da(a,b))}c&&!e&&c(d)}function ib(a,b){a=r(a);q(a,function(a){if(a){var b=S[a]||a,b=M("js",b),c=O[N("js",a)];c&&b!=c&&jb(a)}});hb(a,b,kb)}
|
||
|
function kb(a){q(a,function(a){function b(){db(e,a)}var d=T[a],e=S[a]||a;d?ib(d,b):b()})}function jb(a){a=r(a);q(a,function(a){var b=[],d;for(d in T){var e=T[d],e=r(e);q(e,function(c){c==a&&b.push(d)})}q(b,function(a){jb(a)});eb(a)})}function lb(a,b){$a("js",a,b)}function mb(a){bb("js",a)}var T={};"js-d"in v||t("js-d",T);var T=v["js-d"],S={};"js-u"in v||t("js-u",S);S=v["js-u"];function nb(a,b,c){Na("css",a,b,c)}function ob(a,b){Ra("css",a,b)}function pb(a){a=r(a);q(a,function(a){Wa("css",a)})};function qb(a,b,c){if(b){b=[];var d=0;c&&(a+="\r\n");var e=a.indexOf("[\r\n",d);for(-1<e&&(d=e+3);-1<(e=a.indexOf(",\r\n",d));){var f=ha(a.substring(d,e));d=e+3;f&&b.push(JSON.parse(f))}e=a.indexOf("]\r\n",d);-1<e&&(f=ha(a.substring(d,e)),d=e+3,f&&b.push(JSON.parse(f)));f="";a.length>d&&(f=a.substring(d),c&&w(f,"\r\n")&&(f=f.substring(0,f.length-2)));b=rb(b);return{w:b,g:f}}a=JSON.parse(a);b=rb(r(a));return{w:b,g:""}}
|
||
|
function U(a,b,c,d){var e=c&&0==c.type.lastIndexOf("navigate",0),f=c&&c.reverse,g=c&&!!c.position,l=c&&c.j,h=b.name||"",m="process "+L(a),D=!z["experimental-process-async"];var u=0;b.timing||(b.timing={});b.title&&(document.title=b.title);e&&b.url&&L(b.url)!=L(window.location.href)&&ya(b.url+window.location.hash);b.head&&(u=k(function(a,b){a=V(a);sb(a);tb(a);I(m);ub(a,function(){b.spfProcessHead=p();J(m,D)})},null,b.head,b.timing),u=F(m,u));b.attr&&(u=k(function(a,b){for(var c in a){var d=document.getElementById(c);
|
||
|
if(d){var e=void 0,f=a[c];for(e in f){var g=f[e];"class"==e?d.className=g:"style"==e?d.style.cssText=g:(d.setAttribute(e,g),"value"==e&&(d[e]=g))}}}b.spfProcessAttr=p()},null,b.attr,b.timing),u=F(m,u));var Z=b.body||{},uc=u,Fa;for(Fa in Z)u=k(function(a,b){if(a=document.getElementById(a)){!e||g||l||(t("nav-scroll-position",null),t("nav-scroll-url",null),window.scroll(0,0),l=!0,c&&(c.j=!0));var d=V(b);tb(d);var u=function(){I(m);ub(d,function(){J(m,D)})};b=z["animation-class"];vb&&ta(a,b)?(a=new wb(a,
|
||
|
d.html,b,h,!!f),I(m),H(a.key,!0),F(a.key,k(xb,null,a),0),F(a.key,k(yb,null,a),17),F(a.key,k(zb,null,a),a.T),F(a.key,k(function(){u();J(m,D)},null),0),H(a.key)):(b=z["experimental-html-handler"])?(I(m),b(d.html,a,function(){u();J(m,D)})):(a.innerHTML=d.html,u())}},null,Fa,Z[Fa],b.timing),u=F(m,u);Z=u-uc;b.foot?(u=k(function(a,b,c){c&&(b.spfProcessBody=p());a=V(a);tb(a);I(m);ub(a,function(){b.spfProcessFoot=p();J(m,D)})},null,b.foot,b.timing,Z),u=F(m,u)):Z&&(u=k(function(a){a.spfProcessBody=p()},null,
|
||
|
b.timing),u=F(m,u));d&&(u=F(m,k(d,null,a,b)));H(m,D)}function Ab(a,b,c,d){c="preprocess "+L(a);if(b.head){var e=k(function(a){a=V(a);sb(a);Bb(a);Cb(a)},null,b.head);F(c,e)}var f=b.body||{},g;for(g in f)f[g]&&(e=k(function(a,b){a=V(b);Bb(a);Cb(a)},null,g,f[g]),F(c,e));b.foot&&(e=k(function(a){a=V(a);Bb(a);Cb(a)},null,b.foot),F(c,e));d&&F(c,k(d,null,a,b));H(c)}
|
||
|
function xb(a){B(a.a,a.s);B(a.a,a.H);B(a.a,a.K);B(a.a,a.I);B(a.a,a.J);a.l=document.createElement("div");a.l.className=a.S;var b=a.a,c=a.l;if(c){for(var d;d=b.firstChild;)c.appendChild(d);b.appendChild(c)}a.f=document.createElement("div");a.f.className=a.R;a.f.innerHTML=a.P;a.reverse?(b=a.l,b.parentNode.insertBefore(a.f,b)):(b=a.l,b.parentNode.insertBefore(a.f,b.nextSibling))}function yb(a){C(a.a,a.I);C(a.a,a.J);B(a.a,a.F);B(a.a,a.G)}
|
||
|
function zb(a){a.a.removeChild(a.l);var b=a.f,c,d=b.parentNode;if(d&&11!=d.nodeType)if(b.removeNode)b.removeNode(!1);else{for(;c=b.firstChild;)d.insertBefore(c,b);d.removeChild(b)}C(a.a,a.F);C(a.a,a.G);C(a.a,a.H);C(a.a,a.K);C(a.a,a.s)}function rb(a){q(r(a),function(a){if(a){a.head&&(a.head=V(a.head));if(a.body)for(var b in a.body)a.body[b]=V(a.body[b]);a.foot&&(a.foot=V(a.foot))}});return a}
|
||
|
function V(a){var b=new Db;if(!a)return b;if(!ga(a))return a.scripts&&q(a.scripts,function(a){b.scripts.push({url:a.url||"",text:a.text||"",name:a.name||"",async:a.async||!1})}),a.styles&&q(a.styles,function(a){b.styles.push({url:a.url||"",text:a.text||"",name:a.name||""})}),a.links&&q(a.links,function(a){"spf-preconnect"==a.rel&&b.links.push({url:a.url||"",rel:a.rel||""})}),b.html=a.html||"",b;a=a.replace(Eb,function(a,d,e,f){if("script"==d){d=(d=e.match(Fb))?d[1]:"";var c=e.match(Gb),c=c?c[1]:"",
|
||
|
l=Hb.test(e);e=Ib.exec(e);return(e=!e||-1!=e[1].indexOf("/javascript")||-1!=e[1].indexOf("/x-javascript")||-1!=e[1].indexOf("/ecmascript"))?(b.scripts.push({url:c,text:f,name:d,async:l}),""):a}return"style"==d&&(d=(d=e.match(Fb))?d[1]:"",e=Ib.exec(e),e=!e||-1!=e[1].indexOf("text/css"))?(b.styles.push({url:"",text:f,name:d}),""):a});a=a.replace(Jb,function(a,d){var c=d.match(Kb),c=c?c[1]:"";return"stylesheet"==c?(c=(c=d.match(Fb))?c[1]:"",d=(d=d.match(Lb))?d[1]:"",b.styles.push({url:d,text:"",name:c}),
|
||
|
""):"spf-preconnect"==c?(d=(d=d.match(Lb))?d[1]:"",b.links.push({url:d,rel:c}),""):a});b.html=a;return b}function ub(a,b){if(0>=a.scripts.length)b&&b();else{var c=-1,d=function(){c++;if(c<a.scripts.length){var e=a.scripts[c],f=function(){};e.url?f=e.name?k(db,null,e.url,e.name):k(fb,null,e.url):e.text&&(f=e.name?k(lb,null,e.text,e.name):k(mb,null,e.text));e.url&&!e.async?f(d):(f(),d())}else b&&b()};d()}}function Cb(a){0>=a.scripts.length||(a=fa(a.scripts,function(a){return a.url}),gb(a))}
|
||
|
function tb(a){0>=a.styles.length||q(a.styles,function(a){a.url?a.name?nb(a.url,a.name):ob(a.url):a.text&&(a.name?$a("css",a.text,a.name):bb("css",a.text))})}function Bb(a){0>=a.styles.length||(a=fa(a.styles,function(a){return a.url}),pb(a))}function sb(a){0>=a.links.length||(a=fa(a.links,function(a){return"spf-preconnect"==a.rel?a.url:""}),cb(a))}
|
||
|
function wb(a,b,c,d,e){var f=parseInt(z["animation-duration"],10);this.a=a;this.P=b;this.T=f;this.reverse=e;b=document.body;b=(b.dataset?b.dataset.spfName:b.getAttribute("data-"+"spfName".replace(/([A-Z])/g,"-$1").toLowerCase()))||"";f=parseInt(v.uid,10)||0;f++;this.key=a["spf-key"]||(a["spf-key"]=""+t("uid",f));this.H=b&&c+"-from-"+b;this.K=d&&c+"-to-"+d;this.l=null;this.S=c+"-old";this.f=null;this.R=c+"-new";this.s=c+(e?"-reverse":"-forward");this.I=c+"-start";this.J=this.s+"-start";this.F=c+"-end";
|
||
|
this.G=this.s+"-end"}function Db(){this.html="";this.scripts=[];this.styles=[];this.links=[]}
|
||
|
var vb=function(){var a=document.createElement("div");return"transition"in a.style?!0:da(["webkit","Moz","Ms","O","Khtml"],function(b){return b+"Transition"in a.style})}(),Jb=/\x3clink([\s\S]*?)\x3e/ig,Eb=/\x3c(script|style)([\s\S]*?)\x3e([\s\S]*?)\x3c\/\1\x3e/ig,Hb=/(?:\s|^)async(?:\s|=|$)/i,Lb=/(?:\s|^)href\s*=\s*["']?([^\s"']+)/i,Fb=/(?:\s|^)name\s*=\s*["']?([^\s"']+)/i,Kb=/(?:\s|^)rel\s*=\s*["']?([^\s"']+)/i,Gb=/(?:\s|^)src\s*=\s*["']?([^\s"']+)/i,Ib=/(?:\s|^)type\s*=\s*["']([^"']+)["']/i;function Mb(a,b,c,d){var e=d||{},f=!1,g=0,l,h=new XMLHttpRequest;h.open(a,b,!0);h.timing={};var m=h.abort;h.abort=function(){clearTimeout(l);h.onreadystatechange=null;m.call(h)};h.onreadystatechange=function(){var a=h.timing;if(2==h.readyState){a.responseStart=a.responseStart||p();if("json"==h.responseType)f=!1;else if(-1<(h.getResponseHeader("Transfer-Encoding")||"").toLowerCase().indexOf("chunked"))f=!0;else{a=h.getResponseHeader("X-Firefox-Spdy");var c=window.chrome&&chrome.loadTimes&&chrome.loadTimes(),
|
||
|
c=c&&c.wasFetchedViaSpdy;f=!(!a&&!c)}e.M&&e.M(h)}else 3==h.readyState?f&&e.u&&(a=h.responseText.substring(g),g=h.responseText.length,e.u(h,a)):4==h.readyState&&(a.responseEnd=a.responseEnd||p(),window.performance&&window.performance.getEntriesByName&&(h.resourceTiming=window.performance.getEntriesByName(b).pop()),f&&e.u&&h.responseText.length>g&&(a=h.responseText.substring(g),g=h.responseText.length,e.u(h,a)),clearTimeout(l),e.L&&e.L(h))};"responseType"in h&&"json"==e.responseType&&(h.responseType=
|
||
|
"json");e.withCredentials&&(h.withCredentials=e.withCredentials);d="FormData"in window&&c instanceof FormData;a="POST"==a&&!d;if(e.headers)for(var D in e.headers)h.setRequestHeader(D,e.headers[D]),"content-type"==D.toLowerCase()&&(a=!1);a&&h.setRequestHeader("Content-Type","application/x-www-form-urlencoded");0<e.O&&(l=setTimeout(function(){h.abort();e.N&&e.N(h)},e.O));h.timing.fetchStart=p();h.send(c);return h};function Nb(a,b){b=b||{};b.method=((b.method||"GET")+"").toUpperCase();b.type=b.type||"request";var c=a,d=z["url-identifier"]||"";if(d){var d=d.replace("__type__",b.type||""),e=x(c,"#");var f=x(e[0],"?");var c=f[0],g=f[1];f=f[2];var l=e[1],e=e[2];if(0==d.lastIndexOf("?",0))g&&(d=d.replace("?","&")),f+=d;else{if(0==d.lastIndexOf(".",0))if(w(c,"/"))d="index"+d;else{var h=c.lastIndexOf(".");-1<h&&(c=c.substring(0,h))}else w(c,"/")&&0==d.lastIndexOf("/",0)&&(d=d.substring(1));c+=d}c=c+g+f+l+e}d=L(c);
|
||
|
c={};c.spfUrl=d;c.startTime=p();c.fetchStart=c.startTime;g=Ob(a,b.current,null,b.type,!1);g=Pb(g,b.current);c.spfPrefetched=!!g&&"prefetch"==g.type;c.spfCached=!!g;if(g){a=k(Qb,null,a,b,c,g.key,g.response);b=window._spf_state=window._spf_state||{};var m=parseInt(b.uid,10)||0;m++;b=b.uid=m;y[b]=a;ma?window.postMessage("spf:"+b,"*"):window.setTimeout(k(ja,null,b),0);return null}g={};if(l=z["request-headers"])for(m in l)f=l[m],g[m]=null==f?"":f;if(b.headers)for(m in b.headers)f=b.headers[m],g[m]=null==
|
||
|
f?"":f;null!=b.c&&(g["X-SPF-Referer"]=b.c);null!=b.current&&(g["X-SPF-Previous"]=b.current);if(m=z["advanced-header-identifier"])g["X-SPF-Request"]=m.replace("__type__",b.type),g.Accept="application/json";m=new Rb;f=k(Sb,null,a,b,c,m);a={headers:g,O:z["request-timeout"],M:k(Tb,null,a,m),u:k(Ub,null,a,b,c,m),L:f,N:f};b.withCredentials&&(a.withCredentials=b.withCredentials);z["advanced-response-type-json"]&&(a.responseType="json");return"POST"==b.method?Mb("POST",d,b.C,a):Mb("GET",d,null,a)}
|
||
|
function Qb(a,b,c,d,e){var f=!1;c.responseStart=c.responseEnd=p();b.type&&0==b.type.lastIndexOf("navigate",0)&&(c.navigationStart=c.startTime,z["cache-unified"]||(oa(d),f=!0));b.i&&"multipart"==e.type&&q(e.parts,function(d){d.timing||(d.timing={});d.timing.spfCached=!!c.spfCached;d.timing.spfPrefetched=!!c.spfPrefetched;b.i(a,d)});Vb(a,b,c,e,f)}function Tb(a,b,c){a=c.getResponseHeader("X-SPF-Response-Type")||"";b.f=-1!=a.toLowerCase().indexOf("multipart")}
|
||
|
function Ub(a,b,c,d,e,f,g){if(d.f){f=d.g+f;try{var l=qb(f,!0,g)}catch(h){e.abort();b.h&&b.h(a,h,e);return}b.i&&q(l.w,function(d){d.timing||(d.timing={});d.timing.spfCached=!!c.spfCached;d.timing.spfPrefetched=!!c.spfPrefetched;b.i(a,d)});d.a=d.a.concat(l.w);d.g=l.g}}
|
||
|
function Sb(a,b,c,d,e){if(e.timing)for(var f in e.timing)c[f]=e.timing[f];if(e.resourceTiming)if("load"==b.type)for(var g in e.resourceTiming)c[g]=e.resourceTiming[g];else if(window.performance&&window.performance.timing&&(f=window.performance.timing.navigationStart,f+e.resourceTiming.startTime>=c.startTime))for(var l in e.resourceTiming)g=e.resourceTiming[l],void 0!==g&&(w(l,"Start")||w(l,"End")||"startTime"==l)&&(c[l]=f+Math.round(g));"load"!=b.type&&(c.navigationStart=c.startTime);d.a.length&&
|
||
|
(d.g=ha(d.g),d.g&&Ub(a,b,c,d,e,"",!0));if("json"==e.responseType){if(!e.response){b.h&&b.h(a,Error("JSON response parsing failed"),e);return}var h=rb(r(e.response))}else try{h=qb(e.responseText).w}catch(D){b.h&&b.h(a,D,e);return}if(b.i&&1<h.length)for(d=d.a.length;d<h.length;d++)e=h[d],e.timing||(e.timing={}),e.timing.spfCached=!!c.spfCached,e.timing.spfPrefetched=!!c.spfPrefetched,b.i(a,e);if(1<h.length){var m;q(h,function(a){a.cacheType&&(m=a.cacheType)});h={parts:h,type:"multipart"};m&&(h.cacheType=
|
||
|
m)}else h=1==h.length?h[0]:{};Vb(a,b,c,h,!0)}function Vb(a,b,c,d,e){if(e&&"POST"!=b.method&&(e=Ob(a,b.current,d.cacheType,b.type,!0))){d.cacheKey=e;var f={response:d,type:b.type||""},g=parseInt(z["cache-lifetime"],10),l=parseInt(z["cache-max"],10);0>=g||0>=l||(l=A(),f={data:f,life:g,time:p(),count:0},ra(f),l[e]=f,setTimeout(pa,1E3))}d.timing=c;b.v&&b.v(a,d)}
|
||
|
function Ob(a,b,c,d,e){a=L(a);var f;z["cache-unified"]?f=a:"navigate-back"==d||"navigate-forward"==d?f="history "+a:"navigate"==d?f=(e?"history ":"prefetch ")+a:"prefetch"==d&&(f=e?"prefetch "+a:"");b&&"url"==c?f+=" previous "+b:b&&"path"==c&&(f+=" previous "+K(b).pathname);return f||""}
|
||
|
function Pb(a,b){var c=[];b&&(c.push(a+" previous "+b),c.push(a+" previous "+K(b).pathname));c.push(a);var d=null;da(c,function(a){a:{var b=A();if(a in b){b=b[a];if(qa(b)){ra(b);b=b.data;break a}oa(a)}b=void 0}b&&(d={key:a,response:b.response,type:b.type});return!!b});return d}function Rb(){this.f=!1;this.g="";this.a=[]};function Wb(a){return wa(a,function(a){return ta(a,z["link-class"])})}function Xb(a){return wa(a,function(a){return ta(a,z["nolink-class"])})}function Yb(a,b){return wa(a,function(a){return a.href&&"img"!=a.tagName.toLowerCase()},b)}function Zb(a){if(a.metaKey||a.altKey||a.ctrlKey||a.shiftKey||0<a.button)return null;var b=Wb(a.target);return!b||z["nolink-class"]&&Xb(a.target)?null:(a=Yb(a.target,b))?a.href:null}function $b(a){return K(a).origin!=K(window.location.href).origin?!1:!0}
|
||
|
function ac(){if(!v["nav-init"])return!1;var a=parseInt(v["nav-counter"],10)||0;a++;var b=parseInt(z["navigate-limit"],10),b=isNaN(b)?Infinity:b;if(a>b)return!1;a=parseInt(v["nav-init-time"],10);a--;a=p()-a;b=parseInt(z["navigate-lifetime"],10);b=isNaN(b)?Infinity:b;return a>b?!1:!0}function bc(a,b){b=b||window.location.href;return-1!=a.indexOf("#")&&(a=L(a),b=L(b),a==b)?!1:!0}
|
||
|
function cc(a){if(!a.defaultPrevented){var b=Zb(a);b&&(b=Ma(b),$b(b)&&ac()&&n("spfclick",{url:b,target:a.target})&&(dc(b,{},new ec),a.preventDefault()))}}function fc(a){var b=Zb(a);b&&setTimeout(function(){gc(b)},0)}function hc(){var a=v["nav-scroll-position"]||null;var b=v["nav-scroll-url"]||"";a=a&&b==window.location.href?a:null;ic();a&&window.scroll.apply(null,a)}
|
||
|
function jc(a,b){b=new ec({current:b&&b["spf-current"],history:!0,position:b&&b["spf-position"],c:b&&b["spf-referer"],reverse:!(!b||!b["spf-back"])});var c=z["reload-identifier"];c&&(a=La(a,[c]));$b(a)?ac()?n("spfhistory",{url:a,referer:b.c,previous:b.current})&&(b.position&&(t("nav-scroll-position",[window.pageXOffset,window.pageYOffset]),t("nav-scroll-url",window.location.href)),dc(a,{},b)):W(a,"1"):W(a,"9")}
|
||
|
function dc(a,b,c){kc();if(bc(a,c.current))if(lc(a,c.c,c.current,b)){t("nav-counter",(parseInt(v["nav-counter"],10)||0)+1);mc(a);var d=L(a),e="preprocess "+L(d);for(f in G)e!=f&&0==f.lastIndexOf("preprocess",0)&&Ia(f);d=nc()[d];t("nav-request",d);t("nav-promote",null);t("nav-promote-time",null);if(d&&4!=d.readyState)d="preprocess "+L(a),e="promote "+L(a),t("nav-promote",a),t("nav-promote-time",p()),Ia(d),H(e,!0),c.history||oc(a,c.c,k(X,null,b));else{d=k(X,null,b);e=k(pc,null,b,c);var f=k(qc,null,
|
||
|
b,c);z["advanced-navigate-persist-timing"]||rc();c.type="navigate";c.history&&(c.type+=c.reverse?"-back":"-forward");b=Nb(a,{method:b.method,headers:b.headers,i:e,h:d,v:f,C:b.postData,type:c.type,current:c.current,c:c.c});t("nav-request",b);c.history||oc(a,c.c,d)}}else W(a,"2");else c.history||oc(a,c.c,k(X,null,b)),sc(a,c)}
|
||
|
function sc(a,b){if(b.position)ic(),window.scroll.apply(null,b.position),b.j=!0;else if(a=x(a,"#"),a[2]){if(a=document.getElementById(a[2]))ic(),a.scrollIntoView(),b.j=!0}else b.j||(ic(),window.scroll(0,0),b.j=!0)}function oc(a,b,c){try{ya(null,{"spf-position":[window.pageXOffset,window.pageYOffset]}),L(a,!0)!=window.location.href&&za(!1,a,{"spf-referer":b},void 0)}catch(d){kc(),c(a,d)}}function X(a,b,c,d){t("nav-request",null);tc(b,c,a,void 0,d)&&W(b,"10",c)}
|
||
|
function pc(a,b,c,d){if(vc(c,d,a))if(d.reload)W(c,"5");else if(d.redirect)wc(a,d.redirect);else try{U(c,d,b,function(){xc(c,d,a)})}catch(e){X(a,c,e)}else W(c,"3")}
|
||
|
function qc(a,b,c,d){t("nav-request",null);if(v["nav-promote"]==b.b){var e=d.timing||{};e.navigationStart=v["nav-promote-time"];e.spfPrefetched=!0}var f="multipart"==d.type;if(!f){if(!yc(c,d,a)){W(c,"4");return}if(d.reload){W(c,"5");return}if(d.redirect){wc(a,d.redirect);return}}try{U(c,f?{}:d,b,function(){var e=d.name||"";f&&q(d.parts,function(a){e=a.name||e});ua(e);sc(c,b);zc(c,d,a)})}catch(g){X(a,c,g)}}function wc(a,b){try{b+=window.location.hash,ya(b,null,!0)}catch(c){kc(),X(a,b,c)}}
|
||
|
function kc(){var a=v["nav-request"];a&&(a.abort(),t("nav-request",null))}function Y(a,b){if(a){var c=Array.prototype.slice.call(arguments);c[0]=a;c=aa.apply(null,c)}return!1!==c}
|
||
|
function W(a,b,c){c=c?c.message:"";kc();mc();var d=b;c&&(d+=" Message: "+c);n("spfreload",{url:a,reason:d});var e=window.location.href;z["experimental-remove-history"]&&e==a&&(t("history-ignore-pop",!0),window.history.back());setTimeout(function(){var c=z["reload-identifier"];if(c){var d={};d[c]=encodeURIComponent(b);var c=a,l=x(c,"#"),c=l[0],h=-1!=c.indexOf("?")?"&":"?",m;for(m in d)c+=h+m,d[m]&&(c+="="+d[m]),h="&";a=c+l[1]+l[2]}window.location.href=a;bc(a,e)||window.location.reload()},0)}
|
||
|
function Ac(a,b,c){c.b=c.b||a;if(lc(a,void 0,void 0,b,!0)){var d=k(Bc,null,!1,b,c),e=k(Cc,null,!1,b,c),f=k(Dc,null,!1,b,c);c.type="load";Nb(a,{method:b.method,headers:b.headers,i:e,h:d,v:f,C:b.postData,type:c.type,withCredentials:b.withCredentials})}}function gc(a,b){a=Ma(a);Ec(a,b||{},new ec)}
|
||
|
function Ec(a,b,c){c.b=c.b||a;if(lc(a,void 0,void 0,b,!0)){var d=k(Bc,null,!0,b,c),e=k(Cc,null,!0,b,c),f=k(Dc,null,!0,b,c);c.type="prefetch";b=Nb(a,{method:b.method,headers:b.headers,i:e,h:d,v:f,C:b.postData,type:c.type,current:c.current});a=L(a);nc()[a]=b}}function Bc(a,b,c,d,e){a&&Fc(d);a&&v["nav-promote"]==c.b?X(b,d,e):tc(d,e,b,!0)}
|
||
|
function Cc(a,b,c,d,e){if(vc(d,e,b,!0)){if(e.reload){if(!a)return;if(v["nav-promote"]==c.b){W(d,"5");return}}if(e.redirect)Gc(a,b,c,e.redirect);else{if(a){var f=k(pc,null,b,c,d,e),g="promote "+L(c.b);F(g,f);if(v["nav-promote"]==c.b){H(g,!0);return}}(a?Ab:U)(d,e,c,function(){xc(d,e,b,!0)})}}}
|
||
|
function Dc(a,b,c,d,e){var f="multipart"==e.type;if(!f){if(!yc(d,e,b,!0)){W(d,"4");return}if(e.reload){if(!a)return;if(v["nav-promote"]==c.b){W(d,"5");return}}if(e.redirect){Gc(a,b,c,e.redirect);return}}var g="promote "+L(c.b);if(a){Fc(d);if(v["nav-promote"]==c.b){F(g,k(qc,null,b,c,d,e));H(g,!0);return}Ia(g)}g=a?Ab:U;try{g(d,f?{}:e,c,function(){zc(d,e,b,!0)})}catch(l){Bc(a,b,c,d,l)}}
|
||
|
function Gc(a,b,c,d){a=a?Ec:Ac;var e={};q("onError onRequest onPartProcess onPartDone onProcess onDone".split(" "),function(a){e[a]=b[a]});a(d,e,c)}function tc(a,b,c,d,e){a={url:a,err:b,xhr:e};(c=Y((c||{}).onError,a))&&!d&&(c=n("spferror",a));return c}function lc(a,b,c,d,e){a={url:a,referer:b,previous:c};(d=Y((d||{}).onRequest,a))&&!e&&(d=n("spfrequest",a));return d}function vc(a,b,c,d){a={url:a,part:b};(c=Y((c||{}).onPartProcess,a))&&!d&&(c=n("spfpartprocess",a));return c}
|
||
|
function xc(a,b,c,d){a={url:a,part:b};Y((c||{}).onPartDone,a)&&!d&&n("spfpartdone",a)}function yc(a,b,c,d){a={url:a,response:b};(c=Y((c||{}).onProcess,a))&&!d&&(c=n("spfprocess",a));return c}function zc(a,b,c,d){a={url:a,response:b};Y((c||{}).onDone,a)&&!d&&n("spfdone",a)}function Fc(a){a=L(a);var b=nc(),c=b[a];c&&c.abort();delete b[a]}function mc(a){var b=nc();a=a&&L(a);for(var c in b)a!=c&&Fc(c)}
|
||
|
var rc,Hc=window.performance&&(window.performance.clearResourceTimings||window.performance.webkitClearResourceTimings||window.performance.mozClearResourceTimings||window.performance.msClearResourceTimings||window.performance.oClearResourceTimings);rc=Hc?k(Hc,window.performance):ba;function nc(){return"nav-prefetches"in v?v["nav-prefetches"]:t("nav-prefetches",{})}function ic(){t("nav-scroll-position",null);t("nav-scroll-url",null)}
|
||
|
function ec(a){a=a||{};this.current=a.history&&a.current?a.current:window.location.href;this.history=!!a.history;this.b=a.b||"";this.position=a.position||null;this.c=void 0!=a.c?a.c:window.location.href;this.reverse=!!a.reverse;this.j=!!a.j;this.type=a.type||""};function Ic(){Va("js");Va("css");"complete"==document.readyState&&(document.removeEventListener?document.removeEventListener("DOMContentLoaded",Ic,!1):document.detachEvent&&document.detachEvent("onreadystatechange",Ic))}document.addEventListener?document.addEventListener("DOMContentLoaded",Ic,!1):document.attachEvent&&document.attachEvent("onreadystatechange",Ic);Ic();
|
||
|
var Jc={init:function(a){var b=!("function"!=typeof window.history.pushState&&!Ba().contentWindow.history.pushState);a=a||{};for(var c in na)z[c]=c in a?a[c]:na[c];for(c in a)c in na||(z[c]=a[c]);if(b){c=tc;if(!v["history-init"]&&window.addEventListener){a=window.location.href;window.addEventListener("popstate",Ca,!1);t("history-init",!0);t("history-callback",jc);t("history-error-callback",c);t("history-listener",Ca);t("history-url",a);t("history-timestamp",p());var d={"spf-referer":document.referrer};
|
||
|
try{ya(a,d)}catch(e){c&&c(a,e)}}!v["nav-init"]&&document.addEventListener&&(t("nav-init",!0),t("nav-init-time",p()),t("nav-counter",0),document.addEventListener("click",cc,!1),t("nav-listener",cc),!z["experimental-prefetch-mousedown"]||"ontouchstart"in window||0<window.navigator.maxTouchPoints||0<window.navigator.msMaxTouchPoints||(document.addEventListener("mousedown",fc,!1),t("nav-mousedown-listener",fc)),document.addEventListener("scroll",hc,!1),t("nav-scroll-listener",hc))}return b},dispose:function(){"undefined"!=
|
||
|
typeof History&&History.prototype.pushState&&(kc(),v["nav-init"]&&(document.removeEventListener&&(document.removeEventListener("click",v["nav-listener"],!1),document.removeEventListener("mousedown",v["nav-mousedown-listener"],!1),document.removeEventListener("scroll",v["nav-scroll-listener"],!1)),t("nav-listener",null),t("nav-mousedown-listener",null),t("nav-scroll-listener",null),t("nav-scroll-position",null),t("nav-scroll-url",null),t("nav-init",!1),t("nav-init-time",null),t("nav-counter",null)),
|
||
|
v["history-init"]&&(window.removeEventListener&&window.removeEventListener("popstate",v["history-listener"],!1),t("history-init",!1),t("history-callback",null),t("history-error-callback",null),t("history-listener",null),t("history-url",null),t("history-timestamp",0)));for(var a in z)delete z[a]},navigate:function(a,b){a&&(a=Ma(a),$b(a)?ac()?dc(a,b||{},new ec):W(a,"1"):W(a,"9"))},load:function(a,b){a=Ma(a);Ac(a,b||{},new ec)},prefetch:gc,process:function(a,b){function c(a,c,d,e){a==c&&b&&b(e)}var d=
|
||
|
window.location.href;if("multipart"==a.type){a=a.parts;var e=a.length-1;q(a,function(a,b){U(d,a,null,k(c,null,b,e))})}else U(d,a,null,k(c,null,0,0))}},Kc={cache:{remove:oa,clear:function(){A({})}},script:{load:db,get:fb,ready:hb,done:function(a){O[N("js",a)]="";Pa("js")},require:ib,declare:function(a,b){if(a){for(var c in a)T[c]=a[c];if(b)for(c in b)S[c]=b[c]}},path:function(a){t("rsrc-p-js",a)},unload:eb,ignore:function(a,b){a=r(a);a=N("js",a.sort().join("|"));Ea(a,b)},unrequire:jb,prefetch:gb},
|
||
|
style:{load:nb,get:ob,unload:function(a){Sa("css",a)},path:function(a){t("rsrc-p-css",a)},prefetch:pb}},global=this;global.spf=global.spf||{};var Lc=global.spf,Mc;for(Mc in Jc)Lc[Mc]=Jc[Mc];for(var Nc in Kc)for(var Oc in Kc[Nc])Lc[Nc]=Lc[Nc]||{},Lc[Nc][Oc]=Kc[Nc][Oc];n("spfready");}).call(this);
|