d2hkbi3gan6yg6.cloudfront.net
Open in
urlscan Pro
3.162.7.92
Public Scan
URL:
https://d2hkbi3gan6yg6.cloudfront.net/visscore.tag.min.js
Submission: On April 01 via manual from CA — Scanned from CA
Submission: On April 01 via manual from CA — Scanned from CA
Form analysis
0 forms found in the DOMText Content
(function(){var libraries=new function(){var define=null;var module=null;(function(){function N(p,r){function q(a){if(q[a]!==w)return q[a];var c;if("bug-string-char-index"==a)c="a"!="a"[0];else if("json"==a)c=q("json-stringify")&&q("json-parse");else{var e;if("json-stringify"==a){c=r.stringify;var b="function"==typeof c&&s;if(b){(e=function(){return 1}).toJSON=e;try{b="0"===c(0)&&("0"===c(new t)&&('""'==c(new A)&&(c(u)===w&&(c(w)===w&&(c()===w&&("1"===c(e)&&("[1]"==c([e])&&("[null]"==c([w])&&("null"== c(null)&&("[null,null,null]"==c([w,u,null])&&('{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}'==c({a:[e,!0,!1,null,"\x00\b\n\f\r\t"]})&&("1"===c(null,e)&&("[\n 1,\n 2\n]"==c([1,2],null,1)&&('"-271821-04-20T00:00:00.000Z"'==c(new C(-864E13))&&('"+275760-09-13T00:00:00.000Z"'==c(new C(864E13))&&('"-000001-01-01T00:00:00.000Z"'==c(new C(-621987552E5))&&'"1969-12-31T23:59:59.999Z"'==c(new C(-1))))))))))))))))))}catch(f){b=!1}}c=b}if("json-parse"==a){c=r.parse;if("function"==typeof c)try{if(0===c("0")&& !c(!1)){e=c('{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}');var n=5==e.a.length&&1===e.a[0];if(n){try{n=!c('"\t"')}catch(d){}if(n)try{n=1!==c("01")}catch(g){}if(n)try{n=1!==c("1.")}catch(m){}}}}catch(X){n=!1}c=n}}return q[a]=!!c}p||(p=k.Object());r||(r=k.Object());var t=p.Number||k.Number,A=p.String||k.String,H=p.Object||k.Object,C=p.Date||k.Date,G=p.SyntaxError||k.SyntaxError,K=p.TypeError||k.TypeError,L=p.Math||k.Math,I=p.JSON||k.JSON;"object"==typeof I&&(I&&(r.stringify=I.stringify,r.parse= I.parse));var H=H.prototype,u=H.toString,v,B,w,s=new C(-0xc782b5b800cec);try{s=-109252==s.getUTCFullYear()&&(0===s.getUTCMonth()&&(1===s.getUTCDate()&&(10==s.getUTCHours()&&(37==s.getUTCMinutes()&&(6==s.getUTCSeconds()&&708==s.getUTCMilliseconds())))))}catch(Q){}if(!q("json")){var D=q("bug-string-char-index");if(!s)var x=L.floor,M=[0,31,59,90,120,151,181,212,243,273,304,334],E=function(a,c){return M[c]+365*(a-1970)+x((a-1969+(c=+(1<c)))/4)-x((a-1901+c)/100)+x((a-1601+c)/400)};(v=H.hasOwnProperty)|| (v=function(a){var c={},e;(c.__proto__=null,c.__proto__={toString:1},c).toString!=u?v=function(a){var c=this.__proto__;a=a in(this.__proto__=null,this);this.__proto__=c;return a}:(e=c.constructor,v=function(a){var c=(this.constructor||e).prototype;return a in this&&!(a in c&&this[a]===c[a])});c=null;return v.call(this,a)});B=function(a,c){var e=0,b,f,n;(b=function(){this.valueOf=0}).prototype.valueOf=0;f=new b;for(n in f)v.call(f,n)&&e++;b=f=null;e?B=2==e?function(a,c){var e={},b="[object Function]"== u.call(a),f;for(f in a)b&&"prototype"==f||(v.call(e,f)||(!(e[f]=1)||(!v.call(a,f)||c(f))))}:function(a,c){var e="[object Function]"==u.call(a),b,f;for(b in a)e&&"prototype"==b||(!v.call(a,b)||((f="constructor"===b)||c(b)));(f||v.call(a,b="constructor"))&&c(b)}:(f="valueOf toString toLocaleString propertyIsEnumerable isPrototypeOf hasOwnProperty constructor".split(" "),B=function(a,c){var e="[object Function]"==u.call(a),b,h=!e&&("function"!=typeof a.constructor&&(F[typeof a.hasOwnProperty]&&a.hasOwnProperty))|| v;for(b in a)e&&"prototype"==b||(!h.call(a,b)||c(b));for(e=f.length;b=f[--e];h.call(a,b)&&c(b));});return B(a,c)};if(!q("json-stringify")){var U={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},y=function(a,c){return("000000"+(c||0)).slice(-a)},R=function(a){for(var c='"',b=0,h=a.length,f=!D||10<h,n=f&&(D?a.split(""):a);b<h;b++){var d=a.charCodeAt(b);switch(d){case 8:case 9:case 10:case 12:case 13:case 34:case 92:c+=U[d];break;default:if(32>d){c+="\\u00"+y(2,d.toString(16));break}c+= f?n[b]:a.charAt(b)}}return c+'"'},O=function(a,c,b,h,f,n,d){var g,m,k,l,p,r,s,t,q;try{g=c[a]}catch(z){}if("object"==typeof g&&g)if(m=u.call(g),"[object Date]"!=m||v.call(g,"toJSON"))"function"==typeof g.toJSON&&(("[object Number]"!=m&&("[object String]"!=m&&"[object Array]"!=m)||v.call(g,"toJSON"))&&(g=g.toJSON(a)));else if(g>-1/0&&g<1/0){if(E){l=x(g/864E5);for(m=x(l/365.2425)+1970-1;E(m+1,0)<=l;m++);for(k=x((l-E(m,0))/30.42);E(m,k+1)<=l;k++);l=1+l-E(m,k);p=(g%864E5+864E5)%864E5;r=x(p/36E5)%24;s= x(p/6E4)%60;t=x(p/1E3)%60;p%=1E3}else m=g.getUTCFullYear(),k=g.getUTCMonth(),l=g.getUTCDate(),r=g.getUTCHours(),s=g.getUTCMinutes(),t=g.getUTCSeconds(),p=g.getUTCMilliseconds();g=(0>=m||1E4<=m?(0>m?"-":"+")+y(6,0>m?-m:m):y(4,m))+"-"+y(2,k+1)+"-"+y(2,l)+"T"+y(2,r)+":"+y(2,s)+":"+y(2,t)+"."+y(3,p)+"Z"}else g=null;b&&(g=b.call(c,a,g));if(null===g)return"null";m=u.call(g);if("[object Boolean]"==m)return""+g;if("[object Number]"==m)return g>-1/0&&g<1/0?""+g:"null";if("[object String]"==m)return R(""+g); if("object"==typeof g){for(a=d.length;a--;)if(d[a]===g)throw K();d.push(g);q=[];c=n;n+=f;if("[object Array]"==m){k=0;for(a=g.length;k<a;k++)m=O(k,g,b,h,f,n,d),q.push(m===w?"null":m);a=q.length?f?"[\n"+n+q.join(",\n"+n)+"\n"+c+"]":"["+q.join(",")+"]":"[]"}else B(h||g,function(a){var c=O(a,g,b,h,f,n,d);c!==w&&q.push(R(a)+":"+(f?" ":"")+c)}),a=q.length?f?"{\n"+n+q.join(",\n"+n)+"\n"+c+"}":"{"+q.join(",")+"}":"{}";d.pop();return a}};r.stringify=function(a,c,b){var h,f,n,d;if(F[typeof c]&&c)if("[object Function]"== (d=u.call(c)))f=c;else if("[object Array]"==d){n={};for(var g=0,k=c.length,l;g<k;l=c[g++],(d=u.call(l),"[object String]"==d||"[object Number]"==d)&&(n[l]=1));}if(b)if("[object Number]"==(d=u.call(b))){if(0<(b-=b%1))for(h="",10<b&&(b=10);h.length<b;h+=" ");}else"[object String]"==d&&(h=10>=b.length?b:b.slice(0,10));return O("",(l={},l[""]=a,l),f,n,h,"",[])}}if(!q("json-parse")){var V=A.fromCharCode,W={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"},b,J,l=function(){b=J=null;throw G(); },z=function(){for(var a=J,c=a.length,e,h,f,k,d;b<c;)switch(d=a.charCodeAt(b),d){case 9:case 10:case 13:case 32:b++;break;case 123:case 125:case 91:case 93:case 58:case 44:return e=D?a.charAt(b):a[b],b++,e;case 34:e="@";for(b++;b<c;)if(d=a.charCodeAt(b),32>d)l();else if(92==d)switch(d=a.charCodeAt(++b),d){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:e+=W[d];b++;break;case 117:h=++b;for(f=b+4;b<f;b++)d=a.charCodeAt(b),48<=d&&57>=d||(97<=d&&102>=d||(65<=d&&70>=d||l()));e+=V("0x"+ a.slice(h,b));break;default:l()}else{if(34==d)break;d=a.charCodeAt(b);for(h=b;32<=d&&(92!=d&&34!=d);)d=a.charCodeAt(++b);e+=a.slice(h,b)}if(34==a.charCodeAt(b))return b++,e;l();default:h=b;45==d&&(k=!0,d=a.charCodeAt(++b));if(48<=d&&57>=d){for(48==d&&((d=a.charCodeAt(b+1),48<=d&&57>=d)&&l());b<c&&(d=a.charCodeAt(b),48<=d&&57>=d);b++);if(46==a.charCodeAt(b)){for(f=++b;f<c&&(d=a.charCodeAt(f),48<=d&&57>=d);f++);f==b&&l();b=f}d=a.charCodeAt(b);if(101==d||69==d){d=a.charCodeAt(++b);43!=d&&45!=d||b++; for(f=b;f<c&&(d=a.charCodeAt(f),48<=d&&57>=d);f++);f==b&&l();b=f}return+a.slice(h,b)}k&&l();if("true"==a.slice(b,b+4))return b+=4,!0;if("false"==a.slice(b,b+5))return b+=5,!1;if("null"==a.slice(b,b+4))return b+=4,null;l()}return"$"},P=function(a){var c,b;"$"==a&&l();if("string"==typeof a){if("@"==(D?a.charAt(0):a[0]))return a.slice(1);if("["==a){for(c=[];;b||(b=!0)){a=z();if("]"==a)break;b&&(","==a?(a=z(),"]"==a&&l()):l());","==a&&l();c.push(P(a))}return c}if("{"==a){for(c={};;b||(b=!0)){a=z();if("}"== a)break;b&&(","==a?(a=z(),"}"==a&&l()):l());","!=a&&("string"==typeof a&&("@"==(D?a.charAt(0):a[0])&&":"==z()))||l();c[a.slice(1)]=P(z())}return c}l()}return a},T=function(a,b,e){e=S(a,b,e);e===w?delete a[b]:a[b]=e},S=function(a,b,e){var h=a[b],f;if("object"==typeof h&&h)if("[object Array]"==u.call(h))for(f=h.length;f--;)T(h,f,e);else B(h,function(a){T(h,a,e)});return e.call(a,b,h)};r.parse=function(a,c){var e,h;b=0;J=""+a;e=P(z());"$"!=z()&&l();b=J=null;return c&&"[object Function]"==u.call(c)?S((h= {},h[""]=e,h),"",c):e}}}r.runInContext=N;return r}var K=typeof define==="function"&&define.amd,F={"function":!0,object:!0},G=F[typeof exports]&&(exports&&(!exports.nodeType&&exports)),k=F[typeof window]&&window||this,t=G&&(F[typeof module]&&(module&&(!module.nodeType&&("object"==typeof global&&global))));!t||(t.global!==t&&(t.window!==t&&t.self!==t)||(k=t));if(G&&!K)N(k,G);else{var L=k.JSON,Q=k.JSON3,M=!1,A=N(k,k.JSON3={noConflict:function(){M||(M=!0,k.JSON=L,k.JSON3=Q,L=Q=null);return A}});k.JSON= {parse:A.parse,stringify:A.stringify}}K&&define(function(){return A})}).call(this);"use strict";(function(root,factory){if(typeof define==="function"&&define.amd)define([],factory);else if(typeof exports==="object")module.exports=factory();else root.store=factory()})(this,function(){var store={},win=window,doc=win.document,localStorageName="localStorage",scriptTag="script",storage;store.disabled=false;store.version="1.3.17";store.set=function(key,value){};store.get=function(key,defaultVal){};store.has= function(key){return store.get(key)!==undefined};store.remove=function(key){};store.clear=function(){};store.transact=function(key,defaultVal,transactionFn){if(transactionFn==null){transactionFn=defaultVal;defaultVal=null}if(defaultVal==null)defaultVal={};var val=store.get(key,defaultVal);transactionFn(val);store.set(key,val)};store.getAll=function(){};store.forEach=function(){};store.serialize=function(value){return JSON.stringify(value)};store.deserialize=function(value){if(typeof value!="string")return undefined; try{return JSON.parse(value)}catch(e){return value||undefined}};function isLocalStorageNameSupported(){try{return localStorageName in win&&win[localStorageName]}catch(err){return false}}if(isLocalStorageNameSupported()){storage=win[localStorageName];store.set=function(key,val){if(val===undefined)return store.remove(key);storage.setItem(key,store.serialize(val));return val};store.get=function(key,defaultVal){var val=store.deserialize(storage.getItem(key));return val===undefined?defaultVal:val};store.remove= function(key){storage.removeItem(key)};store.clear=function(){storage.clear()};store.getAll=function(){var ret={};store.forEach(function(key,val){ret[key]=val});return ret};store.forEach=function(callback){for(var i=0;i<storage.length;i++){var key=storage.key(i);callback(key,store.get(key))}}}else if(doc.documentElement.addBehavior){var storageOwner,storageContainer;try{storageContainer=new ActiveXObject("htmlfile");storageContainer.open();storageContainer.write("<"+scriptTag+">document.w=window</"+ scriptTag+'><iframe src="/favicon.ico"></iframe>');storageContainer.close();storageOwner=storageContainer.w.frames[0].document;storage=storageOwner.createElement("div")}catch(e){storage=doc.createElement("div");storageOwner=doc.body}var withIEStorage=function(storeFunction){return function(){var args=Array.prototype.slice.call(arguments,0);args.unshift(storage);storageOwner.appendChild(storage);storage.addBehavior("#default#userData");storage.load(localStorageName);var result=storeFunction.apply(store, args);storageOwner.removeChild(storage);return result}};var forbiddenCharsRegex=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");var ieKeyFix=function(key){return key.replace(/^d/,"___$&").replace(forbiddenCharsRegex,"___")};store.set=withIEStorage(function(storage,key,val){key=ieKeyFix(key);if(val===undefined)return store.remove(key);storage.setAttribute(key,store.serialize(val));storage.save(localStorageName);return val});store.get=withIEStorage(function(storage,key,defaultVal){key=ieKeyFix(key); var val=store.deserialize(storage.getAttribute(key));return val===undefined?defaultVal:val});store.remove=withIEStorage(function(storage,key){key=ieKeyFix(key);storage.removeAttribute(key);storage.save(localStorageName)});store.clear=withIEStorage(function(storage){var attributes=storage.XMLDocument.documentElement.attributes;storage.load(localStorageName);while(attributes.length)storage.removeAttribute(attributes[0].name);storage.save(localStorageName)});store.getAll=function(storage){var ret={}; store.forEach(function(key,val){ret[key]=val});return ret};store.forEach=withIEStorage(function(storage,callback){var attributes=storage.XMLDocument.documentElement.attributes;for(var i=0,attr;attr=attributes[i];++i)callback(attr.name,store.deserialize(storage.getAttribute(attr.name)))})}try{var testKey="__storejs__";store.set(testKey,testKey);if(store.get(testKey)!=testKey)store.disabled=true;store.remove(testKey)}catch(e){store.disabled=true}store.enabled=!store.disabled;return store});(function(n, v){"object"===typeof exports?module.exports=v(require("./punycode"),require("./IPv6"),require("./SecondLevelDomains")):"function"===typeof define&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],v):n.URI=v(n.punycode,n.IPv6,n.SecondLevelDomains,n)})(this,function(n,v,t,h){function d(a,b){var c=1<=arguments.length,f=2<=arguments.length;if(!(this instanceof d))return c?f?new d(a,b):new d(a):new d;if(void 0===a){if(c)throw new TypeError("undefined is not a valid argument for URI");a= "undefined"!==typeof location?location.href+"":""}this.href(a);return void 0!==b?this.absoluteTo(b):this}function q(a){return a.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function w(a){return void 0===a?"Undefined":String(Object.prototype.toString.call(a)).slice(8,-1)}function k(a){return"Array"===w(a)}function C(a,b){var c={},d,g;if("RegExp"===w(b))c=null;else if(k(b))for(d=0,g=b.length;d<g;d++)c[b[d]]=!0;else c[b]=!0;d=0;for(g=a.length;d<g;d++)if(c&&void 0!==c[a[d]]||!c&&b.test(a[d]))a.splice(d, 1),g--,d--;return a}function z(a,b){var c,d;if(k(b)){c=0;for(d=b.length;c<d;c++)if(!z(a,b[c]))return!1;return!0}var g=w(b);c=0;for(d=a.length;c<d;c++)if("RegExp"===g){if("string"===typeof a[c]&&a[c].match(b))return!0}else if(a[c]===b)return!0;return!1}function D(a,b){if(!k(a)||(!k(b)||a.length!==b.length))return!1;a.sort();b.sort();for(var c=0,d=a.length;c<d;c++)if(a[c]!==b[c])return!1;return!0}function F(a){return escape(a)}function A(a){return encodeURIComponent(a).replace(/[!'()*]/g,F).replace(/\*/g, "%2A")}function x(a){return function(b,c){if(void 0===b)return this._parts[a]||"";this._parts[a]=b||null;this.build(!c);return this}}function E(a,b){return function(c,d){if(void 0===c)return this._parts[a]||"";null!==c&&(c+="",c.charAt(0)===b&&(c=c.substring(1)));this._parts[a]=c;this.build(!d);return this}}var G=h&&h.URI;d.version="1.16.1";var e=d.prototype,p=Object.prototype.hasOwnProperty;d._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null, query:null,fragment:null,duplicateQueryParameters:d.duplicateQueryParameters,escapeQuerySpace:d.escapeQuerySpace}};d.duplicateQueryParameters=!1;d.escapeQuerySpace=!0;d.protocol_expression=/^[a-z][a-z0-9.+-]*$/i;d.idn_expression=/[^a-z0-9\.-]/i;d.punycode_expression=/(xn--)/i;d.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;d.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/; d.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/ig;d.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u201e\u2018\u2019]+$/};d.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"};d.invalid_hostname_characters= /[^a-zA-Z0-9\.-]/;d.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"};d.getDomAttribute=function(a){if(a&&a.nodeName){var b=a.nodeName.toLowerCase();return"input"===b&&"image"!==a.type?void 0:d.domAttributes[b]}};d.encode=A;d.decode=decodeURIComponent;d.iso8859=function(){d.encode=escape;d.decode=unescape};d.unicode=function(){d.encode=A;d.decode= decodeURIComponent};d.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",", "%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}};d.encodeQuery=function(a,b){var c=d.encode(a+"");void 0===b&&(b=d.escapeQuerySpace);return b?c.replace(/%20/g,"+"):c};d.decodeQuery=function(a,b){a+="";void 0===b&&(b=d.escapeQuerySpace);try{return d.decode(b?a.replace(/\+/g, "%20"):a)}catch(c){return a}};var r={encode:"encode",decode:"decode"},y,B=function(a,b){return function(c){try{return d[b](c+"").replace(d.characters[a][b].expression,function(c){return d.characters[a][b].map[c]})}catch(f){return c}}};for(y in r)d[y+"PathSegment"]=B("pathname",r[y]),d[y+"UrnPathSegment"]=B("urnpath",r[y]);r=function(a,b,c){return function(f){var g;g=c?function(a){return d[b](d[c](a))}:d[b];f=(f+"").split(a);for(var e=0,l=f.length;e<l;e++)f[e]=g(f[e]);return f.join(a)}};d.decodePath= r("/","decodePathSegment");d.decodeUrnPath=r(":","decodeUrnPathSegment");d.recodePath=r("/","encodePathSegment","decode");d.recodeUrnPath=r(":","encodeUrnPathSegment","decode");d.encodeReserved=B("reserved","encode");d.parse=function(a,b){var c;b||(b={});c=a.indexOf("#");-1<c&&(b.fragment=a.substring(c+1)||null,a=a.substring(0,c));c=a.indexOf("?");-1<c&&(b.query=a.substring(c+1)||null,a=a.substring(0,c));"//"===a.substring(0,2)?(b.protocol=null,a=a.substring(2),a=d.parseAuthority(a,b)):(c=a.indexOf(":"), -1<c&&(b.protocol=a.substring(0,c)||null,b.protocol&&!b.protocol.match(d.protocol_expression)?b.protocol=void 0:"//"===a.substring(c+1,c+3)?(a=a.substring(c+3),a=d.parseAuthority(a,b)):(a=a.substring(c+1),b.urn=!0)));b.path=a;return b};d.parseHost=function(a,b){a=a.replace(/\\/g,"/");var c=a.indexOf("/"),d;-1===c&&(c=a.length);if("["===a.charAt(0))d=a.indexOf("]"),b.hostname=a.substring(1,d)||null,b.port=a.substring(d+2,c)||null,"/"===b.port&&(b.port=null);else{var g=a.indexOf(":");d=a.indexOf("/"); g=a.indexOf(":",g+1);-1!==g&&(-1===d||g<d)?(b.hostname=a.substring(0,c)||null,b.port=null):(d=a.substring(0,c).split(":"),b.hostname=d[0]||null,b.port=d[1]||null)}b.hostname&&("/"!==a.substring(c).charAt(0)&&(c++,a="/"+a));return a.substring(c)||"/"};d.parseAuthority=function(a,b){a=d.parseUserinfo(a,b);return d.parseHost(a,b)};d.parseUserinfo=function(a,b){var c=a.indexOf("/"),f=a.lastIndexOf("@",-1<c?c:a.length-1);-1<f&&(-1===c||f<c)?(c=a.substring(0,f).split(":"),b.username=c[0]?d.decode(c[0]): null,c.shift(),b.password=c[0]?d.decode(c.join(":")):null,a=a.substring(f+1)):(b.username=null,b.password=null);return a};d.parseQuery=function(a,b){if(!a)return{};a=a.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"");if(!a)return{};for(var c={},f=a.split("&"),g=f.length,e,l,m=0;m<g;m++)if(e=f[m].split("="),l=d.decodeQuery(e.shift(),b),e=e.length?d.decodeQuery(e.join("="),b):null,p.call(c,l)){if("string"===typeof c[l]||null===c[l])c[l]=[c[l]];c[l].push(e)}else c[l]=e;return c};d.build=function(a){var b= "";a.protocol&&(b+=a.protocol+":");a.urn||(!b&&!a.hostname||(b+="//"));b+=d.buildAuthority(a)||"";"string"===typeof a.path&&("/"!==a.path.charAt(0)&&("string"===typeof a.hostname&&(b+="/")),b+=a.path);"string"===typeof a.query&&(a.query&&(b+="?"+a.query));"string"===typeof a.fragment&&(a.fragment&&(b+="#"+a.fragment));return b};d.buildHost=function(a){var b="";if(a.hostname)b=d.ip6_expression.test(a.hostname)?b+("["+a.hostname+"]"):b+a.hostname;else return"";a.port&&(b+=":"+a.port);return b};d.buildAuthority= function(a){return d.buildUserinfo(a)+d.buildHost(a)};d.buildUserinfo=function(a){var b="";a.username&&(b+=d.encode(a.username),a.password&&(b+=":"+d.encode(a.password)),b+="@");return b};d.buildQuery=function(a,b,c){var f="",g,e,l,m;for(e in a)if(p.call(a,e)&&e)if(k(a[e]))for(g={},l=0,m=a[e].length;l<m;l++)void 0!==a[e][l]&&(void 0===g[a[e][l]+""]&&(f+="&"+d.buildQueryParameter(e,a[e][l],c),!0!==b&&(g[a[e][l]+""]=!0)));else void 0!==a[e]&&(f+="&"+d.buildQueryParameter(e,a[e],c));return f.substring(1)}; d.buildQueryParameter=function(a,b,c){return d.encodeQuery(a,c)+(null!==b?"="+d.encodeQuery(b,c):"")};d.addQuery=function(a,b,c){if("object"===typeof b)for(var f in b)p.call(b,f)&&d.addQuery(a,f,b[f]);else if("string"===typeof b)void 0===a[b]?a[b]=c:("string"===typeof a[b]&&(a[b]=[a[b]]),k(c)||(c=[c]),a[b]=(a[b]||[]).concat(c));else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");};d.removeQuery=function(a,b,c){var f;if(k(b))for(c=0,f=b.length;c<f;c++)a[b[c]]= void 0;else if("RegExp"===w(b))for(f in a)b.test(f)&&(a[f]=void 0);else if("object"===typeof b)for(f in b)p.call(b,f)&&d.removeQuery(a,f,b[f]);else if("string"===typeof b)void 0!==c?"RegExp"===w(c)?!k(a[b])&&c.test(a[b])?a[b]=void 0:a[b]=C(a[b],c):a[b]===c?a[b]=void 0:k(a[b])&&(a[b]=C(a[b],c)):a[b]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");};d.hasQuery=function(a,b,c,f){if("object"===typeof b){for(var e in b)if(p.call(b,e)&&!d.hasQuery(a, e,b[e]))return!1;return!0}if("string"!==typeof b)throw new TypeError("URI.hasQuery() accepts an object, string as the name parameter");switch(w(c)){case "Undefined":return b in a;case "Boolean":return a=Boolean(k(a[b])?a[b].length:a[b]),c===a;case "Function":return!!c(a[b],b,a);case "Array":return k(a[b])?(f?z:D)(a[b],c):!1;case "RegExp":return k(a[b])?f?z(a[b],c):!1:Boolean(a[b]&&a[b].match(c));case "Number":c=String(c);case "String":return k(a[b])?f?z(a[b],c):!1:a[b]===c;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter"); }};d.commonPath=function(a,b){var c=Math.min(a.length,b.length),d;for(d=0;d<c;d++)if(a.charAt(d)!==b.charAt(d)){d--;break}if(1>d)return a.charAt(0)===b.charAt(0)&&"/"===a.charAt(0)?"/":"";if("/"!==a.charAt(d)||"/"!==b.charAt(d))d=a.substring(0,d).lastIndexOf("/");return a.substring(0,d+1)};d.withinString=function(a,b,c){c||(c={});var f=c.start||d.findUri.start,e=c.end||d.findUri.end,u=c.trim||d.findUri.trim,l=/[a-z0-9-]=["']?$/i;for(f.lastIndex=0;;){var m=f.exec(a);if(!m)break;m=m.index;if(c.ignoreHtml){var k= a.slice(Math.max(m-3,0),m);if(k&&l.test(k))continue}var k=m+a.slice(m).search(e),h=a.slice(m,k).replace(u,"");c.ignore&&c.ignore.test(h)||(k=m+h.length,h=b(h,m,k,a),a=a.slice(0,m)+h+a.slice(k),f.lastIndex=m+h.length)}f.lastIndex=0;return a};d.ensureValidHostname=function(a){if(a.match(d.invalid_hostname_characters)){if(!n)throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-] and Punycode.js is not available');if(n.toASCII(a).match(d.invalid_hostname_characters))throw new TypeError('Hostname "'+ a+'" contains characters other than [A-Z0-9.-]');}};d.noConflict=function(a){if(a)return a={URI:this.noConflict()},h.URITemplate&&("function"===typeof h.URITemplate.noConflict&&(a.URITemplate=h.URITemplate.noConflict())),h.IPv6&&("function"===typeof h.IPv6.noConflict&&(a.IPv6=h.IPv6.noConflict())),h.SecondLevelDomains&&("function"===typeof h.SecondLevelDomains.noConflict&&(a.SecondLevelDomains=h.SecondLevelDomains.noConflict())),a;h.URI===this&&(h.URI=G);return this};e.build=function(a){if(!0===a)this._deferred_build= !0;else if(void 0===a||this._deferred_build)this._string=d.build(this._parts),this._deferred_build=!1;return this};e.clone=function(){return new d(this)};e.valueOf=e.toString=function(){return this.build(!1)._string};e.protocol=x("protocol");e.username=x("username");e.password=x("password");e.hostname=x("hostname");e.port=x("port");e.query=E("query","?");e.fragment=E("fragment","#");e.search=function(a,b){var c=this.query(a,b);return"string"===typeof c&&c.length?"?"+c:c};e.hash=function(a,b){var c= this.fragment(a,b);return"string"===typeof c&&c.length?"#"+c:c};e.pathname=function(a,b){if(void 0===a||!0===a){var c=this._parts.path||(this._parts.hostname?"/":"");return a?(this._parts.urn?d.decodeUrnPath:d.decodePath)(c):c}this._parts.path=this._parts.urn?a?d.recodeUrnPath(a):"":a?d.recodePath(a):"/";this.build(!b);return this};e.path=e.pathname;e.href=function(a,b){var c;if(void 0===a)return this.toString();this._string="";this._parts=d._parts();var f=a instanceof d,e="object"===typeof a&&(a.hostname|| (a.path||a.pathname));a.nodeName&&(e=d.getDomAttribute(a),a=a[e]||"",e=!1);!f&&(e&&(void 0!==a.pathname&&(a=a.toString())));if("string"===typeof a||a instanceof String)this._parts=d.parse(String(a),this._parts);else if(f||e)for(c in f=f?a._parts:a,f)p.call(this._parts,c)&&(this._parts[c]=f[c]);else throw new TypeError("invalid input");this.build(!b);return this};e.is=function(a){var b=!1,c=!1,f=!1,e=!1,u=!1,l=!1,k=!1,h=!this._parts.urn;this._parts.hostname&&(h=!1,c=d.ip4_expression.test(this._parts.hostname), f=d.ip6_expression.test(this._parts.hostname),b=c||f,u=(e=!b)&&(t&&t.has(this._parts.hostname)),l=e&&d.idn_expression.test(this._parts.hostname),k=e&&d.punycode_expression.test(this._parts.hostname));switch(a.toLowerCase()){case "relative":return h;case "absolute":return!h;case "domain":case "name":return e;case "sld":return u;case "ip":return b;case "ip4":case "ipv4":case "inet4":return c;case "ip6":case "ipv6":case "inet6":return f;case "idn":return l;case "url":return!this._parts.urn;case "urn":return!!this._parts.urn; case "punycode":return k}return null};var H=e.protocol,I=e.port,J=e.hostname;e.protocol=function(a,b){if(void 0!==a&&(a&&(a=a.replace(/:(\/\/)?$/,""),!a.match(d.protocol_expression))))throw new TypeError('Protocol "'+a+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return H.call(this,a,b)};e.scheme=e.protocol;e.port=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0!==a&&(0===a&&(a=null),a&&(a+="",":"===a.charAt(0)&&(a=a.substring(1)),a.match(/[^0-9]/))))throw new TypeError('Port "'+ a+'" contains characters other than [0-9]');return I.call(this,a,b)};e.hostname=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0!==a){var c={};if("/"!==d.parseHost(a,c))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');a=c.hostname}return J.call(this,a,b)};e.host=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a)return this._parts.hostname?d.buildHost(this._parts):"";if("/"!==d.parseHost(a,this._parts))throw new TypeError('Hostname "'+ a+'" contains characters other than [A-Z0-9.-]');this.build(!b);return this};e.authority=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a)return this._parts.hostname?d.buildAuthority(this._parts):"";if("/"!==d.parseAuthority(a,this._parts))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');this.build(!b);return this};e.userinfo=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){if(!this._parts.username)return"";var c=d.buildUserinfo(this._parts); return c.substring(0,c.length-1)}"@"!==a[a.length-1]&&(a+="@");d.parseUserinfo(a,this._parts);this.build(!b);return this};e.resource=function(a,b){var c;if(void 0===a)return this.path()+this.search()+this.hash();c=d.parse(a);this._parts.path=c.path;this._parts.query=c.query;this._parts.fragment=c.fragment;this.build(!b);return this};e.subdomain=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var c=this._parts.hostname.length- this.domain().length-1;return this._parts.hostname.substring(0,c)||""}c=this._parts.hostname.length-this.domain().length;c=this._parts.hostname.substring(0,c);c=new RegExp("^"+q(c));a&&("."!==a.charAt(a.length-1)&&(a+="."));a&&d.ensureValidHostname(a);this._parts.hostname=this._parts.hostname.replace(c,a);this.build(!b);return this};e.domain=function(a,b){if(this._parts.urn)return void 0===a?"":this;"boolean"===typeof a&&(b=a,a=void 0);if(void 0===a){if(!this._parts.hostname||this.is("IP"))return""; var c=this._parts.hostname.match(/\./g);if(c&&2>c.length)return this._parts.hostname;c=this._parts.hostname.length-this.tld(b).length-1;c=this._parts.hostname.lastIndexOf(".",c-1)+1;return this._parts.hostname.substring(c)||""}if(!a)throw new TypeError("cannot set domain empty");d.ensureValidHostname(a);!this._parts.hostname||this.is("IP")?this._parts.hostname=a:(c=new RegExp(q(this.domain())+"$"),this._parts.hostname=this._parts.hostname.replace(c,a));this.build(!b);return this};e.tld=function(a, b){if(this._parts.urn)return void 0===a?"":this;"boolean"===typeof a&&(b=a,a=void 0);if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var c=this._parts.hostname.lastIndexOf("."),c=this._parts.hostname.substring(c+1);return!0!==b&&(t&&t.list[c.toLowerCase()])?t.get(this._parts.hostname)||c:c}if(a)if(a.match(/[^a-zA-Z0-9-]/))if(t&&t.is(a))c=new RegExp(q(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(c,a);else throw new TypeError('TLD "'+a+'" contains characters other than [A-Z0-9]'); else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");c=new RegExp(q(this.tld())+"$");this._parts.hostname=this._parts.hostname.replace(c,a)}else throw new TypeError("cannot set TLD empty");this.build(!b);return this};e.directory=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var c=this._parts.path.length-this.filename().length- 1,c=this._parts.path.substring(0,c)||(this._parts.hostname?"/":"");return a?d.decodePath(c):c}c=this._parts.path.length-this.filename().length;c=this._parts.path.substring(0,c);c=new RegExp("^"+q(c));this.is("relative")||(a||(a="/"),"/"!==a.charAt(0)&&(a="/"+a));a&&("/"!==a.charAt(a.length-1)&&(a+="/"));a=d.recodePath(a);this._parts.path=this._parts.path.replace(c,a);this.build(!b);return this};e.filename=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path|| "/"===this._parts.path)return"";var c=this._parts.path.lastIndexOf("/"),c=this._parts.path.substring(c+1);return a?d.decodePathSegment(c):c}c=!1;"/"===a.charAt(0)&&(a=a.substring(1));a.match(/\.?\//)&&(c=!0);var f=new RegExp(q(this.filename())+"$");a=d.recodePath(a);this._parts.path=this._parts.path.replace(f,a);c?this.normalizePath(b):this.build(!b);return this};e.suffix=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path||"/"===this._parts.path)return""; var c=this.filename(),f=c.lastIndexOf(".");if(-1===f)return"";c=c.substring(f+1);c=/^[a-z0-9%]+$/i.test(c)?c:"";return a?d.decodePathSegment(c):c}"."===a.charAt(0)&&(a=a.substring(1));if(c=this.suffix())f=a?new RegExp(q(c)+"$"):new RegExp(q("."+c)+"$");else{if(!a)return this;this._parts.path+="."+d.recodePath(a)}f&&(a=d.recodePath(a),this._parts.path=this._parts.path.replace(f,a));this.build(!b);return this};e.segment=function(a,b,c){var d=this._parts.urn?":":"/",e=this.path(),u="/"===e.substring(0, 1),e=e.split(d);void 0!==a&&("number"!==typeof a&&(c=b,b=a,a=void 0));if(void 0!==a&&"number"!==typeof a)throw Error('Bad segment "'+a+'", must be 0-based integer');u&&e.shift();0>a&&(a=Math.max(e.length+a,0));if(void 0===b)return void 0===a?e:e[a];if(null===a||void 0===e[a])if(k(b)){e=[];a=0;for(var l=b.length;a<l;a++)if(b[a].length||e.length&&e[e.length-1].length)e.length&&(!e[e.length-1].length&&e.pop()),e.push(b[a])}else{if(b||"string"===typeof b)""===e[e.length-1]?e[e.length-1]=b:e.push(b)}else b? e[a]=b:e.splice(a,1);u&&e.unshift("");return this.path(e.join(d),c)};e.segmentCoded=function(a,b,c){var e,g;"number"!==typeof a&&(c=b,b=a,a=void 0);if(void 0===b){a=this.segment(a,b,c);if(k(a))for(e=0,g=a.length;e<g;e++)a[e]=d.decode(a[e]);else a=void 0!==a?d.decode(a):void 0;return a}if(k(b))for(e=0,g=b.length;e<g;e++)b[e]=d.encode(b[e]);else b="string"===typeof b||b instanceof String?d.encode(b):b;return this.segment(a,b,c)};var K=e.query;e.query=function(a,b){if(!0===a)return d.parseQuery(this._parts.query, this._parts.escapeQuerySpace);if("function"===typeof a){var c=d.parseQuery(this._parts.query,this._parts.escapeQuerySpace),e=a.call(this,c);this._parts.query=d.buildQuery(e||c,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);this.build(!b);return this}return void 0!==a&&"string"!==typeof a?(this._parts.query=d.buildQuery(a,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!b),this):K.call(this,a,b)};e.setQuery=function(a,b,c){var e=d.parseQuery(this._parts.query, this._parts.escapeQuerySpace);if("string"===typeof a||a instanceof String)e[a]=void 0!==b?b:null;else if("object"===typeof a)for(var g in a)p.call(a,g)&&(e[g]=a[g]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");this._parts.query=d.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&(c=b);this.build(!c);return this};e.addQuery=function(a,b,c){var e=d.parseQuery(this._parts.query,this._parts.escapeQuerySpace); d.addQuery(e,a,void 0===b?null:b);this._parts.query=d.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&(c=b);this.build(!c);return this};e.removeQuery=function(a,b,c){var e=d.parseQuery(this._parts.query,this._parts.escapeQuerySpace);d.removeQuery(e,a,b);this._parts.query=d.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&(c=b);this.build(!c);return this};e.hasQuery=function(a,b,c){var e=d.parseQuery(this._parts.query, this._parts.escapeQuerySpace);return d.hasQuery(e,a,b,c)};e.setSearch=e.setQuery;e.addSearch=e.addQuery;e.removeSearch=e.removeQuery;e.hasSearch=e.hasQuery;e.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()};e.normalizeProtocol=function(a){"string"===typeof this._parts.protocol&& (this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!a));return this};e.normalizeHostname=function(a){this._parts.hostname&&(this.is("IDN")&&n?this._parts.hostname=n.toASCII(this._parts.hostname):this.is("IPv6")&&(v&&(this._parts.hostname=v.best(this._parts.hostname))),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!a));return this};e.normalizePort=function(a){"string"===typeof this._parts.protocol&&(this._parts.port===d.defaultPorts[this._parts.protocol]&&(this._parts.port= null,this.build(!a)));return this};e.normalizePath=function(a){var b=this._parts.path;if(!b)return this;if(this._parts.urn)return this._parts.path=d.recodeUrnPath(this._parts.path),this.build(!a),this;if("/"===this._parts.path)return this;var c,e="",g,k;"/"!==b.charAt(0)&&(c=!0,b="/"+b);if("/.."===b.slice(-3)||"/."===b.slice(-2))b+="/";b=b.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/");c&&((e=b.substring(1).match(/^(\.\.\/)+/)||"")&&(e=e[0]));for(;;){g=b.indexOf("/..");if(-1===g)break; else if(0===g){b=b.substring(3);continue}k=b.substring(0,g).lastIndexOf("/");-1===k&&(k=g);b=b.substring(0,k)+b.substring(g+3)}c&&(this.is("relative")&&(b=e+b.substring(1)));b=d.recodePath(b);this._parts.path=b;this.build(!a);return this};e.normalizePathname=e.normalizePath;e.normalizeQuery=function(a){"string"===typeof this._parts.query&&(this._parts.query.length?this.query(d.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!a));return this};e.normalizeFragment= function(a){this._parts.fragment||(this._parts.fragment=null,this.build(!a));return this};e.normalizeSearch=e.normalizeQuery;e.normalizeHash=e.normalizeFragment;e.iso8859=function(){var a=d.encode,b=d.decode;d.encode=escape;d.decode=decodeURIComponent;try{this.normalize()}finally{d.encode=a,d.decode=b}return this};e.unicode=function(){var a=d.encode,b=d.decode;d.encode=A;d.decode=unescape;try{this.normalize()}finally{d.encode=a,d.decode=b}return this};e.readable=function(){var a=this.clone();a.username("").password("").normalize(); var b="";a._parts.protocol&&(b+=a._parts.protocol+"://");a._parts.hostname&&(a.is("punycode")&&n?(b+=n.toUnicode(a._parts.hostname),a._parts.port&&(b+=":"+a._parts.port)):b+=a.host());a._parts.hostname&&(a._parts.path&&("/"!==a._parts.path.charAt(0)&&(b+="/")));b+=a.path(!0);if(a._parts.query){for(var c="",e=0,g=a._parts.query.split("&"),k=g.length;e<k;e++){var l=(g[e]||"").split("="),c=c+("&"+d.decodeQuery(l[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"));void 0!==l[1]&&(c+="="+d.decodeQuery(l[1], this._parts.escapeQuerySpace).replace(/&/g,"%26"))}b+="?"+c.substring(1)}return b+=d.decodeQuery(a.hash(),!0)};e.absoluteTo=function(a){var b=this.clone(),c=["protocol","username","password","hostname","port"],e,g;if(this._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");a instanceof d||(a=new d(a));b._parts.protocol||(b._parts.protocol=a._parts.protocol);if(this._parts.hostname)return b;for(e=0;g=c[e];e++)b._parts[g]=a._parts[g];b._parts.path?".."===b._parts.path.substring(-2)&& (b._parts.path+="/"):(b._parts.path=a._parts.path,b._parts.query||(b._parts.query=a._parts.query));"/"!==b.path().charAt(0)&&(c=(c=a.directory())?c:0===a.path().indexOf("/")?"/":"",b._parts.path=(c?c+"/":"")+b._parts.path,b.normalizePath());b.build();return b};e.relativeTo=function(a){var b=this.clone().normalize(),c,e,g;if(b._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");a=(new d(a)).normalize();c=b._parts;e=a._parts;g=b.path();a=a.path();if("/"!==g.charAt(0))throw Error("URI is already relative"); if("/"!==a.charAt(0))throw Error("Cannot calculate a URI relative to another relative URI");c.protocol===e.protocol&&(c.protocol=null);if(c.username===e.username&&(c.password===e.password&&(null===c.protocol&&(null===c.username&&(null===c.password&&(c.hostname===e.hostname&&c.port===e.port))))))c.hostname=null,c.port=null;else return b.build();if(g===a)return c.path="",b.build();g=d.commonPath(g,a);if(!g)return b.build();e=e.path.substring(g.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");c.path= e+c.path.substring(g.length)||"./";return b.build()};e.equals=function(a){var b=this.clone();a=new d(a);var c={},e={},g={},h;b.normalize();a.normalize();if(b.toString()===a.toString())return!0;c=b.query();e=a.query();b.query("");a.query("");if(b.toString()!==a.toString()||c.length!==e.length)return!1;c=d.parseQuery(c,this._parts.escapeQuerySpace);e=d.parseQuery(e,this._parts.escapeQuerySpace);for(h in c)if(p.call(c,h)){if(!k(c[h])){if(c[h]!==e[h])return!1}else if(!D(c[h],e[h]))return!1;g[h]=!0}for(h in e)if(p.call(e, h)&&!g[h])return!1;return!0};e.duplicateQueryParameters=function(a){this._parts.duplicateQueryParameters=!!a;return this};e.escapeQuerySpace=function(a){this._parts.escapeQuerySpace=!!a;return this};return d});this.JSON=JSON3.noConflict()};function hasCookie(sKey){return(new RegExp("(?:^|;\\s*)"+escape(sKey).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=")).test(document.cookie)}function setCookie(sKey,sValue,vEnd,sPath,sDomain,bSecure){if(!sKey||/^(?:expires|max\-age|path|domain|secure)$/.test(sKey))return; var sExpires=vEnd==null?"":"; expires="+vEnd.toGMTString();document.cookie=escape(sKey)+"="+escape(sValue)+sExpires+(sDomain?"; domain="+sDomain:"")+(sPath?"; path="+sPath:"")+(bSecure?"; secure":"")}function getCookie(sKey){if(!sKey||!hasCookie(sKey))return null;return unescape(document.cookie.replace(new RegExp("(?:^|.*;\\s*)"+escape(sKey).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*"),"$1"))}function deleteCookie(sKey,sPath,sDomain,bSecure){if(hasCookie(sKey)){var expires= new Date;expires.setTime(expires.getTime()-1);setCookie(sKey,"",expires,sPath,sDomain,bSecure)}}function checkParam(paramName,obj){var obj=obj;var paramName=paramName;if(dataLayer[obj][paramName])return true;return false}function flattenCurrency(input){if(input){var val=input.toString();var fac=1;val=val.replace(/[^0-9,.;]/g,"");if(val.indexOf(";")>-1)val=val.split(";")[val.split(";").length-1];if(val.length>2&&val[val.length-3].match(/\.|\,/))fac=100;else if(val.length>2&&val[val.length-2].match(/\.|\,/))fac= 10;val=val.replace(/[^0-9]/g,"");return val/fac}return null}var state;var old=window.vscr;vscr={tagVersion:"v46",clientTagVersion:"",defaultIgnoredURLs:["facebook.com/v2.8/dialog/oauth/","fpay.co","ppipe.net","facebook.com/login.php?skip_api_login=1&api_key=1649347482029157","3c.web.de","3d-secure-code.de","3d.sviaz-bank.ru:3443","3ds-pay.sberbank.kz:3443","3ds.bnpparibas.com","3ds.cardcenter.ch","3ds.dzetta.com","3ds.halykpay.kz","3ds.khmb.ru","3ds.mdmbank.ru","3ds.millikart.az","3ds.mmbank.ru", "3ds.otpbank.ru","3ds.payment.ru","3ds.priorbank.by","3ds.rencredit.ru:3443","3ds.rpc-raiffeisen.com","3ds.sdm.ru","3ds.ubrr.ru","3ds.vtb24.ru","3ds.yamoney.ru","3ds.zenit.ru","3dsacs.trust.ru","3dsec.vpb.su","3dsecure.bpce.fr","3dsecure.metcom.ru","3dsecure.paylife.at","3dsecure.postfinance.ch","3dsecure.psa.at","3dsecure.qiwi.com","3dsecure.slsp.sk","3dsp.vtb24.ru","46.48.130.6","aacsw.3ds.verifiedbyvisa.com","acs-ch.cal-online.co.il","acs-visa.norvik.eu","acs.akbars.ru","acs.albank.ru","acs.alfabank.ru", "acs.arca.am","acs.binbank.ru","acs.binbank.ru:3443","acs.bkm.com.tr","acs.bspb.ru","acs.cafis-paynet.jp","acs.cardstandard.ru","acs.centrinvest.ru","acs.chelinvest.ru","acs.firstdata.lv","acs.fortebank.com","acs.gazprombank.ru","acs.minbank.ru","acs.multicarta.ru","acs.netcetera.ch","acs.otkritiefc.ru","acs.privatbank.ua","acs.raiffeisen.ru","acs.rgsbank.ru","acs.rietumu.lv","acs.severgazbank.ru","acs.sia.eu","acs.swisscard.ch","acs.uralfd.ru","acs.zapsibkombank.ru","acs1.3ds.modirum.com","acs1.edb.com", "acs1.rosbank.modirum.com","acs1.sbrf.ru","acs1.ucs.modirum.com","acs1.viseca.ch","acs2.3ds.modirum.com","acs2.bpcprocessing.com","acs2.rosbank.modirum.com","acs2.sbrf.ru","acs2.swedbank.se","acs2.ucs.modirum.com","acs3.3dsecure.no","acs3.sbrf.ru","acs4.3dsecure.no","acs4.sbrf.ru","acs4.sparebank1.no","adyen.com","alert.scansafe.net","alipay.com","atb-online.ru","avangard.ru","belgium-3dsecure-uvg.wlp-acs.com","belgium-3dsecure.wlp-acs.com","belgium-uvj-3dsecure.wlp-acs.com","betalen.rabobank.nl", "bgpb.acs.gazprombank.ru","bill.qiwi.com","bofp.erstebank.hu","cabinet.rshb.ru","cap.attempts.securecode.com","cap.securecode.com","cardsecure.kkb.kz","cashier.95516.com","clicksafe.lloydstsb.com","clickserve.dartsearch.net","do4a.com","dub114.outlook","dub115.outlook","dub120.outlook","dub127.outlook","ebanking.danskebank.fi","ecm.sngb.ru","gc3d.georgiancard.ge","german-3dsecure.wlp-acs.com","gwback.tenpay.com","ia.pkb.ru","ingbank.bpcprocessing.com","ipg.cardcomplete.com","lastpass.com","live.adyen.com", "mail.d3.hu","masterpass.com","mcashier.95516.com","offers.bycontext.com","online.alandsbanken.fi","pay.activa-card.com","payments.mtsbank.ru","paypal.com","sc.rs.ru","secure-payments.express-bank.ru:8443","secure.bankgirot.se","secure.barclaycard.co.uk","secure.dkb.de","secure.homecredit.ru","secure.tcsbank.ru","secure2.arcot.com","secure2gw.ro","secure4.arcot.com","secure5.arcot.com","secure7.arcot.com","securecode.creditural.ru","secureshopping.stgeorge.com.au","securesuite.co.uk","securesuite.net", "secureyou3d.ing.be","sofort.com","solo3.nordea.fi","sparda.wlp-acs.com","sully.wuerth.hu","tenpay.com","trustly.com","tsys.arcot.com","twecv.primbank.ru","unionpaysecure.com","us-mg6.mail.yahoo.com","vbv.bonuscard.ch","vbv.neyvabank.ru","vcas02c.visa3dsecure.com","vcas1.visa.com","vcas2.visa.com","verifiedbyvisa.barclays.co.uk","verkkopankki.danskebank.fi","w.qiwi.com","web-014.citromail.hu","welcome.tochka.com","https://www.clearpay.co.uk/","https://payments.amazon.co.uk/","https://natixispaymentsolutions-3ds-vdm.wlp-acs.com/", "https://amazonpay.lightning.force.com/","https://www.sofort.com/payment/multipay/go/transaction_summary","https://quadpay.my.salesforce.com/","?utm_source=afterpay","https://acs.mercurypaymentservices.it/","https://natixispaymentsolutions-3ds-bxl.wlp-acs.com/","https://3ds.emlpayments.com/","https://portal.clearpay.co.uk/","https://pay.google.com/","https://paypal.com/","https://v3.everypayjoy.com/","https://portal.afterpay.com/","https://idcheck.acs.touchtechpayments.com/","https://verifiedbyvisa.acs.touchtechpayments.com/", "https://3dspayment.paylife.at/","https://www.paypal.com/","https://apay-us.amazon.com/","https://payday.fandom.com/","https://www.afterpay.com/","?utm_source=clearpay"],defaultFwdParams:["gclid","utm_source","utm_campaign","utm_medium","utm_content","adtype","product_id","dclid","wgu","wgexpiry","c_chan","offer_id","offerid","cid"],defaultSocialLoginParams:["socialLoginError=","socialLoginSuccess=fb"],push:function(params){var funcName=params.shift();if(!vscr[funcName])throw funcName+" is not a method on vscr"; if(typeof params[0]=="function")vscr[funcName]=params[0];else vscr[funcName].apply(vscr,params)},flattenCurrency:function(input){if(input){var val=input.toString();var fac=1;val=val.replace(/[^0-9,.;]/g,"");if(val.indexOf(";")>-1)val=val.split(";")[val.split(";").length-1];if(val.length>2&&val[val.length-3].match(/\.|\,/))fac=100;else if(val.length>2&&val[val.length-2].match(/\.|\,/))fac=10;val=val.replace(/[^0-9]/g,"");return val/fac}return null},reset:function(){state={accountId:"",endpoint:null, endpoints:[],events:[],forwardParams:vscr.defaultFwdParams,full:false,splitVisit:false,ignoredURLs:vscr.defaultIgnoredURLs,labels:[],log:[],payload:"",referrer:document.referrer,hostName:location.hostname,cookiesSetOnServer:false,server:"data.withcubed.com",sessionOverrideState:false,simulate:false,syncIds:[],overridePageURL:"",visitId:"",visitIdSource:"",visitorId:"",customerData:[],visitorIdSource:"",visitCookieWindow:30*60*1E3,visitorCookieWindow:2*12*30*24*60*60*1E3};vscr.state=state},clear:function(){state.events= [];state.labels=[];state.syncIds=[];state.customerId=""},forget:function(){vscr.forgetVisitor();vscr.forgetVisit();vscr.forgetCustomer()},forgetVisitor:function(){vscr.log("Forgetting visitorId "+state.visitorId);state.visitorId="";var cookieDomain=vscr.getCookieDomain(state.hostName);deleteCookie("vscr_vid","/",cookieDomain)},forgetVisit:function(){vscr.log("Forgetting visitId "+state.visitId);state.visitId="";var cookieDomain=vscr.getCookieDomain(state.hostName);deleteCookie("vscr_sid","/",cookieDomain); deleteCookie("vscr_ref","/",cookieDomain)},forgetCustomer:function(){vscr.log("Forgetting customerId "+state.customerId+" and clearing customerID Type");state.customerData=[];state.customerId="";state.customerIdType=""},log:function(type,message){state.log.push({type:type,message:message,created:new Date})},warning:function(message){vscr.log("warning",message)},success:function(message){vscr.log("success",message)},error:function(message){vscr.log("error",message)},info:function(message){vscr.log("info", message)},checkIgnoredURLs:function(ignoredURLs){if(hasCookie("vscr_sid")){var refElem=document.createElement("a");refElem.href=document.referrer;var isMatch=state.hostName.match(refElem.hostname);var canSetCookie=true;var testExpires=new Date;testExpires.setTime(testExpires.getTime()+1E4);if(document.referrer){if(vscr.getCookieDomain(refElem.hostname))setCookie("vscr_newvis",1,testExpires,"/",vscr.getCookieDomain(refElem.hostname))}else canSetCookie=false;if(hasCookie("vscr_newvis"))deleteCookie("vscr_newvis", "/",vscr.getCookieDomain(refElem.hostname));else canSetCookie=false;var isIgnored=false;for(var i=0;i<ignoredURLs.length;i++)if(document.referrer.indexOf(ignoredURLs[i])>-1)isIgnored=true;var fwdParamMatch=false;for(var i=0;i<vscr.state.forwardParams.length;i++)if(document.location.href.indexOf(vscr.state.forwardParams[i]+"=")>-1)fwdParamMatch=true;var socialLoginParamMatch=false;for(var i=0;i<vscr.defaultSocialLoginParams.length;i++)if(document.location.href.indexOf(vscr.defaultSocialLoginParams[i])> -1)socialLoginParamMatch=true;if(!socialLoginParamMatch)if(!isIgnored&&(!canSetCookie&&!isMatch)||fwdParamMatch){var cookieDomain=vscr.getCookieDomain(state.hostName);deleteCookie("vscr_sid","/",cookieDomain);vscr.addIntLabel("InSessionVisit","1")}}},reloadIds:function(){if(hasCookie("vscr_vid")){state.visitorId=getCookie("vscr_vid");state.visitorIdSource="c";vscr.info("Visitor Id "+state.visitorId+" grabbed from cookie")}if(hasCookie("vscr_sid")){state.visitId=getCookie("vscr_sid");state.visitIdSource= "c";vscr.info("Visit Id "+state.visitId+" grabbed from cookie")}var paramIndex=location.href.indexOf("ydat");if(paramIndex>-1){state.visitorId=location.href.substr(paramIndex+5,32);state.visitId=location.href.substr(paramIndex+32+5,32);state.visitorIdSource="u";state.visitIdSource="u";vscr.info("Visitor Id "+state.visitorId+" grabbed from location.href ydat");vscr.info("Visit Id "+state.visitId+" grabbed from location.href ydat")}var paramIndex=document.referrer.indexOf("ydat");if(paramIndex>-1){state.visitorId= document.referrer.substr(paramIndex+5,32);state.visitId=document.referrer.substr(paramIndex+32+5,32);state.visitorIdSource="r";state.visitIdSource="r";vscr.info("Visitor Id "+state.visitorId+" grabbed from document.referrer ydat");vscr.info("Visit Id "+state.visitId+" grabbed from document.referrer ydat")}},printErrors:function(message,errors){if(!window.console||(!console.log||(!console.groupCollapsed||!console.groupEnd)))return;console.groupCollapsed("<VisScore www.visscore.com> %s",message);for(var field in errors)console.log("Field: '"+ field+"', Message: '"+errors[field]+"'");console.groupEnd()},printLog:function(){if(!window.console||(!console.log||(!console.groupCollapsed||!console.groupEnd)))return;console.group("<VisScore www.visscore.com> printLog()");for(var i=0;i<state.log.length;i++)console.log(state.log[i]);console.groupEnd()},setAccount:function(accountId){vscr.success("Set account to '"+accountId+"'");state.accountId=accountId;vscr.restorePayload()},setSessionOverride:function(sessionOverrideState){vscr.success("Set session override status to '"+ sessionOverrideState+"'");state.sessionOverrideState=sessionOverrideState},setServer:function(server){vscr.success("Set server to '"+server+"'");state.server=server},setCookiesOnServer:function(flag){vscr.success("Set Cookies On Server with flag '"+flag+"'");state.cookiesSetOnServer=flag},setReferrer:function(referrer){vscr.success("Set referrer to '"+referrer+"'");state.referrer=referrer},setHostName:function(hostName){vscr.success("Set location.hostname to '"+hostName+"'");state.hostName=hostName}, addEvent:function(name,revenue,transactionId){var evt=name;if(typeof name=="string"){evt={};if(typeof name!=undefined)evt.name=name;if(typeof revenue!=undefined)evt.revenue=revenue;if(typeof transactionId!=undefined)evt.transactionId=transactionId}vscr.success("Added event '"+vscr.printEvent(evt)+"'");state.events.push(evt)},trimEvent:function(evt){var trimmed={};if(typeof evt.name!="undefined")trimmed.name=evt.name;if(typeof evt.revenue!="undefined")trimmed.revenue=evt.revenue;if(typeof evt.transactionId!= "undefined")trimmed.transactionId=evt.transactionId;if(evt.details&&(evt.details.length&&typeof evt.details=="object")){trimmed.details=[];for(var i=0;i<evt.details.length;i++){var detail=evt.details[i];var trimmedDetail={};if(typeof detail.name!="undefined")trimmedDetail.name=detail.name;if(typeof detail.sku!="undefined")trimmedDetail.sku=detail.sku;if(typeof detail.cost!="undefined")trimmedDetail.cost=detail.cost;if(typeof detail.quantity!="undefined")trimmedDetail.quantity=detail.quantity;trimmed.details.push(trimmedDetail)}}if(evt.discounts&& (evt.discounts.length&&typeof evt.discounts=="object")){trimmed.discounts=[];for(var i=0;i<evt.discounts.length;i++){var discount=evt.discounts[i];var trimmedDiscount={};if(typeof discount.name!="undefined")trimmedDiscount.name=discount.name;if(typeof discount.code!="undefined")trimmedDiscount.code=discount.code;if(typeof discount.currency!="undefined")trimmedDiscount.currency=discount.currency;if(typeof discount.price!="undefined")trimmedDiscount.price=discount.price;trimmed.discounts.push(trimmedDiscount)}}if(evt.shippings&& (evt.shippings.length&&typeof evt.shippings=="object")){trimmed.shippings=[];for(var i=0;i<evt.shippings.length;i++){var shipping=evt.shippings[i];var trimmedShipping={};if(typeof shipping.name!="undefined")trimmedShipping.name=shipping.name;if(typeof shipping.code!="undefined")trimmedShipping.sku=shipping.code;if(typeof shipping.currency!="undefined")trimmedShipping.cost=shipping.currency;if(typeof shipping.price!="undefined")trimmedShipping.quantity=shipping.price;trimmed.shippings.push(trimmedShipping)}}return trimmed}, printEvent:function(evt){var buf=[];buf.push("<Event: '"+evt.name+"' ");if(evt.transactionId)buf.push("transactionId='"+evt.transactionId+"' ");if(evt.revenue)buf.push("revenue='"+evt.revenue+"' ");buf.push(">");return buf.join("")},addForwardParam:function(name){vscr.success("Added forward param '"+name+"'");state.forwardParams.push(name)},addIgnoredURL:function(url){vscr.success("Added ignored URL '"+url+"'");state.ignoredURLs.push(url)},addCustomerId:function(customerId,customerIdType){if(typeof customerId== "undefined"||(/^\s*$/.test(customerId)||customerId==""))throw"Customer ID values must not be empty";if(typeof customerIdType=="undefined"||/^\s*$/.test(customerId))customerIdType="";vscr.success("Added Customer ID '"+customerId+"'");var customerDataRow={"customerId":customerId,"customerIdType":customerIdType};state.customerData.push(customerDataRow)},addSyncId:function(syncId){if(typeof syncId=="undefined"||/^\s*$/.test(syncId))throw"Sync ID values must not be empty";vscr.success("Added syncId '"+ syncId+"'");state.syncIds.push(syncId)},setFirstPartyCookies:function(){if(state.cookiesSetOnServer){vscr.info("Cookies set server side");return}var cookieDomain=vscr.getCookieDomain(state.hostName);var visitExpires=new Date;var visitorExpires=new Date;visitExpires.setTime(visitExpires.getTime()+state.visitCookieWindow);visitorExpires.setTime(visitorExpires.getTime()+state.visitorCookieWindow);setCookie("vscr_vid",state.visitorId,visitorExpires,"/",cookieDomain);setCookie("vscr_sid",state.visitId, visitExpires,"/",cookieDomain);vscr.info("Setting cookie vscr_vid="+state.visitorId);vscr.info("Setting cookie vscr_sid="+state.visitId)},addEndPoint:function(newURL){var found=state.endpoints.indexOf(newURL)>-1;if(found)return;vscr.info("Added new URL to endpoints '"+newURL+"'");state.endpoints.push(newURL)},addEndPoints:function(urlList){for(var i=0;i<urlList.length;i++)vscr.addEndPoint(urlList[i])},appendYdat:function(url,visitorId,visitId){var uri=new libraries.URI(url);uri.search(function(data){data.ydat= visitorId+visitId});return uri.toString()},appendEndpoints:function(){var links=document.getElementsByTagName("a");for(var i=0;i<links.length;i++){var link=links[i];var href=link.href;if(typeof href!="string")continue;if(href.indexOf("#")>-1)continue;if(href.indexOf("javascript:")>-1)continue;for(var j=0;j<state.endpoints.length;j++){var endpoint=state.endpoints[j];if(href.indexOf(endpoint)>-1){link.href=vscr.appendYdat(link.href,state.visitorId,state.visitId);break}}}},getCookieDomain:function(hostname){if(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/.test(hostname))return hostname; var cookieDomain=null;var split=hostname.split(".");for(var i=0;i<split.length;i++){var domainPart="."+split.slice(split.length-i-1).join(".");setCookie("vscr_domain",domainPart,null,"/",domainPart);vscr.info("Attempting to set cookie on '"+domainPart+"'");if(hasCookie("vscr_domain")){vscr.info("Cookie domain found '"+domainPart+"'");cookieDomain=domainPart;deleteCookie("vscr_domain","/",cookieDomain);break}}if(!cookieDomain)vscr.info("Cookie domain not found. Setting without a domain value");return cookieDomain}, appendForwardParams:function(from,to,params){var fromParams=(new libraries.URI(from)).search(true);var url=new libraries.URI(to);url.search(function(data){for(var i=0;i<params.length;i++){var name=params[i];if(fromParams[name])data[name]=fromParams[name]}});return url.toString()},addIntLabel:function(name,value){state.labels.push({name:name,type:"int",int_value:value})},addFloatLabel:function(name,value){state.labels.push({name:name,type:"float",float_value:value})},addStringLabel:function(name,value){state.labels.push({name:name, type:"string",string_value:value})},addDatetimeLabel:function(name,value){state.labels.push({name:name,type:"datetime",datetime_value:value})},addBoolLabel:function(name,value){state.labels.push({name:name,type:"bool",bool_value:value})},setOverridePageURL:function(newURL){if(newURL==""||newURL==null)vscr.warning("Setting pageURL to blank");vscr.info("Setting overridePageURL to '"+newURL+"'");state.overridePageURL=newURL},setSplitVisit:function(splitVisit){vscr.info("Set splitVisit to '"+splitVisit+ "'");state.splitVisit=splitVisit},isReferrerDirect:function(checkReferrer){return!checkReferrer||checkReferrer==""},isReferrerSameSite:function(checkReferrer){if(!checkReferrer)return false;if(checkReferrer.indexOf(state.hostName)>-1)return true;var refererDomain=vscr.getCookieDomain(checkReferrer);var hostDomain=vscr.getCookieDomain(state.hostName);if(!hostDomain&&!refererDomain)return false;if(hostDomain==refererDomain)return true;return false},isReferrerSame:function(checkReferrer){if(!checkReferrer|| (checkReferrer==undefined||checkReferrer==null))return false;var previousReferrer=getCookie("vscr_ref");return checkReferrer==previousReferrer},isReferrerIgnoreURL:function(checkReferrer){if(!checkReferrer||(checkReferrer==undefined||checkReferrer==null))return false;var ignoreURLs=vscr.defaultIgnoredURLs;for(var i=0;i<ignoreURLs.length;i++){var url=ignoreURLs[i];if(checkReferrer.indexOf(url)>-1)return true}return false},saveReferrer:function(newReferrer){vscr.info("Set vscr_ref with '"+newReferrer+ "'");var visitExpires=new Date;var cookieDomain=vscr.getCookieDomain(state.hostName);visitExpires.setTime(visitExpires.getTime()+state.visitCookieWindow);setCookie("vscr_ref",newReferrer,visitExpires,"/",cookieDomain)},handleSplitVisit:function(){if(!state.splitVisit)return;var referrer=vscr.getGeneratedReferrer();var isDirect=vscr.isReferrerDirect(referrer);var isSameSite=vscr.isReferrerSameSite(referrer);var isSameReferrer=vscr.isReferrerSame(referrer);var isIgnoreURL=vscr.isReferrerIgnoreURL(referrer); var shouldForgetVisit=state.visitId&&(!isDirect&&(!isSameSite&&(!isSameReferrer&&!isIgnoreURL)));var shouldSetReferrerCookie=!state.visitId||shouldForgetVisit;if(shouldForgetVisit){vscr.info("Split visit");vscr.forgetVisit()}else{if(isDirect)vscr.info("Visit is Direct, do not split.");if(isSameSite)vscr.info("Visit came from same site, do not split.");if(isSameReferrer)vscr.info("Visit came from same channel, do not split.");if(isIgnoreURL)vscr.info("Visit came from same ignore URL, do not split.")}if(shouldSetReferrerCookie){vscr.saveReferrer(referrer); return true}},getPageURL:function(){var pageURL=location.href;if(state.overridePageURL)pageURL=state.overridePageURL;return pageURL},getGeneratedReferrer:function(){var pageURL=vscr.getPageURL();var generatedReferrer=vscr.appendForwardParams(pageURL,state.referrer,state.forwardParams);return generatedReferrer},generateURL:function(){var generatedReferrer=vscr.getGeneratedReferrer();var request={aid:state.accountId,vid:state.visitorId,sid:state.visitId,referrer:generatedReferrer,customerData:state.customerData, endpoint:state.endpoint,payload:state.payload,syncs:state.syncIds,labels:state.labels,events:state.events,full:state.full,simulate:state.simulate};var pageURL=vscr.getPageURL();request.pageUrl=pageURL.substring(0,4E3);var json=libraries.JSON.stringify(request);var params=encodeURIComponent(json);if(params.length>2E3)vscr.warning("Generated URL is greater than 2000 characters (is "+params.length+"). URL may be truncated by browsers");var protocol=location.protocol=="file:"?"http:":location.protocol; return protocol+"//"+state.server+"/r.js?params="+params},fire:function(){if(vscr.state.sessionOverrideState)vscr.checkIgnoredURLs(vscr.state.ignoredURLs);vscr.reloadIds();vscr.handleSplitVisit();vscr.onPreFire(vscr.state);var url=vscr.generateURL();vscr.info("Calling "+url);var script=document.createElement("script");script.type="text/javascript";script.async=true;script.src=url;var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(script,s);vscr.clear()},respond:function(data){vscr.success("Respond called"); if(!data.status){vscr.error("Tag fired with errors. Check console.");vscr.printErrors("Tag fired with errors",data.errors);return}state.visitorId=data.params.vid;state.visitId=data.params.sid;vscr.setFirstPartyCookies();vscr.storePayload(data);vscr.appendEndpoints();vscr.onTagComplete(data.params.aid,data.params.vid,data.params.sid,data.params.cask)},storePayload:function(data){if(!data.payload)return;if(!libraries.store.enabled)return vscr.warning("Local storage not supported. Not storing payload"); var payload=libraries.store.get("vscr_payload")||{};payload[data.params.aid]=data.payload;libraries.store.set("vscr_payload",payload);vscr.info("Payload '"+data.payload.id+"' stored for account "+data.params.aid)},restorePayload:function(){vscr.info("Attempting to restore payload for '"+state.accountId+"'");if(!libraries.store.enabled)return vscr.warning("Local storage not supported. Not restoring payload");var payload=libraries.store.get("vscr_payload");if(!payload)return vscr.warning("No payload found"); if(!payload[state.accountId])return vscr.warning("No payload for account '"+state.accountId+"' found");state.payload=payload[state.accountId].id;vscr.info("Restoring '"+state.accountId+"' payload '"+state.payload+"'")},findScriptPath:function(){var scripts=document.getElementsByTagName("script");for(var i=0;i<scripts.length;i++){var script=scripts[i];if(script.src.indexOf("visscore.tag")>-1)return script.src}return""},labelify:function(obj,field){if(typeof obj=="string"){if((field.toString().indexOf("transactionProduct")> -1||field.toString().indexOf("basketProduct")>-1)&&typeof obj!="object")return;var int_=parseInt(obj);var float_=parseFloat(obj);if(!isNaN(float_))if(float_==int_)vscr.addIntLabel(field,int_);else vscr.addFloatLabel(field,float_);else if(obj!="")vscr.addStringLabel(field,obj)}if(typeof obj=="number")if(Math.floor(obj)===obj)if(obj<2E9)vscr.addIntLabel(field,obj);else vscr.addStringLabel(field,obj.toString());else vscr.addFloatLabel(field,obj);if(typeof obj=="boolean")vscr.addBoolLabel(field,obj); if(typeof obj=="object"){if(obj===null)return;if(typeof obj.length=="number")for(var i=0;i<obj.length;i++)vscr.labelify(obj[i],field+"."+i);else for(var name in obj)vscr.labelify(obj[name],!field?name:field+"."+name)}},randomString:function(length){var alphabet="abcdefghijklmnopqrstuvwxyz";var chars=alphabet+alphabet.toUpperCase()+"0123456789";var output=[];for(var i=0;i<length;i++)output.push(chars[Math.floor(Math.random()*chars.length)]);return output.join("")},getRequestIds:function(){var cookieDomain= vscr.getCookieDomain(state.hostName);var requests=[];var cookie=getCookie("vscr_reqid");if(cookie)requests=cookie.split(":");requests.push(vscr.randomString(8));var remove=requests.length-5;for(var i=0;i<remove;i++)requests.shift();var joined=requests.join(":");setCookie("vscr_reqid",joined,null,"/",cookieDomain);return joined},enterDebug:function(){var cookieDomain=vscr.getCookieDomain(state.hostName);var expires=new Date;expires.setTime(expires.getTime()+state.cookieWindow);setCookie("vscr_debug", 1,expires,"/",cookieDomain);var url=vscr.findScriptPath().replace(/\/[^\/]*$/,"/visscore.tag.debug.min.js");vscr.appendScript(url)},exitDebug:function(){var cookieDomain=vscr.getCookieDomain(state.hostName);deleteCookie("vscr_debug","/",cookieDomain)},appendScript:function(url){var script=document.createElement("script");script.type="text/javascript";script.async=true;script.src=url;var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(script,s)},onPreFire:function(state){vscr.info("No onPreFire set.")}, onTagComplete:function(aid,vid,sid,cask){vscr.info("No onTagComplete set.")},setSimulate:function(value){state.simulate=Boolean(value);vscr.info("Simulate set to "+state.simulate)}};vscr.libraries=libraries;vscr.reset();if(hasCookie("vscr_debug"))vscr.enterDebug();if(old&&old.length)for(var i=0;i<old.length;i++)vscr.push(old[i]);if(!window.Yard)Yard={};if(!Yard.Attrib)Yard.Attrib={};Yard.Attrib.Respond=vscr.respond})();