All opcodes implemented!

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
master
sigonasr2 2 years ago
parent 017ea677a7
commit 06bc97ade9
  1. BIN
      C++ProjectTemplate
  2. 1614
      Guide to making a CHIP-8 emulator - Tobias V. Langhoff.html
  3. 5
      Guide to making a CHIP-8 emulator - Tobias V_files/all.min.css
  4. 101
      Guide to making a CHIP-8 emulator - Tobias V_files/analytics.js
  5. BIN
      Guide to making a CHIP-8 emulator - Tobias V_files/anchorhead_map.png
  6. BIN
      Guide to making a CHIP-8 emulator - Tobias V_files/chip-8_ibm_logo.png
  7. BIN
      Guide to making a CHIP-8 emulator - Tobias V_files/cosmac-vip-keypad.png
  8. BIN
      Guide to making a CHIP-8 emulator - Tobias V_files/drom.png
  9. BIN
      Guide to making a CHIP-8 emulator - Tobias V_files/hp48.png
  10. 283
      Guide to making a CHIP-8 emulator - Tobias V_files/js
  11. 69
      Guide to making a CHIP-8 emulator - Tobias V_files/lunr-en.js
  12. 73
      Guide to making a CHIP-8 emulator - Tobias V_files/lunr-store.js
  13. 6
      Guide to making a CHIP-8 emulator - Tobias V_files/lunr.min.js
  14. 5
      Guide to making a CHIP-8 emulator - Tobias V_files/main.css
  15. 6
      Guide to making a CHIP-8 emulator - Tobias V_files/main.min.js
  16. BIN
      Guide to making a CHIP-8 emulator - Tobias V_files/moon_invaders.png
  17. BIN
      Guide to making a CHIP-8 emulator - Tobias V_files/tvl-photo.jpg
  18. 722
      Guide to making a CHIP-8 emulator - Tobias V_files/utterances.html
  19. BIN
      Guide to making a CHIP-8 emulator - Tobias V_files/utterances_data/10425858.jpeg
  20. BIN
      Guide to making a CHIP-8 emulator - Tobias V_files/utterances_data/116707867.png
  21. BIN
      Guide to making a CHIP-8 emulator - Tobias V_files/utterances_data/4517105.gif
  22. BIN
      Guide to making a CHIP-8 emulator - Tobias V_files/utterances_data/58308367.png
  23. BIN
      Guide to making a CHIP-8 emulator - Tobias V_files/utterances_data/80824.jpeg
  24. BIN
      Guide to making a CHIP-8 emulator - Tobias V_files/utterances_data/8123702.png
  25. 2
      Guide to making a CHIP-8 emulator - Tobias V_files/utterances_data/utterances.6ec01640.js
  26. 8
      Guide to making a CHIP-8 emulator - Tobias V_files/utterances_data/utterances.css
  27. 154
      main.cpp

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -0,0 +1,101 @@
(function(){/*
Copyright The Closure Library Authors.
SPDX-License-Identifier: Apache-2.0
*/
var aa=this||self,n=function(a,b){a=a.split(".");var c=aa;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}:c[d]=b};var p=function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])},q=function(a){for(var b in a)if(a.hasOwnProperty(b))return!0;return!1};/*
SPDX-License-Identifier: Apache-2.0
*/
var t=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;var u={},v=function(a){u.TAGGING=u.TAGGING||[];u.TAGGING[a]=!0};var w=window,y=window.history,z=document,A=navigator,B=function(a,b){z.addEventListener?z.addEventListener(a,b,!1):z.attachEvent&&z.attachEvent("on"+a,b)};var C=/:[0-9]+$/,F=function(a,b){b&&(b=String(b).toLowerCase());if("protocol"===b||"port"===b)a.protocol=D(a.protocol)||D(w.location.protocol);"port"===b?a.port=String(Number(a.hostname?a.port:w.location.port)||("http"===a.protocol?80:"https"===a.protocol?443:"")):"host"===b&&(a.hostname=(a.hostname||w.location.hostname).replace(C,"").toLowerCase());return E(a,b)},E=function(a,b,c){var d=D(a.protocol);b&&(b=String(b).toLowerCase());switch(b){case "url_no_fragment":c="";a&&a.href&&(c=a.href.indexOf("#"),
c=0>c?a.href:a.href.substr(0,c));a=c;break;case "protocol":a=d;break;case "host":a=a.hostname.replace(C,"").toLowerCase();c&&(c=/^www\d*\./.exec(a))&&c[0]&&(a=a.substr(c[0].length));break;case "port":a=String(Number(a.port)||("http"===d?80:"https"===d?443:""));break;case "path":a.pathname||a.hostname||v(1);a="/"===a.pathname.substr(0,1)?a.pathname:"/"+a.pathname;a=a.split("/");0<=[].indexOf(a[a.length-1])&&(a[a.length-1]="");a=a.join("/");break;case "query":a=a.search.replace("?","");break;case "extension":a=
a.pathname.split(".");a=1<a.length?a[a.length-1]:"";a=a.split("/")[0];break;case "fragment":a=a.hash.replace("#","");break;default:a=a&&a.href}return a},D=function(a){return a?a.replace(":","").toLowerCase():""},G=function(a){var b=z.createElement("a");a&&(b.href=a);var c=b.pathname;"/"!==c[0]&&(a||v(1),c="/"+c);a=b.hostname.replace(C,"");return{href:b.href,protocol:b.protocol,host:b.host,hostname:a,pathname:c,search:b.search,hash:b.hash,port:b.port}};function H(){for(var a=I,b={},c=0;c<a.length;++c)b[a[c]]=c;return b}function J(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZ";a+=a.toLowerCase()+"0123456789-_";return a+"."}var I,K;
function ba(a){function b(k){for(;d<a.length;){var m=a.charAt(d++),l=K[m];if(null!=l)return l;if(!/^[\s\xa0]*$/.test(m))throw Error("Unknown base64 encoding at char: "+m);}return k}I=I||J();K=K||H();for(var c="",d=0;;){var e=b(-1),f=b(0),h=b(64),g=b(64);if(64===g&&-1===e)return c;c+=String.fromCharCode(e<<2|f>>4);64!=h&&(c+=String.fromCharCode(f<<4&240|h>>2),64!=g&&(c+=String.fromCharCode(h<<6&192|g)))}};var L;var N=function(){var a=ca,b=da,c=M(),d=function(h){a(h.target||h.srcElement||{})},e=function(h){b(h.target||h.srcElement||{})};if(!c.init){B("mousedown",d);B("keyup",d);B("submit",e);var f=HTMLFormElement.prototype.submit;HTMLFormElement.prototype.submit=function(){b(this);f.call(this)};c.init=!0}},O=function(a,b,c,d,e){a={callback:a,domains:b,fragment:2===c,placement:c,forms:d,sameHost:e};M().decorators.push(a)},P=function(a,b,c){for(var d=M().decorators,e={},f=0;f<d.length;++f){var h=d[f],g;if(g=
!c||h.forms)a:{g=h.domains;var k=a,m=!!h.sameHost;if(g&&(m||k!==z.location.hostname))for(var l=0;l<g.length;l++)if(g[l]instanceof RegExp){if(g[l].test(k)){g=!0;break a}}else if(0<=k.indexOf(g[l])||m&&0<=g[l].indexOf(k)){g=!0;break a}g=!1}g&&(g=h.placement,void 0==g&&(g=h.fragment?2:1),g===b&&p(e,h.callback()))}return e};function M(){var a={};var b=w.google_tag_data;w.google_tag_data=void 0===b?a:b;a=w.google_tag_data;b=a.gl;b&&b.decorators||(b={decorators:[]},a.gl=b);return b};var ea=/(.*?)\*(.*?)\*(.*)/,fa=/([^?#]+)(\?[^#]*)?(#.*)?/;function Q(a){return new RegExp("(.*?)(^|&)"+a+"=([^&]*)&?(.*)")}
var S=function(a){var b=[],c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];if(void 0!==d&&d===d&&null!==d&&"[object Object]"!==d.toString()){b.push(c);var e=b,f=e.push;d=String(d);I=I||J();K=K||H();for(var h=[],g=0;g<d.length;g+=3){var k=g+1<d.length,m=g+2<d.length,l=d.charCodeAt(g),r=k?d.charCodeAt(g+1):0,x=m?d.charCodeAt(g+2):0,ha=l>>2;l=(l&3)<<4|r>>4;r=(r&15)<<2|x>>6;x&=63;m||(x=64,k||(r=64));h.push(I[ha],I[l],I[r],I[x])}f.call(e,h.join(""))}}a=b.join("*");return["1",R(a),a].join("*")};
function R(a,b){a=[w.navigator.userAgent,(new Date).getTimezoneOffset(),A.userLanguage||A.language,Math.floor((new Date(Date.now())).getTime()/60/1E3)-(void 0===b?0:b),a].join("*");if(!(b=L)){b=Array(256);for(var c=0;256>c;c++){for(var d=c,e=0;8>e;e++)d=d&1?d>>>1^3988292384:d>>>1;b[c]=d}}L=b;b=4294967295;for(c=0;c<a.length;c++)b=b>>>8^L[(b^a.charCodeAt(c))&255];return((b^-1)>>>0).toString(36)}
function ia(a){return function(b){var c=G(w.location.href),d=c.search.replace("?","");a:{var e=d.split("&");for(var f=0;f<e.length;f++){var h=e[f].split("=");if("_gl"===decodeURIComponent(h[0]).replace(/\+/g," ")){e=h.slice(1).join("=");break a}}e=void 0}b.query=T(e||"")||{};e=F(c,"fragment");f=e.match(Q("_gl"));b.fragment=T(f&&f[3]||"")||{};a&&ja(c,d,e)}}function U(a,b){if(a=Q(a).exec(b)){var c=a[2],d=a[4];b=a[1];d&&(b=b+c+d)}return b}
function ja(a,b,c){function d(f,h){f=U("_gl",f);f.length&&(f=h+f);return f}if(y&&y.replaceState){var e=Q("_gl");if(e.test(b)||e.test(c))a=F(a,"path"),b=d(b,"?"),c=d(c,"#"),y.replaceState({},void 0,""+a+b+c)}}
var T=function(a){try{a:{if(a){b:{for(var b=0;3>b;++b){var c=ea.exec(a);if(c){var d=c;break b}a=decodeURIComponent(a)}d=void 0}if(d&&"1"===d[1]){var e=d[2],f=d[3];b:{for(d=0;3>d;++d)if(e===R(f,d)){var h=!0;break b}h=!1}if(h){var g=f;break a}v(7)}}g=void 0}e=g;if(void 0!==e){g={};var k=e?e.split("*"):[];for(e=0;e+1<k.length;e+=2){var m=k[e],l=ba(k[e+1]);g[m]=l}v(6);return g}}catch(r){v(8)}};
function V(a,b,c,d){function e(k){k=U(a,k);var m=k.charAt(k.length-1);k&&"&"!==m&&(k+="&");return k+g}d=void 0===d?!1:d;var f=fa.exec(c);if(!f)return"";c=f[1];var h=f[2]||"";f=f[3]||"";var g=a+"="+b;d?f="#"+e(f.substring(1)):h="?"+e(h.substring(1));return""+c+h+f}function W(a,b){var c="FORM"===(a.tagName||"").toUpperCase(),d=P(b,1,c),e=P(b,2,c);b=P(b,3,c);q(d)&&(d=S(d),c?X("_gl",d,a):Y("_gl",d,a,!1));!c&&q(e)&&(c=S(e),Y("_gl",c,a,!0));for(var f in b)b.hasOwnProperty(f)&&Z(f,b[f],a)}
function Z(a,b,c,d){if(c.tagName){if("a"===c.tagName.toLowerCase())return Y(a,b,c,d);if("form"===c.tagName.toLowerCase())return X(a,b,c)}if("string"==typeof c)return V(a,b,c,d)}function Y(a,b,c,d){c.href&&(a=V(a,b,c.href,void 0===d?!1:d),t.test(a)&&(c.href=a))}
function X(a,b,c){if(c&&c.action){var d=(c.method||"").toLowerCase();if("get"===d){d=c.childNodes||[];for(var e=!1,f=0;f<d.length;f++){var h=d[f];if(h.name===a){h.setAttribute("value",b);e=!0;break}}e||(d=z.createElement("input"),d.setAttribute("type","hidden"),d.setAttribute("name",a),d.setAttribute("value",b),c.appendChild(d))}else"post"===d&&(a=V(a,b,c.action),t.test(a)&&(c.action=a))}}
function ca(a){try{a:{for(var b=100;a&&0<b;){if(a.href&&a.nodeName.match(/^a(?:rea)?$/i)){var c=a;break a}a=a.parentNode;b--}c=null}if(c){var d=c.protocol;"http:"!==d&&"https:"!==d||W(c,c.hostname)}}catch(e){}}function da(a){try{if(a.action){var b=F(G(a.action),"host");W(a,b)}}catch(c){}};n("google_tag_data.glBridge.auto",function(a,b,c,d){N();O(a,b,"fragment"===c?2:1,!!d,!1)});n("google_tag_data.glBridge.passthrough",function(a,b,c){N();O(a,[E(w.location,"host",!0)],b,!!c,!0)});n("google_tag_data.glBridge.decorate",function(a,b,c){a=S(a);return Z("_gl",a,b,!!c)});n("google_tag_data.glBridge.generate",S);n("google_tag_data.glBridge.get",function(a,b){var c=ia(!!b);b=M();b.data||(b.data={query:{},fragment:{}},c(b.data));c={};if(b=b.data)p(c,b.query),a&&p(c,b.fragment);return c});})(window);
(function(){function La(a){var b=1,c;if(a)for(b=0,c=a.length-1;0<=c;c--){var d=a.charCodeAt(c);b=(b<<6&268435455)+d+(d<<14);d=b&266338304;b=0!=d?b^d>>21:b}return b};/*
Copyright The Closure Library Authors.
SPDX-License-Identifier: Apache-2.0
*/
var $c=function(a){this.C=a||[]};$c.prototype.set=function(a){this.C[a]=!0};$c.prototype.encode=function(){for(var a=[],b=0;b<this.C.length;b++)this.C[b]&&(a[Math.floor(b/6)]^=1<<b%6);for(b=0;b<a.length;b++)a[b]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(a[b]||0);return a.join("")+"~"};var ha=window.GoogleAnalyticsObject,wa;if(wa=void 0!=ha)wa=-1<(ha.constructor+"").indexOf("String");var ya;if(ya=wa){var fc=window.GoogleAnalyticsObject;ya=fc?fc.replace(/^[\s\xa0]+|[\s\xa0]+$/g,""):""}var gb=ya||"ga",jd=/^(?:utma\.)?\d+\.\d+$/,kd=/^amp-[\w.-]{22,64}$/,Ba=!1;var vd=new $c;function J(a){vd.set(a)}var Td=function(a){a=Dd(a);a=new $c(a);for(var b=vd.C.slice(),c=0;c<a.C.length;c++)b[c]=b[c]||a.C[c];return(new $c(b)).encode()},Dd=function(a){a=a.get(Gd);ka(a)||(a=[]);return a};var ea=function(a){return"function"==typeof a},ka=function(a){return"[object Array]"==Object.prototype.toString.call(Object(a))},qa=function(a){return void 0!=a&&-1<(a.constructor+"").indexOf("String")},D=function(a,b){return 0==a.indexOf(b)},sa=function(a){return a?a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,""):""},ra=function(){for(var a=O.navigator.userAgent+(M.cookie?M.cookie:"")+(M.referrer?M.referrer:""),b=a.length,c=O.history.length;0<c;)a+=c--^b++;return[hd()^La(a)&2147483647,Math.round((new Date).getTime()/
1E3)].join(".")},ta=function(a){var b=M.createElement("img");b.width=1;b.height=1;b.src=a;return b},ua=function(){},K=function(a){if(encodeURIComponent instanceof Function)return encodeURIComponent(a);J(28);return a},L=function(a,b,c,d){try{a.addEventListener?a.addEventListener(b,c,!!d):a.attachEvent&&a.attachEvent("on"+b,c)}catch(e){J(27)}},f=/^[\w\-:/.?=&%!\[\]]+$/,Nd=/^[\w+/_-]+[=]{0,2}$/,ff=null,Id=function(a,b,c,d,e){if(!ff){ff={createScriptURL:function(ca){return ca},createHTML:function(ca){return ca}};
try{ff=window.trustedTypes.createPolicy("google-analytics",ff)}catch(ca){}}if(a){var g=M.querySelector&&M.querySelector("script[nonce]")||null;g=g?g.nonce||g.getAttribute&&g.getAttribute("nonce")||"":"";c?(e=d="",b&&f.test(b)&&(d=' id="'+b+'"'),g&&Nd.test(g)&&(e=' nonce="'+g+'"'),f.test(a)&&M.write(ff.createHTML("<script"+d+e+' src="'+a+'">\x3c/script>'))):(c=M.createElement("script"),c.type="text/javascript",c.async=!0,c.src=ff.createScriptURL(a),d&&(c.onload=d),e&&(c.onerror=e),b&&(c.id=b),g&&c.setAttribute("nonce",
g),a=M.getElementsByTagName("script")[0],a.parentNode.insertBefore(c,a))}},be=function(a,b){return E(M.location[b?"href":"search"],a)},E=function(a,b){return(a=a.match("(?:&|#|\\?)"+K(b).replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")+"=([^&#]*)"))&&2==a.length?a[1]:""},xa=function(){var a=""+M.location.hostname;return 0==a.indexOf("www.")?a.substring(4):a},de=function(a,b){var c=a.indexOf(b);if(5==c||6==c)if(a=a.charAt(c+b.length),"/"==a||"?"==a||""==a||":"==a)return!0;return!1},za=function(a,b){if(1==
b.length&&null!=b[0]&&"object"===typeof b[0])return b[0];for(var c={},d=Math.min(a.length+1,b.length),e=0;e<d;e++)if("object"===typeof b[e]){for(var g in b[e])b[e].hasOwnProperty(g)&&(c[g]=b[e][g]);break}else e<a.length&&(c[a[e]]=b[e]);return c},Ee=function(a,b){for(var c=0;c<a.length;c++)if(b==a[c])return!0;return!1};var ee=function(){this.oa=[];this.ea={};this.m={}};ee.prototype.set=function(a,b,c){this.oa.push(a);c?this.m[":"+a]=b:this.ea[":"+a]=b};ee.prototype.get=function(a){return this.m.hasOwnProperty(":"+a)?this.m[":"+a]:this.ea[":"+a]};ee.prototype.map=function(a){for(var b=0;b<this.oa.length;b++){var c=this.oa[b],d=this.get(c);d&&a(c,d)}};var O=window,M=document,jf=document.currentScript?document.currentScript.src:"",va=function(a,b){return setTimeout(a,b)};var Qa=window,Za=document,G=function(a){var b=Qa._gaUserPrefs;if(b&&b.ioo&&b.ioo()||a&&!0===Qa["ga-disable-"+a])return!0;try{var c=Qa.external;if(c&&c._gaUserPrefs&&"oo"==c._gaUserPrefs)return!0}catch(g){}a=[];b=String(Za.cookie).split(";");for(c=0;c<b.length;c++){var d=b[c].split("="),e=d[0].replace(/^\s*|\s*$/g,"");e&&"AMP_TOKEN"==e&&((d=d.slice(1).join("=").replace(/^\s*|\s*$/g,""))&&(d=decodeURIComponent(d)),a.push(d))}for(b=0;b<a.length;b++)if("$OPT_OUT"==a[b])return!0;return Za.getElementById("__gaOptOutExtension")?
!0:!1};var Ca=function(a){var b=[],c=M.cookie.split(";");a=new RegExp("^\\s*"+a+"=\\s*(.*?)\\s*$");for(var d=0;d<c.length;d++){var e=c[d].match(a);e&&b.push(e[1])}return b},zc=function(a,b,c,d,e,g,ca){e=G(e)?!1:eb.test(M.location.hostname)||"/"==c&&vc.test(d)?!1:!0;if(!e)return!1;b&&1200<b.length&&(b=b.substring(0,1200));c=a+"="+b+"; path="+c+"; ";g&&(c+="expires="+(new Date((new Date).getTime()+g)).toGMTString()+"; ");d&&"none"!==d&&(c+="domain="+d+";");ca&&(c+=ca+";");d=M.cookie;M.cookie=c;if(!(d=d!=M.cookie))a:{a=
Ca(a);for(d=0;d<a.length;d++)if(b==a[d]){d=!0;break a}d=!1}return d},Cc=function(a){return encodeURIComponent?encodeURIComponent(a).replace(/\(/g,"%28").replace(/\)/g,"%29"):a},vc=/^(www\.)?google(\.com?)?(\.[a-z]{2})?$/,eb=/(^|\.)doubleclick\.net$/i;var Oe=function(a){var b=[],c=M.cookie.split(";");a=new RegExp("^\\s*"+(a||"_gac")+"_(UA-\\d+-\\d+)=\\s*(.+?)\\s*$");for(var d=0;d<c.length;d++){var e=c[d].match(a);e&&b.push({ja:e[1],value:e[2],timestamp:Number(e[2].split(".")[1])||0})}b.sort(function(g,ca){return ca.timestamp-g.timestamp});return b};
function df(a,b,c){b=Oe(b);var d={};if(!b||!b.length)return d;for(var e=0;e<b.length;e++){var g=b[e].value.split(".");if("1"!==g[0]||c&&3>g.length||!c&&3!==g.length)a&&(a.na=!0);else if(Number(g[1])){d[b[e].ja]?a&&(a.pa=!0):d[b[e].ja]=[];var ca={version:g[0],timestamp:1E3*Number(g[1]),qa:g[2]};c&&3<g.length&&(ca.labels=g.slice(3));d[b[e].ja].push(ca)}}return d};var Fa,Ga,fb,Ab,ja=/^https?:\/\/[^/]*cdn\.ampproject\.org\//,Ue=/^(?:www\.|m\.|amp\.)+/,Ub=[],da=function(a){if(ye(a[Kd])){if(void 0===Ab){var b;if(b=(b=De.get())&&b._ga||void 0)Ab=b,J(81)}if(void 0!==Ab)return a[Q]||(a[Q]=Ab),!1}if(a[Kd]){J(67);if(a[ac]&&"cookie"!=a[ac])return!1;if(void 0!==Ab)a[Q]||(a[Q]=Ab);else{a:{b=String(a[W]||xa());var c=String(a[Yb]||"/"),d=Ca(String(a[U]||"_ga"));b=na(d,b,c);if(!b||jd.test(b))b=!0;else if(b=Ca("AMP_TOKEN"),0==b.length)b=!0;else{if(1==b.length&&(b=decodeURIComponent(b[0]),
"$RETRIEVING"==b||"$OPT_OUT"==b||"$ERROR"==b||"$NOT_FOUND"==b)){b=!0;break a}b=!1}}if(b&&tc(ic,String(a[Na])))return!0}}return!1},ic=function(){Z.D([ua])},tc=function(a,b){var c=Ca("AMP_TOKEN");if(1<c.length)return J(55),!1;c=decodeURIComponent(c[0]||"");if("$OPT_OUT"==c||"$ERROR"==c||G(b))return J(62),!1;if(!ja.test(M.referrer)&&"$NOT_FOUND"==c)return J(68),!1;if(void 0!==Ab)return J(56),va(function(){a(Ab)},0),!0;if(Fa)return Ub.push(a),!0;if("$RETRIEVING"==c)return J(57),va(function(){tc(a,b)},
1E4),!0;Fa=!0;c&&"$"!=c[0]||(xc("$RETRIEVING",3E4),setTimeout(Mc,3E4),c="");return Pc(c,b)?(Ub.push(a),!0):!1},Pc=function(a,b,c){if(!window.JSON)return J(58),!1;var d=O.XMLHttpRequest;if(!d)return J(59),!1;var e=new d;if(!("withCredentials"in e))return J(60),!1;e.open("POST",(c||"https://ampcid.google.com/v1/publisher:getClientId")+"?key=AIzaSyA65lEHUEizIsNtlbNo-l2K18dT680nsaM",!0);e.withCredentials=!0;e.setRequestHeader("Content-Type","text/plain");e.onload=function(){Fa=!1;if(4==e.readyState){try{200!=
e.status&&(J(61),Qc("","$ERROR",3E4));var g=JSON.parse(e.responseText);g.optOut?(J(63),Qc("","$OPT_OUT",31536E6)):g.clientId?Qc(g.clientId,g.securityToken,31536E6):!c&&g.alternateUrl?(Ga&&clearTimeout(Ga),Fa=!0,Pc(a,b,g.alternateUrl)):(J(64),Qc("","$NOT_FOUND",36E5))}catch(ca){J(65),Qc("","$ERROR",3E4)}e=null}};d={originScope:"AMP_ECID_GOOGLE"};a&&(d.securityToken=a);e.send(JSON.stringify(d));Ga=va(function(){J(66);Qc("","$ERROR",3E4)},1E4);return!0},Mc=function(){Fa=!1},xc=function(a,b){if(void 0===
fb){fb="";for(var c=id(),d=0;d<c.length;d++){var e=c[d];if(zc("AMP_TOKEN",encodeURIComponent(a),"/",e,"",b)){fb=e;return}}}zc("AMP_TOKEN",encodeURIComponent(a),"/",fb,"",b)},Qc=function(a,b,c){Ga&&clearTimeout(Ga);b&&xc(b,c);Ab=a;b=Ub;Ub=[];for(c=0;c<b.length;c++)b[c](a)},ye=function(a){a:{if(ja.test(M.referrer)){var b=M.location.hostname.replace(Ue,"");b:{var c=M.referrer;c=c.replace(/^https?:\/\//,"");var d=c.replace(/^[^/]+/,"").split("/"),e=d[2];d=(d="s"==e?d[3]:e)?decodeURIComponent(d):d;if(!d){if(0==
c.indexOf("xn--")){c="";break b}(c=c.match(/(.*)\.cdn\.ampproject\.org\/?$/))&&2==c.length&&(d=c[1].replace(/-/g,".").replace(/\.\./g,"-"))}c=d?d.replace(Ue,""):""}(d=b===c)||(c="."+c,d=b.substring(b.length-c.length,b.length)===c);if(d){b=!0;break a}else J(78)}b=!1}return b&&!1!==a};var bd=function(a){return(a?"https:":Ba||"https:"==M.location.protocol?"https:":"http:")+"//www.google-analytics.com"},Ge=function(a){switch(a){default:case 1:return"https://www.google-analytics.com/gtm/js?id=";case 2:return"https://www.googletagmanager.com/gtag/js?id="}},Da=function(a){this.name="len";this.message=a+"-8192"},ba=function(a,b,c){c=c||ua;if(2036>=b.length)wc(a,b,c);else if(8192>=b.length)x(a,b,c)||wd(a,b,c)||wc(a,b,c);else throw ge("len",b.length),new Da(b.length);},pe=function(a,b,
c,d){d=d||ua;wd(a+"?"+b,"",d,c)},wc=function(a,b,c){var d=ta(a+"?"+b);d.onload=d.onerror=function(){d.onload=null;d.onerror=null;c()}},wd=function(a,b,c,d){var e=O.XMLHttpRequest;if(!e)return!1;var g=new e;if(!("withCredentials"in g))return!1;a=a.replace(/^http:/,"https:");g.open("POST",a,!0);g.withCredentials=!0;g.setRequestHeader("Content-Type","text/plain");g.onreadystatechange=function(){if(4==g.readyState){if(d&&"text/plain"===g.getResponseHeader("Content-Type"))try{Ea(d,g.responseText,c)}catch(ca){ge("xhr",
"rsp"),c()}else c();g=null}};g.send(b);return!0},Ea=function(a,b,c){if(1>b.length)ge("xhr","ver","0"),c();else if(3<a.count++)ge("xhr","tmr",""+a.count),c();else{var d=b.charAt(0);if("1"===d)oc(a,b.substring(1),c);else if(a.V&&"2"===d){var e=b.substring(1).split(","),g=0;b=function(){++g===e.length&&c()};for(d=0;d<e.length;d++)oc(a,e[d],b)}else ge("xhr","ver",String(b.length)),c()}},oc=function(a,b,c){if(0===b.length)c();else{var d=b.charAt(0);switch(d){case "d":pe("https://stats.g.doubleclick.net/j/collect",
a.U,a,c);break;case "g":wc("https://www.google.com/ads/ga-audiences",a.google,c);(b=b.substring(1))&&(/^[a-z.]{1,6}$/.test(b)?wc("https://www.google.%/ads/ga-audiences".replace("%",b),a.google,ua):ge("tld","bcc",b));break;case "G":if(a.V){a.V("G-"+b.substring(1));c();break}case "x":if(a.V){a.V();c();break}default:ge("xhr","brc",d),c()}}},x=function(a,b,c){return O.navigator.sendBeacon?O.navigator.sendBeacon(a,b)?(c(),!0):!1:!1},ge=function(a,b,c){1<=100*Math.random()||G("?")||(a=["t=error","_e="+
a,"_v=j98","sr=1"],b&&a.push("_f="+b),c&&a.push("_m="+K(c.substring(0,100))),a.push("aip=1"),a.push("z="+hd()),wc(bd(!0)+"/u/d",a.join("&"),ua))};var qc=function(){return O.gaData=O.gaData||{}},h=function(a){var b=qc();return b[a]=b[a]||{}};var Ha=function(){this.M=[]};Ha.prototype.add=function(a){this.M.push(a)};Ha.prototype.D=function(a){try{for(var b=0;b<this.M.length;b++){var c=a.get(this.M[b]);c&&ea(c)&&c.call(O,a)}}catch(d){}b=a.get(Ia);b!=ua&&ea(b)&&(a.set(Ia,ua,!0),setTimeout(b,10))};function Ja(a){if(100!=a.get(Ka)&&La(P(a,Q))%1E4>=100*R(a,Ka))throw"abort";}function Ma(a){if(G(P(a,Na)))throw"abort";}function Oa(){var a=M.location.protocol;if("http:"!=a&&"https:"!=a)throw"abort";}
function Pa(a){try{O.navigator.sendBeacon?J(42):O.XMLHttpRequest&&"withCredentials"in new O.XMLHttpRequest&&J(40)}catch(c){}a.set(ld,Td(a),!0);a.set(Ac,R(a,Ac)+1);var b=[];ue.map(function(c,d){d.F&&(c=a.get(c),void 0!=c&&c!=d.defaultValue&&("boolean"==typeof c&&(c*=1),b.push(d.F+"="+K(""+c))))});!1===a.get(xe)&&b.push("npa=1");b.push("z="+Bd());a.set(Ra,b.join("&"),!0)}
function Sa(a){var b=P(a,fa);!b&&a.get(Vd)&&(b="beacon");var c=P(a,gd),d=P(a,oe),e=c||(d||bd(!1)+"")+"/collect";switch(P(a,ad)){case "d":e=c||(d||bd(!1)+"")+"/j/collect";b=a.get(qe)||void 0;pe(e,P(a,Ra),b,a.Z(Ia));break;default:b?(c=P(a,Ra),d=(d=a.Z(Ia))||ua,"image"==b?wc(e,c,d):"xhr"==b&&wd(e,c,d)||"beacon"==b&&x(e,c,d)||ba(e,c,d)):ba(e,P(a,Ra),a.Z(Ia))}e=P(a,Na);e=h(e);b=e.hitcount;e.hitcount=b?b+1:1;e.first_hit||(e.first_hit=(new Date).getTime());e=P(a,Na);delete h(e).pending_experiments;a.set(Ia,
ua,!0)}function Hc(a){qc().expId&&a.set(Nc,qc().expId);qc().expVar&&a.set(Oc,qc().expVar);var b=P(a,Na);if(b=h(b).pending_experiments){var c=[];for(d in b)b.hasOwnProperty(d)&&b[d]&&c.push(encodeURIComponent(d)+"."+encodeURIComponent(b[d]));var d=c.join("!")}else d=void 0;d&&((b=a.get(m))&&(d=b+"!"+d),a.set(m,d,!0))}function cd(){if(O.navigator&&"preview"==O.navigator.loadPurpose)throw"abort";}
function yd(a){var b=O.gaDevIds||[];if(ka(b)){var c=a.get("&did");qa(c)&&0<c.length&&(b=b.concat(c.split(",")));c=[];for(var d=0;d<b.length;d++)Ee(c,b[d])||c.push(b[d]);0!=c.length&&a.set("&did",c.join(","),!0)}}function vb(a){if(!a.get(Na))throw"abort";}
function Pe(a){try{if(!a.get(Qe)&&(a.set(Qe,!0),!a.get("&gtm"))){var b=void 0;lf(be("gtm_debug"))&&(b=2);!b&&D(M.referrer,"https://tagassistant.google.com/")&&(b=3);!b&&Ee(M.cookie.split("; "),"__TAG_ASSISTANT=x")&&(b=4);if(!b){var c=M.documentElement.getAttribute("data-tag-assistant-present");lf(c)&&(b=5)}if(b){O["google.tagmanager.debugui2.queue"]||(O["google.tagmanager.debugui2.queue"]=[],Id("https://www.google-analytics.com/debug/bootstrap?id="+a.get(Na)+"&src=LEGACY&cond="+b));var d=M.currentScript;
O["google.tagmanager.debugui2.queue"].push({messageType:"LEGACY_CONTAINER_STARTING",data:{id:a.get(Na),scriptSource:d&&d.src||""}})}}}catch(e){}}function lf(a){if(null==a||0===a.length)return!1;a=Number(a);var b=Date.now();return a<b+3E5&&a>b-9E5};var hd=function(){return Math.round(2147483647*Math.random())},Bd=function(){try{var a=new Uint32Array(1);O.crypto.getRandomValues(a);return a[0]&2147483647}catch(b){return hd()}};function Ta(a){var b=R(a,Ua);500<=b&&J(15);var c=P(a,Va);if("transaction"!=c&&"item"!=c){c=R(a,Wa);var d=(new Date).getTime(),e=R(a,Xa);0==e&&a.set(Xa,d);e=Math.round(2*(d-e)/1E3);0<e&&(c=Math.min(c+e,20),a.set(Xa,d));if(0>=c)throw"abort";a.set(Wa,--c)}a.set(Ua,++b)};var Ya=function(){this.data=new ee};Ya.prototype.get=function(a){var b=$a(a),c=this.data.get(a);b&&void 0==c&&(c=ea(b.defaultValue)?b.defaultValue():b.defaultValue);return b&&b.Z?b.Z(this,a,c):c};var P=function(a,b){a=a.get(b);return void 0==a?"":""+a},R=function(a,b){a=a.get(b);return void 0==a||""===a?0:Number(a)};Ya.prototype.Z=function(a){return(a=this.get(a))&&ea(a)?a:ua};
Ya.prototype.set=function(a,b,c){if(a)if("object"==typeof a)for(var d in a)a.hasOwnProperty(d)&&ab(this,d,a[d],c);else ab(this,a,b,c)};
var ab=function(a,b,c,d){if(void 0!=c)switch(b){case Na:wb.test(c)}var e=$a(b);e&&e.o?e.o(a,b,c,d):a.data.set(b,c,d)},gf={hitPayload:88,location:89,referrer:90,title:91,buildHitTask:93,sendHitTask:94,displayFeaturesTask:95,customTask:97,cookieName:98,cookieDomain:99,cookiePath:100,cookieExpires:101,cookieUpdate:102,cookieFlags:103,storage:104,_x_19:105,transportUrl:106,allowAdFeatures:107,sampleRate:108};
function hf(a,b){var c=gf[a];c&&J(c);"displayFeaturesTask"===a&&void 0==b&&J(96);/.*Task$/.test(a)&&J(92)}function mf(a,b){if(a)if("object"==typeof a)for(var c in a)a.hasOwnProperty(c)&&hf(c,b);else hf(a,b)};var ue=new ee,ve=[],bb=function(a,b,c,d,e){this.name=a;this.F=b;this.Z=d;this.o=e;this.defaultValue=c},$a=function(a){var b=ue.get(a);if(!b)for(var c=0;c<ve.length;c++){var d=ve[c],e=d[0].exec(a);if(e){b=d[1](e);ue.set(b.name,b);break}}return b},yc=function(a){var b;ue.map(function(c,d){d.F==a&&(b=d)});return b&&b.name},S=function(a,b,c,d,e){a=new bb(a,b,c,d,e);ue.set(a.name,a);return a.name},cb=function(a,b){ve.push([new RegExp("^"+a+"$"),b])},T=function(a,b,c){return S(a,b,c,void 0,db)},db=function(){};var hb=T("apiVersion","v"),ib=T("clientVersion","_v");S("anonymizeIp","aip");var jb=S("adSenseId","a"),Va=S("hitType","t"),Ia=S("hitCallback"),Ra=S("hitPayload");S("nonInteraction","ni");S("currencyCode","cu");S("dataSource","ds");var Vd=S("useBeacon",void 0,!1),fa=S("transport");S("sessionControl","sc","");S("sessionGroup","sg");S("queueTime","qt");var Ac=S("_s","_s");S("screenName","cd");var kb=S("location","dl",""),lb=S("referrer","dr"),mb=S("page","dp","");S("hostname","dh");
var nb=S("language","ul"),ob=S("encoding","de");S("title","dt",function(){return M.title||void 0});cb("contentGroup([0-9]+)",function(a){return new bb(a[0],"cg"+a[1])});var pb=S("screenColors","sd"),qb=S("screenResolution","sr"),rb=S("viewportSize","vp"),sb=S("javaEnabled","je"),tb=S("flashVersion","fl");S("campaignId","ci");S("campaignName","cn");S("campaignSource","cs");S("campaignMedium","cm");S("campaignKeyword","ck");S("campaignContent","cc");
var ub=S("eventCategory","ec"),xb=S("eventAction","ea"),yb=S("eventLabel","el"),zb=S("eventValue","ev"),Bb=S("socialNetwork","sn"),Cb=S("socialAction","sa"),Db=S("socialTarget","st"),Eb=S("l1","plt"),Fb=S("l2","pdt"),Gb=S("l3","dns"),Hb=S("l4","rrt"),Ib=S("l5","srt"),Jb=S("l6","tcp"),Kb=S("l7","dit"),Lb=S("l8","clt"),Ve=S("l9","_gst"),We=S("l10","_gbt"),Xe=S("l11","_cst"),Ye=S("l12","_cbt"),Mb=S("timingCategory","utc"),Nb=S("timingVar","utv"),Ob=S("timingLabel","utl"),Pb=S("timingValue","utt");
S("appName","an");S("appVersion","av","");S("appId","aid","");S("appInstallerId","aiid","");S("exDescription","exd");S("exFatal","exf");var Nc=S("expId","xid"),Oc=S("expVar","xvar"),m=S("exp","exp"),Rc=S("_utma","_utma"),Sc=S("_utmz","_utmz"),Tc=S("_utmht","_utmht"),Ua=S("_hc",void 0,0),Xa=S("_ti",void 0,0),Wa=S("_to",void 0,20);cb("dimension([0-9]+)",function(a){return new bb(a[0],"cd"+a[1])});cb("metric([0-9]+)",function(a){return new bb(a[0],"cm"+a[1])});S("linkerParam",void 0,void 0,Bc,db);
var Ze=T("_cd2l",void 0,!1),ld=S("usage","_u"),Gd=S("_um");S("forceSSL",void 0,void 0,function(){return Ba},function(a,b,c){J(34);Ba=!!c});var ed=S("_j1","jid"),ia=S("_j2","gjid");cb("\\&(.*)",function(a){var b=new bb(a[0],a[1]),c=yc(a[0].substring(1));c&&(b.Z=function(d){return d.get(c)},b.o=function(d,e,g,ca){d.set(c,g,ca)},b.F=void 0);return b});
var Qb=T("_oot"),dd=S("previewTask"),Rb=S("checkProtocolTask"),md=S("validationTask"),Sb=S("checkStorageTask"),Uc=S("historyImportTask"),Tb=S("samplerTask"),Vb=S("_rlt"),Wb=S("buildHitTask"),Xb=S("sendHitTask"),Vc=S("ceTask"),zd=S("devIdTask"),Cd=S("timingTask"),Ld=S("displayFeaturesTask"),oa=S("customTask"),ze=S("fpsCrossDomainTask"),Re=T("_cta"),V=T("name"),Q=T("clientId","cid"),n=T("clientIdTime"),xd=T("storedClientId"),Ad=S("userId","uid"),Na=T("trackingId","tid"),U=T("cookieName",void 0,"_ga"),
W=T("cookieDomain"),Yb=T("cookiePath",void 0,"/"),Zb=T("cookieExpires",void 0,63072E3),Hd=T("cookieUpdate",void 0,!0),Be=T("cookieFlags",void 0,""),$b=T("legacyCookieDomain"),Wc=T("legacyHistoryImport",void 0,!0),ac=T("storage",void 0,"cookie"),bc=T("allowLinker",void 0,!1),cc=T("allowAnchor",void 0,!0),Ka=T("sampleRate","sf",100),dc=T("siteSpeedSampleRate",void 0,1),ec=T("alwaysSendReferrer",void 0,!1),I=T("_gid","_gid"),la=T("_gcn"),Kd=T("useAmpClientId"),ce=T("_gclid"),fe=T("_gt"),he=T("_ge",void 0,
7776E6),ie=T("_gclsrc"),je=T("storeGac",void 0,!0),oe=S("_x_19"),Ae=S("_fplc","_fplc"),F=T("_cs"),Je=T("_useUp",void 0,!1),Le=S("up","up"),Qe=S("_tac",void 0,!1),Se=T("_gbraid"),Te=T("_gbt"),bf=T("_gbe",void 0,7776E6),gd=S("transportUrl"),Md=S("_r","_r"),Od=S("_slc","_slc"),qe=S("_dp"),ad=S("_jt",void 0,"n"),Ud=S("allowAdFeatures",void 0,!0),xe=S("allowAdPersonalizationSignals",void 0,!0);
function X(a,b,c,d){b[a]=function(){try{return d&&J(d),c.apply(this,arguments)}catch(e){throw ge("exc",a,e&&e.name),e;}}};var Ed=function(a){if("cookie"==a.get(ac))return a=Ca("FPLC"),0<a.length?a[0]:void 0},Fe=function(a){var b;if(b=P(a,oe)&&a.get(Ze))b=De.get(a.get(cc)),b=!(b&&b._fplc);b&&!Ed(a)&&a.set(Ae,"0")};var aa=function(a){var b=Math.min(R(a,dc),100);return La(P(a,Q))%100>=b?!1:!0},gc=function(a){var b={};if(Ec(b)||Fc(b)){var c=b[Eb];void 0==c||Infinity==c||isNaN(c)||(0<c?(Y(b,Gb),Y(b,Jb),Y(b,Ib),Y(b,Fb),Y(b,Hb),Y(b,Kb),Y(b,Lb),Y(b,Ve),Y(b,We),Y(b,Xe),Y(b,Ye),va(function(){a(b)},10)):L(O,"load",function(){gc(a)},!1))}},Ec=function(a){var b=O.performance||O.webkitPerformance;b=b&&b.timing;if(!b)return!1;var c=b.navigationStart;if(0==c)return!1;a[Eb]=b.loadEventStart-c;a[Gb]=b.domainLookupEnd-b.domainLookupStart;
a[Jb]=b.connectEnd-b.connectStart;a[Ib]=b.responseStart-b.requestStart;a[Fb]=b.responseEnd-b.responseStart;a[Hb]=b.fetchStart-c;a[Kb]=b.domInteractive-c;a[Lb]=b.domContentLoadedEventStart-c;a[Ve]=N.L-c;a[We]=N.ya-c;O.google_tag_manager&&O.google_tag_manager._li&&(b=O.google_tag_manager._li,a[Xe]=b.cst,a[Ye]=b.cbt);return!0},Fc=function(a){if(O.top!=O)return!1;var b=O.external,c=b&&b.onloadT;b&&!b.isValidLoadTime&&(c=void 0);2147483648<c&&(c=void 0);0<c&&b.setPageReadyTime();if(void 0==c)return!1;
a[Eb]=c;return!0},Y=function(a,b){var c=a[b];if(isNaN(c)||Infinity==c||0>c)a[b]=void 0},Fd=function(a){return function(b){if("pageview"==b.get(Va)&&!a.I){a.I=!0;var c=aa(b),d=0<E(P(b,kb),"gclid").length,e=0<E(P(b,kb),"wbraid").length;(c||d||e)&&gc(function(g){c&&a.send("timing",g);(d||e)&&a.send("adtiming",g)})}}};var hc=!1,mc=function(a){if("cookie"==P(a,ac)){if(a.get(Hd)||P(a,xd)!=P(a,Q)){var b=1E3*R(a,Zb);ma(a,Q,U,b);a.data.set(xd,P(a,Q))}(a.get(Hd)||uc(a)!=P(a,I))&&ma(a,I,la,864E5);if(a.get(je)){if(b=P(a,ce)){var c=Math.min(R(a,he),1E3*R(a,Zb));c=0===c?0:Math.min(c,1E3*R(a,fe)+c-(new Date).getTime());a.data.set(he,c);var d={},e=P(a,fe),g=P(a,ie),ca=kc(P(a,Yb)),l=lc(P(a,W)),k=P(a,Na),w=P(a,Be);g&&"aw.ds"!=g?d&&(d.ua=!0):(b=["1",e,Cc(b)].join("."),0<=c&&(d&&(d.ta=!0),zc("_gac_"+Cc(k),b,ca,l,k,c,w)));le(d)}}else J(75);
a.get(je)&&(b=P(a,Se))&&(c=Math.min(R(a,bf),1E3*R(a,Zb)),c=0===c?0:Math.min(c,1E3*R(a,Te)+c-(new Date).getTime()),a.data.set(bf,c),d={},w=P(a,Te),ca=kc(P(a,Yb)),l=lc(P(a,W)),k=P(a,Na),a=P(a,Be),b=["1",w,Cc(b)].join("."),0<=c&&(d&&(d.ta=!0),zc("_gac_gb_"+Cc(k),b,ca,l,k,c,a)),ef(d))}},ma=function(a,b,c,d){var e=nd(a,b);if(e){c=P(a,c);var g=kc(P(a,Yb)),ca=lc(P(a,W)),l=P(a,Be),k=P(a,Na);if("auto"!=ca)zc(c,e,g,ca,k,d,l)&&(hc=!0);else{J(32);for(var w=id(),Ce=0;Ce<w.length;Ce++)if(ca=w[Ce],a.data.set(W,
ca),e=nd(a,b),zc(c,e,g,ca,k,d,l)){hc=!0;return}a.data.set(W,"auto")}}},uc=function(a){var b=Ca(P(a,la));return Xd(a,b)},nc=function(a){if("cookie"==P(a,ac)&&!hc&&(mc(a),!hc))throw"abort";},Yc=function(a){if(a.get(Wc)){var b=P(a,W),c=P(a,$b)||xa(),d=Xc("__utma",c,b);d&&(J(19),a.set(Tc,(new Date).getTime(),!0),a.set(Rc,d.R),(b=Xc("__utmz",c,b))&&d.hash==b.hash&&a.set(Sc,b.R))}},nd=function(a,b){b=Cc(P(a,b));var c=lc(P(a,W)).split(".").length;a=jc(P(a,Yb));1<a&&(c+="-"+a);return b?["GA1",c,b].join("."):
""},Xd=function(a,b){return na(b,P(a,W),P(a,Yb))},na=function(a,b,c){if(!a||1>a.length)J(12);else{for(var d=[],e=0;e<a.length;e++){var g=a[e];var ca=g.split(".");var l=ca.shift();("GA1"==l||"1"==l)&&1<ca.length?(g=ca.shift().split("-"),1==g.length&&(g[1]="1"),g[0]*=1,g[1]*=1,ca={H:g,s:ca.join(".")}):ca=kd.test(g)?{H:[0,0],s:g}:void 0;ca&&d.push(ca)}if(1==d.length)return J(13),d[0].s;if(0==d.length)J(12);else{J(14);d=Gc(d,lc(b).split(".").length,0);if(1==d.length)return d[0].s;d=Gc(d,jc(c),1);1<d.length&&
J(41);return d[0]&&d[0].s}}},Gc=function(a,b,c){for(var d=[],e=[],g,ca=0;ca<a.length;ca++){var l=a[ca];l.H[c]==b?d.push(l):void 0==g||l.H[c]<g?(e=[l],g=l.H[c]):l.H[c]==g&&e.push(l)}return 0<d.length?d:e},lc=function(a){return 0==a.indexOf(".")?a.substr(1):a},id=function(){var a=[],b=xa().split(".");if(4==b.length){var c=b[b.length-1];if(parseInt(c,10)==c)return["none"]}for(c=b.length-2;0<=c;c--)a.push(b.slice(c).join("."));b=M.location.hostname;eb.test(b)||vc.test(b)||a.push("none");return a},kc=
function(a){if(!a)return"/";1<a.length&&a.lastIndexOf("/")==a.length-1&&(a=a.substr(0,a.length-1));0!=a.indexOf("/")&&(a="/"+a);return a},jc=function(a){a=kc(a);return"/"==a?1:a.split("/").length},le=function(a){a.ta&&J(77);a.na&&J(74);a.pa&&J(73);a.ua&&J(69)},ef=function(a){a.ta&&J(85);a.na&&J(86);a.pa&&J(87)};function Xc(a,b,c){"none"==b&&(b="");var d=[],e=Ca(a);a="__utma"==a?6:2;for(var g=0;g<e.length;g++){var ca=(""+e[g]).split(".");ca.length>=a&&d.push({hash:ca[0],R:e[g],O:ca})}if(0!=d.length)return 1==d.length?d[0]:Zc(b,d)||Zc(c,d)||Zc(null,d)||d[0]}function Zc(a,b){if(null==a)var c=a=1;else c=La(a),a=La(D(a,".")?a.substring(1):"."+a);for(var d=0;d<b.length;d++)if(b[d].hash==c||b[d].hash==a)return b[d]};var Jc=new RegExp(/^https?:\/\/([^\/:]+)/),De=O.google_tag_data.glBridge,Kc=RegExp("(.*)([?&#])(?:_ga=[^&#]*)(?:&?)(.*)"),od=RegExp("(.*)([?&#])(?:_gac=[^&#]*)(?:&?)(.*)");function Bc(a){if(a.get(Ze))return J(35),De.generate($e(a));var b=P(a,Q),c=P(a,I)||"";b="_ga=2."+K(pa(c+b,0)+"."+c+"-"+b);(a=af(a))?(J(44),a="&_gac=1."+K([pa(a.qa,0),a.timestamp,a.qa].join("."))):a="";return b+a}
function Ic(a,b){var c=new Date,d=O.navigator,e=d.plugins||[];a=[a,d.userAgent,c.getTimezoneOffset(),c.getYear(),c.getDate(),c.getHours(),c.getMinutes()+b];for(b=0;b<e.length;++b)a.push(e[b].description);return La(a.join("."))}function pa(a,b){var c=new Date,d=O.navigator,e=c.getHours()+Math.floor((c.getMinutes()+b)/60);return La([a,d.userAgent,d.language||"",c.getTimezoneOffset(),c.getYear(),c.getDate()+Math.floor(e/24),(24+e)%24,(60+c.getMinutes()+b)%60].join("."))}
var Dc=function(a){J(48);this.target=a;this.T=!1};Dc.prototype.ca=function(a,b){if(a){if(this.target.get(Ze))return De.decorate($e(this.target),a,b);if(a.tagName){if("a"==a.tagName.toLowerCase()){a.href&&(a.href=qd(this,a.href,b));return}if("form"==a.tagName.toLowerCase())return rd(this,a)}if("string"==typeof a)return qd(this,a,b)}};
var qd=function(a,b,c){var d=Kc.exec(b);d&&3<=d.length&&(b=d[1]+(d[3]?d[2]+d[3]:""));(d=od.exec(b))&&3<=d.length&&(b=d[1]+(d[3]?d[2]+d[3]:""));a=a.target.get("linkerParam");d=b.indexOf("?");var e=b.indexOf("#");b=c?b+((-1==e?"#":"&")+a):-1==e?b+((-1===d?"?":"&")+a):b.substring(0,e)+(-1===d||d>e?"?":"&")+a+b.substring(e);b=b.replace(/&+_ga=/,"&_ga=");return b=b.replace(RegExp("&+_gac="),"&_gac=")},rd=function(a,b){if(b&&b.action)if("get"==b.method.toLowerCase()){a=a.target.get("linkerParam").split("&");
for(var c=0;c<a.length;c++){var d=a[c].split("="),e=d[1];d=d[0];for(var g=b.childNodes||[],ca=!1,l=0;l<g.length;l++)if(g[l].name==d){g[l].setAttribute("value",e);ca=!0;break}ca||(g=M.createElement("input"),g.setAttribute("type","hidden"),g.setAttribute("name",d),g.setAttribute("value",e),b.appendChild(g))}}else"post"==b.method.toLowerCase()&&(b.action=qd(a,b.action))};
Dc.prototype.S=function(a,b,c){function d(g){try{g=g||O.event;a:{var ca=g.target||g.srcElement;for(g=100;ca&&0<g;){if(ca.href&&ca.nodeName.match(/^a(?:rea)?$/i)){var l=ca;break a}ca=ca.parentNode;g--}l={}}("http:"==l.protocol||"https:"==l.protocol)&&sd(a,l.hostname||"")&&l.href&&(l.href=qd(e,l.href,b))}catch(k){J(26)}}var e=this;this.target.get(Ze)?De.auto(function(){return $e(e.target)},a,b?"fragment":"",c):(this.T||(this.T=!0,L(M,"mousedown",d,!1),L(M,"keyup",d,!1)),c&&L(M,"submit",function(g){g=
g||O.event;if((g=g.target||g.srcElement)&&g.action){var ca=g.action.match(Jc);ca&&sd(a,ca[1])&&rd(e,g)}}))};Dc.prototype.$=function(a){if(a){var b=this,c=b.target.get(F);void 0!==c&&De.passthrough(function(){if(c("analytics_storage"))return{};var d={};return d._ga=b.target.get(Q),d._up="1",d},1,!0)}};function sd(a,b){if(b==M.location.hostname)return!1;for(var c=0;c<a.length;c++)if(a[c]instanceof RegExp){if(a[c].test(b))return!0}else if(0<=b.indexOf(a[c]))return!0;return!1}
function ke(a,b){return b!=Ic(a,0)&&b!=Ic(a,-1)&&b!=Ic(a,-2)&&b!=pa(a,0)&&b!=pa(a,-1)&&b!=pa(a,-2)}function $e(a){var b=af(a),c={};c._ga=a.get(Q);c._gid=a.get(I)||void 0;c._gac=b?[b.qa,b.timestamp].join("."):void 0;b=a.get(Ae);a=Ed(a);return c._fplc=b&&"0"!==b?b:a,c}function af(a){function b(e){return void 0==e||""===e?0:Number(e)}var c=a.get(ce);if(c&&a.get(je)){var d=b(a.get(fe));if(1E3*d+b(a.get(he))<=(new Date).getTime())J(76);else return{timestamp:d,qa:c}}};var p=/^(GTM|OPT)-[A-Z0-9]+$/,Ie=/^G-[A-Z0-9]+$/,q=/;_gaexp=[^;]*/g,r=/;((__utma=)|([^;=]+=GAX?\d+\.))[^;]*/g,Aa=/^https?:\/\/[\w\-.]+\.google.com(:\d+)?\/optimize\/opt-launch\.html\?.*$/,t=function(a){function b(d,e){e&&(c+="&"+d+"="+K(e))}var c=Ge(a.type)+K(a.id);"dataLayer"!=a.B&&b("l",a.B);b("cx",a.context);b("t",a.target);b("cid",a.clientId);b("cidt",a.ka);b("gac",a.la);b("aip",a.ia);a.sync&&b("m","sync");b("cycle",a.G);a.qa&&b("gclid",a.qa);Aa.test(M.referrer)&&b("cb",String(hd()));return c},
He=function(a,b){var c=(new Date).getTime();O[a.B]=O[a.B]||[];c={"gtm.start":c};a.sync||(c.event="gtm.js");O[a.B].push(c);2===a.type&&function(d,e,g){O[a.B].push(arguments)}("config",a.id,b)},Ke=function(a,b,c,d){c=c||{};var e=1;Ie.test(b)&&(e=2);var g={id:b,type:e,B:c.dataLayer||"dataLayer",G:!1},ca=void 0;a.get("&gtm")==b&&(g.G=!0);1===e?(g.ia=!!a.get("anonymizeIp"),g.sync=d,b=String(a.get("name")),"t0"!=b&&(g.target=b),G(String(a.get("trackingId")))||(g.clientId=String(a.get(Q)),g.ka=Number(a.get(n)),
c=c.palindrome?r:q,c=(c=M.cookie.replace(/^|(; +)/g,";").match(c))?c.sort().join("").substring(1):void 0,g.la=c,g.qa=E(P(a,kb),"gclid"))):2===e&&(g.context="c",ca={allow_google_signals:a.get(Ud),allow_ad_personalization_signals:a.get(xe)});He(g,ca);return t(g)};var H={},Jd=function(a,b){b||(b=(b=P(a,V))&&"t0"!=b?Wd.test(b)?"_gat_"+Cc(P(a,Na)):"_gat_"+Cc(b):"_gat");this.Y=b},Rd=function(a,b){var c=b.get(Wb);b.set(Wb,function(e){Pd(a,e,ed);Pd(a,e,ia);var g=c(e);Qd(a,e);return g});var d=b.get(Xb);b.set(Xb,function(e){var g=d(e);if(se(e)){J(80);var ca={U:re(e,1),google:re(e,2),count:0};pe("https://stats.g.doubleclick.net/j/collect",ca.U,ca);e.set(ed,"",!0)}return g})},Pd=function(a,b,c){!1===b.get(Ud)||b.get(c)||("1"==Ca(a.Y)[0]?b.set(c,"",!0):b.set(c,""+hd(),
!0))},Qd=function(a,b){se(b)&&zc(a.Y,"1",P(b,Yb),P(b,W),P(b,Na),6E4,P(b,Be))},se=function(a){return!!a.get(ed)&&!1!==a.get(Ud)},Ne=function(a){return!H[P(a,Na)]&&void 0===a.get("&gtm")&&void 0===a.get(fa)&&void 0===a.get(gd)&&void 0===a.get(oe)},re=function(a,b){var c=new ee,d=function(g){$a(g).F&&c.set($a(g).F,a.get(g))};d(hb);d(ib);d(Na);d(Q);d(ed);1==b&&(d(Ad),d(ia),d(I));!1===a.get(xe)&&c.set("npa","1");c.set($a(ld).F,Td(a));var e="";c.map(function(g,ca){e+=K(g)+"=";e+=K(""+ca)+"&"});e+="z="+
hd();1==b?e="t=dc&aip=1&_r=3&"+e:2==b&&(e="t=sr&aip=1&_r=4&slf_rd=1&"+e);return e},Me=function(a){if(Ne(a))return H[P(a,Na)]=!0,function(b){if(b&&!H[b]){var c=Ke(a,b);Id(c);H[b]=!0}}},Wd=/^gtm\d+$/;var fd=function(a,b){a=a.model;if(!a.get("dcLoaded")){var c=new $c(Dd(a));c.set(29);a.set(Gd,c.C);b=b||{};var d;b[U]&&(d=Cc(b[U]));b=new Jd(a,d);Rd(b,a);a.set("dcLoaded",!0)}};var Sd=function(a){if(!a.get("dcLoaded")&&"cookie"==a.get(ac)){var b=new Jd(a);Pd(b,a,ed);Pd(b,a,ia);Qd(b,a);b=se(a);var c=Ne(a);b&&a.set(Md,1,!0);c&&a.set(Od,1,!0);if(b||c)a.set(ad,"d",!0),J(79),a.set(qe,{U:re(a,1),google:re(a,2),V:Me(a),count:0},!0)}};var Lc=function(){var a=O.gaGlobal=O.gaGlobal||{};return a.hid=a.hid||hd()};var wb=/^(UA|YT|MO|GP)-(\d+)-(\d+)$/,pc=function(a){function b(e,g){d.model.data.set(e,g);a.hasOwnProperty(e)&&hf(e,g)}function c(e,g){d.model.data.set(e,g);d.filters.add(e)}var d=this;this.model=new Ya;this.filters=new Ha;b(V,a[V]);b(Na,sa(a[Na]));b(U,a[U]);b(W,a[W]||xa());b(Yb,a[Yb]);b(Zb,a[Zb]);b(Hd,a[Hd]);b(Be,a[Be]);b($b,a[$b]);b(Wc,a[Wc]);b(bc,a[bc]);b(cc,a[cc]);b(Ka,a[Ka]);b(dc,a[dc]);b(ec,a[ec]);b(ac,a[ac]);b(Ad,a[Ad]);b(n,a[n]);b(Kd,a[Kd]);b(je,a[je]);b(Ze,a[Ze]);b(oe,a[oe]);b(Je,a[Je]);
b(F,a[F]);b(hb,1);b(ib,"j98");c(Re,Pe);c(Qb,Ma);c(oa,ua);c(dd,cd);c(Rb,Oa);c(md,vb);c(Sb,nc);c(Uc,Yc);c(Tb,Ja);c(Vb,Ta);c(Vc,Hc);c(zd,yd);c(Ld,Sd);c(ze,Fe);c(Wb,Pa);c(Xb,Sa);c(Cd,Fd(this));pd(this.model);td(this.model,a[Q]);this.model.set(jb,Lc())};pc.prototype.get=function(a){return this.model.get(a)};pc.prototype.set=function(a,b){this.model.set(a,b);mf(a,b)};
pc.prototype.send=function(a){if(!(1>arguments.length)){if("string"===typeof arguments[0]){var b=arguments[0];var c=[].slice.call(arguments,1)}else b=arguments[0]&&arguments[0][Va],c=arguments;b&&(c=za(me[b]||[],c),c[Va]=b,mf(c),this.model.set(c,void 0,!0),this.filters.D(this.model),this.model.data.m={})}};pc.prototype.ma=function(a,b){var c=this;u(a,c,b)||(v(a,function(){u(a,c,b)}),y(String(c.get(V)),a,void 0,b,!0))};
var td=function(a,b){var c=P(a,U);a.data.set(la,"_ga"==c?"_gid":c+"_gid");if("cookie"==P(a,ac)){hc=!1;c=Ca(P(a,U));c=Xd(a,c);if(!c){c=P(a,W);var d=P(a,$b)||xa();c=Xc("__utma",d,c);void 0!=c?(J(10),c=c.O[1]+"."+c.O[2]):c=void 0}c&&(hc=!0);if(d=c&&!a.get(Hd))if(d=c.split("."),2!=d.length)d=!1;else if(d=Number(d[1])){var e=R(a,Zb);d=d+e<(new Date).getTime()/1E3}else d=!1;d&&(c=void 0);c&&(a.data.set(xd,c),a.data.set(Q,c),(c=uc(a))&&a.data.set(I,c));a.get(je)&&(c=a.get(ce),d=a.get(ie),!c||d&&"aw.ds"!=
d)&&(c={},d=(M?df(c):{})[P(a,Na)],le(c),d&&0!=d.length&&(c=d[0],a.data.set(fe,c.timestamp/1E3),a.data.set(ce,c.qa)));a.get(je)&&(c=a.get(Se),d={},e=(M?df(d,"_gac_gb",!0):{})[P(a,Na)],ef(d),e&&0!=e.length&&(d=e[0],e=d.qa,c&&c!==e||(d.labels&&d.labels.length&&(e+="."+d.labels.join(".")),a.data.set(Te,d.timestamp/1E3),a.data.set(Se,e))))}if(a.get(Hd)){c=be("_ga",!!a.get(cc));var g=be("_gl",!!a.get(cc));d=De.get(a.get(cc));e=d._ga;g&&0<g.indexOf("_ga*")&&!e&&J(30);if(b||!a.get(Je))g=!1;else if(g=a.get(F),
void 0===g||g("analytics_storage"))g=!1;else{J(84);a.data.set(Le,1);if(g=d._up)if(g=Jc.exec(M.referrer)){g=g[1];var ca=M.location.hostname;g=ca===g||0<=ca.indexOf("."+g)||0<=g.indexOf("."+ca)?!0:!1}else g=!1;g=g?!0:!1}ca=d.gclid;var l=d._gac;if(c||e||ca||l)if(c&&e&&J(36),a.get(bc)||ye(a.get(Kd))||g){if(e&&(J(38),a.data.set(Q,e),d._gid&&(J(51),a.data.set(I,d._gid))),ca?(J(82),a.data.set(ce,ca),d.gclsrc&&a.data.set(ie,d.gclsrc)):l&&(e=l.split("."))&&2===e.length&&(J(37),a.data.set(ce,e[0]),a.data.set(fe,
e[1])),(d=d._fplc)&&P(a,oe)&&(J(83),a.data.set(Ae,d)),c)b:if(d=c.indexOf("."),-1==d)J(22);else{e=c.substring(0,d);g=c.substring(d+1);d=g.indexOf(".");c=g.substring(0,d);g=g.substring(d+1);if("1"==e){if(d=g,ke(d,c)){J(23);break b}}else if("2"==e){d=g.indexOf("-");e="";0<d?(e=g.substring(0,d),d=g.substring(d+1)):d=g.substring(1);if(ke(e+d,c)){J(53);break b}e&&(J(2),a.data.set(I,e))}else{J(22);break b}J(11);a.data.set(Q,d);if(c=be("_gac",!!a.get(cc)))c=c.split("."),"1"!=c[0]||4!=c.length?J(72):ke(c[3],
c[1])?J(71):(a.data.set(ce,c[3]),a.data.set(fe,c[2]),J(70))}}else J(21)}b&&(J(9),a.data.set(Q,K(b)));a.get(Q)||(b=(b=O.gaGlobal)&&b.from_cookie&&"cookie"!==P(a,ac)?void 0:(b=b&&b.vid)&&-1!==b.search(jd)?b:void 0,b?(J(17),a.data.set(Q,b)):(J(8),a.data.set(Q,ra())));a.get(I)||(J(3),a.data.set(I,ra()));mc(a);b=O.gaGlobal=O.gaGlobal||{};c=P(a,Q);a=c===P(a,xd);if(void 0==b.vid||a&&!b.from_cookie)b.vid=c,b.from_cookie=a},pd=function(a){var b=O.navigator,c=O.screen,d=M.location,e=a.set;a:{var g=!!a.get(ec),
ca=!!a.get(Kd);var l=M.referrer;if(/^(https?|android-app):\/\//i.test(l)){if(g)break a;g="//"+M.location.hostname;if(!de(l,g)){if(ca&&(ca=g.replace(/\./g,"-")+".cdn.ampproject.org",de(l,ca))){l=void 0;break a}break a}}l=void 0}e.call(a,lb,l);d&&(e=d.pathname||"","/"!=e.charAt(0)&&(J(31),e="/"+e),a.set(kb,d.protocol+"//"+d.hostname+e+d.search));c&&a.set(qb,c.width+"x"+c.height);c&&a.set(pb,c.colorDepth+"-bit");c=M.documentElement;l=(e=M.body)&&e.clientWidth&&e.clientHeight;ca=[];c&&c.clientWidth&&
c.clientHeight&&("CSS1Compat"===M.compatMode||!l)?ca=[c.clientWidth,c.clientHeight]:l&&(ca=[e.clientWidth,e.clientHeight]);c=0>=ca[0]||0>=ca[1]?"":ca.join("x");a.set(rb,c);c=a.set;var k;if((e=(e=O.navigator)?e.plugins:null)&&e.length)for(l=0;l<e.length&&!k;l++)ca=e[l],-1<ca.name.indexOf("Shockwave Flash")&&(k=ca.description);if(!k)try{var w=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");k=w.GetVariable("$version")}catch(Ce){}if(!k)try{w=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),k=
"WIN 6,0,21,0",w.AllowScriptAccess="always",k=w.GetVariable("$version")}catch(Ce){}if(!k)try{w=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),k=w.GetVariable("$version")}catch(Ce){}k&&(w=k.match(/[\d]+/g))&&3<=w.length&&(k=w[0]+"."+w[1]+" r"+w[2]);c.call(a,tb,k||void 0);a.set(ob,M.characterSet||M.charset);a.set(sb,b&&"function"===typeof b.javaEnabled&&b.javaEnabled()||!1);a.set(nb,(b&&(b.language||b.browserLanguage)||"").toLowerCase());a.data.set(ce,be("gclid",!0));a.data.set(ie,be("gclsrc",!0));
a.data.set(fe,Math.round((new Date).getTime()/1E3));a.get(ce)||(a.data.set(Se,be("wbraid",!0)),a.data.set(Te,Math.round((new Date).getTime()/1E3)));if(d&&a.get(cc)&&(b=M.location.hash)){b=b.split(/[?&#]+/);d=[];for(k=0;k<b.length;++k)(D(b[k],"utm_id")||D(b[k],"utm_campaign")||D(b[k],"utm_source")||D(b[k],"utm_medium")||D(b[k],"utm_term")||D(b[k],"utm_content")||D(b[k],"gclid")||D(b[k],"dclid")||D(b[k],"gclsrc")||D(b[k],"wbraid"))&&d.push(b[k]);0<d.length&&(b="#"+d.join("&"),a.set(kb,a.get(kb)+b))}},
me={pageview:[mb],event:[ub,xb,yb,zb],social:[Bb,Cb,Db],timing:[Mb,Nb,Pb,Ob]};var rc=function(a){if("prerender"==M.visibilityState)return!1;a();return!0},z=function(a){if(!rc(a)){J(16);var b=!1,c=function(){if(!b&&rc(a)){b=!0;var d=c,e=M;e.removeEventListener?e.removeEventListener("visibilitychange",d,!1):e.detachEvent&&e.detachEvent("onvisibilitychange",d)}};L(M,"visibilitychange",c)}};var te=/^(?:(\w+)\.)?(?:(\w+):)?(\w+)$/,sc=function(a){if(ea(a[0]))this.u=a[0];else{var b=te.exec(a[0]);null!=b&&4==b.length&&(this.da=b[1]||"t0",this.K=b[2]||"",this.methodName=b[3],this.aa=[].slice.call(a,1),this.K||(this.A="create"==this.methodName,this.i="require"==this.methodName,this.g="provide"==this.methodName,this.ba="remove"==this.methodName),this.i&&(3<=this.aa.length?(this.X=this.aa[1],this.W=this.aa[2]):this.aa[1]&&(qa(this.aa[1])?this.X=this.aa[1]:this.W=this.aa[1])));b=a[1];a=a[2];
if(!this.methodName)throw"abort";if(this.i&&(!qa(b)||""==b))throw"abort";if(this.g&&(!qa(b)||""==b||!ea(a)))throw"abort";if(ud(this.da)||ud(this.K))throw"abort";if(this.g&&"t0"!=this.da)throw"abort";}};function ud(a){return 0<=a.indexOf(".")||0<=a.indexOf(":")};var Yd,Zd,$d,A;Yd=new ee;$d=new ee;A=new ee;Zd={ec:45,ecommerce:46,linkid:47};
var u=function(a,b,c){b==N||b.get(V);var d=Yd.get(a);if(!ea(d))return!1;b.plugins_=b.plugins_||new ee;if(b.plugins_.get(a))return!0;b.plugins_.set(a,new d(b,c||{}));return!0},y=function(a,b,c,d,e){if(!ea(Yd.get(b))&&!$d.get(b)){Zd.hasOwnProperty(b)&&J(Zd[b]);var g=void 0;if(p.test(b)){J(52);a=N.j(a);if(!a)return!0;c=Ke(a.model,b,d,e);g=function(){Z.D(["provide",b,function(){}]);var l=O[d&&d.dataLayer||"dataLayer"];l&&l.hide&&ea(l.hide.end)&&l.hide[b]&&(l.hide.end(),l.hide.end=void 0)}}!c&&Zd.hasOwnProperty(b)?
(J(39),c=b+".js"):J(43);if(c){var ca;d&&(ca=d[oe]);qa(ca)||(ca=void 0);a=ae(cf(c,ca));!ca||ne(a.protocol)&&B(a)||(a=ae(cf(c)));ne(a.protocol)&&B(a)&&(Id(a.url,void 0,e,void 0,g),$d.set(b,!0))}}},v=function(a,b){var c=A.get(a)||[];c.push(b);A.set(a,c)},C=function(a,b){Yd.set(a,b);b=A.get(a)||[];for(var c=0;c<b.length;c++)b[c]();A.set(a,[])},B=function(a){var b=ae(M.location.href);if(D(a.url,Ge(1))||D(a.url,Ge(2)))return!0;if(a.query||0<=a.url.indexOf("?")||0<=a.path.indexOf("://"))return!1;if(a.host==
b.host&&a.port==b.port||jf&&(b=M.createElement("a"),b.href=jf,b=kf(b),a.host===b[0]&&a.port===b[1]))return!0;b="http:"==a.protocol?80:443;return"www.google-analytics.com"==a.host&&(a.port||b)==b&&D(a.path,"/plugins/")?!0:!1},ne=function(a){var b=M.location.protocol;return"https:"==a||a==b?!0:"http:"!=a?!1:"http:"==b},kf=function(a){var b=a.hostname||"",c=0<=b.indexOf("]");b=b.split(c?"]":":")[0].toLowerCase();c&&(b+="]");c=(a.protocol||"").toLowerCase();c=1*a.port||("http:"==c?80:"https:"==c?443:
"");a=a.pathname||"";D(a,"/")||(a="/"+a);return[b,""+c,a]},ae=function(a){var b=M.createElement("a");b.href=M.location.href;var c=(b.protocol||"").toLowerCase(),d=kf(b),e=b.search||"",g=c+"//"+d[0]+(d[1]?":"+d[1]:"");D(a,"//")?a=c+a:D(a,"/")?a=g+a:!a||D(a,"?")?a=g+d[2]+(a||e):0>a.split("/")[0].indexOf(":")&&(a=g+d[2].substring(0,d[2].lastIndexOf("/"))+"/"+a);b.href=a;c=kf(b);return{protocol:(b.protocol||"").toLowerCase(),host:c[0],port:c[1],path:c[2],query:b.search||"",url:a||""}},cf=function(a,b){return a&&
0<=a.indexOf("/")?a:(b||bd(!1))+"/plugins/ua/"+a};var Z={ga:function(){Z.fa=[]}};Z.ga();Z.D=function(a){var b=Z.J.apply(Z,arguments);b=Z.fa.concat(b);for(Z.fa=[];0<b.length&&!Z.v(b[0])&&!(b.shift(),0<Z.fa.length););Z.fa=Z.fa.concat(b)};Z.ra=function(a){N.q&&(300===N.q.length&&(N.q.shift(),N.qd++),N.q.push(a))};Z.J=function(a){for(var b=[],c=0;c<arguments.length;c++)try{var d=new sc(arguments[c]);d.g?C(d.aa[0],d.aa[1]):(d.i&&(d.ha=y(d.da,d.aa[0],d.X,d.W)),b.push(d));Z.ra(arguments[c])}catch(e){}return b};
Z.v=function(a){try{if(a.u)a.u.call(O,N.j("t0"));else{var b=a.da==gb?N:N.j(a.da);if(a.A){if("t0"==a.da&&(b=N.create.apply(N,a.aa),null===b))return!0}else if(a.ba)N.remove(a.da);else if(b)if(a.i){if(a.ha&&(a.ha=y(a.da,a.aa[0],a.X,a.W)),!u(a.aa[0],b,a.W))return!0}else if(a.K){var c=a.methodName,d=a.aa,e=b.plugins_.get(a.K);e[c].apply(e,d)}else b[a.methodName].apply(b,a.aa)}}catch(g){}};var N=function(a){J(1);Z.D.apply(Z,[arguments])};N.h={};N.P=[];N.L=0;N.ya=0;N.answer=42;var we=[Na,W,V];N.create=function(a){var b=za(we,[].slice.call(arguments));b[V]||(b[V]="t0");var c=""+b[V];if(N.h[c])return N.h[c];if(da(b))return null;b=new pc(b);N.h[c]=b;N.P.push(b);c=qc().tracker_created;if(ea(c))try{c(b)}catch(d){}return b};N.remove=function(a){for(var b=0;b<N.P.length;b++)if(N.P[b].get(V)==a){N.P.splice(b,1);N.h[a]=null;break}};N.j=function(a){return N.h[a]};N.getAll=function(){return N.P.slice(0)};
N.N=function(){"ga"!=gb&&J(49);var a=O[gb];if(!a||42!=a.answer){N.L=a&&a.l;N.ya=1*new Date;N.loaded=!0;var b=a&&a.q,c=ka(b);a=[];c?a=b.slice(0):J(50);N.q=c?b:[];N.q.splice(0);N.qd=0;b=O[gb]=N;X("create",b,b.create);X("remove",b,b.remove);X("getByName",b,b.j,5);X("getAll",b,b.getAll,6);b=pc.prototype;X("get",b,b.get,7);X("set",b,b.set,4);X("send",b,b.send);X("requireSync",b,b.ma);b=Ya.prototype;X("get",b,b.get);X("set",b,b.set);if("https:"!=M.location.protocol&&!Ba){a:{b=M.getElementsByTagName("script");
for(c=0;c<b.length&&100>c;c++){var d=b[c].src;if(d&&0==d.indexOf(bd(!0)+"/analytics")){b=!0;break a}}b=!1}b&&(Ba=!0)}(O.gaplugins=O.gaplugins||{}).Linker=Dc;b=Dc.prototype;C("linker",Dc);X("decorate",b,b.ca,20);X("autoLink",b,b.S,25);X("passthrough",b,b.$,25);C("displayfeatures",fd);C("adfeatures",fd);Z.D.apply(N,a)}};var nf=N.N,of=O[gb];of&&of.r?nf():z(nf);z(function(){Z.D(["provide","render",ua])});})(window);

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

@ -0,0 +1,283 @@
// Copyright 2012 Google Inc. All rights reserved.
(function(){
var data = {
"resource": {
"version":"1",
"macros":[{"function":"__e"},{"function":"__cid"}],
"tags":[{"function":"__rep","once_per_event":true,"vtp_containerId":["macro",1],"tag_id":1}],
"predicates":[{"function":"_eq","arg0":["macro",0],"arg1":"gtm.js"}],
"rules":[[["if",0],["add",0]]]
},
"runtime":[]
};
/*
Copyright The Closure Library Authors.
SPDX-License-Identifier: Apache-2.0
*/
var ba,ca=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}},da="function"==typeof Object.create?Object.create:function(a){var b=function(){};b.prototype=a;return new b},ea;if("function"==typeof Object.setPrototypeOf)ea=Object.setPrototypeOf;else{var fa;a:{var ha={a:!0},ia={};try{ia.__proto__=ha;fa=ia.a;break a}catch(a){}fa=!1}ea=fa?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}
var ja=ea,ka=function(a,b){a.prototype=da(b.prototype);a.prototype.constructor=a;if(ja)ja(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Gk=b.prototype},la=this||self,ma=function(a){return a};var na=function(){},oa=function(a){return"function"===typeof a},h=function(a){return"string"===typeof a},pa=function(a){return"number"===typeof a&&!isNaN(a)},qa=Array.isArray,ra=function(a,b){if(a&&qa(a))for(var c=0;c<a.length;c++)if(a[c]&&b(a[c]))return a[c]},sa=function(a,b){if(!pa(a)||!pa(b)||a>b)a=0,b=2147483647;return Math.floor(Math.random()*(b-a+1)+a)},ua=function(a,b){for(var c=new ta,d=0;d<a.length;d++)c.set(a[d],!0);for(var e=0;e<b.length;e++)if(c.get(b[e]))return!0;return!1},k=function(a,
b){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b(c,a[c])},xa=function(a){return!!a&&("[object Arguments]"===Object.prototype.toString.call(a)||Object.prototype.hasOwnProperty.call(a,"callee"))},za=function(a){return Math.round(Number(a))||0},Aa=function(a){return"false"===String(a).toLowerCase()?!1:!!a},Ba=function(a){var b=[];if(qa(a))for(var c=0;c<a.length;c++)b.push(String(a[c]));return b},Ca=function(a){return a?a.replace(/^\s+|\s+$/g,""):""},Da=function(){return new Date(Date.now())},
z=function(){return Da().getTime()},ta=function(){this.prefix="gtm.";this.values={}};ta.prototype.set=function(a,b){this.values[this.prefix+a]=b};ta.prototype.get=function(a){return this.values[this.prefix+a]};
var Ea=function(a,b,c){return a&&a.hasOwnProperty(b)?a[b]:c},Fa=function(a){var b=a;return function(){if(b){var c=b;b=void 0;try{c()}catch(d){}}}},Ga=function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])},Ha=function(a){for(var b in a)if(a.hasOwnProperty(b))return!0;return!1},Ia=function(a,b){for(var c=[],d=0;d<a.length;d++)c.push(a[d]),c.push.apply(c,b[a[d]]||[]);return c},Ja=function(a,b){for(var c={},d=c,e=a.split("."),f=0;f<e.length-1;f++)d=d[e[f]]={};d[e[e.length-1]]=b;return c},Ka=/^\w{1,9}$/,
La=function(a,b){a=a||{};b=b||",";var c=[];k(a,function(d,e){Ka.test(d)&&e&&c.push(d)});return c.join(b)},Ma=function(a,b){function c(){++d===b&&(e(),e=null,c.done=!0)}var d=0,e=a;c.done=!1;return c};function Pa(){for(var a=Qa,b={},c=0;c<a.length;++c)b[a[c]]=c;return b}function Ra(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZ";a+=a.toLowerCase()+"0123456789-_";return a+"."}var Qa,Sa;function Ta(a){Qa=Qa||Ra();Sa=Sa||Pa();for(var b=[],c=0;c<a.length;c+=3){var d=c+1<a.length,e=c+2<a.length,f=a.charCodeAt(c),g=d?a.charCodeAt(c+1):0,l=e?a.charCodeAt(c+2):0,m=f>>2,n=(f&3)<<4|g>>4,p=(g&15)<<2|l>>6,q=l&63;e||(q=64,d||(p=64));b.push(Qa[m],Qa[n],Qa[p],Qa[q])}return b.join("")}
function Ua(a){function b(m){for(;d<a.length;){var n=a.charAt(d++),p=Sa[n];if(null!=p)return p;if(!/^[\s\xa0]*$/.test(n))throw Error("Unknown base64 encoding at char: "+n);}return m}Qa=Qa||Ra();Sa=Sa||Pa();for(var c="",d=0;;){var e=b(-1),f=b(0),g=b(64),l=b(64);if(64===l&&-1===e)return c;c+=String.fromCharCode(e<<2|f>>4);64!=g&&(c+=String.fromCharCode(f<<4&240|g>>2),64!=l&&(c+=String.fromCharCode(g<<6&192|l)))}};var Va={},Wa=function(a,b){Va[a]=Va[a]||[];Va[a][b]=!0},Xa=function(){delete Va.GA4_EVENT},Ya=function(a){var b=Va[a];if(!b||0===b.length)return"";for(var c=[],d=0,e=0;e<b.length;e++)0===e%8&&0<e&&(c.push(String.fromCharCode(d)),d=0),b[e]&&(d|=1<<e%8);0<d&&c.push(String.fromCharCode(d));return Ta(c.join("")).replace(/\.+$/,"")};var Za=Array.prototype.indexOf?function(a,b){return Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if("string"===typeof a)return"string"!==typeof b||1!=b.length?-1:a.indexOf(b,0);for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1};var $a,ab=function(){if(void 0===$a){var a=null,b=la.trustedTypes;if(b&&b.createPolicy){try{a=b.createPolicy("goog#html",{createHTML:ma,createScript:ma,createScriptURL:ma})}catch(c){la.console&&la.console.error(c.message)}$a=a}else $a=a}return $a};var cb=function(a,b){this.h=b===bb?a:""};cb.prototype.toString=function(){return this.h+""};var bb={};var db=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function eb(){var a=la.navigator;if(a){var b=a.userAgent;if(b)return b}return""}function fb(a){return-1!=eb().indexOf(a)};function gb(){return fb("Firefox")||fb("FxiOS")}function hb(){return(fb("Chrome")||fb("CriOS"))&&!fb("Edge")||fb("Silk")};var ib={},jb=function(a,b){this.h=b===ib?a:""};jb.prototype.toString=function(){return this.h.toString()};var kb=function(a){return a instanceof jb&&a.constructor===jb?a.h:"type_error:SafeHtml"},lb=function(a){var b=a,c=ab(),d=c?c.createHTML(b):b;return new jb(d,ib)};/*
SPDX-License-Identifier: Apache-2.0
*/
function mb(a){if("script"===a.tagName.toLowerCase())throw Error("Use setTextContent with a SafeScript.");if("style"===a.tagName.toLowerCase())throw Error("Use setTextContent with a SafeStyleSheet.");};var E=window,F=document,nb=navigator,ob=F.currentScript&&F.currentScript.src,pb=function(a,b){var c=E[a];E[a]=void 0===c?b:c;return E[a]},qb=function(a,b){b&&(a.addEventListener?a.onload=b:a.onreadystatechange=function(){a.readyState in{loaded:1,complete:1}&&(a.onreadystatechange=null,b())})},rb={async:1,nonce:1,onerror:1,onload:1,src:1,type:1},sb={onload:1,src:1,width:1,height:1,style:1};function tb(a,b,c){b&&k(b,function(d,e){d=d.toLowerCase();c.hasOwnProperty(d)||a.setAttribute(d,e)})}
var ub=function(a,b,c,d,e){var f=F.createElement("script");tb(f,d,rb);f.type="text/javascript";f.async=!0;var g,l=a,m=ab(),n=m?m.createScriptURL(l):l;g=new cb(n,bb);f.src=g instanceof cb&&g.constructor===cb?g.h:"type_error:TrustedResourceUrl";var p,q,r,t=null==(r=(q=(f.ownerDocument&&f.ownerDocument.defaultView||window).document).querySelector)?void 0:r.call(q,"script[nonce]");(p=t?t.nonce||t.getAttribute("nonce")||"":"")&&f.setAttribute("nonce",p);qb(f,b);c&&(f.onerror=c);if(e)e.appendChild(f);else{var u=
F.getElementsByTagName("script")[0]||F.body||F.head;u.parentNode.insertBefore(f,u)}return f},vb=function(){if(ob){var a=ob.toLowerCase();if(0===a.indexOf("https://"))return 2;if(0===a.indexOf("http://"))return 3}return 1},wb=function(a,b,c,d,e){var f;f=void 0===f?!0:f;var g=e,l=!1;g||(g=F.createElement("iframe"),l=!0);tb(g,c,sb);d&&k(d,function(n,p){g.dataset[n]=p});f&&(g.height="0",g.width="0",g.style.display="none",g.style.visibility="hidden");if(l){var m=F.body&&F.body.lastChild||F.body||F.head;
m.parentNode.insertBefore(g,m)}qb(g,b);void 0!==a&&(g.src=a);return g},xb=function(a,b,c){var d=new Image(1,1);d.onload=function(){d.onload=null;b&&b()};d.onerror=function(){d.onerror=null;c&&c()};d.src=a},yb=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,!!d):a.attachEvent&&a.attachEvent("on"+b,c)},zb=function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent&&a.detachEvent("on"+b,c)},G=function(a){E.setTimeout(a,0)},Ab=function(a,b){return a&&b&&a.attributes&&
a.attributes[b]?a.attributes[b].value:null},Bb=function(a){var b=a.innerText||a.textContent||"";b&&" "!=b&&(b=b.replace(/^[\s\xa0]+|[\s\xa0]+$/g,""));b&&(b=b.replace(/(\xa0+|\s{2,}|\n|\r\t)/g," "));return b},Cb=function(a){var b=F.createElement("div"),c=b,d=lb("A<div>"+a+"</div>");void 0!==c.tagName&&mb(c);c.innerHTML=kb(d);b=b.lastChild;for(var e=[];b.firstChild;)e.push(b.removeChild(b.firstChild));return e},Db=function(a,b,c){c=c||100;for(var d={},e=0;e<b.length;e++)d[b[e]]=!0;for(var f=a,g=0;f&&
g<=c;g++){if(d[String(f.tagName).toLowerCase()])return f;f=f.parentElement}return null},Eb=function(a){var b;try{b=nb.sendBeacon&&nb.sendBeacon(a)}catch(c){Wa("TAGGING",15)}b||xb(a)},Fb=function(a,b){var c=a[b];c&&"string"===typeof c.animVal&&(c=c.animVal);return c},Gb=function(){var a=E.performance;if(a&&oa(a.now))return a.now()};/*
jQuery (c) 2005, 2012 jQuery Foundation, Inc. jquery.org/license. */
var Hb=/\[object (Boolean|Number|String|Function|Array|Date|RegExp)\]/,Ib=function(a){if(null==a)return String(a);var b=Hb.exec(Object.prototype.toString.call(Object(a)));return b?b[1].toLowerCase():"object"},Jb=function(a,b){return Object.prototype.hasOwnProperty.call(Object(a),b)},Kb=function(a){if(!a||"object"!=Ib(a)||a.nodeType||a==a.window)return!1;try{if(a.constructor&&!Jb(a,"constructor")&&!Jb(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}for(var b in a);return void 0===
b||Jb(a,b)},J=function(a,b){var c=b||("array"==Ib(a)?[]:{}),d;for(d in a)if(Jb(a,d)){var e=a[d];"array"==Ib(e)?("array"!=Ib(c[d])&&(c[d]=[]),c[d]=J(e,c[d])):Kb(e)?(Kb(c[d])||(c[d]={}),c[d]=J(e,c[d])):c[d]=e}return c};var Lb=function(a){if(void 0===a||qa(a)||Kb(a))return!0;switch(typeof a){case "boolean":case "number":case "string":case "function":return!0}return!1};var Mb=function(){var a=function(b){return{toString:function(){return b}}};return{Ph:a("consent"),Nf:a("convert_case_to"),Of:a("convert_false_to"),Pf:a("convert_null_to"),Qf:a("convert_true_to"),Rf:a("convert_undefined_to"),tk:a("debug_mode_metadata"),Ra:a("function"),Ve:a("instance_name"),Fi:a("live_only"),Gi:a("malware_disabled"),Hi:a("metadata"),Ki:a("original_activity_id"),xk:a("original_vendor_template_id"),wk:a("once_on_load"),Ji:a("once_per_event"),Ug:a("once_per_load"),yk:a("priority_override"),
zk:a("respected_consent_types"),Yg:a("setup_tags"),Rc:a("tag_id"),Zg:a("teardown_tags")}}();var ic;
var jc=[],kc=[],lc=[],mc=[],nc=[],oc={},pc,qc,sc=function(){var a=rc;qc=qc||a},tc,uc=function(a,b){var c=a["function"],d=b&&b.event;if(!c)throw Error("Error: No function name given for function call.");var e=oc[c],f={},g;for(g in a)a.hasOwnProperty(g)&&0===g.indexOf("vtp_")&&(e&&d&&d.fh&&d.fh(a[g]),f[void 0!==e?g:g.substr(4)]=a[g]);e&&d&&d.eh&&(f.vtp_gtmCachedValues=d.eh);if(b){if(null==b.name){var l;a:{var m=b.index;if(null==m)l="";else{var n;switch(b.type){case 2:n=jc[m];break;case 1:n=mc[m];break;
default:l="";break a}var p=n&&n[Mb.Ve];l=p?String(p):""}}b.name=l}e&&(f.vtp_gtmEntityIndex=b.index,f.vtp_gtmEntityName=b.name)}return void 0!==e?e(f):ic(c,f,b)},wc=function(a,b,c){c=c||[];var d={},e;for(e in a)a.hasOwnProperty(e)&&(d[e]=vc(a[e],b,c));return d},vc=function(a,b,c){if(qa(a)){var d;switch(a[0]){case "function_id":return a[1];case "list":d=[];for(var e=1;e<a.length;e++)d.push(vc(a[e],b,c));return d;case "macro":var f=a[1];if(c[f])return;var g=jc[f];if(!g||b.qf(g))return;c[f]=!0;var l=
String(g[Mb.Ve]);try{var m=wc(g,b,c);m.vtp_gtmEventId=b.id;b.priorityId&&(m.vtp_gtmPriorityId=b.priorityId);d=uc(m,{event:b,index:f,type:2,name:l});tc&&(d=tc.Zi(d,m))}catch(x){b.rh&&b.rh(x,Number(f),l),d=!1}c[f]=!1;return d;case "map":d={};for(var n=1;n<a.length;n+=2)d[vc(a[n],b,c)]=vc(a[n+1],b,c);return d;case "template":d=[];for(var p=!1,q=1;q<a.length;q++){var r=vc(a[q],b,c);qc&&(p=p||r===qc.Sd);d.push(r)}return qc&&p?qc.aj(d):d.join("");case "escape":d=vc(a[1],b,c);if(qc&&qa(a[1])&&"macro"===
a[1][0]&&qc.zj(a))return qc.Rj(d);d=String(d);for(var t=2;t<a.length;t++)Nb[a[t]]&&(d=Nb[a[t]](d));return d;case "tag":var u=a[1];if(!mc[u])throw Error("Unable to resolve tag reference "+u+".");return d={kh:a[2],index:u};case "zb":var v={arg0:a[2],arg1:a[3],ignore_case:a[5]};v["function"]=a[1];var w=xc(v,b,c),y=!!a[4];return y||2!==w?y!==(1===w):null;default:throw Error("Attempting to expand unknown Value type: "+a[0]+".");}}return a},xc=function(a,b,c){try{return pc(wc(a,b,c))}catch(d){JSON.stringify(a)}return 2};var Ac=function(a){function b(r){for(var t=0;t<r.length;t++)d[r[t]]=!0}for(var c=[],d=[],e=yc(a),f=0;f<kc.length;f++){var g=kc[f],l=zc(g,e);if(l){for(var m=g.add||[],n=0;n<m.length;n++)c[m[n]]=!0;b(g.block||[])}else null===l&&b(g.block||[]);}for(var p=[],q=0;q<mc.length;q++)c[q]&&!d[q]&&(p[q]=!0);return p},zc=function(a,b){for(var c=a["if"]||[],d=0;d<c.length;d++){var e=b(c[d]);if(0===e)return!1;if(2===e)return null}for(var f=
a.unless||[],g=0;g<f.length;g++){var l=b(f[g]);if(2===l)return null;if(1===l)return!1}return!0},yc=function(a){var b=[];return function(c){void 0===b[c]&&(b[c]=xc(lc[c],a));return b[c]}};var Bc={Zi:function(a,b){b[Mb.Nf]&&"string"===typeof a&&(a=1==b[Mb.Nf]?a.toLowerCase():a.toUpperCase());b.hasOwnProperty(Mb.Pf)&&null===a&&(a=b[Mb.Pf]);b.hasOwnProperty(Mb.Rf)&&void 0===a&&(a=b[Mb.Rf]);b.hasOwnProperty(Mb.Qf)&&!0===a&&(a=b[Mb.Qf]);b.hasOwnProperty(Mb.Of)&&!1===a&&(a=b[Mb.Of]);return a}};var Yc=/^[1-9a-zA-Z_-][1-9a-c][1-9a-v]\d$/;function Zc(a,b){return"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"[a<<2|b]};var ad=function(a){return $c?F.querySelectorAll(a):null},ed=function(a,b){if(!$c)return null;if(Element.prototype.closest)try{return a.closest(b)}catch(e){return null}var c=Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector,d=a;if(!F.documentElement.contains(d))return null;do{try{if(c.call(d,b))return d}catch(e){break}d=d.parentElement||d.parentNode}while(null!==d&&1===d.nodeType);
return null},fd=!1;if(F.querySelectorAll)try{var gd=F.querySelectorAll(":root");gd&&1==gd.length&&gd[0]==F.documentElement&&(fd=!0)}catch(a){}var $c=fd;var O=function(a){Wa("GTM",a)};var Ed=[];Ed[7]=!0;Ed[9]=!0;Ed[27]=!0;
Ed[6]=!0;Ed[12]=!0;Ed[11]=!0;
Ed[13]=!0;Ed[15]=!0;Ed[23]=!0;Ed[29]=!0;
Ed[35]=!0;Ed[36]=!0;Ed[38]=!0;Ed[43]=!0;
Ed[44]=!0;
a:{for(var Fd,Gd,Hd=0;Fd===Gd;)if(Fd=Math.floor(2*Math.random()),Gd=Math.floor(2*Math.random()),Hd++,20<Hd)break a;Fd?Ed[46]=!0:Ed[47]=!0;}
Ed[54]=!0;
Ed[57]=!0;Ed[60]=!0;
var P=function(a){return!!Ed[a]};var R={g:{F:"ad_storage",R:"analytics_storage",Kf:"region",Lf:"consent_updated",Mf:"wait_for_update",Th:"app_remove",Uh:"app_store_refund",Vh:"app_store_subscription_cancel",Wh:"app_store_subscription_convert",Xh:"app_store_subscription_renew",Sf:"add_payment_info",Tf:"add_shipping_info",mc:"add_to_cart",nc:"remove_from_cart",Uf:"view_cart",Ib:"begin_checkout",oc:"select_item",sb:"view_item_list",Jb:"select_promotion",tb:"view_promotion",Ba:"purchase",qc:"refund",Ha:"view_item",Vf:"add_to_wishlist",
Yh:"first_open",Zh:"first_visit",va:"gtag.config",Ca:"gtag.get",ai:"in_app_purchase",sc:"page_view",bi:"session_start",xe:"user_engagement",Kb:"gclid",ia:"ads_data_redaction",X:"allow_ad_personalization_signals",ye:"allow_custom_scripts",ci:"allow_display_features",uc:"allow_enhanced_conversions",Lb:"allow_google_signals",wa:"allow_interest_groups",wd:"auid",di:"auto_detection_enabled",Wa:"aw_remarketing",xd:"aw_remarketing_only",vc:"discount",wc:"aw_feed_country",xc:"aw_feed_language",Z:"items",
yc:"aw_merchant_id",Wf:"aw_basket_type",yd:"campaign_content",zd:"campaign_id",Ad:"campaign_medium",Bd:"campaign_name",zc:"campaign",Cd:"campaign_source",Dd:"campaign_term",kb:"client_id",ei:"content_group",fi:"content_type",Da:"conversion_cookie_prefix",Ac:"conversion_id",Xa:"conversion_label",qa:"conversion_linker",ze:"conversion_api",Ya:"cookie_domain",Ia:"cookie_expires",Za:"cookie_flags",Bc:"cookie_name",Ae:"cookie_path",Pa:"cookie_prefix",ub:"cookie_update",Mb:"country",ma:"currency",Cc:"customer_lifetime_value",
Dc:"custom_map",gi:"debug_mode",aa:"developer_id",Xf:"disable_merchant_reported_purchases",hi:"dc_custom_params",ii:"dc_natural_search",Be:"dynamic_event_settings",ji:"affiliation",Yf:"checkout_option",Zf:"checkout_step",ki:"coupon",ag:"item_list_name",cg:"list_name",li:"promotions",Ec:"shipping",dg:"tax",Ed:"engagement_time_msec",Fc:"enhanced_client_id",Gc:"enhanced_conversions",eg:"enhanced_conversions_automatic_settings",Hc:"estimated_delivery_date",Ce:"euid_logged_in_state",Nb:"event_callback",
Ob:"event_developer_id_string",fg:"event",Fd:"event_settings",Gd:"event_timeout",mi:"experiments",De:"firebase_id",Hd:"first_party_collection",Id:"_x_20",vb:"_x_19",gg:"fledge",hg:"flight_error_code",ig:"flight_error_message",jg:"gac_gclid",Jd:"gac_wbraid",kg:"gac_wbraid_multiple_conversions",Ic:"ga_restrict_domain",Ee:"ga_temp_client_id",lg:"gdpr_applies",mg:"geo_granularity",ab:"value_callback",Qa:"value_key",Pb:"global_developer_id_string",uk:"google_ono",lb:"google_signals",Kd:"google_tld",Ld:"groups",
ng:"gsa_experiment_id",og:"iframe_state",Md:"ignore_referrer",Fe:"internal_traffic_results",Nd:"is_legacy_loaded",pg:"is_passthrough",Ja:"language",Ge:"legacy_developer_id_string",ra:"linker",Qb:"accept_incoming",Rb:"decorate_forms",T:"domains",Jc:"url_position",qg:"method",Sb:"new_customer",rg:"non_interaction",ni:"optimize_id",Ka:"page_location",He:"page_path",La:"page_referrer",Tb:"page_title",sg:"passengers",ug:"phone_conversion_callback",oi:"phone_conversion_country_code",vg:"phone_conversion_css_class",
ri:"phone_conversion_ids",wg:"phone_conversion_number",xg:"phone_conversion_options",yg:"quantity",Kc:"redact_device_info",Ie:"redact_enhanced_user_id",si:"redact_ga_client_id",ui:"redact_user_id",Od:"referral_exclusion_definition",nb:"restricted_data_processing",vi:"retoken",zg:"screen_name",wb:"screen_resolution",wi:"search_term",xa:"send_page_view",xb:"send_to",Lc:"session_duration",Pd:"session_engaged",Je:"session_engaged_time",ob:"session_id",Qd:"session_number",Ub:"delivery_postal_code",Ag:"tc_privacy_string",
Bg:"temporary_client_id",xi:"tracking_id",Ke:"traffic_type",Ea:"transaction_id",na:"transport_url",Cg:"trip_type",Mc:"update",cb:"url_passthrough",Le:"_user_agent_architecture",Me:"_user_agent_bitness",Ne:"_user_agent_full_version_list",Dg:"_user_agent_mobile",Oe:"_user_agent_model",Pe:"_user_agent_platform",Qe:"_user_agent_platform_version",Eg:"_user_agent_wait",Re:"_user_agent_wow64",ca:"user_data",Fg:"user_data_auto_latency",Gg:"user_data_auto_meta",Hg:"user_data_auto_multi",Ig:"user_data_auto_selectors",
Jg:"user_data_auto_status",Kg:"user_data_mode",Se:"user_data_settings",sa:"user_id",Ma:"user_properties",Lg:"us_privacy_string",ka:"value",Rd:"wbraid",Mg:"wbraid_multiple_conversions",Pg:"_host_name",Qg:"_in_page_command",Rg:"_is_linker_valid",Sg:"_is_passthrough_cid",Tg:"non_personalized_ads",Qc:"sst_parameters"}},Id={},Jd=(Id[R.g.X]=1,Id[R.g.uc]=1,Id[R.g.Lb]=1,Id[R.g.Z]=1,Id[R.g.Ya]=1,Id[R.g.Ia]=1,Id[R.g.Za]=1,Id[R.g.Bc]=1,Id[R.g.Ae]=1,Id[R.g.Pa]=1,Id[R.g.ub]=1,Id[R.g.Dc]=1,Id[R.g.aa]=1,Id[R.g.Be]=
1,Id[R.g.Nb]=1,Id[R.g.Fd]=1,Id[R.g.Gd]=1,Id[R.g.Hd]=1,Id[R.g.Ic]=1,Id[R.g.lb]=1,Id[R.g.Kd]=1,Id[R.g.Ld]=1,Id[R.g.Fe]=1,Id[R.g.Nd]=1,Id[R.g.ra]=1,Id[R.g.Ie]=1,Id[R.g.Od]=1,Id[R.g.nb]=1,Id[R.g.xa]=1,Id[R.g.xb]=1,Id[R.g.Lc]=1,Id[R.g.Je]=1,Id[R.g.Ub]=1,Id[R.g.na]=1,Id[R.g.Mc]=1,Id[R.g.Se]=1,Id[R.g.Ma]=1,Id);P(65)&&(Jd[R.g.Qc]=1);var Kd=Object.freeze(Jd);Object.freeze([R.g.Ka,R.g.La,R.g.Tb,R.g.Ja,R.g.zg,R.g.sa,R.g.De,R.g.ei]);
var Md={},Nd=Object.freeze((Md[R.g.Th]=1,Md[R.g.Uh]=1,Md[R.g.Vh]=1,Md[R.g.Wh]=1,Md[R.g.Xh]=1,Md[R.g.Yh]=1,Md[R.g.Zh]=1,Md[R.g.ai]=1,Md[R.g.bi]=1,Md[R.g.xe]=1,Md)),Od={},Pd=Object.freeze((Od[R.g.Sf]=1,Od[R.g.Tf]=1,Od[R.g.mc]=1,Od[R.g.nc]=1,Od[R.g.Uf]=1,Od[R.g.Ib]=1,Od[R.g.oc]=1,Od[R.g.sb]=1,Od[R.g.Jb]=1,Od[R.g.tb]=1,Od[R.g.Ba]=1,Od[R.g.qc]=1,Od[R.g.Ha]=1,Od[R.g.Vf]=1,Od)),Qd=Object.freeze([R.g.X,R.g.Lb,R.g.ub]),Rd=Object.freeze([].concat(Qd)),Sd=Object.freeze([R.g.Ia,R.g.Gd,R.g.Lc,R.g.Je,R.g.Ed]),
Td=Object.freeze([].concat(Sd)),Ud={},Vd=(Ud[R.g.F]="1",Ud[R.g.R]="2",Ud),Wd={},Xd=Object.freeze((Wd[R.g.X]=1,Wd[R.g.uc]=1,Wd[R.g.wa]=1,Wd[R.g.Wa]=1,Wd[R.g.xd]=1,Wd[R.g.vc]=1,Wd[R.g.wc]=1,Wd[R.g.xc]=1,Wd[R.g.Z]=1,Wd[R.g.yc]=1,Wd[R.g.Da]=1,Wd[R.g.qa]=1,Wd[R.g.Ya]=1,Wd[R.g.Ia]=1,Wd[R.g.Za]=1,Wd[R.g.Pa]=1,Wd[R.g.ma]=1,Wd[R.g.Cc]=1,Wd[R.g.aa]=1,Wd[R.g.Xf]=1,Wd[R.g.Gc]=1,Wd[R.g.Hc]=1,Wd[R.g.De]=1,Wd[R.g.Hd]=1,Wd[R.g.Nd]=1,Wd[R.g.Ja]=1,Wd[R.g.Sb]=1,Wd[R.g.Ka]=1,Wd[R.g.La]=1,Wd[R.g.ug]=1,Wd[R.g.vg]=1,Wd[R.g.wg]=
1,Wd[R.g.xg]=1,Wd[R.g.nb]=1,Wd[R.g.xa]=1,Wd[R.g.xb]=1,Wd[R.g.Ub]=1,Wd[R.g.Ea]=1,Wd[R.g.na]=1,Wd[R.g.Mc]=1,Wd[R.g.cb]=1,Wd[R.g.ca]=1,Wd[R.g.sa]=1,Wd[R.g.ka]=1,Wd));Object.freeze(R.g);var Yd={},Zd=E.google_tag_manager=E.google_tag_manager||{},$d=Math.random();Yd.Pc="bu0";Yd.Ye=Number("0")||0;Yd.fa="dataLayer";Yd.Rh="ChAIgMHPnQYQ9OnH7vTFmo9NEicAijZw2yb2iL79b1v247IbcqiZ9Qzto4xW71qO/qThgovSnEtbsRAaAqL7";var ae={__cl:!0,__ecl:!0,__ehl:!0,__evl:!0,__fal:!0,__fil:!0,__fsl:!0,__hl:!0,__jel:!0,__lcl:!0,__sdl:!0,__tl:!0,__ytl:!0},be={__paused:!0,__tg:!0},ce;for(ce in ae)ae.hasOwnProperty(ce)&&(be[ce]=!0);var de=Aa(""),ee=Aa(""),fe,ge=!1;
ge=!0;fe=ge;var he,ie=!1;he=ie;var je,ke=!1;je=ke;var le,me=!1;le=me;Yd.vd="www.googletagmanager.com";
var ne=""+Yd.vd+(fe?"/gtag/js":"/gtm.js"),oe=null,pe=null,qe={},re={},se={},te=function(){var a=Zd.sequence||1;Zd.sequence=a+1;return a};Yd.Qh="";var ue="";Yd.Wd=ue;var ve=new ta,we={},xe={},Ae={name:Yd.fa,set:function(a,b){J(Ja(a,b),we);ye()},get:function(a){return ze(a,2)},reset:function(){ve=new ta;we={};ye()}},ze=function(a,b){return 2!=b?ve.get(a):Be(a)},Be=function(a){var b,c=a.split(".");b=b||[];for(var d=we,e=0;e<c.length;e++){if(null===d)return!1;if(void 0===d)break;d=d[c[e]];if(-1!==b.indexOf(d))return}return d},Ce=function(a,b){xe.hasOwnProperty(a)||(ve.set(a,b),J(Ja(a,b),we),ye())},ye=function(a){k(xe,function(b,c){ve.set(b,c);J(Ja(b),we);J(Ja(b,
c),we);a&&delete xe[b]})},De=function(a,b){var c,d=1!==(void 0===b?2:b)?Be(a):ve.get(a);"array"===Ib(d)||"object"===Ib(d)?c=J(d):c=d;return c};var Ee,Fe=!1,Ge=function(a){if(!Fe){Fe=!0;Ee=Ee||{}}return Ee[a]};var He=function(){var a=E.screen;return{width:a?a.width:0,height:a?a.height:0}},Ie=function(a){if(F.hidden)return!0;var b=a.getBoundingClientRect();if(b.top==b.bottom||b.left==b.right||!E.getComputedStyle)return!0;var c=E.getComputedStyle(a,null);if("hidden"===c.visibility)return!0;for(var d=a,e=c;d;){if("none"===e.display)return!0;var f=e.opacity,g=e.filter;if(g){var l=g.indexOf("opacity(");0<=l&&(g=g.substring(l+8,g.indexOf(")",l)),"%"==g.charAt(g.length-1)&&(g=g.substring(0,g.length-1)),f=Math.min(g,
f))}if(void 0!==f&&0>=f)return!0;(d=d.parentElement)&&(e=E.getComputedStyle(d,null))}return!1};var Te=/:[0-9]+$/,Ue=function(a,b,c){for(var d=a.split("&"),e=0;e<d.length;e++){var f=d[e].split("=");if(decodeURIComponent(f[0]).replace(/\+/g," ")===b){var g=f.slice(1).join("=");return c?g:decodeURIComponent(g).replace(/\+/g," ")}}},Xe=function(a,b,c,d,e){b&&(b=String(b).toLowerCase());if("protocol"===b||"port"===b)a.protocol=Ve(a.protocol)||Ve(E.location.protocol);"port"===b?a.port=String(Number(a.hostname?a.port:E.location.port)||("http"===a.protocol?80:"https"===a.protocol?443:"")):"host"===
b&&(a.hostname=(a.hostname||E.location.hostname).replace(Te,"").toLowerCase());return We(a,b,c,d,e)},We=function(a,b,c,d,e){var f,g=Ve(a.protocol);b&&(b=String(b).toLowerCase());switch(b){case "url_no_fragment":f=Ye(a);break;case "protocol":f=g;break;case "host":f=a.hostname.replace(Te,"").toLowerCase();if(c){var l=/^www\d*\./.exec(f);l&&l[0]&&(f=f.substr(l[0].length))}break;case "port":f=String(Number(a.port)||("http"===g?80:"https"===g?443:""));break;case "path":a.pathname||a.hostname||Wa("TAGGING",
1);f="/"===a.pathname.substr(0,1)?a.pathname:"/"+a.pathname;var m=f.split("/");0<=(d||[]).indexOf(m[m.length-1])&&(m[m.length-1]="");f=m.join("/");break;case "query":f=a.search.replace("?","");e&&(f=Ue(f,e));break;case "extension":var n=a.pathname.split(".");f=1<n.length?n[n.length-1]:"";f=f.split("/")[0];break;case "fragment":f=a.hash.replace("#","");break;default:f=a&&a.href}return f},Ve=function(a){return a?a.replace(":","").toLowerCase():""},Ye=function(a){var b="";if(a&&a.href){var c=a.href.indexOf("#");
b=0>c?a.href:a.href.substr(0,c)}return b},Ze=function(a){var b=F.createElement("a");a&&(b.href=a);var c=b.pathname;"/"!==c[0]&&(a||Wa("TAGGING",1),c="/"+c);var d=b.hostname.replace(Te,"");return{href:b.href,protocol:b.protocol,host:b.host,hostname:d,pathname:c,search:b.search,hash:b.hash,port:b.port}},$e=function(a){function b(n){var p=n.split("=")[0];return 0>d.indexOf(p)?n:p+"=0"}function c(n){return n.split("&").map(b).filter(function(p){return void 0!==p}).join("&")}var d="gclid dclid gbraid wbraid gclaw gcldc gclha gclgf gclgb _gl".split(" "),
e=Ze(a),f=a.split(/[?#]/)[0],g=e.search,l=e.hash;"?"===g[0]&&(g=g.substring(1));"#"===l[0]&&(l=l.substring(1));g=c(g);l=c(l);""!==g&&(g="?"+g);""!==l&&(l="#"+l);var m=""+f+g+l;"/"===m[m.length-1]&&(m=m.substring(0,m.length-1));return m};var af={};var Df={},Ef=function(a,b){if(E._gtmexpgrp&&E._gtmexpgrp.hasOwnProperty(a))return E._gtmexpgrp[a];void 0===Df[a]&&(Df[a]=Math.floor(Math.random()*b));return Df[a]};var Gf={ef:"US",Xj:"US-TX"};var Hf=new function(a,b){this.h=a;this.defaultValue=void 0===b?!1:b}(1933);var If=function(a){If[" "](a);return a};If[" "]=function(){};var Kf=function(){var a=Jf,b="nf";if(a.nf&&a.hasOwnProperty(b))return a.nf;var c=new a;return a.nf=c};var Jf=function(){var a={};this.h=function(){var b=Hf.h,c=Hf.defaultValue;return null!=a[b]?a[b]:c};this.m=function(){a[Hf.h]=!0}};var Lf=[];function Mf(){var a=pb("google_tag_data",{});a.ics||(a.ics={entries:{},set:Nf,update:Of,addListener:Pf,notifyListeners:Qf,active:!1,usedDefault:!1,usedUpdate:!1,accessedDefault:!1,accessedAny:!1,wasSetLate:!1});return a.ics}
function Nf(a,b,c,d,e,f){var g=Mf();g.usedDefault||!g.accessedDefault&&!g.accessedAny||(g.wasSetLate=!0);g.active=!0;g.usedDefault=!0;if(void 0!=b){var l=g.entries,m=l[a]||{},n=m.region,p=c&&h(c)?c.toUpperCase():void 0;d=d.toUpperCase();e=e.toUpperCase();if(""===d||p===e||(p===d?n!==e:!p&&!n)){var q=!!(f&&0<f&&void 0===m.update),r={region:p,initial:"granted"===b,update:m.update,quiet:q};if(""!==d||!1!==m.initial)l[a]=r;q&&E.setTimeout(function(){l[a]===r&&r.quiet&&(r.quiet=!1,Rf(a),Qf(),Wa("TAGGING",
2))},f)}}}function Of(a,b){var c=Mf();c.usedDefault||c.usedUpdate||!c.accessedAny||(c.wasSetLate=!0);c.active=!0;c.usedUpdate=!0;if(void 0!=b){var d=Sf(c,a),e=c.entries,f=e[a]=e[a]||{};f.update="granted"===b;var g=Sf(c,a);f.quiet?(f.quiet=!1,Rf(a)):g!==d&&Rf(a)}}function Pf(a,b){Lf.push({cf:a,jj:b})}function Rf(a){for(var b=0;b<Lf.length;++b){var c=Lf[b];qa(c.cf)&&-1!==c.cf.indexOf(a)&&(c.wh=!0)}}
function Qf(a,b){for(var c=0;c<Lf.length;++c){var d=Lf[c];if(d.wh){d.wh=!1;try{d.jj({consentEventId:a,consentPriorityId:b})}catch(e){}}}}function Sf(a,b){var c=a.entries[b]||{};return void 0!==c.update?c.update:c.initial}
var Tf=function(a){var b=Mf();b.accessedAny=!0;return Sf(b,a)},Uf=function(a){var b=Mf();b.accessedDefault=!0;return(b.entries[a]||{}).initial},Vf=function(a){var b=Mf();b.accessedAny=!0;return!(b.entries[a]||{}).quiet},Wf=function(){if(!Kf().h())return!1;var a=Mf();a.accessedAny=!0;return a.active},Xf=function(){var a=Mf();a.accessedDefault=!0;return a.usedDefault},Yf=function(a,b){Mf().addListener(a,b)},Zf=function(a,b){Mf().notifyListeners(a,b)},$f=function(a,b){function c(){for(var e=0;e<b.length;e++)if(!Vf(b[e]))return!0;
return!1}if(c()){var d=!1;Yf(b,function(e){d||c()||(d=!0,a(e))})}else a({})},ag=function(a,b){function c(){for(var f=[],g=0;g<d.length;g++){var l=d[g];!1===Tf(l)||e[l]||(f.push(l),e[l]=!0)}return f}var d=h(b)?[b]:b,e={};c().length!==d.length&&Yf(d,function(f){var g=c();0<g.length&&(f.cf=g,a(f))})};function bg(){}function cg(){};function dg(a){for(var b=[],c=0;c<eg.length;c++){var d=a(eg[c]);b[c]=!0===d?"1":!1===d?"0":"-"}return b.join("")}
var eg=[R.g.F,R.g.R],fg=function(a){var b=a[R.g.Kf];b&&O(40);var c=a[R.g.Mf];c&&O(41);for(var d=qa(b)?b:[b],e={ic:0};e.ic<d.length;e={ic:e.ic},++e.ic)k(a,function(f){return function(g,l){if(g!==R.g.Kf&&g!==R.g.Mf){var m=d[f.ic],n=Gf.ef,p=Gf.Xj;Mf().set(g,l,m,n,p,c)}}}(e))},gg=function(a,b){k(a,function(c,d){Mf().update(c,d)});Zf(b.eventId,b.priorityId)},hg=function(a){var b=Tf(a);return void 0!=b?b:!0},ig=function(){return"G1"+dg(Tf)},jg=function(a,b){ag(a,b)},kg=function(a,b){$f(a,b)};var lg=function(a){var b=1,c,d,e;if(a)for(b=0,d=a.length-1;0<=d;d--)e=a.charCodeAt(d),b=(b<<6&268435455)+e+(e<<14),c=b&266338304,b=0!==c?b^c>>21:b;return b};var mg=function(a,b,c){for(var d=[],e=b.split(";"),f=0;f<e.length;f++){var g=e[f].split("="),l=g[0].replace(/^\s*|\s*$/g,"");if(l&&l==a){var m=g.slice(1).join("=").replace(/^\s*|\s*$/g,"");m&&c&&(m=decodeURIComponent(m));d.push(m)}}return d};var ng=function(a,b){var c=function(){};c.prototype=a.prototype;var d=new c;a.apply(d,Array.prototype.slice.call(arguments,1));return d},og=function(a){var b=a;return function(){if(b){var c=b;b=null;c()}}};function pg(a){return"null"!==a.origin};var sg=function(a,b,c,d){return qg(d)?mg(a,String(b||rg()),c):[]},Cg=function(a,b,c,d,e){if(qg(e)){var f=tg(a,d,e);if(1===f.length)return f[0].id;if(0!==f.length){f=ug(f,function(g){return g.ce},b);if(1===f.length)return f[0].id;f=ug(f,function(g){return g.gd},c);return f[0]?f[0].id:void 0}}};function Dg(a,b,c,d){var e=rg(),f=window;pg(f)&&(f.document.cookie=a);var g=rg();return e!=g||void 0!=c&&0<=sg(b,g,!1,d).indexOf(c)}
var Hg=function(a,b,c){function d(t,u,v){if(null==v)return delete g[u],t;g[u]=v;return t+"; "+u+"="+v}function e(t,u){if(null==u)return delete g[u],t;g[u]=!0;return t+"; "+u}if(!qg(c.rb))return 2;var f;void 0==b?f=a+"=deleted; expires="+(new Date(0)).toUTCString():(c.encode&&(b=encodeURIComponent(b)),b=Eg(b),f=a+"="+b);var g={};f=d(f,"path",c.path);var l;c.expires instanceof Date?l=c.expires.toUTCString():null!=c.expires&&(l=""+c.expires);f=d(f,"expires",l);f=d(f,"max-age",c.Dk);f=d(f,"samesite",
c.Ek);c.Fk&&(f=e(f,"secure"));var m=c.domain;if(m&&"auto"===m.toLowerCase()){for(var n=Fg(),p=0;p<n.length;++p){var q="none"!==n[p]?n[p]:void 0,r=d(f,"domain",q);r=e(r,c.flags);if(!Gg(q,c.path)&&Dg(r,a,b,c.rb))return 0}return 1}m&&"none"!==m.toLowerCase()&&(f=d(f,"domain",m));f=e(f,c.flags);return Gg(m,c.path)?1:Dg(f,a,b,c.rb)?0:1},Ig=function(a,b,c){null==c.path&&(c.path="/");c.domain||(c.domain="auto");return Hg(a,b,c)};
function ug(a,b,c){for(var d=[],e=[],f,g=0;g<a.length;g++){var l=a[g],m=b(l);m===c?d.push(l):void 0===f||m<f?(e=[l],f=m):m===f&&e.push(l)}return 0<d.length?d:e}function tg(a,b,c){for(var d=[],e=sg(a,void 0,void 0,c),f=0;f<e.length;f++){var g=e[f].split("."),l=g.shift();if(!b||-1!==b.indexOf(l)){var m=g.shift();m&&(m=m.split("-"),d.push({id:g.join("."),ce:1*m[0]||1,gd:1*m[1]||1}))}}return d}
var Eg=function(a){a&&1200<a.length&&(a=a.substring(0,1200));return a},Jg=/^(www\.)?google(\.com?)?(\.[a-z]{2})?$/,Kg=/(^|\.)doubleclick\.net$/i,Gg=function(a,b){return Kg.test(window.document.location.hostname)||"/"===b&&Jg.test(a)},rg=function(){return pg(window)?window.document.cookie:""},Fg=function(){var a=[],b=window.document.location.hostname.split(".");if(4===b.length){var c=b[b.length-1];if(parseInt(c,10).toString()===c)return["none"]}for(var d=b.length-2;0<=d;d--)a.push(b.slice(d).join("."));
var e=window.document.location.hostname;Kg.test(e)||Jg.test(e)||a.push("none");return a},qg=function(a){if(!Kf().h()||!a||!Wf())return!0;if(!Vf(a))return!1;var b=Tf(a);return null==b?!0:!!b};var Lg=function(a){var b=Math.round(2147483647*Math.random());return a?String(b^lg(a)&2147483647):String(b)},Mg=function(a){return[Lg(a),Math.round(z()/1E3)].join(".")},Pg=function(a,b,c,d,e){var f=Ng(b);return Cg(a,f,Og(c),d,e)},Qg=function(a,b,c,d){var e=""+Ng(c),f=Og(d);1<f&&(e+="-"+f);return[b,e,a].join(".")},Ng=function(a){if(!a)return 1;a=0===a.indexOf(".")?a.substr(1):a;return a.split(".").length},Og=function(a){if(!a||"/"===a)return 1;"/"!==a[0]&&(a="/"+a);"/"!==a[a.length-1]&&(a+="/");return a.split("/").length-
1};var Rg=function(){Zd.dedupe_gclid||(Zd.dedupe_gclid=""+Mg());return Zd.dedupe_gclid};var Sg=function(){var a=!1;return a};var Tg={M:"UA-37898375-14",Hb:""},Ug={th:"UA-37898375-14",uh:"UA-37898375-14"};Tg.We=Aa("");
var Vg=function(){return Ug.th?Ug.th.split("|"):[Tg.M]},Wg=function(){return Ug.uh?Ug.uh.split("|"):[]},Xg=function(){this.container={};this.destination={};this.canonical={}},Zg=function(){for(var a=Yg(),b=Vg(),c=0;c<b.length;c++){var d=a.container[b[c]];!d||pa(d)?a.container[b[c]]={state:2}:d.state=2}for(var e=Wg(),f=0;f<e.length;f++){var g=a.destination[e[f]];g&&0===g.state&&O(93);g?g.state=2:a.destination[e[f]]={state:2}}a.canonical[Tg.Hb]=2},$g=function(a){return!!Yg().container[a]},ah=function(){var a=
Yg().container,b;for(b in a)if(a.hasOwnProperty(b)){var c=a[b];if(pa(c)){if(1===c)return!0}else if(1===c.state)return!0}return!1},bh=function(){var a={};k(Yg().destination,function(b,c){0===c.state&&(a[b]=c)});return a};function Yg(){var a=Zd.tidr;a||(a=new Xg,Zd.tidr=a);return a}var ch={"":"n",UA:"u",AW:"a",DC:"d",G:"e",GF:"f",GT:"t",HA:"h",MC:"m",GTM:"g",OPT:"o"},dh={UA:1,AW:2,DC:3,G:4,GF:5,GT:12,GTM:14,HA:6,MC:7},eh=function(a){var b=Tg.M.split("-"),c=b[0].toUpperCase();if(P(45)){var d={};d.bj=Tg.M;d.ck=Yd.Ye;d.gk=Yd.Pc;d.Ij=Tg.We?2:1;fe?(d.qe=dh[c],d.qe||(d.qe=0)):d.qe=le?13:10;je?d.vf=1:Sg()?d.vf=2:d.vf=3;var e;var f=d.qe,g=d.vf;void 0===f?e="":(g||(g=0),e=""+Zc(1,1)+"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"[f<<2|g]);var l=d.Ak,m=4+e+(l?""+Zc(2,
1)+"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"[l]:""),n,p=d.gk;n=p&&Yc.test(p)?""+Zc(3,2)+p:"";var q,r=d.ck;q=r?""+Zc(4,1)+"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"[r]:"";var t;var u=d.bj;if(u&&a){var v=u.split("-"),w=v[0].toUpperCase();if("GTM"!==w&&"OPT"!==w)t="";else{var y=v[1];t=""+Zc(5,3)+"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"[1+y.length]+(d.Ij||0)+y}}else t="";return m+n+q+t}var x=ch[c]||"i",A=a&&"GTM"===c?b[1]:"OPT"===
c?b[1]:"",B="w";fe&&(B=Sg()?"s":"o");he?("w"===B&&(B="x"),"o"===B&&(B="q")):je?("w"===B&&(B="y"),"o"===B&&(B="r")):le&&(B="z");return"2"+B+x+(4===Yd.Pc.length?Yd.Pc.slice(1):Yd.Pc)+A};function fh(a,b){if(""===a)return b;var c=Number(a);return isNaN(c)?b:c};var gh=function(a,b,c){a.addEventListener&&a.addEventListener(b,c,!1)};function hh(){return fb("iPhone")&&!fb("iPod")&&!fb("iPad")}function ih(){hh()||fb("iPad")||fb("iPod")};fb("Opera");fb("Trident")||fb("MSIE");fb("Edge");!fb("Gecko")||-1!=eb().toLowerCase().indexOf("webkit")&&!fb("Edge")||fb("Trident")||fb("MSIE")||fb("Edge");-1!=eb().toLowerCase().indexOf("webkit")&&!fb("Edge")&&fb("Mobile");fb("Macintosh");fb("Windows");fb("Linux")||fb("CrOS");var jh=la.navigator||null;jh&&(jh.appVersion||"").indexOf("X11");fb("Android");hh();fb("iPad");fb("iPod");ih();eb().toLowerCase().indexOf("kaios");var kh=function(a,b,c,d){for(var e=b,f=c.length;0<=(e=a.indexOf(c,e))&&e<d;){var g=a.charCodeAt(e-1);if(38==g||63==g){var l=a.charCodeAt(e+f);if(!l||61==l||38==l||35==l)return e}e+=f+1}return-1},lh=/#|$/,mh=function(a,b){var c=a.search(lh),d=kh(a,0,b,c);if(0>d)return null;var e=a.indexOf("&",d);if(0>e||e>c)e=c;d+=b.length+1;return decodeURIComponent(a.slice(d,-1!==e?e:0).replace(/\+/g," "))},nh=/[?&]($|#)/,oh=function(a,b,c){for(var d,e=a.search(lh),f=0,g,l=[];0<=(g=kh(a,f,b,e));)l.push(a.substring(f,
g)),f=Math.min(a.indexOf("&",g)+1||e,e);l.push(a.slice(f));d=l.join("").replace(nh,"$1");var m,n=null!=c?"="+encodeURIComponent(String(c)):"";var p=b+n;if(p){var q,r=d.indexOf("#");0>r&&(r=d.length);var t=d.indexOf("?"),u;0>t||t>r?(t=r,u=""):u=d.substring(t+1,r);q=[d.slice(0,t),u,d.slice(r)];var v=q[1];q[1]=p?v?v+"&"+p:p:v;m=q[0]+(q[1]?"?"+q[1]:"")+q[2]}else m=d;return m};var ph=function(a,b){if(a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b(a[c],c,a)};function qh(a){if(!a||!F.head)return null;var b=rh("META");F.head.appendChild(b);b.httpEquiv="origin-trial";b.content=a;return b}
var sh=function(){if(E.top==E)return 0;var a=E.location.ancestorOrigins;if(a)return a[a.length-1]==E.location.origin?1:2;var b;var c=E.top;try{var d;if(d=!!c&&null!=c.location.href)b:{try{If(c.foo);d=!0;break b}catch(e){}d=!1}b=d}catch(e){b=!1}return b?1:2},rh=function(a,b){b=void 0===b?document:b;return b.createElement(String(a).toLowerCase())};function th(a,b,c){a.google_image_requests||(a.google_image_requests=[]);var d=rh("IMG",a.document);if(c){var e=function(){if(c){var f=a.google_image_requests,g=Za(f,d);0<=g&&Array.prototype.splice.call(f,g,1)}d.removeEventListener&&d.removeEventListener("load",e,!1);d.removeEventListener&&d.removeEventListener("error",e,!1)};gh(d,"load",e);gh(d,"error",e)}d.src=b;a.google_image_requests.push(d)}
var vh=function(a){var b;b=void 0===b?!1:b;var c="https://pagead2.googlesyndication.com/pagead/gen_204?id=tcfe";ph(a,function(d,e){d&&(c+="&"+e+"="+encodeURIComponent(d))});uh(c,b)},uh=function(a,b){var c=window;b=void 0===b?!1:b;c.fetch?c.fetch(a,{keepalive:!0,credentials:"include",redirect:"follow",method:"get",mode:"no-cors"}):th(c,a,void 0===b?!1:b)};var wh=function(){};var xh=function(a){void 0!==a.addtlConsent&&"string"!==typeof a.addtlConsent&&(a.addtlConsent=void 0);void 0!==a.gdprApplies&&"boolean"!==typeof a.gdprApplies&&(a.gdprApplies=void 0);return void 0!==a.tcString&&"string"!==typeof a.tcString||void 0!==a.listenerId&&"number"!==typeof a.listenerId?2:a.cmpStatus&&"error"!==a.cmpStatus?0:3},yh=function(a,b,c){this.m=a;this.h=null;this.K={};this.Ga=0;this.P=void 0===b?500:b;this.D=void 0===c?!1:c;this.B=null};ka(yh,wh);
yh.prototype.addEventListener=function(a){var b=this,c={internalBlockOnErrors:this.D},d=og(function(){return a(c)}),e=0;-1!==this.P&&(e=setTimeout(function(){c.tcString="tcunavailable";c.internalErrorState=1;d()},this.P));var f=function(g,l){clearTimeout(e);g?(c=g,c.internalErrorState=xh(c),c.internalBlockOnErrors=b.D,l&&0===c.internalErrorState||(c.tcString="tcunavailable",l||(c.internalErrorState=3))):(c.tcString="tcunavailable",c.internalErrorState=3);a(c)};try{zh(this,"addEventListener",f)}catch(g){c.tcString=
"tcunavailable",c.internalErrorState=3,e&&(clearTimeout(e),e=0),d()}};yh.prototype.removeEventListener=function(a){a&&a.listenerId&&zh(this,"removeEventListener",null,a.listenerId)};
var Bh=function(a,b,c){var d;d=void 0===d?"755":d;var e;a:{if(a.publisher&&a.publisher.restrictions){var f=a.publisher.restrictions[b];if(void 0!==f){e=f[void 0===d?"755":d];break a}}e=void 0}var g=e;if(0===g)return!1;var l=c;2===c?(l=0,2===g&&(l=1)):3===c&&(l=1,1===g&&(l=0));var m;if(0===l)if(a.purpose&&a.vendor){var n=Ah(a.vendor.consents,void 0===d?"755":d);m=n&&"1"===b&&a.purposeOneTreatment&&"CH"===a.publisherCC?!0:n&&Ah(a.purpose.consents,b)}else m=!0;else m=1===l?a.purpose&&a.vendor?Ah(a.purpose.legitimateInterests,
b)&&Ah(a.vendor.legitimateInterests,void 0===d?"755":d):!0:!0;return m},Ah=function(a,b){return!(!a||!a[b])},zh=function(a,b,c,d){c||(c=function(){});if("function"===typeof a.m.__tcfapi){var e=a.m.__tcfapi;e(b,2,c,d)}else if(Ch(a)){Dh(a);var f=++a.Ga;a.K[f]=c;if(a.h){var g={};a.h.postMessage((g.__tcfapiCall={command:b,version:2,callId:f,parameter:d},g),"*")}}else c({},!1)},Ch=function(a){if(a.h)return a.h;var b;a:{for(var c=a.m,d=0;50>d;++d){var e;try{e=!(!c.frames||!c.frames.__tcfapiLocator)}catch(l){e=
!1}if(e){b=c;break a}var f;b:{try{var g=c.parent;if(g&&g!=c){f=g;break b}}catch(l){}f=null}if(!(c=f))break}b=null}a.h=b;return a.h},Dh=function(a){a.B||(a.B=function(b){try{var c;c=("string"===typeof b.data?JSON.parse(b.data):b.data).__tcfapiReturn;a.K[c.callId](c.returnValue,c.success)}catch(d){}},gh(a.m,"message",a.B))},Eh=function(a){if(!1===a.gdprApplies)return!0;void 0===a.internalErrorState&&(a.internalErrorState=xh(a));return"error"===a.cmpStatus||0!==a.internalErrorState?a.internalBlockOnErrors?
(vh({e:String(a.internalErrorState)}),!1):!0:"loaded"!==a.cmpStatus||"tcloaded"!==a.eventStatus&&"useractioncomplete"!==a.eventStatus?!1:!0};var Fh=!0;Fh=!1;var Gh={1:0,3:0,4:0,7:3,9:3,10:3},Hh=fh("",550),Ih=fh("",500);function Jh(){var a=Zd.tcf||{};return Zd.tcf=a}
var Oh=function(){var a=Jh(),b=new yh(E,Fh?3E3:-1);if(!0===E.gtag_enable_tcf_support&&!a.active&&("function"===typeof E.__tcfapi||"function"===typeof b.m.__tcfapi||null!=Ch(b))){a.active=!0;a.jd={};Kh();var c=null;Fh?c=E.setTimeout(function(){Lh(a);Mh(a);c=null},Ih):a.tcString="tcunavailable";try{b.addEventListener(function(d){c&&(clearTimeout(c),c=null);if(0!==d.internalErrorState)Lh(a),Mh(a);else{var e;a.gdprApplies=d.gdprApplies;if(!1===d.gdprApplies)e=Nh(),b.removeEventListener(d);else if("tcloaded"===
d.eventStatus||"useractioncomplete"===d.eventStatus||"cmpuishown"===d.eventStatus){var f={},g;for(g in Gh)if(Gh.hasOwnProperty(g))if("1"===g){var l,m=d,n=!0;n=void 0===n?!1:n;l=Eh(m)?!1===m.gdprApplies||"tcunavailable"===m.tcString||void 0===m.gdprApplies&&!n||"string"!==typeof m.tcString||!m.tcString.length?!0:Bh(m,"1",0):!1;f["1"]=l}else f[g]=Bh(d,g,Gh[g]);e=f}e&&(a.tcString=d.tcString||"tcempty",a.jd=e,Mh(a))}})}catch(d){c&&(clearTimeout(c),c=null),Lh(a),Mh(a)}}};
function Lh(a){a.type="e";a.tcString="tcunavailable";Fh&&(a.jd=Nh())}function Kh(){var a={},b=(a.ad_storage="denied",a.wait_for_update=Hh,a);fg(b)}function Nh(){var a={},b;for(b in Gh)Gh.hasOwnProperty(b)&&(a[b]=!0);return a}function Mh(a){var b={},c=(b.ad_storage=a.jd["1"]?"granted":"denied",b);gg(c,{eventId:0},{gdprApplies:a?a.gdprApplies:void 0,tcString:Ph()})}
var Ph=function(){var a=Jh();return a.active?a.tcString||"":""},Qh=function(){var a=Jh();return a.active&&void 0!==a.gdprApplies?a.gdprApplies?"1":"0":""},Rh=function(a){if(!Gh.hasOwnProperty(String(a)))return!0;var b=Jh();return b.active&&b.jd?!!b.jd[String(a)]:!0};var Sh=["L","S","Y"],Th=["S","E"],Uh={sampleRate:"0.005000",Lh:"",Kh:Number("5"),Jh:Number("")},Vh=0<=F.location.search.indexOf("?gtm_latency=")||0<=F.location.search.indexOf("&gtm_latency="),Wh;
if(!(Wh=Vh)){var Xh=Math.random(),Yh=Uh.sampleRate;Wh=Xh<Yh}var Zh=Wh,$h="https://www.googletagmanager.com/a?id="+Tg.M+"&cv=1",ai={label:Tg.M+" Container",children:[{label:"Initialization",children:[]}]};function bi(){return[$h,"&v=3&t=t","&pid="+sa(),"&rv="+Yd.Pc].join("")}var ci=bi();function di(){ci=bi()}
var ei={},fi="",gi="",hi="",ii="",ji=[],ki="",li={},mi=!1,ni={},oi={},pi={},qi="",ri=void 0,si={},ti={},ui=void 0,vi=5;0<Uh.Kh&&(vi=Uh.Kh);var wi=function(a,b){for(var c=0,d=[],e=0;e<a;++e)d.push(0);return{Aj:function(){return c<a?!1:z()-d[c%a]<b},Yj:function(){var f=c++%a;d[f]=z()}}}(vi,1E3),xi=1E3,yi="";
function zi(a,b){var c=ri;if(void 0===c)return"";var d=Ya("GTM"),e=Ya("TAGGING"),f=Ya("HEALTH"),g=ci,l=ei[c]?"":"&es=1",m=si[c],n=Ai(c),p=Bi(),q=fi,r=gi,t=qi,u=Ci(a),v=hi,w=ii,y=Di(a,b),x;return[g,l,m,n,d?"&u="+d:"",e?"&ut="+e:"",f?"&h="+f:"",p,q,r,t,u,v,w,y,x,ki?"&dl="+encodeURIComponent(ki):"",0<ji.length?"&tdp="+ji.join("."):
"",Yd.Ye?"&x="+Yd.Ye:"","&z=0"].join("")}function Fi(a){ui&&(E.clearTimeout(ui),ui=void 0);if(void 0!==ri&&(!ei[ri]||fi||gi||Gi(a)))if(void 0===Hi[ri]&&(ti[ri]||wi.Aj()||0>=xi--))O(1),ti[ri]=!0;else{void 0===Hi[ri]&&wi.Yj();var b=zi(!0,a);a?Eb(b):xb(b);if(ii||ki&&0<ji.length){var c=b.replace("/a?","/td?");xb(c)}ei[ri]=!0;ki=ii=hi=qi=gi=fi="";ji=[]}}function Ii(){ui||(ui=E.setTimeout(Fi,500))}function Ji(a){var b=String(a[Mb.Ra]||"").replace(/_/g,"");0===b.indexOf("cvt")&&(b="cvt");return b}
function Ki(a){return a.match(/^(gtm|gtag)\./)?encodeURIComponent(a):"*"}function Li(){2022<=zi().length&&Fi()}function Bi(){return"&tc="+mc.filter(function(a){return a}).length}
var Ni=function(a,b){if(Zh&&!ti[a]&&ri!==a){Fi();ri=a;hi=fi="";si[a]="&e="+Ki(b)+"&eid="+a;Ii();}},Oi=function(a,b,c,d){if(Zh&&b){var e=Ji(b),f=c+e;if(!ti[a]){a!==ri&&(Fi(),ri=a);fi=fi?fi+"."+f:"&tr="+f;var g=b["function"];if(!g)throw Error("Error: No function name given for function call.");var l=(oc[g]?"1":"2")+e;hi=hi?hi+"."+l:"&ti="+l;Ii();Li()}}},Pi=function(a,b,c){if(Zh&&a&&a[Mb.Rc]){var d=b+"."+a[Mb.Rc];
pi[d]=c;"html"==Ji(a)&&yi==d&&(fi+=":"+Math.floor(c))}};
function Ci(a){}
function Ai(a){}
var Wi=function(a,b,c){if(Zh&&void 0!==a&&!ti[a]){a!==ri&&(Fi(),ri=a);var d=c+b;gi=gi?gi+"."+d:"&epr="+d;Ii();Li()}},Xi=function(a,b,c){},Yi=["S","P","C","Z"],Zi={},$i=(Zi[1]=5,Zi[2]=5,Zi[3]=5,Zi),aj={},Hi={},Ei=void 0,bj=function(a,b){var c=!1;if(!Zh||Hi[a]||0===$i[b])return!1;--$i[b];Hi[a]=b;c=!0;
return c},cj=function(a,b,c){if(!Zh||!Hi[a])return;var d=aj[a];d||(aj[a]=d={});d[b]=c;};
function Di(a,b){var c;if(!ri||!Gi(b))return"";var d=aj[ri];c="&al="+Yi.filter(function(e){return void 0!==d[e]}).map(function(e){return e+Math.floor(d[e])}).join(".")+(".Z"+Hi[ri]);a&&delete aj[ri];return c}
function Gi(a){var b=!1;if(!ri||!aj[ri])return!1;b=a||"C"in aj[ri];return b}
var dj=function(){if(Zh){E.setInterval(di,864E5);yb(E,"pagehide",function(){ri&&Hi[ri]&&Fi(!0);for(var a in aj)aj.hasOwnProperty(a)&&(ri=Number(a),Fi(!0));});}};gb();hh()||fb("iPod");fb("iPad");!fb("Android")||hb()||gb()||fb("Opera")||fb("Silk");hb();!fb("Safari")||hb()||fb("Coast")||fb("Opera")||fb("Edge")||fb("Edg/")||fb("OPR")||gb()||fb("Silk")||fb("Android")||ih();var ej={},fj=null,gj=function(a){for(var b=[],c=0,d=0;d<a.length;d++){var e=a.charCodeAt(d);255<e&&(b[c++]=e&255,e>>=8);b[c++]=e}var f=4;void 0===f&&(f=0);if(!fj){fj={};for(var g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),l=["+/=","+/","-_=","-_.","-_"],m=0;5>m;m++){var n=g.concat(l[m].split(""));ej[m]=n;for(var p=0;p<n.length;p++){var q=n[p];void 0===fj[q]&&(fj[q]=p)}}}for(var r=ej[f],t=Array(Math.floor(b.length/3)),u=r[64]||"",v=0,w=0;v<b.length-2;v+=3){var y=b[v],
x=b[v+1],A=b[v+2],B=r[y>>2],C=r[(y&3)<<4|x>>4],H=r[(x&15)<<2|A>>6],I=r[A&63];t[w++]=""+B+C+H+I}var D=0,K=u;switch(b.length-v){case 2:D=b[v+1],K=r[(D&15)<<2]||u;case 1:var M=b[v];t[w]=""+r[M>>2]+r[(M&3)<<4|D>>4]+K+u}return t.join("")};var hj="platform platformVersion architecture model uaFullVersion bitness fullVersionList wow64".split(" ");function ij(){var a;return null!=(a=E.google_tag_data)?a:E.google_tag_data={}}function jj(){var a=E.google_tag_data,b;if(null!=a&&a.uach){var c=a.uach,d=Object.assign({},c);c.fullVersionList&&(d.fullVersionList=c.fullVersionList.slice(0));b=d}else b=null;return b}function kj(){var a,b;return null!=(b=null==(a=E.google_tag_data)?void 0:a.uach_promise)?b:null}
function lj(){var a,b;return"function"===typeof(null==(a=E.navigator)?void 0:null==(b=a.userAgentData)?void 0:b.getHighEntropyValues)}function mj(){if(!lj())return null;var a=ij();if(a.uach_promise)return a.uach_promise;var b=E.navigator.userAgentData.getHighEntropyValues(hj).then(function(c){null!=a.uach||(a.uach=c);return c});return a.uach_promise=b};function sj(a,b,c,d){var e,f=Number(null!=a.Ta?a.Ta:void 0);0!==f&&(e=new Date((b||z())+1E3*(f||7776E3)));return{path:a.path,domain:a.domain,flags:a.flags,encode:!!c,expires:e,rb:d}};var Jj=["1"],Kj={},Lj={},Nj=function(a){return Kj[Mj(a)]},Qj=function(a,b){b=void 0===b?!0:b;var c=Mj(a.prefix);if(!Kj[c]&&!Oj(c,a.path,a.domain)&&b){var d=Mj(a.prefix),e=Mg();if(0===Pj(d,e,a)){var f=pb("google_tag_data",{});f._gcl_au||(f._gcl_au=e)}Oj(c,a.path,a.domain)}};function Pj(a,b,c,d){var e=Qg(b,"1",c.domain,c.path),f=sj(c,d);f.rb="ad_storage";return Ig(a,e,f)}
function Oj(a,b,c){var d=Pg(a,b,c,Jj,"ad_storage");if(!d)return!1;var e=d.split(".");5===e.length?(Kj[a]=e.slice(0,2).join("."),Lj[a]={id:e.slice(2,4).join("."),qh:Number(e[4])||0}):3===e.length?Lj[a]={id:e.slice(0,2).join("."),qh:Number(e[2])||0}:Kj[a]=d;return!0}function Mj(a){return(a||"_gcl")+"_au"};var Rj;var Vj=function(){var a=Sj,b=Tj,c=Uj(),d=function(g){a(g.target||g.srcElement||{})},e=function(g){b(g.target||g.srcElement||{})};if(!c.init){yb(F,"mousedown",d);yb(F,"keyup",d);yb(F,"submit",e);var f=HTMLFormElement.prototype.submit;HTMLFormElement.prototype.submit=function(){b(this);f.call(this)};c.init=!0}},Wj=function(a,b,c,d,e){var f={callback:a,domains:b,fragment:2===c,placement:c,forms:d,sameHost:e};Uj().decorators.push(f)},Xj=function(a,b,c){for(var d=Uj().decorators,e={},f=0;f<d.length;++f){var g=
d[f],l;if(l=!c||g.forms)a:{var m=g.domains,n=a,p=!!g.sameHost;if(m&&(p||n!==F.location.hostname))for(var q=0;q<m.length;q++)if(m[q]instanceof RegExp){if(m[q].test(n)){l=!0;break a}}else if(0<=n.indexOf(m[q])||p&&0<=m[q].indexOf(n)){l=!0;break a}l=!1}if(l){var r=g.placement;void 0==r&&(r=g.fragment?2:1);r===b&&Ga(e,g.callback())}}return e};function Uj(){var a=pb("google_tag_data",{}),b=a.gl;b&&b.decorators||(b={decorators:[]},a.gl=b);return b};var Yj=/(.*?)\*(.*?)\*(.*)/,Zj=/^https?:\/\/([^\/]*?)\.?cdn\.ampproject\.org\/?(.*)/,ak=/^(?:www\.|m\.|amp\.)+/,bk=/([^?#]+)(\?[^#]*)?(#.*)?/;function ck(a){return new RegExp("(.*?)(^|&)"+a+"=([^&]*)&?(.*)")}var ek=function(a){var b=[],c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];void 0!==d&&d===d&&null!==d&&"[object Object]"!==d.toString()&&(b.push(c),b.push(Ta(String(d))))}var e=b.join("*");return["1",dk(e),e].join("*")};
function dk(a,b){var c=[E.navigator.userAgent,(new Date).getTimezoneOffset(),nb.userLanguage||nb.language,Math.floor(z()/60/1E3)-(void 0===b?0:b),a].join("*"),d;if(!(d=Rj)){for(var e=Array(256),f=0;256>f;f++){for(var g=f,l=0;8>l;l++)g=g&1?g>>>1^3988292384:g>>>1;e[f]=g}d=e}Rj=d;for(var m=4294967295,n=0;n<c.length;n++)m=m>>>8^Rj[(m^c.charCodeAt(n))&255];return((m^-1)>>>0).toString(36)}
function fk(){return function(a){var b=Ze(E.location.href),c=b.search.replace("?",""),d=Ue(c,"_gl",!0)||"";a.query=gk(d)||{};var e=Xe(b,"fragment").match(ck("_gl"));a.fragment=gk(e&&e[3]||"")||{}}}function hk(a,b){var c=ck(a).exec(b),d=b;if(c){var e=c[2],f=c[4];d=c[1];f&&(d=d+e+f)}return d}
var ik=function(a,b){b||(b="_gl");var c=bk.exec(a);if(!c)return"";var d=c[1],e=hk(b,(c[2]||"").slice(1)),f=hk(b,(c[3]||"").slice(1));e.length&&(e="?"+e);f.length&&(f="#"+f);return""+d+e+f},jk=function(a){var b=fk(),c=Uj();c.data||(c.data={query:{},fragment:{}},b(c.data));var d={},e=c.data;e&&(Ga(d,e.query),a&&Ga(d,e.fragment));return d},gk=function(a){try{var b=kk(a,3);if(void 0!==b){for(var c={},d=b?b.split("*"):[],e=0;e+1<d.length;e+=2){var f=d[e],g=Ua(d[e+1]);c[f]=g}Wa("TAGGING",6);return c}}catch(l){Wa("TAGGING",
8)}};function kk(a,b){if(a){var c;a:{for(var d=a,e=0;3>e;++e){var f=Yj.exec(d);if(f){c=f;break a}d=decodeURIComponent(d)}c=void 0}var g=c;if(g&&"1"===g[1]){var l=g[3],m;a:{for(var n=g[2],p=0;p<b;++p)if(n===dk(l,p)){m=!0;break a}m=!1}if(m)return l;Wa("TAGGING",7)}}}
function lk(a,b,c,d){function e(p){p=hk(a,p);var q=p.charAt(p.length-1);p&&"&"!==q&&(p+="&");return p+n}d=void 0===d?!1:d;var f=bk.exec(c);if(!f)return"";var g=f[1],l=f[2]||"",m=f[3]||"",n=a+"="+b;d?m="#"+e(m.substring(1)):l="?"+e(l.substring(1));return""+g+l+m}
function mk(a,b){var c="FORM"===(a.tagName||"").toUpperCase(),d=Xj(b,1,c),e=Xj(b,2,c),f=Xj(b,3,c);if(Ha(d)){var g=ek(d);c?nk("_gl",g,a):ok("_gl",g,a,!1)}if(!c&&Ha(e)){var l=ek(e);ok("_gl",l,a,!0)}for(var m in f)if(f.hasOwnProperty(m))a:{var n=m,p=f[m],q=a;if(q.tagName){if("a"===q.tagName.toLowerCase()){ok(n,p,q);break a}if("form"===q.tagName.toLowerCase()){nk(n,p,q);break a}}"string"==typeof q&&lk(n,p,q)}}
function ok(a,b,c,d){if(c.href){var e=lk(a,b,c.href,void 0===d?!1:d);db.test(e)&&(c.href=e)}}
function nk(a,b,c){if(c&&c.action){var d=(c.method||"").toLowerCase();if("get"===d){for(var e=c.childNodes||[],f=!1,g=0;g<e.length;g++){var l=e[g];if(l.name===a){l.setAttribute("value",b);f=!0;break}}if(!f){var m=F.createElement("input");m.setAttribute("type","hidden");m.setAttribute("name",a);m.setAttribute("value",b);c.appendChild(m)}}else if("post"===d){var n=lk(a,b,c.action);db.test(n)&&(c.action=n)}}}
function Sj(a){try{var b;a:{for(var c=a,d=100;c&&0<d;){if(c.href&&c.nodeName.match(/^a(?:rea)?$/i)){b=c;break a}c=c.parentNode;d--}b=null}var e=b;if(e){var f=e.protocol;"http:"!==f&&"https:"!==f||mk(e,e.hostname)}}catch(g){}}function Tj(a){try{if(a.action){var b=Xe(Ze(a.action),"host");mk(a,b)}}catch(c){}}
var pk=function(a,b,c,d){Vj();Wj(a,b,"fragment"===c?2:1,!!d,!1)},qk=function(a,b){Vj();Wj(a,[We(E.location,"host",!0)],b,!0,!0)},rk=function(){var a=F.location.hostname,b=Zj.exec(F.referrer);if(!b)return!1;var c=b[2],d=b[1],e="";if(c){var f=c.split("/"),g=f[1];e="s"===g?decodeURIComponent(f[2]):decodeURIComponent(g)}else if(d){if(0===d.indexOf("xn--"))return!1;e=d.replace(/-/g,".").replace(/\.\./g,"-")}var l=a.replace(ak,""),m=e.replace(ak,""),n;if(!(n=l===m)){var p="."+m;n=l.substring(l.length-p.length,
l.length)===p}return n},sk=function(a,b){return!1===a?!1:a||b||rk()};var tk={};var uk=function(a){for(var b=[],c=F.cookie.split(";"),d=new RegExp("^\\s*"+(a||"_gac")+"_(UA-\\d+-\\d+)=\\s*(.+?)\\s*$"),e=0;e<c.length;e++){var f=c[e].match(d);f&&b.push({Gf:f[1],value:f[2],timestamp:Number(f[2].split(".")[1])||0})}b.sort(function(g,l){return l.timestamp-g.timestamp});return b};
function vk(a,b){var c=uk(a),d={};if(!c||!c.length)return d;for(var e=0;e<c.length;e++){var f=c[e].value.split(".");if(!("1"!==f[0]||b&&3>f.length||!b&&3!==f.length)&&Number(f[1])){d[c[e].Gf]||(d[c[e].Gf]=[]);var g={version:f[0],timestamp:1E3*Number(f[1]),da:f[2]};b&&3<f.length&&(g.labels=f.slice(3));d[c[e].Gf].push(g)}}return d};var wk=/^\w+$/,xk=/^[\w-]+$/,yk={aw:"_aw",dc:"_dc",gf:"_gf",ha:"_ha",gp:"_gp",gb:"_gb"},zk=function(){if(!Kf().h()||!Wf())return!0;var a=Tf("ad_storage");return null==a?!0:!!a},Ak=function(a,b){Vf("ad_storage")?zk()?a():ag(a,"ad_storage"):b?Wa("TAGGING",3):$f(function(){Ak(a,!0)},["ad_storage"])},Ck=function(a){return Bk(a).map(function(b){return b.da})},Bk=function(a){var b=[];if(!pg(E)||!F.cookie)return b;var c=sg(a,F.cookie,void 0,"ad_storage");if(!c||0==c.length)return b;for(var d={},e=0;e<c.length;d=
{pd:d.pd},e++){var f=Dk(c[e]);if(null!=f){var g=f,l=g.version;d.pd=g.da;var m=g.timestamp,n=g.labels,p=ra(b,function(q){return function(r){return r.da===q.pd}}(d));p?(p.timestamp=Math.max(p.timestamp,m),p.labels=Ek(p.labels,n||[])):b.push({version:l,da:d.pd,timestamp:m,labels:n})}}b.sort(function(q,r){return r.timestamp-q.timestamp});return Fk(b)};function Ek(a,b){for(var c={},d=[],e=0;e<a.length;e++)c[a[e]]=!0,d.push(a[e]);for(var f=0;f<b.length;f++)c[b[f]]||d.push(b[f]);return d}
function Gk(a){return a&&"string"==typeof a&&a.match(wk)?a:"_gcl"}
var Ik=function(){var a=Ze(E.location.href),b=Xe(a,"query",!1,void 0,"gclid"),c=Xe(a,"query",!1,void 0,"gclsrc"),d=Xe(a,"query",!1,void 0,"wbraid"),e=Xe(a,"query",!1,void 0,"dclid");if(!b||!c||!d){var f=a.hash.replace("#","");b=b||Ue(f,"gclid");c=c||Ue(f,"gclsrc");d=d||Ue(f,"wbraid")}return Hk(b,c,e,d)},Hk=function(a,b,c,d){var e={},f=function(g,l){e[l]||(e[l]=[]);e[l].push(g)};e.gclid=a;e.gclsrc=b;e.dclid=c;void 0!==d&&xk.test(d)&&(e.gbraid=d,f(d,"gb"));if(void 0!==a&&a.match(xk))switch(b){case void 0:f(a,
"aw");break;case "aw.ds":f(a,"aw");f(a,"dc");break;case "ds":f(a,"dc");break;case "3p.ds":f(a,"dc");break;case "gf":f(a,"gf");break;case "ha":f(a,"ha")}c&&f(c,"dc");return e},Kk=function(a){var b=Ik();Ak(function(){Jk(b,!1,a)})};
function Jk(a,b,c,d,e){function f(w,y){var x=Lk(w,g);x&&(Ig(x,y,l),m=!0)}c=c||{};e=e||[];var g=Gk(c.prefix);d=d||z();var l=sj(c,d,!0);l.rb="ad_storage";var m=!1,n=Math.round(d/1E3),p=function(w){var y=["GCL",n,w];0<e.length&&y.push(e.join("."));return y.join(".")};a.aw&&f("aw",p(a.aw[0]));a.dc&&f("dc",p(a.dc[0]));a.gf&&f("gf",p(a.gf[0]));a.ha&&f("ha",p(a.ha[0]));a.gp&&f("gp",p(a.gp[0]));if((void 0==tk.enable_gbraid_cookie_write?0:tk.enable_gbraid_cookie_write)&&!m&&a.gb){var q=a.gb[0],r=Lk("gb",g),
t=!1;if(!b)for(var u=Bk(r),v=0;v<u.length;v++)u[v].da===q&&u[v].labels&&0<u[v].labels.length&&(t=!0);t||f("gb",p(q))}}
var Nk=function(a,b){var c=jk(!0);Ak(function(){for(var d=Gk(b.prefix),e=0;e<a.length;++e){var f=a[e];if(void 0!==yk[f]){var g=Lk(f,d),l=c[g];if(l){var m=Math.min(Mk(l),z()),n;b:{var p=m;if(pg(E))for(var q=sg(g,F.cookie,void 0,"ad_storage"),r=0;r<q.length;++r)if(Mk(q[r])>p){n=!0;break b}n=!1}if(!n){var t=sj(b,m,!0);t.rb="ad_storage";Ig(g,l,t)}}}}Jk(Hk(c.gclid,c.gclsrc),!1,b)})},Lk=function(a,b){var c=yk[a];if(void 0!==c)return b+c},Mk=function(a){return 0!==Ok(a.split(".")).length?1E3*(Number(a.split(".")[1])||
0):0};function Dk(a){var b=Ok(a.split("."));return 0===b.length?null:{version:b[0],da:b[2],timestamp:1E3*(Number(b[1])||0),labels:b.slice(3)}}function Ok(a){return 3>a.length||"GCL"!==a[0]&&"1"!==a[0]||!/^\d+$/.test(a[1])||!xk.test(a[2])?[]:a}
var Pk=function(a,b,c,d,e){if(qa(b)&&pg(E)){var f=Gk(e),g=function(){for(var l={},m=0;m<a.length;++m){var n=Lk(a[m],f);if(n){var p=sg(n,F.cookie,void 0,"ad_storage");p.length&&(l[n]=p.sort()[p.length-1])}}return l};Ak(function(){pk(g,b,c,d)})}},Fk=function(a){return a.filter(function(b){return xk.test(b.da)})},Qk=function(a,b){if(pg(E)){for(var c=Gk(b.prefix),d={},e=0;e<a.length;e++)yk[a[e]]&&(d[a[e]]=yk[a[e]]);Ak(function(){k(d,function(f,g){var l=sg(c+g,F.cookie,void 0,"ad_storage");l.sort(function(t,
u){return Mk(u)-Mk(t)});if(l.length){var m=l[0],n=Mk(m),p=0!==Ok(m.split(".")).length?m.split(".").slice(3):[],q={},r;r=0!==Ok(m.split(".")).length?m.split(".")[2]:void 0;q[f]=[r];Jk(q,!0,b,n,p)}})})}};function Rk(a,b){for(var c=0;c<b.length;++c)if(a[b[c]])return!0;return!1}
var Sk=function(a){function b(e,f,g){g&&(e[f]=g)}if(Wf()){var c=Ik();if(Rk(c,a)){var d={};b(d,"gclid",c.gclid);b(d,"dclid",c.dclid);b(d,"gclsrc",c.gclsrc);b(d,"wbraid",c.gbraid);qk(function(){return d},3);qk(function(){var e={};return e._up="1",e},1)}}},Tk=function(a,b,c,d){var e=[];c=c||{};if(!zk())return e;var f=Bk(a);if(!f.length)return e;for(var g=0;g<f.length;g++)-1===(f[g].labels||[]).indexOf(b)?e.push(0):e.push(1);if(d)return e;if(1!==e[0]){var l=f[0],m=f[0].timestamp,n=[l.version,Math.round(m/
1E3),l.da].concat(l.labels||[],[b]).join("."),p=sj(c,m,!0);p.rb="ad_storage";Ig(a,n,p)}return e};function Uk(a,b){var c=Gk(b),d=Lk(a,c);if(!d)return 0;for(var e=Bk(d),f=0,g=0;g<e.length;g++)f=Math.max(f,e[g].timestamp);return f}function Vk(a){var b=0,c;for(c in a)for(var d=a[c],e=0;e<d.length;e++)b=Math.max(b,Number(d[e].timestamp));return b}var Wk=function(a){var b=Math.max(Uk("aw",a),Vk(zk()?vk():{}));return Math.max(Uk("gb",a),Vk(zk()?vk("_gac_gb",!0):{}))>b};var al=/[A-Z]+/,bl=/\s/,cl=function(a){if(h(a)){a=Ca(a);var b=a.indexOf("-");if(!(0>b)){var c=a.substring(0,b);if(al.test(c)){for(var d=a.substring(b+1).split("/"),e=0;e<d.length;e++)if(!d[e]||bl.test(d[e])&&("AW"!==c||1!==e))return;return{id:a,prefix:c,U:c+"-"+d[0],I:d}}}}},el=function(a){for(var b={},c=0;c<a.length;++c){var d=cl(a[c]);d&&(b[d.id]=d)}dl(b);var e=[];k(b,function(f,g){e.push(g)});return e};
function dl(a){var b=[],c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];"AW"===d.prefix&&d.I[1]&&b.push(d.U)}for(var e=0;e<b.length;++e)delete a[b[e]]};var gl=function(a,b,c,d){return(2===fl()||d||"http:"!=E.location.protocol?a:b)+c},fl=function(){var a=vb(),b;if(1===a)a:{var c=ne;c=c.toLowerCase();for(var d="https://"+c,e="http://"+c,f=1,g=F.getElementsByTagName("script"),l=0;l<g.length&&100>l;l++){var m=g[l].src;if(m){m=m.toLowerCase();if(0===m.indexOf(e)){b=3;break a}1===f&&0===m.indexOf(d)&&(f=2)}}b=f}else b=a;return b};
var il=function(a,b,c){if(E[a.functionName])return b.yf&&G(b.yf),E[a.functionName];var d=hl();E[a.functionName]=d;if(a.Yd)for(var e=0;e<a.Yd.length;e++)E[a.Yd[e]]=E[a.Yd[e]]||hl();a.ne&&void 0===E[a.ne]&&(E[a.ne]=c);ub(gl("https://","http://",a.Ff),b.yf,b.Mj);return d},hl=function(){var a=function(){a.q=a.q||[];a.q.push(arguments)};return a},jl={functionName:"_googWcmImpl",ne:"_googWcmAk",Ff:"www.gstatic.com/wcm/loader.js"},kl={functionName:"_gaPhoneImpl",ne:"ga_wpid",Ff:"www.gstatic.com/gaphone/loader.js"},
ll={Oh:"",Mi:"5"},ml={functionName:"_googCallTrackingImpl",Yd:[kl.functionName,jl.functionName],Ff:"www.gstatic.com/call-tracking/call-tracking_"+(ll.Oh||ll.Mi)+".js"},nl={},ol=function(a,b,c,d){O(22);if(c){d=d||{};var e=il(jl,d,a),f={ak:a,cl:b};void 0===d.fb&&(f.autoreplace=c);e(2,d.fb,f,c,0,Da(),d.options)}},pl=function(a,b,c,d){O(21);if(b&&c){d=d||{};for(var e={countryNameCode:c,destinationNumber:b,retrievalTime:Da()},f=0;f<a.length;f++){var g=a[f];nl[g.id]||
(g&&"AW"===g.prefix&&!e.adData&&2<=g.I.length?(e.adData={ak:g.I[0],cl:g.I[1]},nl[g.id]=!0):g&&"UA"===g.prefix&&!e.gaData&&(e.gaData={gaWpid:g.U},nl[g.id]=!0))}(e.gaData||e.adData)&&il(ml,d)(d.fb,e,d.options)}},ql=function(){var a=!1;return a},rl=function(a,b){if(a)if(Sg()){}else{if(h(a)){var c=
cl(a);if(!c)return;a=c}var d=void 0,e=!1,f=T(b,R.g.ri);if(f&&qa(f)){d=[];for(var g=0;g<f.length;g++){var l=cl(f[g]);l&&(d.push(l),(a.id===l.id||a.id===a.U&&a.U===l.U)&&(e=!0))}}if(!d||e){var m=T(b,R.g.wg),n;if(m){qa(m)?n=m:n=[m];var p=T(b,R.g.ug),q=T(b,R.g.vg),r=T(b,R.g.xg),t=T(b,R.g.oi),u=p||q,v=1;"UA"!==a.prefix||d||(v=5);for(var w=0;w<n.length;w++)if(w<v)if(d)pl(d,n[w],t,{fb:u,options:r});else if("AW"===a.prefix&&a.I[1])ql()?pl([a],n[w],t||"US",{fb:u,options:r}):ol(a.I[0],a.I[1],n[w],{fb:u,options:r});
else if("UA"===a.prefix)if(ql())pl([a],n[w],t||"US",{fb:u});else{var y=a.U,x=n[w],A={fb:u};O(23);if(x){A=A||{};var B=il(kl,A,y),C={};void 0!==A.fb?C.receiver=A.fb:C.replace=x;C.ga_wpid=y;C.destination=x;B(2,Da(),C)}}}}}};var sl=function(a,b,c){this.target=a;this.eventName=b;this.h=c;this.m={};this.metadata=J(c.eventMetadata||{});this.H=!1},tl=function(a,b,c){var d=T(a.h,b);void 0!==d?a.m[b]=d:void 0!==c&&(a.m[b]=c)},ul=function(a,b,c){var d=Ge(a.target.U);return d&&d.hasOwnProperty(b)?d[b]:c};function vl(a){return{getDestinationId:function(){return a.target.U},getEventName:function(){return a.eventName},setEventName:function(b){return void(a.eventName=b)},getHitData:function(b){return a.m[b]},setHitData:function(b,c){return void(a.m[b]=c)},setHitDataIfNotDefined:function(b,c){void 0===a.m[b]&&(a.m[b]=c)},copyToHitData:function(b,c){tl(a,b,c)},getMetadata:function(b){return a.metadata[b]},setMetadata:function(b,c){return void(a.metadata[b]=c)},abort:function(){return void(a.H=!0)},getProcessedEvent:function(){return a},
getFromEventContext:function(b){return T(a.h,b)}}};var Ol=function(a,b,c,d,e,f,g,l,m,n,p,q){this.eventId=a;this.priorityId=b;this.h=c;this.K=d;this.m=e;this.D=f;this.P=g;this.B=l;this.eventMetadata=m;this.O=n;this.N=p;this.C=q},T=function(a,b,c){if(void 0!==a.h[b])return a.h[b];if(void 0!==a.K[b])return a.K[b];if(void 0!==a.m[b])return a.m[b];Zh&&Pl(a,a.D[b],a.P[b])&&(O(71),O(79));return void 0!==a.D[b]?a.D[b]:void 0!==a.B[b]?a.B[b]:c},Ql=function(a){function b(g){for(var l=Object.keys(g),m=0;m<l.length;++m)c[l[m]]=1}var c={};b(a.h);b(a.K);b(a.m);
b(a.D);if(Zh)for(var d=Object.keys(a.P),e=0;e<d.length;e++){var f=d[e];if("event"!==f&&"gtm"!==f&&"tagTypeBlacklist"!==f&&!c.hasOwnProperty(f)){O(71);O(80);break}}return Object.keys(c)},Rl=function(a,b,c){function d(m){Kb(m)&&k(m,function(n,p){f=!0;e[n]=p})}var e={},f=!1;c&&1!==c||(d(a.B[b]),d(a.D[b]),d(a.m[b]),d(a.K[b]));c&&2!==c||d(a.h[b]);if(Zh){var g=f,l=e;e={};f=!1;c&&1!==c||(d(a.B[b]),d(a.P[b]),d(a.m[b]),d(a.K[b]));c&&2!==c||d(a.h[b]);if(f!==g||Pl(a,e,l))O(71),O(81);f=g;e=l}return f?e:void 0},
Sl=function(a){var b=[R.g.zc,R.g.yd,R.g.zd,R.g.Ad,R.g.Bd,R.g.Cd,R.g.Dd],c={},d=!1,e=function(l){for(var m=0;m<b.length;m++)void 0!==l[b[m]]&&(c[b[m]]=l[b[m]],d=!0);return d};if(e(a.h)||e(a.K)||e(a.m))return c;e(a.D);if(Zh){var f=c,g=d;c={};d=!1;e(a.P);Pl(a,c,f)&&(O(71),O(82));c=f;d=g}if(d)return c;e(a.B);return c},Pl=function(a,b,c){if(!Zh)return!1;try{if(b===c)return!1;var d=Ib(b);if(d!==Ib(c)||!(Kb(b)&&Kb(c)||"array"===d))return!0;if("array"===d){if(b.length!==c.length)return!0;for(var e=0;e<b.length;e++)if(Pl(a,
b[e],c[e]))return!0}else{for(var f in c)if(!b.hasOwnProperty(f))return!0;for(var g in b)if(!c.hasOwnProperty(g)||Pl(a,b[g],c[g]))return!0}}catch(l){O(72)}return!1},Tl=function(a,b){this.Ai=a;this.Bi=b;this.D={};this.Ng={};this.h={};this.K={};this.m={};this.Nc={};this.B={};this.kc=function(){};this.Ga=function(){};this.P=!1},Ul=function(a,b){a.D=b;return a},Vl=function(a,b){a.Ng=b;return a},Wl=function(a,b){a.h=b;return a},Xl=function(a,b){a.K=b;return a},Yl=function(a,b){a.m=b;return a},Zl=function(a,
b){a.Nc=b;return a},$l=function(a,b){a.B=b||{};return a},am=function(a,b){a.kc=b;return a},bm=function(a,b){a.Ga=b;return a},cm=function(a){a.P=!0;return a},dm=function(a){return new Ol(a.Ai,a.Bi,a.D,a.Ng,a.h,a.K,a.m,a.Nc,a.B,a.kc,a.Ga,a.P)};function hm(){return"attribution-reporting"}function im(a){var b;b=void 0===b?document:b;var c;return!(null==(c=b.featurePolicy)||!c.allowedFeatures().includes(a))};var jm=!1;function km(){if(im("join-ad-interest-group")&&oa(nb.joinAdInterestGroup))return!0;jm||(qh('A751Xsk4ZW3DVQ8WZng2Dk5s3YzAyqncTzgv+VaE6wavgTY0QHkDvUTET1o7HanhuJO8lgv1Vvc88Ij78W1FIAAAAAB7eyJvcmlnaW4iOiJodHRwczovL3d3dy5nb29nbGV0YWdtYW5hZ2VyLmNvbTo0NDMiLCJmZWF0dXJlIjoiUHJpdmFjeVNhbmRib3hBZHNBUElzIiwiZXhwaXJ5IjoxNjgwNjUyNzk5LCJpc1RoaXJkUGFydHkiOnRydWV9'),jm=!0);return im("join-ad-interest-group")&&oa(nb.joinAdInterestGroup)}
function lm(a,b){var c=void 0;try{c=F.querySelector('iframe[data-tagging-id="'+b+'"]')}catch(e){}if(c){var d=Number(c.dataset.loadTime);if(d&&6E4>z()-d){Wa("TAGGING",9);return}}else try{if(50<=F.querySelectorAll('iframe[allow="join-ad-interest-group"][data-tagging-id*="-"]').length){Wa("TAGGING",10);return}}catch(e){}wb(a,void 0,{allow:"join-ad-interest-group"},{taggingId:b,loadTime:z()},c)}function mm(){return P(60)?"https://td.doubleclick.net":"https://googleads.g.doubleclick.net"};var nm=RegExp("^UA-\\d+-\\d+%3A[\\w-]+(?:%2C[\\w-]+)*(?:%3BUA-\\d+-\\d+%3A[\\w-]+(?:%2C[\\w-]+)*)*$"),om=/^~?[\w-]+(?:\.~?[\w-]+)*$/,pm=/^\d+\.fls\.doubleclick\.net$/,qm=/;gac=([^;?]+)/,rm=/;gacgb=([^;?]+)/,sm=/;gclaw=([^;?]+)/,tm=/;gclgb=([^;?]+)/;
function um(a,b){if(pm.test(F.location.host)){var c=F.location.href.match(b);return c&&2==c.length&&c[1].match(nm)?decodeURIComponent(c[1]):""}var d=[],e;for(e in a){for(var f=[],g=a[e],l=0;l<g.length;l++)f.push(g[l].da);d.push(e+":"+f.join(","))}return 0<d.length?d.join(";"):""}
var vm=function(a,b,c){var d=zk()?vk("_gac_gb",!0):{},e=[],f=!1,g;for(g in d){var l=Tk("_gac_gb_"+g,a,b,c);f=f||0!==l.length&&l.some(function(m){return 1===m});e.push(g+":"+l.join(","))}return{mj:f?e.join(";"):"",lj:um(d,rm)}};function wm(a,b,c){if(pm.test(F.location.host)){var d=F.location.href.match(c);if(d&&2==d.length&&d[1].match(om))return[{da:d[1]}]}else return Bk((a||"_gcl")+b);return[]}
var xm=function(a){return wm(a,"_aw",sm).map(function(b){return b.da}).join(".")},ym=function(a){return wm(a,"_gb",tm).map(function(b){return b.da}).join(".")},zm=function(a,b){var c=Tk((b&&b.prefix||"_gcl")+"_gb",a,b);return 0===c.length||c.every(function(d){return 0===d})?"":c.join(".")};var Am=function(){if(oa(E.__uspapi)){var a="";try{E.__uspapi("getUSPData",1,function(b,c){if(c&&b){var d=b.uspString;d&&RegExp("^[\\da-zA-Z-]{1,20}$").test(d)&&(a=d)}})}catch(b){}return a}};var kn=function(a,b){var c,d=E.GooglebQhCsO;d||(d={},E.GooglebQhCsO=d);c=d;if(c[a])return!1;c[a]=[];c[a][0]=b;return!0};var ln=function(a,b){var c=mh(a,"fmt");if(b){var d=mh(a,"random"),e=mh(a,"label")||"";if(!d)return!1;var f=gj(decodeURIComponent(e.replace(/\+/g," "))+":"+decodeURIComponent(d.replace(/\+/g," ")));if(!kn(f,b))return!1}c&&4!=c&&(a=oh(a,"rfmt",c));var g=oh(a,"fmt",4);ub(g,function(){E.google_noFurtherRedirects&&b&&b.call&&(E.google_noFurtherRedirects=null,b())},void 0,void 0,F.getElementsByTagName("script")[0].parentElement||void 0);return!0};var Bn=function(){this.h={}},Cn=function(a,b,c){null!=c&&(a.h[b]=c)},Dn=function(a){return Object.keys(a.h).map(function(b){return encodeURIComponent(b)+"="+encodeURIComponent(a.h[b])}).join("&")},Fn=function(a,b,c,d,e){};function Hn(a,b){if(a){var c=""+a;0!==c.indexOf("http://")&&0!==c.indexOf("https://")&&(c="https://"+c);"/"===c[c.length-1]&&(c=c.substring(0,c.length-1));return Ze(""+c+b).href}}function In(a,b){return he||je?Hn(a,b):void 0}function Jn(){return!!Yd.Wd&&"SGTM_TOKEN"!==Yd.Wd.split("@@").join("")};var Ln=function(a,b,c,d){if(!Kn()&&!$g(a)){var e=c?"/gtag/js":"/gtm.js",f="?id="+encodeURIComponent(a)+"&l="+Yd.fa,g=0===a.indexOf("GTM-");g||(f+="&cx=c");var l=Jn();l&&(f+="&sign="+Yd.Wd);var m=In(b,e+f);if(!m){var n=Yd.vd+e;l&&ob&&g&&(n=ob.replace(/^(?:https?:\/\/)?/i,"").split(/[?#]/)[0]);m=gl("https://","http://",n+f)}Yg().container[a]={state:1,context:d};ub(m)}},Mn=function(a,b,c){var d;if(d=!Kn()){var e=Yg().destination[a];d=!(e&&e.state)}if(d)if(ah())Yg().destination[a]={state:0,transportUrl:b,
context:c},O(91);else{var f="/gtag/destination?id="+encodeURIComponent(a)+"&l="+Yd.fa+"&cx=c";Jn()&&(f+="&sign="+Yd.Wd);var g=In(b,f);g||(g=gl("https://","http://",Yd.vd+f));Yg().destination[a]={state:1,context:c};ub(g)}};function Kn(){if(Sg()){return!0}return!1};var Nn=new RegExp(/^(.*\.)?(google|youtube|blogger|withgoogle)(\.com?)?(\.[a-z]{2})?\.?$/),On={cl:["ecl"],customPixels:["nonGooglePixels"],ecl:["cl"],ehl:["hl"],hl:["ehl"],html:["customScripts","customPixels","nonGooglePixels","nonGoogleScripts","nonGoogleIframes"],customScripts:["html","customPixels","nonGooglePixels","nonGoogleScripts","nonGoogleIframes"],nonGooglePixels:[],nonGoogleScripts:["nonGooglePixels"],nonGoogleIframes:["nonGooglePixels"]},Pn={cl:["ecl"],customPixels:["customScripts","html"],
ecl:["cl"],ehl:["hl"],hl:["ehl"],html:["customScripts"],customScripts:["html"],nonGooglePixels:["customPixels","customScripts","html","nonGoogleScripts","nonGoogleIframes"],nonGoogleScripts:["customScripts","html"],nonGoogleIframes:["customScripts","html","nonGoogleScripts"]},Qn="google customPixels customScripts html nonGooglePixels nonGoogleScripts nonGoogleIframes".split(" "),Tn=function(a){var b=ze("gtm.allowlist")||ze("gtm.whitelist");b&&O(9);fe&&(b=["google","gtagfl","lcl","zone"]);Rn&&Sn()&&
(b=[],window.console&&window.console.log&&window.console.log("GTM blocked. See go/13687728."));var c=b&&Ia(Ba(b),On),d=ze("gtm.blocklist")||ze("gtm.blacklist");d||(d=ze("tagTypeBlacklist"))&&O(3);d?O(8):d=[];Sn()&&(d=Ba(d),d.push("nonGooglePixels","nonGoogleScripts","sandboxedScripts"));0<=Ba(d).indexOf("google")&&O(2);var e=d&&Ia(Ba(d),Pn),f={};return function(g){var l=g&&g[Mb.Ra];if(!l||"string"!=typeof l)return!0;l=l.replace(/^_*/,"");if(void 0!==f[l])return f[l];var m=re[l]||[],n=a(l,m);if(b){var p;
if(p=n)a:{if(0>c.indexOf(l))if(m&&0<m.length)for(var q=0;q<m.length;q++){if(0>c.indexOf(m[q])){O(11);p=!1;break a}}else{p=!1;break a}p=!0}n=p}var r=!1;if(d){var t=0<=e.indexOf(l);if(t)r=t;else{var u=ua(e,m||[]);u&&O(10);r=u}}var v=!n||r;v||!(0<=m.indexOf("sandboxedScripts"))||c&&-1!==c.indexOf("sandboxedScripts")||(v=ua(e,Qn));return f[l]=v}},Rn=!1;
var Sn=function(){return Nn.test(E.location&&E.location.hostname)};var Un={initialized:11,complete:12,interactive:13},Vn={},Wn=Object.freeze((Vn[R.g.xa]=!0,Vn)),Xn=0<=F.location.search.indexOf("?gtm_diagnostics=")||0<=F.location.search.indexOf("&gtm_diagnostics="),Zn=function(a,b,c){if(Zh&&"config"===a&&!(1<cl(b).I.length)){var d,e=pb("google_tag_data",{});e.td||(e.td={});d=e.td;var f=J(c.D);J(c.h,f);var g=[],l;for(l in d){var m=Yn(d[l],f);m.length&&(Xn&&console.log(m),g.push(l))}if(g.length){if(g.length){var n=b+"*"+g.join(".");ii=ii?ii+"!"+n:"&tdc="+n}Wa("TAGGING",
Un[F.readyState]||14)}d[b]=f}};function $n(a,b){var c={},d;for(d in b)b.hasOwnProperty(d)&&(c[d]=!0);for(var e in a)a.hasOwnProperty(e)&&(c[e]=!0);return c}function Yn(a,b,c,d){c=void 0===c?{}:c;d=void 0===d?"":d;if(a===b)return[];var e=function(q,r){var t=r[q];return void 0===t?Wn[q]:t},f;for(f in $n(a,b)){var g=(d?d+".":"")+f,l=e(f,a),m=e(f,b),n="object"===Ib(l)||"array"===Ib(l),p="object"===Ib(m)||"array"===Ib(m);if(n&&p)Yn(l,m,c,g);else if(n||p||l!==m)c[g]=!0}return Object.keys(c)};var ao=!1,bo=0,co=[];function eo(a){if(!ao){var b=F.createEventObject,c="complete"==F.readyState,d="interactive"==F.readyState;if(!a||"readystatechange"!=a.type||c||!b&&d){ao=!0;for(var e=0;e<co.length;e++)G(co[e])}co.push=function(){for(var f=0;f<arguments.length;f++)G(arguments[f]);return 0}}}function fo(){if(!ao&&140>bo){bo++;try{F.documentElement.doScroll("left"),eo()}catch(a){E.setTimeout(fo,50)}}}var go=function(a){ao?a():co.push(a)};var ho=function(a,b){return{entityType:1,indexInOriginContainer:a,nameInOriginContainer:b,originContainerId:Tg.M}};var jo=function(a,b){this.h=!1;this.D=[];this.K={tags:[]};this.P=!1;this.m=this.B=0;io(this,a,b)},ko=function(a,b,c,d){if(be.hasOwnProperty(b)||"__zone"===b)return-1;var e={};Kb(d)&&(e=J(d,e));e.id=c;e.status="timeout";return a.K.tags.push(e)-1},lo=function(a,b,c,d){var e=a.K.tags[b];e&&(e.status=c,e.executionTime=d)},mo=function(a){if(!a.h){for(var b=a.D,c=0;c<b.length;c++)b[c]();a.h=!0;a.D.length=0}},io=function(a,b,c){void 0!==b&&no(a,b);c&&E.setTimeout(function(){return mo(a)},Number(c))},no=
function(a,b){var c=Fa(function(){return G(function(){b(Tg.M,a.K)})});a.h?c():a.D.push(c)},oo=function(a){a.B++;return Fa(function(){a.m++;a.P&&a.m>=a.B&&mo(a)})},po=function(a){a.P=!0;a.m>=a.B&&mo(a)};
var qo=function(){function a(d){return!pa(d)||0>d?0:d}if(!Zd._li&&E.performance&&E.performance.timing){var b=E.performance.timing.navigationStart,c=pa(Ae.get("gtm.start"))?Ae.get("gtm.start"):0;Zd._li={cst:a(c-b),cbt:a(pe-b)}}},ro=function(a){E.performance&&E.performance.mark(Tg.M+"_"+a+"_start")},so=function(a){if(E.performance){var b=Tg.M+"_"+a+"_start",c=Tg.M+"_"+a+"_duration";E.performance.measure(c,b);var d=E.performance.getEntriesByName(c)[0];E.performance.clearMarks(b);E.performance.clearMeasures(c);
var e=Zd._p||{};void 0===e[a]&&(e[a]=d.duration,Zd._p=e);return d.duration}},to=function(){var a=Gb();if(void 0!==a){var b=Zd._p||{};b.PAGEVIEW=a;Zd._p=b}};var uo={},vo=function(){return E.GoogleAnalyticsObject&&E[E.GoogleAnalyticsObject]},wo=!1;var xo=function(a){E.GoogleAnalyticsObject||(E.GoogleAnalyticsObject=a||"ga");var b=E.GoogleAnalyticsObject;if(E[b])E.hasOwnProperty(b);else{var c=function(){c.q=c.q||[];c.q.push(arguments)};c.l=Number(Da());E[b]=c}qo();return E[b]},yo=function(a){if(Wf()){var b=vo();b(a+"require","linker");b(a+"linker:passthrough",!0)}};
function zo(){return E.GoogleAnalyticsObject||"ga"}
var Ao=function(a){},Bo=function(a,b){return function(){var c=vo(),d=c&&c.getByName&&c.getByName(a);if(d){var e=d.get("sendHitTask");d.set("sendHitTask",function(f){var g=f.get("hitPayload"),l=f.get("hitCallback"),m=0>g.indexOf("&tid="+b);m&&(f.set("hitPayload",g.replace(/&tid=UA-[0-9]+-[0-9]+/,"&tid="+b),!0),f.set("hitCallback",void 0,!0));e(f);m&&(f.set("hitPayload",
g,!0),f.set("hitCallback",l,!0),f.set("_x_19",void 0,!0),e(f))})}}};function Go(a,b,c,d){var e=mc[a],f=Ho(a,b,c,d);if(!f)return null;var g=vc(e[Mb.Yg],c,[]);if(g&&g.length){var l=g[0];f=Go(l.index,{O:f,N:1===l.kh?b.terminate:f,terminate:b.terminate},c,d)}return f}
function Ho(a,b,c,d){function e(){if(f[Mb.Gi])l();else{var w=wc(f,c,[]),y=w[Mb.Ph];if(null!=y)for(var x=0;x<y.length;x++)if(!hg(y[x])){l();return}var A=ko(c.zb,String(f[Mb.Ra]),Number(f[Mb.Rc]),w[Mb.Hi]),B=!1;w.vtp_gtmOnSuccess=function(){if(!B){B=!0;var I=z()-H;Oi(c.id,mc[a],"5",I);lo(c.zb,A,"success",I);g()}};w.vtp_gtmOnFailure=function(){if(!B){B=!0;var I=z()-H;Oi(c.id,mc[a],"6",I);lo(c.zb,A,"failure",I);l()}};w.vtp_gtmTagId=f.tag_id;w.vtp_gtmEventId=c.id;c.priorityId&&(w.vtp_gtmPriorityId=c.priorityId);
Oi(c.id,f,"1");var C=function(){var I=z()-H;Oi(c.id,f,"7",I);lo(c.zb,A,"exception",I);B||(B=!0,l())};var H=z();try{uc(w,{event:c,index:a,type:1})}catch(I){C(I)}}}
var f=mc[a],g=b.O,l=b.N,m=b.terminate;if(c.qf(f))return null;var n=vc(f[Mb.Zg],c,[]);if(n&&n.length){var p=n[0],q=Go(p.index,{O:g,N:l,terminate:m},c,d);if(!q)return null;g=q;l=2===p.kh?m:q}if(f[Mb.Ug]||f[Mb.Ji]){var r=f[Mb.Ug]?nc:c.mk,t=g,u=l;if(!r[a]){e=Fa(e);var v=Io(a,r,e);g=v.O;l=v.N}return function(){r[a](t,u)}}return e}function Io(a,b,c){var d=[],e=[];b[a]=Jo(d,e,c);return{O:function(){b[a]=Ko;for(var f=0;f<d.length;f++)d[f]()},N:function(){b[a]=Lo;for(var f=0;f<e.length;f++)e[f]()}}}
function Jo(a,b,c){return function(d,e){a.push(d);b.push(e);c()}}function Ko(a){a()}function Lo(a,b){b()};var No=function(a,b){return 1===arguments.length?Mo("config",a):Mo("config",a,b)},Oo=function(a,b,c){c=c||{};c[R.g.xb]=a;return Mo("event",b,c)};function Mo(a){return arguments}var Po=function(){this.h=[];this.m=[]};Po.prototype.enqueue=function(a,b,c){var d=this.h.length+1;a["gtm.uniqueEventId"]=b;a["gtm.priorityId"]=d;c.eventId=b;c.fromContainerExecution=!0;c.priorityId=d;var e={message:a,notBeforeEventId:b,priorityId:d,messageContext:c};this.h.push(e);for(var f=0;f<this.m.length;f++)try{this.m[f](e)}catch(g){}};Po.prototype.listen=function(a){this.m.push(a)};
Po.prototype.get=function(){for(var a={},b=0;b<this.h.length;b++){var c=this.h[b],d=a[c.notBeforeEventId];d||(d=[],a[c.notBeforeEventId]=d);d.push(c)}return a};Po.prototype.prune=function(a){for(var b=[],c=[],d=0;d<this.h.length;d++){var e=this.h[d];e.notBeforeEventId===a?b.push(e):c.push(e)}this.h=c;return b};var Ro=function(a,b,c){Qo().enqueue(a,b,c)},To=function(){var a=So;Qo().listen(a)};function Qo(){var a=Zd.mb;a||(a=new Po,Zd.mb=a);return a}var ap=function(a){var b=Zd.zones;return b?b.getIsAllowedFn(Vg(),a):function(){return!0}},bp=function(a){var b=Zd.zones;return b?b.isActive(Vg(),a):!0};var ep=function(a,b){for(var c=[],d=0;d<mc.length;d++)if(a[d]){var e=mc[d];var f=oo(b.zb);try{var g=Go(d,{O:f,N:f,terminate:f},b,d);if(g){var l=c,m=l.push,n=d,p=e["function"];if(!p)throw"Error: No function name given for function call.";var q=oc[p];m.call(l,{Gh:n,xh:q?q.priorityOverride||0:0,execute:g})}else cp(d,b),f()}catch(t){f()}}c.sort(dp);for(var r=0;r<c.length;r++)c[r].execute();return 0<c.length};function dp(a,b){var c,d=b.xh,e=a.xh;c=d>e?1:d<e?-1:0;var f;if(0!==c)f=c;else{var g=a.Gh,l=b.Gh;f=g>l?1:g<l?-1:0}return f}
function cp(a,b){if(Zh){var c=function(d){var e=b.qf(mc[d])?"3":"4",f=vc(mc[d][Mb.Yg],b,[]);f&&f.length&&c(f[0].index);Oi(b.id,mc[d],e);var g=vc(mc[d][Mb.Zg],b,[]);g&&g.length&&c(g[0].index)};c(a)}}var hp=!1,fp;
var Kp=function(a){var b=z(),c=a["gtm.uniqueEventId"],d=a["gtm.priorityId"],e=a.event;if("gtm.js"===e){if(hp)return!1;hp=!0;}var l,m=!1;if(bp(c))l=ap(c);else{if("gtm.js"!==e&&"gtm.init"!==e&&"gtm.init_consent"!==e)return!1;m=!0;l=ap(Number.MAX_SAFE_INTEGER)}Ni(c,e);var n=a.eventCallback,p=a.eventTimeout,
q=n;var r={id:c,priorityId:d,name:e,qf:Tn(l),mk:[],rh:function(){O(6);Wa("HEALTH",0)},eh:ip(),fh:Hp(c),zb:new jo(q,p)},t=Ac(r);m&&(t=Ip(t));
var u=ep(t,r),v=!1;po(r.zb);"gtm.js"!==e&&"gtm.sync"!==e||Ao(Tg.M);return Jp(t,u)||v};function Hp(a){return function(b){Zh&&(Lb(b)||Xi(a,"input",b))}}function ip(){var a={};a.event=De("event",1);a.ecommerce=De("ecommerce",1);a.gtm=De("gtm");a.eventModel=De("eventModel");return a}
function Ip(a){for(var b=[],c=0;c<a.length;c++)if(a[c]){var d=String(mc[c][Mb.Ra]);if(ae[d]||void 0!==mc[c][Mb.Ki]||se[d])b[c]=!0;P(58)||0!==mc[c][Mb.Ra].indexOf("__ccd")&&0!==mc[c][Mb.Ra].indexOf("__ogt")&&"__set_product_settings"!==mc[c][Mb.Ra]||(b[c]=!0)}return b}function Jp(a,b){if(!b)return b;for(var c=0;c<a.length;c++)if(a[c]&&mc[c]&&!be[String(mc[c][Mb.Ra])])return!0;return!1}var Mp=function(a,b,c,d){Lp.push("event",[b,a],c,d)},Np=function(a,b,c,d){Lp.push("get",[a,b],c,d)},Op=function(){this.status=1;this.D={};this.h={};this.K={};this.P=null;this.B={};this.m=!1},Pp=function(a,b,c,d){var e=z();this.type=a;this.m=e;this.W=b||"";this.h=c;this.messageContext=d},Qp=function(){this.m={};this.B={};this.h=[]},Rp=function(a,b){var c=cl(b);return a.m[c.U]=a.m[c.U]||new Op},Sp=function(a,b,c,d){if(d.W){var e=Rp(a,d.W),f=e.P;if(f){var g=J(c),l=J(e.D[d.W]),m=J(e.B),n=J(e.h),p=J(a.B),
q={};if(Zh)try{q=J(we)}catch(v){O(72)}var r=cl(d.W).prefix,t=function(v){Wi(d.messageContext.eventId,r,v);var w=g[R.g.Nb];w&&G(w)},u=dm(bm(am($l(Yl(Xl(Zl(Wl(Vl(Ul(new Tl(d.messageContext.eventId,d.messageContext.priorityId),g),l),m),n),p),q),d.messageContext.eventMetadata),function(){if(t){var v=t;t=void 0;v("2")}}),function(){if(t){var v=t;t=void 0;v("3")}}));try{Wi(d.messageContext.eventId,r,"1"),Zn(d.type,d.W,u),f(d.W,b,d.m,u)}catch(v){Wi(d.messageContext.eventId,r,"4")}}}};
Qp.prototype.register=function(a,b,c){var d=Rp(this,a);3!==d.status&&(d.P=b,d.status=3,c&&(J(d.h,c),d.h=c),this.flush())};Qp.prototype.push=function(a,b,c,d){if(void 0!==c){if(!cl(c))return;if(c){var e=cl(c);e&&1===Rp(this,c).status&&(Rp(this,c).status=2,this.push("require",[{}],e.U,{}))}Rp(this,c).m&&(d.deferrable=!1)}this.h.push(new Pp(a,c,b,d));d.deferrable||this.flush()};
Qp.prototype.flush=function(a){for(var b=this,c=[],d=!1,e={};this.h.length;){var f=this.h[0];if(f.messageContext.deferrable)!f.W||Rp(this,f.W).m?(f.messageContext.deferrable=!1,this.h.push(f)):c.push(f),this.h.shift();else{var g=void 0;switch(f.type){case "require":g=Rp(this,f.W);if(3!==g.status&&!a){this.h.push.apply(this.h,c);return}break;case "set":k(f.h[0],function(r,t){J(Ja(r,t),b.B)});break;case "config":g=Rp(this,f.W);e.hb={};k(f.h[0],function(r){return function(t,u){J(Ja(t,u),r.hb)}}(e));
var l=!!e.hb[R.g.Mc];delete e.hb[R.g.Mc];var m=cl(f.W),n=m.U===m.id;l||(n?g.B={}:g.D[f.W]={});g.m&&l||Sp(this,R.g.va,e.hb,f);g.m=!0;n?J(e.hb,g.B):(J(e.hb,g.D[f.W]),O(70));d=!0;break;case "event":g=Rp(this,f.W);e.od={};k(f.h[0],function(r){return function(t,u){J(Ja(t,u),r.od)}}(e));Sp(this,f.h[1],e.od,f);break;case "get":g=Rp(this,f.W);var p={},q=(p[R.g.Qa]=f.h[0],p[R.g.ab]=f.h[1],p);Sp(this,R.g.Ca,q,f)}this.h.shift();Tp(this,f)}e={hb:e.hb,od:e.od}}this.h.push.apply(this.h,c);d&&this.flush()};
var Tp=function(a,b){if("require"!==b.type)if(b.W)for(var c=Rp(a,b.W).K[b.type]||[],d=0;d<c.length;d++)c[d]();else for(var e in a.m)if(a.m.hasOwnProperty(e)){var f=a.m[e];if(f&&f.K)for(var g=f.K[b.type]||[],l=0;l<g.length;l++)g[l]()}},Up=function(a,b){var c=Lp,d=J(b);J(Rp(c,a).h,d);Rp(c,a).h=d},Lp=new Qp;var Vp={},Wp={},Xp=function(a){for(var b=[],c=[],d={},e=0;e<a.length;d={ud:d.ud,qd:d.qd},e++){var f=a[e];if(0<=f.indexOf("-"))d.ud=cl(f),d.ud&&(ra(Wg(),function(p){return function(q){return p.ud.U===q}}(d))?b.push(f):c.push(f));else{var g=Vp[f]||[];d.qd={};g.forEach(function(p){return function(q){return p.qd[q]=!0}}(d));for(var l=Vg(),m=0;m<l.length;m++)if(d.qd[l[m]]){b=b.concat(Wg());break}var n=Wp[f]||[];n.length&&(b=b.concat(n))}}return{Jj:b,Lj:c}},Yp=function(a){k(Vp,function(b,c){var d=c.indexOf(a);
0<=d&&c.splice(d,1)})},Zp=function(a){k(Wp,function(b,c){var d=c.indexOf(a);0<=d&&c.splice(d,1)})};var $p="HA GF G UA AW DC MC".split(" "),aq=!1,bq=!1;function cq(a,b){a.hasOwnProperty("gtm.uniqueEventId")||Object.defineProperty(a,"gtm.uniqueEventId",{value:te()});b.eventId=a["gtm.uniqueEventId"];b.priorityId=a["gtm.priorityId"];return{eventId:b.eventId,priorityId:b.priorityId}}
var dq={config:function(a,b){var c=cq(a,b);if(!(2>a.length)&&h(a[1])){var d={};if(2<a.length){if(void 0!=a[2]&&!Kb(a[2])||3<a.length)return;d=a[2]}var e=cl(a[1]);if(e){Ni(c.eventId,"gtag.config");var f=e.U,g=e.id!==f;if(g?-1===Wg().indexOf(f):-1===Vg().indexOf(f)){if(!P(61)||!d[R.g.Nd]){var l=d[R.g.na]||Lp.B[R.g.na];g?Mn(f,l,{source:2,fromContainerExecution:b.fromContainerExecution}):Ln(f,l,!0,{source:2,fromContainerExecution:b.fromContainerExecution})}}else{if(ee&&!g&&!d[R.g.Mc]){var m=bq;bq=!0;
if(m)return}aq||O(43);if(!b.noTargetGroup)if(g){Zp(e.id);var n=e.id,p=d[R.g.Ld]||"default";p=String(p).split(",");for(var q=0;q<p.length;q++){var r=Wp[p[q]]||[];Wp[p[q]]=r;0>r.indexOf(n)&&r.push(n)}}else{Yp(e.id);var t=e.id,u=d[R.g.Ld]||"default";u=u.toString().split(",");for(var v=0;v<u.length;v++){var w=Vp[u[v]]||[];Vp[u[v]]=w;0>w.indexOf(t)&&w.push(t)}}delete d[R.g.Ld];var y=b.eventMetadata||{};y.hasOwnProperty("is_external_event")||(y.is_external_event=!b.fromContainerExecution);b.eventMetadata=
y;delete d[R.g.Nb];for(var x=g?[e.id]:Wg(),A=0;A<x.length;A++){var B=J(b);Lp.push("config",[d],x[A],B)}}}}},consent:function(a,b){if(3===a.length){O(39);var c=cq(a,b),d=a[1];"default"===d?fg(a[2]):"update"===d&&gg(a[2],c)}},event:function(a,b){var c=a[1];if(!(2>a.length)&&h(c)){var d;if(2<a.length){if(!Kb(a[2])&&void 0!=a[2]||3<a.length)return;d=a[2]}var e=d,f={},g=(f.event=c,f);e&&(g.eventModel=J(e),e[R.g.Nb]&&(g.eventCallback=e[R.g.Nb]),e[R.g.Gd]&&(g.eventTimeout=e[R.g.Gd]));var l=cq(a,b),m=l.eventId,
n=l.priorityId;g["gtm.uniqueEventId"]=m;n&&(g["gtm.priorityId"]=n);if("optimize.callback"===c)return g.eventModel=g.eventModel||{},g;var p;var q=d,r=q&&q[R.g.xb];void 0===r&&(r=ze(R.g.xb,2),void 0===r&&(r="default"));if(h(r)||qa(r)){var t=r.toString().replace(/\s+/g,"").split(","),u=Xp(t),v=u.Jj,w=u.Lj;if(w.length)for(var y=q&&q[R.g.na]||Lp.B[R.g.na],x=0;x<w.length;x++){var A=cl(w[x]);A&&Mn(A.U,y,{source:3,fromContainerExecution:b.fromContainerExecution})}p=el(v)}else p=void 0;var B=p;if(B){Ni(m,
c);for(var C=[],H=0;H<B.length;H++){var I=B[H],D=J(b);if(-1!==$p.indexOf(I.prefix)){var K=J(d),M=D.eventMetadata||{};M.hasOwnProperty("is_external_event")||(M.is_external_event=!D.fromContainerExecution);D.eventMetadata=M;delete K[R.g.Nb];Mp(c,K,I.id,D)}C.push(I.id)}g.eventModel=g.eventModel||{};0<B.length?g.eventModel[R.g.xb]=C.join():delete g.eventModel[R.g.xb];aq||O(43);return b.noGtmEvent?void 0:g}}},get:function(a,b){O(53);if(4===a.length&&h(a[1])&&h(a[2])&&oa(a[3])){var c=cl(a[1]),d=String(a[2]),
e=a[3];if(c){aq||O(43);var f=Lp.B[R.g.na];if(!ra(Wg(),function(l){return c.U===l}))Mn(c.U,f,{source:4,fromContainerExecution:b.fromContainerExecution});else if(-1!==$p.indexOf(c.prefix)){cq(a,b);var g={};bg(J((g[R.g.Qa]=d,g[R.g.ab]=e,g)));Np(d,function(l){G(function(){return e(l)})},c.id,b)}}}},js:function(a,b){if(2==a.length&&a[1].getTime){aq=!0;var c=cq(a,b),d=c.eventId,e=c.priorityId,f={};return f.event="gtm.js",f["gtm.start"]=a[1].getTime(),f["gtm.uniqueEventId"]=d,f["gtm.priorityId"]=e,f}},policy:function(){},
set:function(a,b){var c;2==a.length&&Kb(a[1])?c=J(a[1]):3==a.length&&h(a[1])&&(c={},Kb(a[2])||qa(a[2])?c[a[1]]=J(a[2]):c[a[1]]=a[2]);if(c){var d=cq(a,b),e=d.eventId,f=d.priorityId;J(c);var g=J(c);Lp.push("set",[g],void 0,b);c["gtm.uniqueEventId"]=e;f&&(c["gtm.priorityId"]=f);P(30)&&delete c.event;b.overwriteModelFields=!0;return c}}},eq={policy:!0};var fq=function(a){var b=E[Yd.fa].hide;if(b&&void 0!==b[a]&&b.end){b[a]=!1;var c=!0,d;for(d in b)if(b.hasOwnProperty(d)&&!0===b[d]){c=!1;break}c&&(b.end(),b.end=null)}},gq=function(a){var b=E[Yd.fa],c=b&&b.hide;c&&c.end&&(c[a]=!0)};var hq=!1,iq=[];function jq(){if(!hq){hq=!0;for(var a=0;a<iq.length;a++)G(iq[a])}}var kq=function(a){hq?G(a):iq.push(a)};var Bq=function(a){if(Aq(a))return a;this.h=a};Bq.prototype.getUntrustedMessageValue=function(){return this.h};var Aq=function(a){return!a||"object"!==Ib(a)||Kb(a)?!1:"getUntrustedMessageValue"in a};Bq.prototype.getUntrustedMessageValue=Bq.prototype.getUntrustedMessageValue;var Cq=0,Dq={},Eq=[],Fq=[],Gq=!1,Hq=!1;function Iq(a,b){return a.messageContext.eventId-b.messageContext.eventId||a.messageContext.priorityId-b.messageContext.priorityId}var Jq=function(a){return E[Yd.fa].push(a)},Kq=function(a,b){var c=Zd[Yd.fa],d=c?c.subscribers:1,e=0,f=!1,g=void 0;b&&(g=E.setTimeout(function(){f||(f=!0,a());g=void 0},b));return function(){++e===d&&(g&&(E.clearTimeout(g),g=void 0),f||(a(),f=!0))}};
function Lq(a,b){var c=a._clear||b.overwriteModelFields;k(a,function(e,f){"_clear"!==e&&(c&&Ce(e),Ce(e,f))});oe||(oe=a["gtm.start"]);var d=a["gtm.uniqueEventId"];if(!a.event)return!1;"number"!==typeof d&&(d=te(),a["gtm.uniqueEventId"]=d,Ce("gtm.uniqueEventId",d));return Kp(a)}
function Mq(a){if(null==a||"object"!==typeof a)return!1;if(a.event)return!0;if(xa(a)){var b=a[0];if("config"===b||"event"===b||"js"===b||"get"===b)return!0}return!1}
function Nq(){var a;if(Fq.length)a=Fq.shift();else if(Eq.length)a=Eq.shift();else return;var b;var c=a;if(Gq||!Mq(c.message))b=c;else{Gq=!0;var d=c.message["gtm.uniqueEventId"];"number"!==typeof d&&(d=c.message["gtm.uniqueEventId"]=te());var e={},f={message:(e.event="gtm.init_consent",e["gtm.uniqueEventId"]=d-2,e),messageContext:{eventId:d-2}},g={},l={message:(g.event="gtm.init",g["gtm.uniqueEventId"]=d-1,g),messageContext:{eventId:d-1}};Eq.unshift(l,c);if(Zh&&Tg.M){var m;if(Tg.We){var n=Tg.M,p=Yg().destination[n];
m=p&&p.context}else{var q=Tg.M,r=Yg().container[q];m=r&&r.context}var t=m,u,v=Ze(E.location.href);u=v.hostname+v.pathname;var w=t&&t.fromContainerExecution,y=t&&t.source,x=Tg.M,A=Tg.Hb,B=Tg.We;ki||(ki=u);ji.push(x+";"+A+";"+(w?1:0)+";"+(y||0)+";"+(B?1:0))}b=f}return b}
function Oq(){for(var a=!1,b;!Hq&&(b=Nq());){Hq=!0;delete we.eventModel;ye();var c=b,d=c.message,e=c.messageContext;if(null==d)Hq=!1;else{if(e.fromContainerExecution)for(var f=["gtm.allowlist","gtm.blocklist","gtm.whitelist","gtm.blacklist","tagTypeBlacklist"],g=0;g<f.length;g++){var l=f[g],m=ze(l,1);if(qa(m)||Kb(m))m=J(m);xe[l]=m}try{if(oa(d))try{d.call(Ae)}catch(C){}else if(qa(d)){var n=
d;if(h(n[0])){var p=n[0].split("."),q=p.pop(),r=n.slice(1),t=ze(p.join("."),2);if(null!=t)try{t[q].apply(t,r)}catch(C){}}}else{var u=void 0,v=!1;if(xa(d)){a:{if(d.length&&h(d[0])){var w=dq[d[0]];if(w&&(!e.fromContainerExecution||!eq[d[0]])){u=w(d,e);break a}}u=void 0}(v=u&&"set"===d[0]&&!!u.event)&&O(101)}else u=d;if(u){var y=Lq(u,e);a=y||a;v&&y&&O(113)}}}finally{e.fromContainerExecution&&ye(!0);var x=d["gtm.uniqueEventId"];if("number"===typeof x){for(var A=Dq[String(x)]||[],B=0;B<A.length;B++)Fq.push(Pq(A[B]));
A.length&&Fq.sort(Iq);delete Dq[String(x)];x>Cq&&(Cq=x)}Hq=!1}}}return!a}function Qq(){var b=Oq();try{fq(Tg.M)}catch(c){}return b}
function So(a){if(Cq<a.notBeforeEventId){var b=String(a.notBeforeEventId);Dq[b]=Dq[b]||[];Dq[b].push(a)}else Fq.push(Pq(a)),Fq.sort(Iq),G(function(){Hq||Oq()})}function Pq(a){return{message:a.message,messageContext:a.messageContext}}
var Sq=function(){function a(f){var g={};if(Aq(f)){var l=f;f=Aq(l)?l.getUntrustedMessageValue():void 0;g.fromContainerExecution=!0}return{message:f,messageContext:g}}var b=pb(Yd.fa,[]),c=Zd[Yd.fa]=Zd[Yd.fa]||{};!0===c.pruned&&O(83);Dq=Qo().get();To();go(function(){if(!c.gtmDom){c.gtmDom=!0;var f={};b.push((f.event="gtm.dom",f))}});kq(function(){if(!c.gtmLoad){c.gtmLoad=!0;var f={};b.push((f.event="gtm.load",f))}});c.subscribers=(c.subscribers||0)+1;var d=b.push;b.push=function(){var f;if(0<Zd.SANDBOXED_JS_SEMAPHORE){f=
[];for(var g=0;g<arguments.length;g++)f[g]=new Bq(arguments[g])}else f=[].slice.call(arguments,0);var l=f.map(function(q){return a(q)});Eq.push.apply(Eq,l);var m=d.apply(b,f),n=Math.max(100,Number("1000")||300);if(this.length>n)for(O(4),c.pruned=!0;this.length>n;)this.shift();var p="boolean"!==typeof m||m;return Oq()&&p};var e=b.slice(0).map(function(f){return a(f)});Eq.push.apply(Eq,e);if(Rq()){G(Qq)}},Rq=function(){var a=!0;return a};function Tq(a){if(null==a||0===a.length)return!1;var b=Number(a),c=z();return b<c+3E5&&b>c-9E5}function Uq(a){return a&&0===a.indexOf("pending:")?Tq(a.substr(8)):!1};var rc={};rc.Sd=new String("undefined");var ur=E.clearTimeout,vr=E.setTimeout,V=function(a,b,c,d){if(Sg()){b&&G(b)}else return ub(a,b,c,d)},wr=function(){return new Date},xr=function(){return E.location.href},yr=function(a){return Xe(Ze(a),"fragment")},zr=function(a){return Ye(Ze(a))},Ar=function(a,b){return ze(a,b||2)},Br=function(a,b,c){var d;b?(a.eventCallback=b,c&&(a.eventTimeout=c),d=Jq(a)):d=Jq(a);return d},Cr=function(a,b){E[a]=b},W=function(a,b,c){b&&
(void 0===E[a]||c&&!E[a])&&(E[a]=b);return E[a]},Dr=function(a,b,c){return sg(a,b,void 0===c?!0:!!c)},Er=function(a,b,c){return 0===Ig(a,b,c)},Fr=function(a,b){if(Sg()){b&&G(b)}else wb(a,b)},Gr=function(a){return!!ar(a,"init",!1)},Hr=function(a){Zq(a,"init",!0)},Ir=function(a,b,c){Zh&&(Lb(a)||Xi(c,b,a))};
var fs=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"];function gs(a,b){a=String(a);b=String(b);var c=a.length-b.length;return 0<=c&&a.indexOf(b,c)===c}var hs=new ta;function is(a,b,c){var d=c?"i":void 0;try{var e=String(b)+d,f=hs.get(e);f||(f=new RegExp(b,d),hs.set(e,f));return f.test(a)}catch(g){return!1}}
function js(a,b){function c(g){var l=Ze(g),m=Xe(l,"protocol"),n=Xe(l,"host",!0),p=Xe(l,"port"),q=Xe(l,"path").toLowerCase().replace(/\/$/,"");if(void 0===m||"http"===m&&"80"===p||"https"===m&&"443"===p)m="web",p="default";return[m,n,p,q]}for(var d=c(String(a)),e=c(String(b)),f=0;f<d.length;f++)if(d[f]!==e[f])return!1;return!0}
function ks(a){return ls(a)?1:0}
function ls(a){var b=a.arg0,c=a.arg1;if(a.any_of&&Array.isArray(c)){for(var d=0;d<c.length;d++){var e=J(a,{});J({arg1:c[d],any_of:void 0},e);if(ks(e))return!0}return!1}switch(a["function"]){case "_cn":return 0<=String(b).indexOf(String(c));case "_css":var f;a:{if(b)try{for(var g=0;g<fs.length;g++){var l=fs[g];if(b[l]){f=b[l](c);break a}}}catch(m){}f=!1}return f;case "_ew":return gs(b,c);case "_eq":return String(b)===String(c);case "_ge":return Number(b)>=Number(c);case "_gt":return Number(b)>Number(c);
case "_lc":return 0<=String(b).split(",").indexOf(String(c));case "_le":return Number(b)<=Number(c);case "_lt":return Number(b)<Number(c);case "_re":return is(b,c,a.ignore_case);case "_sw":return 0===String(b).indexOf(String(c));case "_um":return js(b,c)}return!1};Object.freeze({dl:1,id:1});Object.freeze(["config","event","get","set"]);function Ds(){return E.gaGlobal=E.gaGlobal||{}}var Es=function(){var a=Ds();a.hid=a.hid||sa();return a.hid},Fs=function(a,b){var c=Ds();if(void 0==c.vid||b&&!c.from_cookie)c.vid=a,c.from_cookie=b};var bt=function(){var a=!0;Rh(7)&&Rh(9)&&Rh(10)||(a=!1);return a},ct=function(){var a=!0;Rh(3)&&Rh(4)||(a=!1);return a};var Ft=window,Gt=document,Ht=function(a){var b=Ft._gaUserPrefs;if(b&&b.ioo&&b.ioo()||a&&!0===Ft["ga-disable-"+a])return!0;try{var c=Ft.external;if(c&&c._gaUserPrefs&&"oo"==c._gaUserPrefs)return!0}catch(f){}for(var d=mg("AMP_TOKEN",String(Gt.cookie),!0),e=0;e<d.length;e++)if("$OPT_OUT"==d[e])return!0;return Gt.getElementById("__gaOptOutExtension")?!0:!1};
function Pt(a){k(a,function(c){"_"===c.charAt(0)&&delete a[c]});var b=a[R.g.Ma]||{};k(b,function(c){"_"===c.charAt(0)&&delete b[c]})};var Yt=function(a,b){};function Xt(a,b){var c=function(){};return c}
function Zt(a,b,c){};
var dv=function(a,b){if(!b.C){var c=T(b,R.g.Qa),d=T(b,R.g.ab),e=T(b,c);if(void 0===e){var f=void 0;av.hasOwnProperty(c)?f=av[c]:bv.hasOwnProperty(c)&&(f=bv[c]);1===f&&(f=cv(c));h(f)?vo()(function(){var g=vo().getByName(a).get(f);d(g)}):d(void 0)}else d(e)}},ev=function(a,b){var c=a[R.g.Jc],d=b+".",e=a[R.g.T]||"",f=void 0===c?!!a.use_anchor:"fragment"===c,g=!!a[R.g.Rb];e=String(e).replace(/\s+/g,"").split(",");var l=vo();l(d+"require","linker");l(d+"linker:autoLink",e,f,g)},iv=function(a,b,c){if(Wf()&&
(!c.C||!fv[a])){var d=!hg(R.g.R),e=function(f){var g,l,m=vo(),n=gv(b,"",c),p,q=n.createOnlyFields._useUp;if(c.C||hv(b,n.createOnlyFields)){c.C&&(g="gtm"+te(),l=n.createOnlyFields,n.gtmTrackerName&&(l.name=g));m(function(){var t=m.getByName(b);t&&(p=t.get("clientId"));c.C||m.remove(b)});m("create",a,c.C?l:n.createOnlyFields);d&&
hg(R.g.R)&&(d=!1,m(function(){var t=vo().getByName(c.C?g:b);!t||t.get("clientId")==p&&q||(c.C?(n.fieldsToSet["&gcu"]="1",n.fieldsToSet["&gcut"]=Vd[f]):(n.fieldsToSend["&gcu"]="1",n.fieldsToSend["&gcut"]=Vd[f]),t.set(n.fieldsToSet),c.C?t.send("pageview"):t.send("pageview",n.fieldsToSend))}));c.C&&m(function(){m.remove(g)})}};jg(function(){return e(R.g.R)},R.g.R);jg(function(){return e(R.g.F)},R.g.F);c.C&&(fv[a]=!0)}},jv=function(a,b){Jn()&&b&&(a[R.g.vb]=b)},sv=function(a,b,c){function d(){var D=T(c,
R.g.Dc);l(function(){if(!c.C&&Kb(D)){var K=u.fieldsToSend,M=m().getByName(n),S;for(S in D)if(D.hasOwnProperty(S)&&/^(dimension|metric)\d+$/.test(S)&&void 0!=D[S]){var Z=M.get(cv(D[S]));kv(K,S,Z)}}})}function e(){if(u.displayfeatures){var D="_dc_gtm_"+f.replace(/[^A-Za-z0-9-]/g,"");p("require","displayfeatures",void 0,{cookieName:D})}}var f=a,g="https://www.google-analytics.com/analytics.js",l=c.C?xo(T(c,"gaFunctionName")):xo();if(oa(l)){var m=vo,n;c.C?n=T(c,"name")||T(c,"gtmTrackerName"):n="gtag_"+
f.split("-").join("_");var p=function(D){var K=[].slice.call(arguments,0);K[0]=n?n+"."+K[0]:""+K[0];l.apply(window,K)},q=function(D){var K=function(aa,U){for(var Q=0;U&&Q<U.length;Q++)p(aa,U[Q])},M=c.C,S=M?lv(u):mv(b,c);if(S){var Z={};jv(Z,D);p("require","ec","ec.js",Z);M&&S.ff&&p("set","&cu",S.ff);var L=S.action;if(M||"impressions"===L)if(K("ec:addImpression",S.ph),!M)return;if("promo_click"===L||"promo_view"===L||M&&S.hd){var N=S.hd;K("ec:addPromo",N);if(N&&0<N.length&&"promo_click"===L){M?p("ec:setAction",
L,S.Sa):p("ec:setAction",L);return}if(!M)return}"promo_view"!==L&&"impressions"!==L&&(K("ec:addProduct",S.Bb),p("ec:setAction",L,S.Sa))}},r=function(D){if(D){var K={};if(Kb(D))for(var M in nv)nv.hasOwnProperty(M)&&ov(nv[M],M,D[M],K);jv(K,y);p("require","linkid",K)}},t=function(){if(Sg()){}else{var D=T(c,R.g.ni);D&&(p("require",D,{dataLayer:Yd.fa}),p("require","render"))}},u=gv(n,b,c),v=function(D,K,M){M&&(K=""+K);u.fieldsToSend[D]=
K};!c.C&&hv(n,u.createOnlyFields)&&(l(function(){m()&&m().remove(n)}),pv[n]=!1);l("create",f,u.createOnlyFields);if(u.createOnlyFields[R.g.vb]&&!c.C){var w=In(u.createOnlyFields[R.g.vb],"/analytics.js");w&&(g=w)}var y=c.C?u.fieldsToSet[R.g.vb]:u.createOnlyFields[R.g.vb];if(y){var x=c.C?u.fieldsToSet[R.g.Id]:u.createOnlyFields[R.g.Id];x&&!pv[n]&&(pv[n]=!0,l(Bo(n,x)))}c.C?u.enableRecaptcha&&p("require","recaptcha","recaptcha.js"):(d(),r(u.linkAttribution));var A=u[R.g.ra];A&&A[R.g.T]&&ev(A,n);p("set",
u.fieldsToSet);if(c.C){if(u.enableLinkId){var B={};jv(B,y);p("require","linkid","linkid.js",B)}Wf()&&iv(f,n,c)}if(b===R.g.sc)if(c.C){e();if(u.remarketingLists){var C="_dc_gtm_"+f.replace(/[^A-Za-z0-9-]/g,"");p("require","adfeatures",{cookieName:C})}q(y);p("send","pageview");u.createOnlyFields._useUp&&yo(n+".")}else t(),p("send","pageview",u.fieldsToSend);else b===R.g.va?(t(),rl(f,c),T(c,R.g.cb)&&(Sk(["aw","dc"]),yo(n+".")),0!=u.sendPageView&&p("send","pageview",u.fieldsToSend),iv(f,n,c)):b===R.g.Ca?
dv(n,c):"screen_view"===b?p("send","screenview",u.fieldsToSend):"timing_complete"===b?(u.fieldsToSend.hitType="timing",v("timingCategory",u.eventCategory,!0),c.C?v("timingVar",u.timingVar,!0):v("timingVar",u.name,!0),v("timingValue",za(u.value)),void 0!==u.eventLabel&&v("timingLabel",u.eventLabel,!0),p("send",u.fieldsToSend)):"exception"===b?p("send","exception",u.fieldsToSend):""===b&&c.C||("track_social"===b&&c.C?(u.fieldsToSend.hitType="social",v("socialNetwork",u.socialNetwork,!0),v("socialAction",
u.socialAction,!0),v("socialTarget",u.socialTarget,!0)):((c.C||qv[b])&&q(y),c.C&&e(),u.fieldsToSend.hitType="event",v("eventCategory",u.eventCategory,!0),v("eventAction",u.eventAction||b,!0),void 0!==u.eventLabel&&v("eventLabel",u.eventLabel,!0),void 0!==u.value&&v("eventValue",za(u.value))),p("send",u.fieldsToSend));if(!rv&&!c.C){rv=!0;qo();var H=function(){c.N()},I=function(){m().loaded||H()};Sg()?G(I):ub(g,I,H)}}else G(c.N)},tv=function(a,b,c,d){kg(function(){sv(a,b,d)},[R.g.R,R.g.F])},wv=function(a,
b){function c(f){function g(n,p){for(var q=0;q<p.length;q++){var r=p[q];if(f[r]){m[n]=f[r];break}}}function l(){if(f.category)m.category=f.category;else{for(var n="",p=0;p<uv.length;p++)void 0!==f[uv[p]]&&(n&&(n+="/"),n+=f[uv[p]]);n&&(m.category=n)}}var m=J(f);if(vv||b)g("id",["id","item_id","promotion_id"]),g("name",["name","item_name","promotion_name"]),g("brand",["brand","item_brand"]),g("variant",["variant","item_variant"]),g("list",["list_name","item_list_name"]),g("position",["list_position",
"creative_slot","index"]),l();g("listPosition",["list_position"]);g("creative",["creative_name"]);g("list",["list_name"]);g("position",["list_position","creative_slot"]);return m}b=void 0===b?!1:b;for(var d=[],e=0;a&&e<a.length;e++)a[e]&&Kb(a[e])&&d.push(c(a[e]));return d.length?d:void 0},xv=function(a){return hg(a)},yv=!1;var vv=!1;
vv=!0;var rv,pv={},fv={},zv={},av=Object.freeze((zv.client_storage="storage",zv.sample_rate=1,zv.site_speed_sample_rate=1,zv.store_gac=1,zv.use_amp_client_id=1,zv[R.g.kb]=1,zv[R.g.qa]="storeGac",zv[R.g.Ya]=1,zv[R.g.Ia]=1,zv[R.g.Za]=1,zv[R.g.Bc]=1,zv[R.g.Ae]=1,zv[R.g.ub]=1,zv)),Av={},Bv=Object.freeze((Av._cs=1,Av._useUp=1,Av.allowAnchor=1,Av.allowLinker=1,Av.alwaysSendReferrer=1,Av.clientId=1,Av.cookieDomain=1,Av.cookieExpires=1,Av.cookieFlags=
1,Av.cookieName=1,Av.cookiePath=1,Av.cookieUpdate=1,Av.legacyCookieDomain=1,Av.legacyHistoryImport=1,Av.name=1,Av.sampleRate=1,Av.siteSpeedSampleRate=1,Av.storage=1,Av.storeGac=1,Av.useAmpClientId=1,Av._cd2l=1,Av)),Cv=Object.freeze({anonymize_ip:1}),Dv={},bv=Object.freeze((Dv.campaign={content:"campaignContent",id:"campaignId",medium:"campaignMedium",name:"campaignName",source:"campaignSource",term:"campaignKeyword"},Dv.app_id=1,Dv.app_installer_id=1,Dv.app_name=1,Dv.app_version=1,Dv.description=
"exDescription",Dv.fatal="exFatal",Dv.language=1,Dv.page_hostname="hostname",Dv.transport_type="transport",Dv[R.g.ma]="currencyCode",Dv[R.g.rg]=1,Dv[R.g.Ka]="location",Dv[R.g.He]="page",Dv[R.g.La]="referrer",Dv[R.g.Tb]="title",Dv[R.g.zg]=1,Dv[R.g.sa]=1,Dv)),Ev={},Fv=Object.freeze((Ev.content_id=1,Ev.event_action=1,Ev.event_category=1,Ev.event_label=1,Ev.link_attribution=1,Ev.name=1,Ev[R.g.ra]=1,Ev[R.g.qg]=1,Ev[R.g.xa]=1,Ev[R.g.ka]=1,Ev)),Gv=Object.freeze({displayfeatures:1,enableLinkId:1,enableRecaptcha:1,
eventAction:1,eventCategory:1,eventLabel:1,gaFunctionName:1,gtmEcommerceData:1,gtmTrackerName:1,linker:1,remarketingLists:1,socialAction:1,socialNetwork:1,socialTarget:1,timingVar:1,value:1}),uv=Object.freeze(["item_category","item_category2","item_category3","item_category4","item_category5"]),Hv={},nv=Object.freeze((Hv.levels=1,Hv[R.g.Ia]="duration",Hv[R.g.Bc]=1,Hv)),Iv={},Jv=Object.freeze((Iv.anonymize_ip=1,Iv.fatal=1,Iv.send_page_view=1,Iv.store_gac=1,Iv.use_amp_client_id=1,Iv[R.g.qa]=1,Iv[R.g.rg]=
1,Iv)),ov=function(a,b,c,d){if(void 0!==c)if(Jv[b]&&(c=Aa(c)),"anonymize_ip"!==b||c||(c=void 0),1===a)d[cv(b)]=c;else if(h(a))d[a]=c;else for(var e in a)a.hasOwnProperty(e)&&void 0!==c[e]&&(d[a[e]]=c[e])},cv=function(a){return a&&h(a)?a.replace(/(_[a-z])/g,function(b){return b[1].toUpperCase()}):a},Kv={},qv=Object.freeze((Kv.checkout_progress=1,Kv.select_content=1,Kv.set_checkout_option=1,Kv[R.g.mc]=1,Kv[R.g.nc]=1,Kv[R.g.Ib]=1,Kv[R.g.oc]=1,Kv[R.g.sb]=1,Kv[R.g.Jb]=1,Kv[R.g.tb]=1,Kv[R.g.Ba]=1,Kv[R.g.qc]=
1,Kv[R.g.Ha]=1,Kv)),Lv={},Mv=Object.freeze((Lv.checkout_progress=1,Lv.set_checkout_option=1,Lv[R.g.Sf]=1,Lv[R.g.Tf]=1,Lv[R.g.mc]=1,Lv[R.g.nc]=1,Lv[R.g.Uf]=1,Lv[R.g.Ib]=1,Lv[R.g.Ba]=1,Lv[R.g.qc]=1,Lv[R.g.Vf]=1,Lv)),Nv={},Ov=Object.freeze((Nv.generate_lead=1,Nv.login=1,Nv.search=1,Nv.select_content=1,Nv.share=1,Nv.sign_up=1,Nv.view_search_results=1,Nv[R.g.oc]=1,Nv[R.g.sb]=1,Nv[R.g.Jb]=1,Nv[R.g.tb]=1,Nv[R.g.Ha]=1,Nv)),Pv=function(a){var b="general";Mv[a]?b="ecommerce":Ov[a]?b="engagement":"exception"===
a&&(b="error");return b},Qv={},Rv=Object.freeze((Qv.view_search_results=1,Qv[R.g.sb]=1,Qv[R.g.tb]=1,Qv[R.g.Ha]=1,Qv)),kv=function(a,b,c){a.hasOwnProperty(b)||(a[b]=c)},Sv=function(a){if(qa(a)){for(var b=[],c=0;c<a.length;c++){var d=a[c];if(void 0!=d){var e=d.id,f=d.variant;void 0!=e&&void 0!=f&&b.push(String(e)+"."+String(f))}}return 0<b.length?b.join("!"):void 0}},gv=function(a,b,c){var d=function(K){return T(c,K)},e={},f={},g={},l={},m=Sv(d(R.g.mi));!c.C&&m&&kv(f,"exp",m);g["&gtm"]=eh(!0);Wf()&&
(l._cs=xv);var n=d(R.g.Dc);if(!c.C&&Kb(n))for(var p in n)if(n.hasOwnProperty(p)&&/^(dimension|metric)\d+$/.test(p)&&void 0!=n[p]){var q=d(String(n[p]));void 0!==q&&kv(f,p,q)}for(var r=Ql(c),t=0;t<r.length;++t){var u=r[t];if(c.C){var v=d(u);Gv.hasOwnProperty(u)?e[u]=v:Bv.hasOwnProperty(u)?l[u]=v:g[u]=v}else{var w=void 0;w=u!==R.g.aa?d(u):Rl(c,u);if(Fv.hasOwnProperty(u))ov(Fv[u],u,w,e);else if(Cv.hasOwnProperty(u))ov(Cv[u],u,w,g);else if(bv.hasOwnProperty(u))ov(bv[u],u,w,f);else if(av.hasOwnProperty(u))ov(av[u],
u,w,l);else if(/^(dimension|metric|content_group)\d+$/.test(u))ov(1,u,w,f);else if(u===R.g.aa){if(!yv){var y=La(w);y&&(f["&did"]=y)}var x=void 0,A=void 0;b===R.g.va?x=La(Rl(c,u),"."):(x=La(Rl(c,u,1),"."),A=La(Rl(c,u,2),"."));x&&(f["&gdid"]=x);A&&(f["&edid"]=A)}else u===R.g.Pa&&0>r.indexOf(R.g.Bc)&&(l.cookieName=w+"_ga")}}!1!==d(R.g.ci)&&!1!==d(R.g.Lb)&&bt()||(g.allowAdFeatures=!1);!1!==d(R.g.X)&&ct()||(g.allowAdPersonalizationSignals=!1);!c.C&&d(R.g.cb)&&(l._useUp=!0);if(c.C){l.name=l.name||e.gtmTrackerName;
var B=g.hitCallback;g.hitCallback=function(){oa(B)&&B();c.O()}}else{kv(l,"cookieDomain","auto");kv(g,"forceSSL",!0);kv(e,"eventCategory",Pv(b));Rv[b]&&kv(f,"nonInteraction",!0);"login"===b||"sign_up"===b||"share"===b?kv(e,"eventLabel",d(R.g.qg)):"search"===b||"view_search_results"===b?kv(e,"eventLabel",d(R.g.wi)):"select_content"===b&&kv(e,"eventLabel",d(R.g.fi));var C=e[R.g.ra]||{},H=C[R.g.Qb];H||0!=H&&C[R.g.T]?l.allowLinker=!0:!1===H&&kv(l,"useAmpClientId",!1);f.hitCallback=c.O;l.name=a}Wf()&&(g["&gcs"]=
ig(),hg(R.g.R)||(l.storage="none"),hg(R.g.F)||(g.allowAdFeatures=!1,l.storeGac=!1));var I=d(R.g.na)||d(R.g.vb),D=d(R.g.Id);I&&(c.C||(l[R.g.vb]=I),l._cd2l=!0);D&&!c.C&&(l[R.g.Id]=D);e.fieldsToSend=f;e.fieldsToSet=g;e.createOnlyFields=l;return e},lv=function(a){var b=a.gtmEcommerceData;if(!b)return null;var c={};b.currencyCode&&(c.ff=b.currencyCode);if(b.impressions){c.action="impressions";var d=b.impressions;c.ph="impressions"===b.translateIfKeyEquals?wv(d,!0):d}if(b.promoView){c.action="promo_view";
var e=b.promoView.promotions;c.hd="promoView"===b.translateIfKeyEquals?wv(e,!0):e}if(b.promoClick){c.action="promo_click";var f=b.promoClick.promotions;c.hd="promoClick"===b.translateIfKeyEquals?wv(f,!0):f;c.Sa=b.promoClick.actionField;return c}for(var g in b)if(b.hasOwnProperty(g)&&"translateIfKeyEquals"!==g&&"impressions"!==g&&"promoView"!==g&&"promoClick"!==g&&"currencyCode"!==g){c.action=g;var l=b[g].products;c.Bb="products"===b.translateIfKeyEquals?wv(l,!0):l;c.Sa=b[g].actionField;break}return Object.keys(c).length?
c:null},mv=function(a,b){function c(v){return{id:d(R.g.Ea),affiliation:d(R.g.ji),revenue:d(R.g.ka),tax:d(R.g.dg),shipping:d(R.g.Ec),coupon:d(R.g.ki),list:e()||v}}for(var d=function(v){return T(b,v)},e=function(){var v;vv&&(v=d(R.g.ag));return d(R.g.cg)||v},f=d(R.g.Z),g,l=0;f&&l<f.length&&(g=f[l][R.g.cg],!g&&vv&&(g=f[l][R.g.ag]),!g);l++);var m=d(R.g.Dc);if(Kb(m))for(var n=0;f&&n<f.length;++n){var p=f[n],q;for(q in m)m.hasOwnProperty(q)&&/^(dimension|metric)\d+$/.test(q)&&void 0!=m[q]&&kv(p,q,p[m[q]])}var r=
null,t=d(R.g.li);if(a===R.g.Ba||a===R.g.qc)r={action:a,Sa:c(),Bb:wv(f)};else if(a===R.g.mc)r={action:"add",Sa:c(),Bb:wv(f)};else if(a===R.g.nc)r={action:"remove",Sa:c(),Bb:wv(f)};else if(a===R.g.Ha)r={action:"detail",Sa:c(g),Bb:wv(f)};else if(a===R.g.sb)r={action:"impressions",ph:wv(f)};else if(a===R.g.tb)r={action:"promo_view",hd:vv?wv(t)||wv(f):wv(t)};else if("select_content"===a&&t&&0<t.length||vv&&a===R.g.Jb)r={action:"promo_click",hd:vv?wv(t)||wv(f):wv(t)};else if("select_content"===a||vv&&a===
R.g.oc)r={action:"click",Sa:{list:e()||g},Bb:wv(f)};else if(a===R.g.Ib||"checkout_progress"===a){var u={step:a===R.g.Ib?1:d(R.g.Zf),option:d(R.g.Yf)};r={action:"checkout",Bb:wv(f),Sa:J(c(),u)}}else"set_checkout_option"===a&&(r={action:"checkout_option",Sa:{step:d(R.g.Zf),option:d(R.g.Yf)}});r&&(r.ff=d(R.g.ma));return r},Tv={},hv=function(a,b){var c=Tv[a];Tv[a]=J(b);if(!c)return!1;for(var d in b)if(b.hasOwnProperty(d)&&b[d]!==c[d])return!0;for(var e in c)if(c.hasOwnProperty(e)&&c[e]!==b[e])return!0;
return!1};var Uv=Xt;var Wv=encodeURI,X=encodeURIComponent,Xv=function(a,b,c){xb(a,b,c)},Yv=function(a,b){if(!a)return!1;var c=Xe(Ze(a),"host");if(!c)return!1;for(var d=0;b&&d<b.length;d++){var e=b[d]&&b[d].toLowerCase();if(e){var f=c.length-e.length;0<f&&"."!=e.charAt(0)&&(f--,e="."+e);if(0<=f&&c.indexOf(e,f)==f)return!0}}return!1},Zv=function(a,b,c){for(var d={},e=!1,f=0;a&&f<a.length;f++)a[f]&&a[f].hasOwnProperty(b)&&
a[f].hasOwnProperty(c)&&(d[a[f][b]]=a[f][c],e=!0);return e?d:null};var Y={o:{}};
Y.o.e=["google"],function(){(function(a){Y.__e=a;Y.__e.s="e";Y.__e.isVendorTemplate=!0;Y.__e.priorityOverride=0;Y.__e.isInfrastructure=!1})(function(a){return String(a.vtp_gtmCachedValues.event)})}();
Y.o.v=["google"],function(){(function(a){Y.__v=a;Y.__v.s="v";Y.__v.isVendorTemplate=!0;Y.__v.priorityOverride=0;Y.__v.isInfrastructure=!1})(function(a){var b=a.vtp_name;if(!b||!b.replace)return!1;var c=Ar(b.replace(/\\\./g,"."),a.vtp_dataLayerVersion||1),d=void 0!==c?c:a.vtp_defaultValue;Ir(d,"v",a.vtp_gtmEventId);return d})}();
Y.o.rep=["google"],function(){(function(a){Y.__rep=a;Y.__rep.s="rep";Y.__rep.isVendorTemplate=!0;Y.__rep.priorityOverride=0;Y.__rep.isInfrastructure=!1})(function(a){var b=cl(a.vtp_containerId),c;switch(b.prefix){case "AW":c=Cu;c=cu;break;case "DC":c=Mu;break;case "GF":c=
Su;break;case "HA":c=Xu;break;case "UA":c=tv;break;case "MC":break;default:G(a.vtp_gtmOnFailure);return}c?(G(a.vtp_gtmOnSuccess),Lp.register(a.vtp_containerId,c),a.vtp_remoteConfig&&Up(a.vtp_containerId,a.vtp_remoteConfig||{})):G(a.vtp_gtmOnFailure)})}();
Y.o.cid=["google"],function(){(function(a){Y.__cid=a;Y.__cid.s="cid";Y.__cid.isVendorTemplate=!0;Y.__cid.priorityOverride=0;Y.__cid.isInfrastructure=!1})(function(){return Tg.M})}();
Y.o.get=["google"],function(){(function(a){Y.__get=a;Y.__get.s="get";Y.__get.isVendorTemplate=!0;Y.__get.priorityOverride=0;Y.__get.isInfrastructure=!1})(function(a){var b=a.vtp_settings,c=b.eventParameters||{},d=String(a.vtp_eventName),e={};e.eventId=a.vtp_gtmEventId;e.priorityId=a.vtp_gtmPriorityId;a.vtp_deferrable&&(e.deferrable=!0);var f=Oo(String(b.streamId),d,c);Ro(f,e.eventId,e);a.vtp_gtmOnSuccess()})}();
var rx={};rx.dataLayer=Ae;rx.callback=function(a){qe.hasOwnProperty(a)&&oa(qe[a])&&qe[a]();delete qe[a]};rx.bootstrap=0;rx._spx=!1;
function sx(){Zd[Tg.M]=Zd[Tg.M]||rx;Tg.Hb&&(Zd["ctid_"+Tg.Hb]=rx);Zg();ah()||k(bh(),function(a,b){Mn(a,b.transportUrl,b.context);O(92)});Ga(re,Y.o);tc=Bc}
(function(a){function b(){m=F.documentElement.getAttribute("data-tag-assistant-present");Tq(m)&&(l=g.yi)}if(!E["__TAGGY_INSTALLED"]){var c=!1;if(F.referrer){var d=Ze(F.referrer);c="cct.google"===We(d,"host")}if(!c){var e=sg("googTaggyReferrer");c=e.length&&e[0].length}c&&(E["__TAGGY_INSTALLED"]=!0,ub("https://cct.google/taggy/agent.js"))}if(le)a();else{var f=function(u){var v="GTM",w="GTM";fe?(v="OGT",w="GTAG"):le&&(w=v="OPT");var y=E["google.tagmanager.debugui2.queue"];y||(y=[],
E["google.tagmanager.debugui2.queue"]=y,ub("https://"+Yd.vd+"/debug/bootstrap?id="+Tg.M+"&src="+w+"&cond="+u+"&gtm="+eh()));var x={messageType:"CONTAINER_STARTING",data:{scriptSource:ob,containerProduct:v,debug:!1,id:Tg.M,isGte:ee}};x.data.resume=function(){a()};Yd.Qh&&(x.data.initialPublish=!0);y.push(x)},g={vk:1,zi:2,Li:3,Sh:4,yi:5},l=void 0,m=void 0,n=Xe(E.location,"query",!1,void 0,"gtm_debug");Tq(n)&&(l=g.zi);if(!l&&F.referrer){var p=Ze(F.referrer);"tagassistant.google.com"===We(p,"host")&&(l=g.Li)}if(!l){var q=
sg("__TAG_ASSISTANT");q.length&&q[0].length&&(l=g.Sh)}l||b();if(!l&&P(54)&&Uq(m)){var r=function(){if(t)return!0;t=!0;b();l&&ob?f(l):a()},t=!1;yb(F,"TADebugSignal",function(){r()},!1);E.setTimeout(function(){r()},200)}else l&&ob?f(l):a()}})(function(){var a=!1;a&&ro("INIT");
Kf().m();Oh();tk.enable_gbraid_cookie_write=!0;if(Tg.Hb?Zd["ctid_"+Tg.Hb]:Zd[Tg.M]){var b=Zd.zones;b&&b.unregisterChild(Vg());}else{for(var c=data.resource||{},d=c.macros||[],e=0;e<d.length;e++)jc.push(d[e]);for(var f=c.tags||[],g=0;g<f.length;g++)mc.push(f[g]);for(var l=c.predicates||[],m=0;m<
l.length;m++)lc.push(l[m]);for(var n=c.rules||[],p=0;p<n.length;p++){for(var q=n[p],r={},t=0;t<q.length;t++)r[q[t][0]]=Array.prototype.slice.call(q[t],1);kc.push(r)}oc=Y;pc=ks;sx();Sq();ao=!1;bo=0;if("interactive"==F.readyState&&!F.createEventObject||"complete"==F.readyState)eo();else{yb(F,"DOMContentLoaded",eo);yb(F,"readystatechange",eo);if(F.createEventObject&&F.documentElement.doScroll){var u=!0;try{u=!E.frameElement}catch(A){}u&&fo()}yb(E,"load",eo)}hq=!1;"complete"===F.readyState?jq():yb(E,
"load",jq);dj();P(46)&&(O(111),Wa("HEALTH",1));P(47)&&(O(112),Wa("HEALTH",2));pe=z();
rx.bootstrap=pe;if(a){var x=so("INIT");}}});
})()

@ -0,0 +1,69 @@
var idx = lunr(function () {
this.field('title')
this.field('excerpt')
this.field('categories')
this.field('tags')
this.ref('id')
this.pipeline.remove(lunr.trimmer)
for (var item in store) {
this.add({
title: store[item].title,
excerpt: store[item].excerpt,
categories: store[item].categories,
tags: store[item].tags,
id: item
})
}
});
$(document).ready(function() {
$('input#search').on('keyup', function () {
var resultdiv = $('#results');
var query = $(this).val().toLowerCase();
var result =
idx.query(function (q) {
query.split(lunr.tokenizer.separator).forEach(function (term) {
q.term(term, { boost: 100 })
if(query.lastIndexOf(" ") != query.length-1){
q.term(term, { usePipeline: false, wildcard: lunr.Query.wildcard.TRAILING, boost: 10 })
}
if (term != ""){
q.term(term, { usePipeline: false, editDistance: 1, boost: 1 })
}
})
});
resultdiv.empty();
resultdiv.prepend('<p class="results__found">'+result.length+' Result(s) found</p>');
for (var item in result) {
var ref = result[item].ref;
if(store[ref].teaser){
var searchitem =
'<div class="list__item">'+
'<article class="archive__item" itemscope itemtype="https://schema.org/CreativeWork">'+
'<h2 class="archive__item-title" itemprop="headline">'+
'<a href="'+store[ref].url+'" rel="permalink">'+store[ref].title+'</a>'+
'</h2>'+
'<div class="archive__item-teaser">'+
'<img src="'+store[ref].teaser+'" alt="">'+
'</div>'+
'<p class="archive__item-excerpt" itemprop="description">'+store[ref].excerpt.split(" ").splice(0,20).join(" ")+'...</p>'+
'</article>'+
'</div>';
}
else{
var searchitem =
'<div class="list__item">'+
'<article class="archive__item" itemscope itemtype="https://schema.org/CreativeWork">'+
'<h2 class="archive__item-title" itemprop="headline">'+
'<a href="'+store[ref].url+'" rel="permalink">'+store[ref].title+'</a>'+
'</h2>'+
'<p class="archive__item-excerpt" itemprop="description">'+store[ref].excerpt.split(" ").splice(0,20).join(" ")+'...</p>'+
'</article>'+
'</div>';
}
resultdiv.append(searchitem);
}
});
});

@ -0,0 +1,73 @@
var store = [{
"title": "Picolarium and Polarium passwords",
"excerpt":"A few months ago, I published my first game Picolarium, a “demake” of one of my favorite puzzle games, Polarium, made in PICO-8. You can play Picolarium here. I just updated Picolarium with some new features: Picolarium now has a level editor! You can create levels, export them as passwords...","categories": ["Blog"],
"tags": ["Game development","PICO-8"],
"url": "/blog/picolarium/",
"teaser": null
},{
"title": "Mini Lights Out for CHIP-8",
"excerpt":"I’ve always thought games are shaped by their medium, so ever since I discovered CHIP-8 I’ve wanted to make a game that’s very idiomatic. Octojam was my chance. CHIP-8 has a very distinctive human–computer interface: Input is a hexadecimal keyboard on a 4x4 grid, and output is done by XOR-ing...","categories": ["Blog"],
"tags": ["CHIP-8","Game development"],
"url": "/blog/mini-lights-out/",
"teaser": "/assets/images/mini-lights-out.gif"
},{
"title": "Things I finished in 2019",
"excerpt":"A summary of things I “finished” in 2019, with comments. In 2019 I had my second child. Having one kid (born in 2014) actually opened up a lot of free time for my hobbies, since I had to stay at home most evenings, but with two kids there’s so much...","categories": ["Blog"],
"tags": ["Year in Review"],
"url": "/blog/things-i-finished/",
"teaser": null
},{
"title": "New project: DRÖM, a DREAM 6800 emulator",
"excerpt":"For this year’s RetroChallenge, I’m going to make an emulator for a 41 year old Australian hobby computer. This post is part of a series on writing an emulator for the DREAM 6800 computer. Read the DREAM 6800 posts and look at the emulator’s repository. I’ve been very interested in...","categories": ["Blog"],
"tags": ["CHIP-8","DREAM 6800","Emulation"],
"url": "/blog/drom/",
"teaser": "/assets/images/dream_6800_ea.jpg"
},{
"title": "Motorola 6800 addressing modes",
"excerpt":"The MC6800’s addressing modes have a few things to be aware of. This post is part of a series on writing an emulator for the DREAM 6800 computer. Read the DREAM 6800 posts and look at the emulator’s repository. The first step in emulating an M6800 system is to decode...","categories": ["Blog"],
"tags": ["M6800","DREAM 6800","Emulation"],
"url": "/blog/m6800-addressing-modes/",
"teaser": "/assets/images/m6800-logo.png"
},{
"title": "Extending CHIPOS with more CHIP-8 instructions",
"excerpt":"In which I learn 6800 assembly in order to hack CHIPOS. This post is part of a series on writing an emulator for the DREAM 6800 computer. Read the DREAM 6800 posts and look at the emulator’s repository. The source code and binary for the modified CHIPOS (“CHIPOSLO”) can be...","categories": ["Blog"],
"tags": ["CHIP-8","DREAM 6800","M6800"],
"url": "/blog/chipos-hacking/",
"teaser": "/assets/images/chipos_logo.png"
},{
"title": "Choosing the wrong M6800 assembler",
"excerpt":"Using the wrong assembler can set your MC6800 on fire. This post is part of a series on writing an emulator for the DREAM 6800 computer. Read the DREAM 6800 posts and look at the emulator’s repository. I’ve done a little homebrew for the Fairchild Channel F in the past,...","categories": ["Blog"],
"tags": ["M6800","DREAM 6800"],
"url": "/blog/choosing-the-wrong-m6800-assembler/",
"teaser": "/assets/images/m6800-logo.png"
},{
"title": "An emulator UI",
"excerpt":"The RetroChallenge is over, and I finished my project, the DREAM 6800 emulator DRÖM. This post is part of a series on writing an emulator for the DREAM 6800 computer. Read the DREAM 6800 posts and look at the emulator’s repository. First off: To download the emulator, head over to...","categories": ["Blog"],
"tags": ["DREAM 6800","Emulation"],
"url": "/blog/an-emulator-ui/",
"teaser": "/assets/images/drom.png"
},{
"title": "Emulating the Space Invaders look and feel",
"excerpt":"My attempt at making a Space Invaders emulator look like the arcade cabinet. Check out the emulator’s repository if you’re interested. It’s called Moon Invaders, because the game seemingly takes place on the moon, and I wrote the emulator in Lua (which is the Portuguese name for the Moon). To...","categories": ["Blog"],
"tags": ["Emulation"],
"url": "/blog/space-invaders/",
"teaser": "/assets/images/moon_invaders.png"
},{
"title": "Guide to making a CHIP-8 emulator",
"excerpt":"A high-level guide to making a CHIP-8 emulator. Do you want to get into emulator development? A common advice is to start out with CHIP-8. But how do you do that? And why are there so many different, conflicting specifications? This is a guide for you. It will tell you...","categories": ["Blog"],
"tags": ["CHIP-8","Emulation"],
"url": "/blog/write-a-chip-8-emulator/",
"teaser": "/assets/images/cosmac-vip-manual.png"
},{
"title": "Running CHIP-8 on an HP 48 calculator",
"excerpt":"How to use an advanced calculator as a “Game Boy” for CHIP-8! In 1990, the 1977 programming language and interpreter CHIP-8 had its renaissance on the HP 48S, a graphing calculator that was common in engineering schools. The numeric keypad was well suited for CHIP-8 input, and the simple language...","categories": ["Blog"],
"tags": ["CHIP-8"],
"url": "/blog/chip-8-hp-48/",
"teaser": "/assets/images/hp48.png"
},{
"title": "Anchorhead map",
"excerpt":"A map I made for the interactive fiction game Anchorhead. It’s been a while since I blogged. Contrary to what I thought at the beginning of the pandemic, I didn’t work a lot on my hobbies even though I suddenly got a lot of time to do so. But I’ve...","categories": ["Blog"],
"tags": ["Interactive Fiction"],
"url": "/blog/anchorhead-map/",
"teaser": "/assets/images/anchorhead_map.png"
}]

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

@ -0,0 +1,722 @@
<!DOCTYPE html>
<html lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>utterances</title><meta name="description" content="A lightweight commenting system using GitHub issues."><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="preconnect" href="https://api.github.com/"><link rel="preconnect" href="https://avatars3.githubusercontent.com/"><script type="module" src="utterances_data/utterances.6ec01640.js"></script><link rel="stylesheet" crossorigin="anonymous" href="utterances_data/utterances.css"></head><body><main class="timeline">
<h1 class="timeline-header">
<a class="text-link" target="_blank" href="https://github.com/tobiasvl/tobiasvl.github.io/issues/16">9 Comments</a>
<em>
- powered by
<a class="text-link" href="https://utteranc.es/" target="_blank">utteranc.es</a>
</em>
</h1><article class="timeline-comment">
<a class="avatar" href="https://github.com/cbreezier" target="_blank" tabindex="-1">
<img alt="@cbreezier" src="utterances_data/4517105.gif" width="44" height="44">
</a>
<div class="comment">
<header class="comment-header">
<span class="comment-meta">
<a class="text-link" href="https://github.com/cbreezier" target="_blank"><strong>cbreezier</strong></a>
commented
<a class="text-link" href="https://github.com/tobiasvl/tobiasvl.github.io/issues/16#issuecomment-826249951" target="_blank">on Apr 24, 2021</a>
</span>
<div class="comment-actions">
<details class="details-overlay details-popover reactions-popover">
<summary aria-label="Reactions Menu"><svg class="octicon" style="margin-right:3px" viewBox="0 0 7 16" version="1.1" width="7" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 4H3v3H0v1h3v3h1V8h3V7H4V4z"></path></svg><svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm4.81 12.81a6.72 6.72 0 0 1-2.17 1.45c-.83.36-1.72.53-2.64.53-.92 0-1.81-.17-2.64-.53-.81-.34-1.55-.83-2.17-1.45a6.773 6.773 0 0 1-1.45-2.17A6.59 6.59 0 0 1 1.21 8c0-.92.17-1.81.53-2.64.34-.81.83-1.55 1.45-2.17.62-.62 1.36-1.11 2.17-1.45A6.59 6.59 0 0 1 8 1.21c.92 0 1.81.17 2.64.53.81.34 1.55.83 2.17 1.45.62.62 1.11 1.36 1.45 2.17.36.83.53 1.72.53 2.64 0 .92-.17 1.81-.53 2.64-.34.81-.83 1.55-1.45 2.17zM4 6.8v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2H5.2C4.53 8 4 7.47 4 6.8zm5 0v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2h-.59C9.53 8 9 7.47 9 6.8zm4 3.2c-.72 1.88-2.91 3-5 3s-4.28-1.13-5-3c-.14-.39.23-1 .66-1h8.59c.41 0 .89.61.75 1z"></path></svg></summary>
<div class="Popover" style="right:6px">
<div class="Popover-message Popover-message--top-right box-shadow-large" style="padding: 16px">
<span><a href="https://api.utteranc.es/authorize?redirect_uri=https%3A%2F%2Ftobiasvl.github.io%2Fblog%2Fwrite-a-chip-8-emulator%2F" target="_top">Sign in</a> to add your reaction.</span>
</div>
</div>
</details>
</div>
</header>
<div class="markdown-body markdown-body-scrollable">
<p dir="auto">This was a great write-up - I found that it
provided a good level of detail while leaving enough of the
implementation details for me to figure out.</p>
<p dir="auto">Two things that were a little unclear to me, both in the <code class="notranslate">DXYN</code> instruction:</p>
<ol dir="auto">
<li>While drawing the sprite, I wasn't sure whether I should be actually modifying <code class="notranslate">I</code> or just reading from successive memory locations. I ended up <em>not</em> modifying it, which seemed to work fine.</li>
<li>The written explanation didn't say anything about setting the <code class="notranslate">VF</code> flag - I had to find that out from the pseudocode section which I had initially tried to avoid.</li>
</ol>
<p dir="auto">My attempt (seems to be working, sans sound) is in Rust: <a href="https://github.com/cbreezier/rchip8" target="_top" rel="noopener noreferrer">https://github.com/cbreezier/rchip8</a></p>
</div>
<div class="comment-footer" reaction-count="0" reaction-url="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/826249951/reactions">
<form class="reaction-list BtnGroup" action="javascript:">
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/826249951/reactions" class="btn BtnGroup-item reaction-button" value="+1" aria-label="Toggle Thumbs Up reaction" reaction-count="0" disabled="disabled">
👍
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/826249951/reactions" class="btn BtnGroup-item reaction-button" value="-1" aria-label="Toggle Thumbs Down reaction" reaction-count="0" disabled="disabled">
👎
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/826249951/reactions" class="btn BtnGroup-item reaction-button" value="laugh" aria-label="Toggle Laugh reaction" reaction-count="0" disabled="disabled">
😂
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/826249951/reactions" class="btn BtnGroup-item reaction-button" value="hooray" aria-label="Toggle Hooray reaction" reaction-count="0" disabled="disabled">
🎉
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/826249951/reactions" class="btn BtnGroup-item reaction-button" value="confused" aria-label="Toggle Confused reaction" reaction-count="0" disabled="disabled">
😕
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/826249951/reactions" class="btn BtnGroup-item reaction-button" value="heart" aria-label="Toggle Heart reaction" reaction-count="0" disabled="disabled">
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/826249951/reactions" class="btn BtnGroup-item reaction-button" value="rocket" aria-label="Toggle Rocket reaction" reaction-count="0" disabled="disabled">
🚀
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/826249951/reactions" class="btn BtnGroup-item reaction-button" value="eyes" aria-label="Toggle Eyes reaction" reaction-count="0" disabled="disabled">
👀
</button>
</form>
<details class="details-overlay details-popover reactions-popover">
<summary aria-label="Reactions Menu"><svg class="octicon" style="margin-right:3px" viewBox="0 0 7 16" version="1.1" width="7" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 4H3v3H0v1h3v3h1V8h3V7H4V4z"></path></svg><svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm4.81 12.81a6.72 6.72 0 0 1-2.17 1.45c-.83.36-1.72.53-2.64.53-.92 0-1.81-.17-2.64-.53-.81-.34-1.55-.83-2.17-1.45a6.773 6.773 0 0 1-1.45-2.17A6.59 6.59 0 0 1 1.21 8c0-.92.17-1.81.53-2.64.34-.81.83-1.55 1.45-2.17.62-.62 1.36-1.11 2.17-1.45A6.59 6.59 0 0 1 8 1.21c.92 0 1.81.17 2.64.53.81.34 1.55.83 2.17 1.45.62.62 1.11 1.36 1.45 2.17.36.83.53 1.72.53 2.64 0 .92-.17 1.81-.53 2.64-.34.81-.83 1.55-1.45 2.17zM4 6.8v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2H5.2C4.53 8 4 7.47 4 6.8zm5 0v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2h-.59C9.53 8 9 7.47 9 6.8zm4 3.2c-.72 1.88-2.91 3-5 3s-4.28-1.13-5-3c-.14-.39.23-1 .66-1h8.59c.41 0 .89.61.75 1z"></path></svg></summary>
<div class="Popover" style="left: 50%;transform: translateX(-50%)">
<div class="Popover-message box-shadow-large" style="padding: 16px">
<span><a href="https://api.utteranc.es/authorize?redirect_uri=https%3A%2F%2Ftobiasvl.github.io%2Fblog%2Fwrite-a-chip-8-emulator%2F" target="_top">Sign in</a> to add your reaction.</span>
</div>
</div>
</details>
</div>
</div></article><article class="timeline-comment">
<a class="avatar" href="https://github.com/tobiasvl" target="_blank" tabindex="-1">
<img alt="@tobiasvl" src="utterances_data/80824.jpeg" width="44" height="44">
</a>
<div class="comment">
<header class="comment-header">
<span class="comment-meta">
<a class="text-link" href="https://github.com/tobiasvl" target="_blank"><strong>tobiasvl</strong></a>
commented
<a class="text-link" href="https://github.com/tobiasvl/tobiasvl.github.io/issues/16#issuecomment-912114772" target="_blank">on Sep 2, 2021</a>
</span>
<div class="comment-actions">
<span class="author-association-badge">Owner</span>
<details class="details-overlay details-popover reactions-popover">
<summary aria-label="Reactions Menu"><svg class="octicon" style="margin-right:3px" viewBox="0 0 7 16" version="1.1" width="7" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 4H3v3H0v1h3v3h1V8h3V7H4V4z"></path></svg><svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm4.81 12.81a6.72 6.72 0 0 1-2.17 1.45c-.83.36-1.72.53-2.64.53-.92 0-1.81-.17-2.64-.53-.81-.34-1.55-.83-2.17-1.45a6.773 6.773 0 0 1-1.45-2.17A6.59 6.59 0 0 1 1.21 8c0-.92.17-1.81.53-2.64.34-.81.83-1.55 1.45-2.17.62-.62 1.36-1.11 2.17-1.45A6.59 6.59 0 0 1 8 1.21c.92 0 1.81.17 2.64.53.81.34 1.55.83 2.17 1.45.62.62 1.11 1.36 1.45 2.17.36.83.53 1.72.53 2.64 0 .92-.17 1.81-.53 2.64-.34.81-.83 1.55-1.45 2.17zM4 6.8v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2H5.2C4.53 8 4 7.47 4 6.8zm5 0v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2h-.59C9.53 8 9 7.47 9 6.8zm4 3.2c-.72 1.88-2.91 3-5 3s-4.28-1.13-5-3c-.14-.39.23-1 .66-1h8.59c.41 0 .89.61.75 1z"></path></svg></summary>
<div class="Popover" style="right:6px">
<div class="Popover-message Popover-message--top-right box-shadow-large" style="padding: 16px">
<span><a href="https://api.utteranc.es/authorize?redirect_uri=https%3A%2F%2Ftobiasvl.github.io%2Fblog%2Fwrite-a-chip-8-emulator%2F" target="_top">Sign in</a> to add your reaction.</span>
</div>
</div>
</details>
</div>
</header>
<div class="markdown-body markdown-body-scrollable">
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/cbreezier/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/cbreezier" target="_top" rel="noopener noreferrer">@cbreezier</a> Hey, thanks for the feedback!</p>
<ol dir="auto">
<li>Thanks, I've attempted to clarify this. You're correct, <code class="notranslate">I</code> should not be modified (and neither should <code class="notranslate">VX</code> and <code class="notranslate">VY</code>, for that matter).</li>
<li>Hmm, the written explanation does have a bullet point about setting <code class="notranslate">VF</code>,
though? It says "If the current pixel in the sprite row is on and the
pixel at coordinates X,Y on the screen is also on, turn off the pixel
and set <code class="notranslate">VF</code> to 1". Let me know if anything is unclear about this, or if you were talking about some other part of the tutorial.</li>
</ol>
<p dir="auto">Again, thanks for the feedback, and I'm glad you found it useful!</p>
</div>
<div class="comment-footer" reaction-count="0" reaction-url="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/912114772/reactions">
<form class="reaction-list BtnGroup" action="javascript:">
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/912114772/reactions" class="btn BtnGroup-item reaction-button" value="+1" aria-label="Toggle Thumbs Up reaction" reaction-count="0" disabled="disabled">
👍
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/912114772/reactions" class="btn BtnGroup-item reaction-button" value="-1" aria-label="Toggle Thumbs Down reaction" reaction-count="0" disabled="disabled">
👎
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/912114772/reactions" class="btn BtnGroup-item reaction-button" value="laugh" aria-label="Toggle Laugh reaction" reaction-count="0" disabled="disabled">
😂
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/912114772/reactions" class="btn BtnGroup-item reaction-button" value="hooray" aria-label="Toggle Hooray reaction" reaction-count="0" disabled="disabled">
🎉
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/912114772/reactions" class="btn BtnGroup-item reaction-button" value="confused" aria-label="Toggle Confused reaction" reaction-count="0" disabled="disabled">
😕
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/912114772/reactions" class="btn BtnGroup-item reaction-button" value="heart" aria-label="Toggle Heart reaction" reaction-count="0" disabled="disabled">
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/912114772/reactions" class="btn BtnGroup-item reaction-button" value="rocket" aria-label="Toggle Rocket reaction" reaction-count="0" disabled="disabled">
🚀
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/912114772/reactions" class="btn BtnGroup-item reaction-button" value="eyes" aria-label="Toggle Eyes reaction" reaction-count="0" disabled="disabled">
👀
</button>
</form>
<details class="details-overlay details-popover reactions-popover">
<summary aria-label="Reactions Menu"><svg class="octicon" style="margin-right:3px" viewBox="0 0 7 16" version="1.1" width="7" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 4H3v3H0v1h3v3h1V8h3V7H4V4z"></path></svg><svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm4.81 12.81a6.72 6.72 0 0 1-2.17 1.45c-.83.36-1.72.53-2.64.53-.92 0-1.81-.17-2.64-.53-.81-.34-1.55-.83-2.17-1.45a6.773 6.773 0 0 1-1.45-2.17A6.59 6.59 0 0 1 1.21 8c0-.92.17-1.81.53-2.64.34-.81.83-1.55 1.45-2.17.62-.62 1.36-1.11 2.17-1.45A6.59 6.59 0 0 1 8 1.21c.92 0 1.81.17 2.64.53.81.34 1.55.83 2.17 1.45.62.62 1.11 1.36 1.45 2.17.36.83.53 1.72.53 2.64 0 .92-.17 1.81-.53 2.64-.34.81-.83 1.55-1.45 2.17zM4 6.8v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2H5.2C4.53 8 4 7.47 4 6.8zm5 0v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2h-.59C9.53 8 9 7.47 9 6.8zm4 3.2c-.72 1.88-2.91 3-5 3s-4.28-1.13-5-3c-.14-.39.23-1 .66-1h8.59c.41 0 .89.61.75 1z"></path></svg></summary>
<div class="Popover" style="left: 50%;transform: translateX(-50%)">
<div class="Popover-message box-shadow-large" style="padding: 16px">
<span><a href="https://api.utteranc.es/authorize?redirect_uri=https%3A%2F%2Ftobiasvl.github.io%2Fblog%2Fwrite-a-chip-8-emulator%2F" target="_top">Sign in</a> to add your reaction.</span>
</div>
</div>
</details>
</div>
</div></article><article class="timeline-comment">
<a class="avatar" href="https://github.com/DasStone" target="_blank" tabindex="-1">
<img alt="@DasStone" src="utterances_data/58308367.png" width="44" height="44">
</a>
<div class="comment">
<header class="comment-header">
<span class="comment-meta">
<a class="text-link" href="https://github.com/DasStone" target="_blank"><strong>DasStone</strong></a>
commented
<a class="text-link" href="https://github.com/tobiasvl/tobiasvl.github.io/issues/16#issuecomment-1063939210" target="_blank">on Mar 10, 2022</a>
</span>
<div class="comment-actions">
<details class="details-overlay details-popover reactions-popover">
<summary aria-label="Reactions Menu"><svg class="octicon" style="margin-right:3px" viewBox="0 0 7 16" version="1.1" width="7" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 4H3v3H0v1h3v3h1V8h3V7H4V4z"></path></svg><svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm4.81 12.81a6.72 6.72 0 0 1-2.17 1.45c-.83.36-1.72.53-2.64.53-.92 0-1.81-.17-2.64-.53-.81-.34-1.55-.83-2.17-1.45a6.773 6.773 0 0 1-1.45-2.17A6.59 6.59 0 0 1 1.21 8c0-.92.17-1.81.53-2.64.34-.81.83-1.55 1.45-2.17.62-.62 1.36-1.11 2.17-1.45A6.59 6.59 0 0 1 8 1.21c.92 0 1.81.17 2.64.53.81.34 1.55.83 2.17 1.45.62.62 1.11 1.36 1.45 2.17.36.83.53 1.72.53 2.64 0 .92-.17 1.81-.53 2.64-.34.81-.83 1.55-1.45 2.17zM4 6.8v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2H5.2C4.53 8 4 7.47 4 6.8zm5 0v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2h-.59C9.53 8 9 7.47 9 6.8zm4 3.2c-.72 1.88-2.91 3-5 3s-4.28-1.13-5-3c-.14-.39.23-1 .66-1h8.59c.41 0 .89.61.75 1z"></path></svg></summary>
<div class="Popover" style="right:6px">
<div class="Popover-message Popover-message--top-right box-shadow-large" style="padding: 16px">
<span><a href="https://api.utteranc.es/authorize?redirect_uri=https%3A%2F%2Ftobiasvl.github.io%2Fblog%2Fwrite-a-chip-8-emulator%2F" target="_top">Sign in</a> to add your reaction.</span>
</div>
</div>
</details>
</div>
</header>
<div class="markdown-body markdown-body-scrollable">
<p dir="auto">Thanks for writing this great article! I’m sure it helped many people get into the topic of emulators, as it did with me.</p>
<p dir="auto">But there is one thing I’m still not sure about (it has to do with <code class="notranslate">FX0A</code>
Instruction). It says that the instruction “blocks” execution. Does
this mean that the timers should stop decrementing as well or do they
continue at their normal rate of <code class="notranslate">60Hz</code>
(I’ve scanned the Internet for any mention of this, but I haven’t found a
clear, unambiguous answer. But it seems like that the timers should
continue)?</p>
<p dir="auto">Maybe this is something you find worth clarifying in your article.</p>
<p dir="auto">Thanks for your time!</p>
<p dir="auto">Here is my attempt in Rust for anyone interested: <a href="https://github.com/DasStone/chip8emu_rs" target="_top" rel="noopener noreferrer">https://github.com/DasStone/chip8emu_rs</a></p>
</div>
<div class="comment-footer" reaction-count="0" reaction-url="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1063939210/reactions">
<form class="reaction-list BtnGroup" action="javascript:">
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1063939210/reactions" class="btn BtnGroup-item reaction-button" value="+1" aria-label="Toggle Thumbs Up reaction" reaction-count="0" disabled="disabled">
👍
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1063939210/reactions" class="btn BtnGroup-item reaction-button" value="-1" aria-label="Toggle Thumbs Down reaction" reaction-count="0" disabled="disabled">
👎
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1063939210/reactions" class="btn BtnGroup-item reaction-button" value="laugh" aria-label="Toggle Laugh reaction" reaction-count="0" disabled="disabled">
😂
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1063939210/reactions" class="btn BtnGroup-item reaction-button" value="hooray" aria-label="Toggle Hooray reaction" reaction-count="0" disabled="disabled">
🎉
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1063939210/reactions" class="btn BtnGroup-item reaction-button" value="confused" aria-label="Toggle Confused reaction" reaction-count="0" disabled="disabled">
😕
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1063939210/reactions" class="btn BtnGroup-item reaction-button" value="heart" aria-label="Toggle Heart reaction" reaction-count="0" disabled="disabled">
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1063939210/reactions" class="btn BtnGroup-item reaction-button" value="rocket" aria-label="Toggle Rocket reaction" reaction-count="0" disabled="disabled">
🚀
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1063939210/reactions" class="btn BtnGroup-item reaction-button" value="eyes" aria-label="Toggle Eyes reaction" reaction-count="0" disabled="disabled">
👀
</button>
</form>
<details class="details-overlay details-popover reactions-popover">
<summary aria-label="Reactions Menu"><svg class="octicon" style="margin-right:3px" viewBox="0 0 7 16" version="1.1" width="7" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 4H3v3H0v1h3v3h1V8h3V7H4V4z"></path></svg><svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm4.81 12.81a6.72 6.72 0 0 1-2.17 1.45c-.83.36-1.72.53-2.64.53-.92 0-1.81-.17-2.64-.53-.81-.34-1.55-.83-2.17-1.45a6.773 6.773 0 0 1-1.45-2.17A6.59 6.59 0 0 1 1.21 8c0-.92.17-1.81.53-2.64.34-.81.83-1.55 1.45-2.17.62-.62 1.36-1.11 2.17-1.45A6.59 6.59 0 0 1 8 1.21c.92 0 1.81.17 2.64.53.81.34 1.55.83 2.17 1.45.62.62 1.11 1.36 1.45 2.17.36.83.53 1.72.53 2.64 0 .92-.17 1.81-.53 2.64-.34.81-.83 1.55-1.45 2.17zM4 6.8v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2H5.2C4.53 8 4 7.47 4 6.8zm5 0v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2h-.59C9.53 8 9 7.47 9 6.8zm4 3.2c-.72 1.88-2.91 3-5 3s-4.28-1.13-5-3c-.14-.39.23-1 .66-1h8.59c.41 0 .89.61.75 1z"></path></svg></summary>
<div class="Popover" style="left: 50%;transform: translateX(-50%)">
<div class="Popover-message box-shadow-large" style="padding: 16px">
<span><a href="https://api.utteranc.es/authorize?redirect_uri=https%3A%2F%2Ftobiasvl.github.io%2Fblog%2Fwrite-a-chip-8-emulator%2F" target="_top">Sign in</a> to add your reaction.</span>
</div>
</div>
</details>
</div>
</div></article><article class="timeline-comment">
<a class="avatar" href="https://github.com/tobiasvl" target="_blank" tabindex="-1">
<img alt="@tobiasvl" src="utterances_data/80824.jpeg" width="44" height="44">
</a>
<div class="comment">
<header class="comment-header">
<span class="comment-meta">
<a class="text-link" href="https://github.com/tobiasvl" target="_blank"><strong>tobiasvl</strong></a>
commented
<a class="text-link" href="https://github.com/tobiasvl/tobiasvl.github.io/issues/16#issuecomment-1098475208" target="_blank">on Apr 13, 2022</a>
</span>
<div class="comment-actions">
<span class="author-association-badge">Owner</span>
<details class="details-overlay details-popover reactions-popover">
<summary aria-label="Reactions Menu"><svg class="octicon" style="margin-right:3px" viewBox="0 0 7 16" version="1.1" width="7" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 4H3v3H0v1h3v3h1V8h3V7H4V4z"></path></svg><svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm4.81 12.81a6.72 6.72 0 0 1-2.17 1.45c-.83.36-1.72.53-2.64.53-.92 0-1.81-.17-2.64-.53-.81-.34-1.55-.83-2.17-1.45a6.773 6.773 0 0 1-1.45-2.17A6.59 6.59 0 0 1 1.21 8c0-.92.17-1.81.53-2.64.34-.81.83-1.55 1.45-2.17.62-.62 1.36-1.11 2.17-1.45A6.59 6.59 0 0 1 8 1.21c.92 0 1.81.17 2.64.53.81.34 1.55.83 2.17 1.45.62.62 1.11 1.36 1.45 2.17.36.83.53 1.72.53 2.64 0 .92-.17 1.81-.53 2.64-.34.81-.83 1.55-1.45 2.17zM4 6.8v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2H5.2C4.53 8 4 7.47 4 6.8zm5 0v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2h-.59C9.53 8 9 7.47 9 6.8zm4 3.2c-.72 1.88-2.91 3-5 3s-4.28-1.13-5-3c-.14-.39.23-1 .66-1h8.59c.41 0 .89.61.75 1z"></path></svg></summary>
<div class="Popover" style="right:6px">
<div class="Popover-message Popover-message--top-right box-shadow-large" style="padding: 16px">
<span><a href="https://api.utteranc.es/authorize?redirect_uri=https%3A%2F%2Ftobiasvl.github.io%2Fblog%2Fwrite-a-chip-8-emulator%2F" target="_top">Sign in</a> to add your reaction.</span>
</div>
</div>
</details>
</div>
</header>
<div class="markdown-body markdown-body-scrollable">
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/DasStone/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/DasStone" target="_top" rel="noopener noreferrer">@DasStone</a>
Thanks for the kind words and the feedback! You're right, this is
definitely worth clarifying in the blog post. In the meantime, I can
confirm that yes, you're correct, the timers should continue while the <code class="notranslate">FX0A</code> instruction is blocking for input.</p>
<p dir="auto">In the CHIP-8 interpreter on the COSMAC VIP, <code class="notranslate">FX0A</code>
was simply an infinite loop that ran until a key was pressed. The
timers were decremented in the COSMAC VIP's built-in display interrupt
routine, which is why they're decremented 60 times per second – the
display interrupt occurs each frame drawn to the display, which
refreshes at 60 Hz. You can read more about it here: <a href="https://laurencescotford.com/chip-8-on-the-cosmac-vip-interrupts/" rel="noopener noreferrer" target="_top">https://laurencescotford.com/chip-8-on-the-cosmac-vip-interrupts/</a></p>
</div>
<div class="comment-footer" reaction-count="2" reaction-url="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1098475208/reactions">
<form class="reaction-list BtnGroup" action="javascript:">
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1098475208/reactions" class="btn BtnGroup-item reaction-button" value="+1" aria-label="Toggle Thumbs Up reaction" reaction-count="1" disabled="disabled">
👍
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1098475208/reactions" class="btn BtnGroup-item reaction-button" value="-1" aria-label="Toggle Thumbs Down reaction" reaction-count="0" disabled="disabled">
👎
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1098475208/reactions" class="btn BtnGroup-item reaction-button" value="laugh" aria-label="Toggle Laugh reaction" reaction-count="0" disabled="disabled">
😂
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1098475208/reactions" class="btn BtnGroup-item reaction-button" value="hooray" aria-label="Toggle Hooray reaction" reaction-count="0" disabled="disabled">
🎉
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1098475208/reactions" class="btn BtnGroup-item reaction-button" value="confused" aria-label="Toggle Confused reaction" reaction-count="0" disabled="disabled">
😕
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1098475208/reactions" class="btn BtnGroup-item reaction-button" value="heart" aria-label="Toggle Heart reaction" reaction-count="1" disabled="disabled">
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1098475208/reactions" class="btn BtnGroup-item reaction-button" value="rocket" aria-label="Toggle Rocket reaction" reaction-count="0" disabled="disabled">
🚀
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1098475208/reactions" class="btn BtnGroup-item reaction-button" value="eyes" aria-label="Toggle Eyes reaction" reaction-count="0" disabled="disabled">
👀
</button>
</form>
<details class="details-overlay details-popover reactions-popover">
<summary aria-label="Reactions Menu"><svg class="octicon" style="margin-right:3px" viewBox="0 0 7 16" version="1.1" width="7" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 4H3v3H0v1h3v3h1V8h3V7H4V4z"></path></svg><svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm4.81 12.81a6.72 6.72 0 0 1-2.17 1.45c-.83.36-1.72.53-2.64.53-.92 0-1.81-.17-2.64-.53-.81-.34-1.55-.83-2.17-1.45a6.773 6.773 0 0 1-1.45-2.17A6.59 6.59 0 0 1 1.21 8c0-.92.17-1.81.53-2.64.34-.81.83-1.55 1.45-2.17.62-.62 1.36-1.11 2.17-1.45A6.59 6.59 0 0 1 8 1.21c.92 0 1.81.17 2.64.53.81.34 1.55.83 2.17 1.45.62.62 1.11 1.36 1.45 2.17.36.83.53 1.72.53 2.64 0 .92-.17 1.81-.53 2.64-.34.81-.83 1.55-1.45 2.17zM4 6.8v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2H5.2C4.53 8 4 7.47 4 6.8zm5 0v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2h-.59C9.53 8 9 7.47 9 6.8zm4 3.2c-.72 1.88-2.91 3-5 3s-4.28-1.13-5-3c-.14-.39.23-1 .66-1h8.59c.41 0 .89.61.75 1z"></path></svg></summary>
<div class="Popover" style="left: 50%;transform: translateX(-50%)">
<div class="Popover-message box-shadow-large" style="padding: 16px">
<span><a href="https://api.utteranc.es/authorize?redirect_uri=https%3A%2F%2Ftobiasvl.github.io%2Fblog%2Fwrite-a-chip-8-emulator%2F" target="_top">Sign in</a> to add your reaction.</span>
</div>
</div>
</details>
</div>
</div></article><article class="timeline-comment">
<a class="avatar" href="https://github.com/jakubito" target="_blank" tabindex="-1">
<img alt="@jakubito" src="utterances_data/8123702.png" width="44" height="44">
</a>
<div class="comment">
<header class="comment-header">
<span class="comment-meta">
<a class="text-link" href="https://github.com/jakubito" target="_blank"><strong>jakubito</strong></a>
commented
<a class="text-link" href="https://github.com/tobiasvl/tobiasvl.github.io/issues/16#issuecomment-1132356459" target="_blank">on May 19, 2022</a>
</span>
<div class="comment-actions">
<details class="details-overlay details-popover reactions-popover">
<summary aria-label="Reactions Menu"><svg class="octicon" style="margin-right:3px" viewBox="0 0 7 16" version="1.1" width="7" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 4H3v3H0v1h3v3h1V8h3V7H4V4z"></path></svg><svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm4.81 12.81a6.72 6.72 0 0 1-2.17 1.45c-.83.36-1.72.53-2.64.53-.92 0-1.81-.17-2.64-.53-.81-.34-1.55-.83-2.17-1.45a6.773 6.773 0 0 1-1.45-2.17A6.59 6.59 0 0 1 1.21 8c0-.92.17-1.81.53-2.64.34-.81.83-1.55 1.45-2.17.62-.62 1.36-1.11 2.17-1.45A6.59 6.59 0 0 1 8 1.21c.92 0 1.81.17 2.64.53.81.34 1.55.83 2.17 1.45.62.62 1.11 1.36 1.45 2.17.36.83.53 1.72.53 2.64 0 .92-.17 1.81-.53 2.64-.34.81-.83 1.55-1.45 2.17zM4 6.8v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2H5.2C4.53 8 4 7.47 4 6.8zm5 0v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2h-.59C9.53 8 9 7.47 9 6.8zm4 3.2c-.72 1.88-2.91 3-5 3s-4.28-1.13-5-3c-.14-.39.23-1 .66-1h8.59c.41 0 .89.61.75 1z"></path></svg></summary>
<div class="Popover" style="right:6px">
<div class="Popover-message Popover-message--top-right box-shadow-large" style="padding: 16px">
<span><a href="https://api.utteranc.es/authorize?redirect_uri=https%3A%2F%2Ftobiasvl.github.io%2Fblog%2Fwrite-a-chip-8-emulator%2F" target="_top">Sign in</a> to add your reaction.</span>
</div>
</div>
</details>
</div>
</header>
<div class="markdown-body markdown-body-scrollable">
<p dir="auto">Hi <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tobiasvl/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tobiasvl" target="_top" rel="noopener noreferrer">@tobiasvl</a>, thanks for posting this excellent guide. I referenced it many times while writing my own interpreter.</p>
<p dir="auto">I have a question regarding one of your statements:</p>
<blockquote>
<p dir="auto">However, the actual drawing of the sprite should not wrap.
If a sprite is drawn near the edge of the screen, it should be clipped,
and not wrap. The sprite should be partly drawn near the edge, and the
other part should not reappear on the opposite side of the screen.</p>
</blockquote>
<p dir="auto">But <a href="http://devernay.free.fr/hacks/chip8/C8TECH10.HTM#Dxyn" rel="noopener noreferrer" target="_top">this reference</a> says:</p>
<blockquote>
<p dir="auto">If the sprite is positioned so part of it is outside the
coordinates of the display, it wraps around to the opposite side of the
screen.</p>
</blockquote>
<p dir="auto">For example, paddles in Pong seem to wrap in other
interpreters I tried (e.g. Octo IDE), but based on your instructions,
they shouldn't. Am I missing something here?</p>
<p dir="auto">Edit: Just found out Octo IDE has an option for wrapping/clipping sprites. I think I'll make it configurable too.</p>
</div>
<div class="comment-footer" reaction-count="0" reaction-url="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1132356459/reactions">
<form class="reaction-list BtnGroup" action="javascript:">
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1132356459/reactions" class="btn BtnGroup-item reaction-button" value="+1" aria-label="Toggle Thumbs Up reaction" reaction-count="0" disabled="disabled">
👍
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1132356459/reactions" class="btn BtnGroup-item reaction-button" value="-1" aria-label="Toggle Thumbs Down reaction" reaction-count="0" disabled="disabled">
👎
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1132356459/reactions" class="btn BtnGroup-item reaction-button" value="laugh" aria-label="Toggle Laugh reaction" reaction-count="0" disabled="disabled">
😂
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1132356459/reactions" class="btn BtnGroup-item reaction-button" value="hooray" aria-label="Toggle Hooray reaction" reaction-count="0" disabled="disabled">
🎉
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1132356459/reactions" class="btn BtnGroup-item reaction-button" value="confused" aria-label="Toggle Confused reaction" reaction-count="0" disabled="disabled">
😕
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1132356459/reactions" class="btn BtnGroup-item reaction-button" value="heart" aria-label="Toggle Heart reaction" reaction-count="0" disabled="disabled">
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1132356459/reactions" class="btn BtnGroup-item reaction-button" value="rocket" aria-label="Toggle Rocket reaction" reaction-count="0" disabled="disabled">
🚀
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1132356459/reactions" class="btn BtnGroup-item reaction-button" value="eyes" aria-label="Toggle Eyes reaction" reaction-count="0" disabled="disabled">
👀
</button>
</form>
<details class="details-overlay details-popover reactions-popover">
<summary aria-label="Reactions Menu"><svg class="octicon" style="margin-right:3px" viewBox="0 0 7 16" version="1.1" width="7" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 4H3v3H0v1h3v3h1V8h3V7H4V4z"></path></svg><svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm4.81 12.81a6.72 6.72 0 0 1-2.17 1.45c-.83.36-1.72.53-2.64.53-.92 0-1.81-.17-2.64-.53-.81-.34-1.55-.83-2.17-1.45a6.773 6.773 0 0 1-1.45-2.17A6.59 6.59 0 0 1 1.21 8c0-.92.17-1.81.53-2.64.34-.81.83-1.55 1.45-2.17.62-.62 1.36-1.11 2.17-1.45A6.59 6.59 0 0 1 8 1.21c.92 0 1.81.17 2.64.53.81.34 1.55.83 2.17 1.45.62.62 1.11 1.36 1.45 2.17.36.83.53 1.72.53 2.64 0 .92-.17 1.81-.53 2.64-.34.81-.83 1.55-1.45 2.17zM4 6.8v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2H5.2C4.53 8 4 7.47 4 6.8zm5 0v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2h-.59C9.53 8 9 7.47 9 6.8zm4 3.2c-.72 1.88-2.91 3-5 3s-4.28-1.13-5-3c-.14-.39.23-1 .66-1h8.59c.41 0 .89.61.75 1z"></path></svg></summary>
<div class="Popover" style="left: 50%;transform: translateX(-50%)">
<div class="Popover-message box-shadow-large" style="padding: 16px">
<span><a href="https://api.utteranc.es/authorize?redirect_uri=https%3A%2F%2Ftobiasvl.github.io%2Fblog%2Fwrite-a-chip-8-emulator%2F" target="_top">Sign in</a> to add your reaction.</span>
</div>
</div>
</details>
</div>
</div></article><article class="timeline-comment">
<a class="avatar" href="https://github.com/tobiasvl" target="_blank" tabindex="-1">
<img alt="@tobiasvl" src="utterances_data/80824.jpeg" width="44" height="44">
</a>
<div class="comment">
<header class="comment-header">
<span class="comment-meta">
<a class="text-link" href="https://github.com/tobiasvl" target="_blank"><strong>tobiasvl</strong></a>
commented
<a class="text-link" href="https://github.com/tobiasvl/tobiasvl.github.io/issues/16#issuecomment-1133746903" target="_blank">on May 21, 2022</a>
</span>
<div class="comment-actions">
<span class="author-association-badge">Owner</span>
<details class="details-overlay details-popover reactions-popover">
<summary aria-label="Reactions Menu"><svg class="octicon" style="margin-right:3px" viewBox="0 0 7 16" version="1.1" width="7" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 4H3v3H0v1h3v3h1V8h3V7H4V4z"></path></svg><svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm4.81 12.81a6.72 6.72 0 0 1-2.17 1.45c-.83.36-1.72.53-2.64.53-.92 0-1.81-.17-2.64-.53-.81-.34-1.55-.83-2.17-1.45a6.773 6.773 0 0 1-1.45-2.17A6.59 6.59 0 0 1 1.21 8c0-.92.17-1.81.53-2.64.34-.81.83-1.55 1.45-2.17.62-.62 1.36-1.11 2.17-1.45A6.59 6.59 0 0 1 8 1.21c.92 0 1.81.17 2.64.53.81.34 1.55.83 2.17 1.45.62.62 1.11 1.36 1.45 2.17.36.83.53 1.72.53 2.64 0 .92-.17 1.81-.53 2.64-.34.81-.83 1.55-1.45 2.17zM4 6.8v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2H5.2C4.53 8 4 7.47 4 6.8zm5 0v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2h-.59C9.53 8 9 7.47 9 6.8zm4 3.2c-.72 1.88-2.91 3-5 3s-4.28-1.13-5-3c-.14-.39.23-1 .66-1h8.59c.41 0 .89.61.75 1z"></path></svg></summary>
<div class="Popover" style="right:6px">
<div class="Popover-message Popover-message--top-right box-shadow-large" style="padding: 16px">
<span><a href="https://api.utteranc.es/authorize?redirect_uri=https%3A%2F%2Ftobiasvl.github.io%2Fblog%2Fwrite-a-chip-8-emulator%2F" target="_top">Sign in</a> to add your reaction.</span>
</div>
</div>
</details>
</div>
</header>
<div class="markdown-body markdown-body-scrollable">
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jakubito/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jakubito" target="_top" rel="noopener noreferrer">@jakubito</a>
Thanks, interesting! I can confirm that my statement is correct –
sprites shouldn't partially wrap in either the original CHIP-8
interpreter (<a href="https://laurencescotford.com/chip-8-on-the-cosmac-vip-drawing-sprites/" rel="noopener noreferrer" target="_top">source</a>) or in CHIP-48/S-CHIP (<a href="https://github.com/Chromatophore/HP48-Superchip/blob/master/investigations/quirk_collide.md" target="_top" rel="noopener noreferrer">source</a>).</p>
<p dir="auto">However! By "Pong", I assume you're referring to David
Winter's Pong game. It was written for his own DOS interpreter, which
was based on the CHIP-48 specification. This specification seems to be
what Cowgod's reference is based on as well. It's possible David Winter
introduced sprite wrapping himself, and this is the reason for the
disparity.</p>
</div>
<div class="comment-footer" reaction-count="1" reaction-url="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1133746903/reactions">
<form class="reaction-list BtnGroup" action="javascript:">
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1133746903/reactions" class="btn BtnGroup-item reaction-button" value="+1" aria-label="Toggle Thumbs Up reaction" reaction-count="0" disabled="disabled">
👍
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1133746903/reactions" class="btn BtnGroup-item reaction-button" value="-1" aria-label="Toggle Thumbs Down reaction" reaction-count="0" disabled="disabled">
👎
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1133746903/reactions" class="btn BtnGroup-item reaction-button" value="laugh" aria-label="Toggle Laugh reaction" reaction-count="0" disabled="disabled">
😂
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1133746903/reactions" class="btn BtnGroup-item reaction-button" value="hooray" aria-label="Toggle Hooray reaction" reaction-count="0" disabled="disabled">
🎉
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1133746903/reactions" class="btn BtnGroup-item reaction-button" value="confused" aria-label="Toggle Confused reaction" reaction-count="0" disabled="disabled">
😕
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1133746903/reactions" class="btn BtnGroup-item reaction-button" value="heart" aria-label="Toggle Heart reaction" reaction-count="1" disabled="disabled">
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1133746903/reactions" class="btn BtnGroup-item reaction-button" value="rocket" aria-label="Toggle Rocket reaction" reaction-count="0" disabled="disabled">
🚀
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1133746903/reactions" class="btn BtnGroup-item reaction-button" value="eyes" aria-label="Toggle Eyes reaction" reaction-count="0" disabled="disabled">
👀
</button>
</form>
<details class="details-overlay details-popover reactions-popover">
<summary aria-label="Reactions Menu"><svg class="octicon" style="margin-right:3px" viewBox="0 0 7 16" version="1.1" width="7" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 4H3v3H0v1h3v3h1V8h3V7H4V4z"></path></svg><svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm4.81 12.81a6.72 6.72 0 0 1-2.17 1.45c-.83.36-1.72.53-2.64.53-.92 0-1.81-.17-2.64-.53-.81-.34-1.55-.83-2.17-1.45a6.773 6.773 0 0 1-1.45-2.17A6.59 6.59 0 0 1 1.21 8c0-.92.17-1.81.53-2.64.34-.81.83-1.55 1.45-2.17.62-.62 1.36-1.11 2.17-1.45A6.59 6.59 0 0 1 8 1.21c.92 0 1.81.17 2.64.53.81.34 1.55.83 2.17 1.45.62.62 1.11 1.36 1.45 2.17.36.83.53 1.72.53 2.64 0 .92-.17 1.81-.53 2.64-.34.81-.83 1.55-1.45 2.17zM4 6.8v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2H5.2C4.53 8 4 7.47 4 6.8zm5 0v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2h-.59C9.53 8 9 7.47 9 6.8zm4 3.2c-.72 1.88-2.91 3-5 3s-4.28-1.13-5-3c-.14-.39.23-1 .66-1h8.59c.41 0 .89.61.75 1z"></path></svg></summary>
<div class="Popover" style="left: 50%;transform: translateX(-50%)">
<div class="Popover-message box-shadow-large" style="padding: 16px">
<span><a href="https://api.utteranc.es/authorize?redirect_uri=https%3A%2F%2Ftobiasvl.github.io%2Fblog%2Fwrite-a-chip-8-emulator%2F" target="_top">Sign in</a> to add your reaction.</span>
</div>
</div>
</details>
</div>
</div></article><article class="timeline-comment">
<a class="avatar" href="https://github.com/JamesWWalker" target="_blank" tabindex="-1">
<img alt="@JamesWWalker" src="utterances_data/10425858.jpeg" width="44" height="44">
</a>
<div class="comment">
<header class="comment-header">
<span class="comment-meta">
<a class="text-link" href="https://github.com/JamesWWalker" target="_blank"><strong>JamesWWalker</strong></a>
commented
<a class="text-link" href="https://github.com/tobiasvl/tobiasvl.github.io/issues/16#issuecomment-1193015003" target="_blank">on Jul 22, 2022</a>
</span>
<div class="comment-actions">
<details class="details-overlay details-popover reactions-popover">
<summary aria-label="Reactions Menu"><svg class="octicon" style="margin-right:3px" viewBox="0 0 7 16" version="1.1" width="7" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 4H3v3H0v1h3v3h1V8h3V7H4V4z"></path></svg><svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm4.81 12.81a6.72 6.72 0 0 1-2.17 1.45c-.83.36-1.72.53-2.64.53-.92 0-1.81-.17-2.64-.53-.81-.34-1.55-.83-2.17-1.45a6.773 6.773 0 0 1-1.45-2.17A6.59 6.59 0 0 1 1.21 8c0-.92.17-1.81.53-2.64.34-.81.83-1.55 1.45-2.17.62-.62 1.36-1.11 2.17-1.45A6.59 6.59 0 0 1 8 1.21c.92 0 1.81.17 2.64.53.81.34 1.55.83 2.17 1.45.62.62 1.11 1.36 1.45 2.17.36.83.53 1.72.53 2.64 0 .92-.17 1.81-.53 2.64-.34.81-.83 1.55-1.45 2.17zM4 6.8v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2H5.2C4.53 8 4 7.47 4 6.8zm5 0v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2h-.59C9.53 8 9 7.47 9 6.8zm4 3.2c-.72 1.88-2.91 3-5 3s-4.28-1.13-5-3c-.14-.39.23-1 .66-1h8.59c.41 0 .89.61.75 1z"></path></svg></summary>
<div class="Popover" style="right:6px">
<div class="Popover-message Popover-message--top-right box-shadow-large" style="padding: 16px">
<span><a href="https://api.utteranc.es/authorize?redirect_uri=https%3A%2F%2Ftobiasvl.github.io%2Fblog%2Fwrite-a-chip-8-emulator%2F" target="_top">Sign in</a> to add your reaction.</span>
</div>
</div>
</details>
</div>
</header>
<div class="markdown-body markdown-body-scrollable">
<p dir="auto">Thanks for this helpful post on creating a
CHIP-8 emulator! I just developed an interest in emulator creation and,
after a little research, discovered that writing a CHIP-8 emulator
(/interpreter) is apparently a rite of passage. With the help of this
guide, I put together a working CHIP-8 emulator in Java that passes the
BonCoder test, and it only took around 8 hours. I'm planning to try to
make an NES emulator next. I expect that to be a big step up in
complexity!</p>
</div>
<div class="comment-footer" reaction-count="1" reaction-url="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1193015003/reactions">
<form class="reaction-list BtnGroup" action="javascript:">
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1193015003/reactions" class="btn BtnGroup-item reaction-button" value="+1" aria-label="Toggle Thumbs Up reaction" reaction-count="1" disabled="disabled">
👍
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1193015003/reactions" class="btn BtnGroup-item reaction-button" value="-1" aria-label="Toggle Thumbs Down reaction" reaction-count="0" disabled="disabled">
👎
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1193015003/reactions" class="btn BtnGroup-item reaction-button" value="laugh" aria-label="Toggle Laugh reaction" reaction-count="0" disabled="disabled">
😂
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1193015003/reactions" class="btn BtnGroup-item reaction-button" value="hooray" aria-label="Toggle Hooray reaction" reaction-count="0" disabled="disabled">
🎉
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1193015003/reactions" class="btn BtnGroup-item reaction-button" value="confused" aria-label="Toggle Confused reaction" reaction-count="0" disabled="disabled">
😕
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1193015003/reactions" class="btn BtnGroup-item reaction-button" value="heart" aria-label="Toggle Heart reaction" reaction-count="0" disabled="disabled">
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1193015003/reactions" class="btn BtnGroup-item reaction-button" value="rocket" aria-label="Toggle Rocket reaction" reaction-count="0" disabled="disabled">
🚀
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1193015003/reactions" class="btn BtnGroup-item reaction-button" value="eyes" aria-label="Toggle Eyes reaction" reaction-count="0" disabled="disabled">
👀
</button>
</form>
<details class="details-overlay details-popover reactions-popover">
<summary aria-label="Reactions Menu"><svg class="octicon" style="margin-right:3px" viewBox="0 0 7 16" version="1.1" width="7" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 4H3v3H0v1h3v3h1V8h3V7H4V4z"></path></svg><svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm4.81 12.81a6.72 6.72 0 0 1-2.17 1.45c-.83.36-1.72.53-2.64.53-.92 0-1.81-.17-2.64-.53-.81-.34-1.55-.83-2.17-1.45a6.773 6.773 0 0 1-1.45-2.17A6.59 6.59 0 0 1 1.21 8c0-.92.17-1.81.53-2.64.34-.81.83-1.55 1.45-2.17.62-.62 1.36-1.11 2.17-1.45A6.59 6.59 0 0 1 8 1.21c.92 0 1.81.17 2.64.53.81.34 1.55.83 2.17 1.45.62.62 1.11 1.36 1.45 2.17.36.83.53 1.72.53 2.64 0 .92-.17 1.81-.53 2.64-.34.81-.83 1.55-1.45 2.17zM4 6.8v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2H5.2C4.53 8 4 7.47 4 6.8zm5 0v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2h-.59C9.53 8 9 7.47 9 6.8zm4 3.2c-.72 1.88-2.91 3-5 3s-4.28-1.13-5-3c-.14-.39.23-1 .66-1h8.59c.41 0 .89.61.75 1z"></path></svg></summary>
<div class="Popover" style="left: 50%;transform: translateX(-50%)">
<div class="Popover-message box-shadow-large" style="padding: 16px">
<span><a href="https://api.utteranc.es/authorize?redirect_uri=https%3A%2F%2Ftobiasvl.github.io%2Fblog%2Fwrite-a-chip-8-emulator%2F" target="_top">Sign in</a> to add your reaction.</span>
</div>
</div>
</details>
</div>
</div></article><article class="timeline-comment">
<a class="avatar" href="https://github.com/jasonnelson618" target="_blank" tabindex="-1">
<img alt="@jasonnelson618" src="utterances_data/116707867.png" width="44" height="44">
</a>
<div class="comment">
<header class="comment-header">
<span class="comment-meta">
<a class="text-link" href="https://github.com/jasonnelson618" target="_blank"><strong>jasonnelson618</strong></a>
commented
<a class="text-link" href="https://github.com/tobiasvl/tobiasvl.github.io/issues/16#issuecomment-1291568542" target="_blank">3 months ago</a>
</span>
<div class="comment-actions">
<details class="details-overlay details-popover reactions-popover">
<summary aria-label="Reactions Menu"><svg class="octicon" style="margin-right:3px" viewBox="0 0 7 16" version="1.1" width="7" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 4H3v3H0v1h3v3h1V8h3V7H4V4z"></path></svg><svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm4.81 12.81a6.72 6.72 0 0 1-2.17 1.45c-.83.36-1.72.53-2.64.53-.92 0-1.81-.17-2.64-.53-.81-.34-1.55-.83-2.17-1.45a6.773 6.773 0 0 1-1.45-2.17A6.59 6.59 0 0 1 1.21 8c0-.92.17-1.81.53-2.64.34-.81.83-1.55 1.45-2.17.62-.62 1.36-1.11 2.17-1.45A6.59 6.59 0 0 1 8 1.21c.92 0 1.81.17 2.64.53.81.34 1.55.83 2.17 1.45.62.62 1.11 1.36 1.45 2.17.36.83.53 1.72.53 2.64 0 .92-.17 1.81-.53 2.64-.34.81-.83 1.55-1.45 2.17zM4 6.8v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2H5.2C4.53 8 4 7.47 4 6.8zm5 0v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2h-.59C9.53 8 9 7.47 9 6.8zm4 3.2c-.72 1.88-2.91 3-5 3s-4.28-1.13-5-3c-.14-.39.23-1 .66-1h8.59c.41 0 .89.61.75 1z"></path></svg></summary>
<div class="Popover" style="right:6px">
<div class="Popover-message Popover-message--top-right box-shadow-large" style="padding: 16px">
<span><a href="https://api.utteranc.es/authorize?redirect_uri=https%3A%2F%2Ftobiasvl.github.io%2Fblog%2Fwrite-a-chip-8-emulator%2F" target="_top">Sign in</a> to add your reaction.</span>
</div>
</div>
</details>
</div>
</header>
<div class="markdown-body markdown-body-scrollable">
<p dir="auto">Hello! Love the article and I've been working on
my own interpreter, however I noted you said for the IBM logo program
only the opcodes you mentioned were needed, but there are several
opcodes starting with "F" in the versions of the IBM logo I can find, so
I'm quite confused if more opcodes are needed or if I'm messing up
something. Any clarity would be appreciated! Thanks in advance.</p>
</div>
<div class="comment-footer" reaction-count="0" reaction-url="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1291568542/reactions">
<form class="reaction-list BtnGroup" action="javascript:">
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1291568542/reactions" class="btn BtnGroup-item reaction-button" value="+1" aria-label="Toggle Thumbs Up reaction" reaction-count="0" disabled="disabled">
👍
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1291568542/reactions" class="btn BtnGroup-item reaction-button" value="-1" aria-label="Toggle Thumbs Down reaction" reaction-count="0" disabled="disabled">
👎
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1291568542/reactions" class="btn BtnGroup-item reaction-button" value="laugh" aria-label="Toggle Laugh reaction" reaction-count="0" disabled="disabled">
😂
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1291568542/reactions" class="btn BtnGroup-item reaction-button" value="hooray" aria-label="Toggle Hooray reaction" reaction-count="0" disabled="disabled">
🎉
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1291568542/reactions" class="btn BtnGroup-item reaction-button" value="confused" aria-label="Toggle Confused reaction" reaction-count="0" disabled="disabled">
😕
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1291568542/reactions" class="btn BtnGroup-item reaction-button" value="heart" aria-label="Toggle Heart reaction" reaction-count="0" disabled="disabled">
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1291568542/reactions" class="btn BtnGroup-item reaction-button" value="rocket" aria-label="Toggle Rocket reaction" reaction-count="0" disabled="disabled">
🚀
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1291568542/reactions" class="btn BtnGroup-item reaction-button" value="eyes" aria-label="Toggle Eyes reaction" reaction-count="0" disabled="disabled">
👀
</button>
</form>
<details class="details-overlay details-popover reactions-popover">
<summary aria-label="Reactions Menu"><svg class="octicon" style="margin-right:3px" viewBox="0 0 7 16" version="1.1" width="7" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 4H3v3H0v1h3v3h1V8h3V7H4V4z"></path></svg><svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm4.81 12.81a6.72 6.72 0 0 1-2.17 1.45c-.83.36-1.72.53-2.64.53-.92 0-1.81-.17-2.64-.53-.81-.34-1.55-.83-2.17-1.45a6.773 6.773 0 0 1-1.45-2.17A6.59 6.59 0 0 1 1.21 8c0-.92.17-1.81.53-2.64.34-.81.83-1.55 1.45-2.17.62-.62 1.36-1.11 2.17-1.45A6.59 6.59 0 0 1 8 1.21c.92 0 1.81.17 2.64.53.81.34 1.55.83 2.17 1.45.62.62 1.11 1.36 1.45 2.17.36.83.53 1.72.53 2.64 0 .92-.17 1.81-.53 2.64-.34.81-.83 1.55-1.45 2.17zM4 6.8v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2H5.2C4.53 8 4 7.47 4 6.8zm5 0v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2h-.59C9.53 8 9 7.47 9 6.8zm4 3.2c-.72 1.88-2.91 3-5 3s-4.28-1.13-5-3c-.14-.39.23-1 .66-1h8.59c.41 0 .89.61.75 1z"></path></svg></summary>
<div class="Popover" style="left: 50%;transform: translateX(-50%)">
<div class="Popover-message box-shadow-large" style="padding: 16px">
<span><a href="https://api.utteranc.es/authorize?redirect_uri=https%3A%2F%2Ftobiasvl.github.io%2Fblog%2Fwrite-a-chip-8-emulator%2F" target="_top">Sign in</a> to add your reaction.</span>
</div>
</div>
</details>
</div>
</div></article><article class="timeline-comment">
<a class="avatar" href="https://github.com/tobiasvl" target="_blank" tabindex="-1">
<img alt="@tobiasvl" src="utterances_data/80824.jpeg" width="44" height="44">
</a>
<div class="comment">
<header class="comment-header">
<span class="comment-meta">
<a class="text-link" href="https://github.com/tobiasvl" target="_blank"><strong>tobiasvl</strong></a>
commented
<a class="text-link" href="https://github.com/tobiasvl/tobiasvl.github.io/issues/16#issuecomment-1291863321" target="_blank">3 months ago</a>
</span>
<div class="comment-actions">
<span class="author-association-badge">Owner</span>
<details class="details-overlay details-popover reactions-popover">
<summary aria-label="Reactions Menu"><svg class="octicon" style="margin-right:3px" viewBox="0 0 7 16" version="1.1" width="7" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 4H3v3H0v1h3v3h1V8h3V7H4V4z"></path></svg><svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm4.81 12.81a6.72 6.72 0 0 1-2.17 1.45c-.83.36-1.72.53-2.64.53-.92 0-1.81-.17-2.64-.53-.81-.34-1.55-.83-2.17-1.45a6.773 6.773 0 0 1-1.45-2.17A6.59 6.59 0 0 1 1.21 8c0-.92.17-1.81.53-2.64.34-.81.83-1.55 1.45-2.17.62-.62 1.36-1.11 2.17-1.45A6.59 6.59 0 0 1 8 1.21c.92 0 1.81.17 2.64.53.81.34 1.55.83 2.17 1.45.62.62 1.11 1.36 1.45 2.17.36.83.53 1.72.53 2.64 0 .92-.17 1.81-.53 2.64-.34.81-.83 1.55-1.45 2.17zM4 6.8v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2H5.2C4.53 8 4 7.47 4 6.8zm5 0v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2h-.59C9.53 8 9 7.47 9 6.8zm4 3.2c-.72 1.88-2.91 3-5 3s-4.28-1.13-5-3c-.14-.39.23-1 .66-1h8.59c.41 0 .89.61.75 1z"></path></svg></summary>
<div class="Popover" style="right:6px">
<div class="Popover-message Popover-message--top-right box-shadow-large" style="padding: 16px">
<span><a href="https://api.utteranc.es/authorize?redirect_uri=https%3A%2F%2Ftobiasvl.github.io%2Fblog%2Fwrite-a-chip-8-emulator%2F" target="_top">Sign in</a> to add your reaction.</span>
</div>
</div>
</details>
</div>
</header>
<div class="markdown-body markdown-body-scrollable">
<blockquote>
<p dir="auto">Hello! Love the article and I've been working on my own
interpreter, however I noted you said for the IBM logo program only the
opcodes you mentioned were needed, but there are several opcodes
starting with "F" in the versions of the IBM logo I can find, so I'm
quite confused if more opcodes are needed or if I'm messing up
something. Any clarity would be appreciated! Thanks in advance.</p>
</blockquote>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jasonnelson618/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jasonnelson618" target="_top" rel="noopener noreferrer">@jasonnelson618</a>
Thanks for the kind words! There should be no FXXX opcodes in the IBM
program. How are you reaching those opcodes? My guess is that you're
reading the graphics data (for the IBM logo) as code somehow, ie. that
you have a bug that has caused your Program Counter to point into the
graphics, attempting to execute it.</p>
<p dir="auto">If you push your code to GitHub, I could have a look at it
and see if I spot the bug. Otherwise, good luck bug hunting! Might be a
good idea to write some debug stuff to the terminal, such as the
current PC and opcode at each step, so you see what's happening.</p>
</div>
<div class="comment-footer" reaction-count="0" reaction-url="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1291863321/reactions">
<form class="reaction-list BtnGroup" action="javascript:">
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1291863321/reactions" class="btn BtnGroup-item reaction-button" value="+1" aria-label="Toggle Thumbs Up reaction" reaction-count="0" disabled="disabled">
👍
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1291863321/reactions" class="btn BtnGroup-item reaction-button" value="-1" aria-label="Toggle Thumbs Down reaction" reaction-count="0" disabled="disabled">
👎
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1291863321/reactions" class="btn BtnGroup-item reaction-button" value="laugh" aria-label="Toggle Laugh reaction" reaction-count="0" disabled="disabled">
😂
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1291863321/reactions" class="btn BtnGroup-item reaction-button" value="hooray" aria-label="Toggle Hooray reaction" reaction-count="0" disabled="disabled">
🎉
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1291863321/reactions" class="btn BtnGroup-item reaction-button" value="confused" aria-label="Toggle Confused reaction" reaction-count="0" disabled="disabled">
😕
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1291863321/reactions" class="btn BtnGroup-item reaction-button" value="heart" aria-label="Toggle Heart reaction" reaction-count="0" disabled="disabled">
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1291863321/reactions" class="btn BtnGroup-item reaction-button" value="rocket" aria-label="Toggle Rocket reaction" reaction-count="0" disabled="disabled">
🚀
</button>
<button reaction="" type="submit" action="javascript:" formaction="https://api.github.com/repos/tobiasvl/tobiasvl.github.io/issues/comments/1291863321/reactions" class="btn BtnGroup-item reaction-button" value="eyes" aria-label="Toggle Eyes reaction" reaction-count="0" disabled="disabled">
👀
</button>
</form>
<details class="details-overlay details-popover reactions-popover">
<summary aria-label="Reactions Menu"><svg class="octicon" style="margin-right:3px" viewBox="0 0 7 16" version="1.1" width="7" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 4H3v3H0v1h3v3h1V8h3V7H4V4z"></path></svg><svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm4.81 12.81a6.72 6.72 0 0 1-2.17 1.45c-.83.36-1.72.53-2.64.53-.92 0-1.81-.17-2.64-.53-.81-.34-1.55-.83-2.17-1.45a6.773 6.773 0 0 1-1.45-2.17A6.59 6.59 0 0 1 1.21 8c0-.92.17-1.81.53-2.64.34-.81.83-1.55 1.45-2.17.62-.62 1.36-1.11 2.17-1.45A6.59 6.59 0 0 1 8 1.21c.92 0 1.81.17 2.64.53.81.34 1.55.83 2.17 1.45.62.62 1.11 1.36 1.45 2.17.36.83.53 1.72.53 2.64 0 .92-.17 1.81-.53 2.64-.34.81-.83 1.55-1.45 2.17zM4 6.8v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2H5.2C4.53 8 4 7.47 4 6.8zm5 0v-.59c0-.66.53-1.19 1.2-1.19h.59c.66 0 1.19.53 1.19 1.19v.59c0 .67-.53 1.2-1.19 1.2h-.59C9.53 8 9 7.47 9 6.8zm4 3.2c-.72 1.88-2.91 3-5 3s-4.28-1.13-5-3c-.14-.39.23-1 .66-1h8.59c.41 0 .89.61.75 1z"></path></svg></summary>
<div class="Popover" style="left: 50%;transform: translateX(-50%)">
<div class="Popover-message box-shadow-large" style="padding: 16px">
<span><a href="https://api.utteranc.es/authorize?redirect_uri=https%3A%2F%2Ftobiasvl.github.io%2Fblog%2Fwrite-a-chip-8-emulator%2F" target="_top">Sign in</a> to add your reaction.</span>
</div>
</div>
</details>
</div>
</div></article><!--marker--><article class="timeline-comment">
<a class="avatar" target="_blank" tabindex="-1">
<img alt="@anonymous" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNCAxNiIgdmVyc2lvbj0iMS4xIj48cGF0aCBmaWxsPSJyZ2IoMTc5LDE3OSwxNzkpIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik04IDEwLjVMOSAxNEg1bDEtMy41TDUuMjUgOWgzLjVMOCAxMC41ek0xMCA2SDRMMiA3aDEwbC0yLTF6TTkgMkw3IDMgNSAyIDQgNWg2TDkgMnptNC4wMyA3Ljc1TDEwIDlsMSAyLTIgM2gzLjIyYy40NSAwIC44Ni0uMzEuOTctLjc1bC41Ni0yLjI4Yy4xNC0uNTMtLjE5LTEuMDgtLjcyLTEuMjJ6TTQgOWwtMy4wMy43NWMtLjUzLjE0LS44Ni42OS0uNzIgMS4yMmwuNTYgMi4yOGMuMTEuNDQuNTIuNzUuOTcuNzVINWwtMi0zIDEtMnoiPjwvcGF0aD48L3N2Zz4=" width="44" height="44">
</a>
<form class="comment" accept-charset="UTF-8" action="javascript:">
<header class="new-comment-header tabnav">
<div class="tabnav-tabs" role="tablist">
<button type="button" class="tabnav-tab tab-write" role="tab" aria-selected="true">
Write
</button>
<button type="button" class="tabnav-tab tab-preview" role="tab">
Preview
</button>
</div>
</header>
<div class="comment-body">
<textarea class="form-control" placeholder="Sign in to comment" aria-label="comment" disabled="disabled"></textarea>
<div class="markdown-body" style="display: none">
Nothing to preview
</div>
</div>
<footer class="new-comment-footer">
<a class="text-link markdown-info" tabindex="-1" target="_blank" href="https://guides.github.com/features/mastering-markdown/">
<svg class="octicon v-align-bottom" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true">
<path fill-rule="evenodd" d="M14.85 3H1.15C.52 3 0 3.52 0 4.15v7.69C0 12.48.52 13 1.15
13h13.69c.64 0 1.15-.52 1.15-1.15v-7.7C16 3.52 15.48 3 14.85 3zM9 11H7V8L5.5 9.92 4
8v3H2V5h2l1.5 2L7 5h2v6zm2.99.5L9.5 8H11V5h2v3h1.5l-2.51 3.5z">
</path>
</svg>
Styling with Markdown is supported
</a>
<button class="btn btn-primary" type="submit" disabled="disabled" hidden="">Comment</button>
<a class="btn btn-primary" href="https://api.utteranc.es/authorize?redirect_uri=https%3A%2F%2Ftobiasvl.github.io%2Fblog%2Fwrite-a-chip-8-emulator%2F" target="_top">
<svg class="octicon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path></svg>
Sign in with GitHub
</a>
</footer>
</form></article></main></body></html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

@ -3,6 +3,7 @@
#include <ios> #include <ios>
#include <stack> #include <stack>
#include <bitset> #include <bitset>
#include <random>
using namespace olc; using namespace olc;
@ -52,6 +53,10 @@ public:
uint16_t pc=0x200; uint16_t pc=0x200;
uint16_t index; //One 16-bit index register called “I” which is used to point at locations in memory uint16_t index; //One 16-bit index register called “I” which is used to point at locations in memory
std::array<uint8_t,16>reg; std::array<uint8_t,16>reg;
std::random_device rd; //Will be used to obtain a seed for the random number engine
std::mt19937 gen; //Standard mersenne_twister_engine seeded with rd()
std::uniform_int_distribution<> distrib;
std::array<Key,16>keymap{X,K1,K2,K3,Q,W,E,A,S,D,Z,C,K4,R,F,V};
std::string Display8(int number){ std::string Display8(int number){
std::bitset<8>numb(number); std::bitset<8>numb(number);
@ -65,10 +70,12 @@ public:
bool OnUserCreate() override bool OnUserCreate() override
{ {
gen=std::mt19937(rd());
distrib=std::uniform_int_distribution<>(0,255);
for (int i=0;i<display.size();i++){ for (int i=0;i<display.size();i++){
display[i]=0; display[i]=0;
} }
std::ifstream file("test_opcode.ch8",std::ios_base::binary); std::ifstream file("bc_test.ch8",std::ios_base::binary);
uint16_t counter=0x200; uint16_t counter=0x200;
while (file.good()){ while (file.good()){
int val = file.get(); int val = file.get();
@ -148,14 +155,20 @@ public:
pc=NNN; pc=NNN;
//std::cout<<"Entering subroutine @ 0x"<<std::hex<<NNN<<std::endl; //std::cout<<"Entering subroutine @ 0x"<<std::hex<<NNN<<std::endl;
}break; }break;
case 0x3:{ case 0x3:{//If register X is equal to NN, skip instruction.
if(reg[X]==NN){
pc+=2;
}
}break; }break;
case 0x4:{ case 0x4:{//If register X is not equal to NN, skip instruction.
if(reg[X]!=NN){
pc+=2;
}
}break; }break;
case 0x5:{ case 0x5:{//If register X is equal to register Y, skip instruction.
if(reg[X]==reg[Y]){
pc+=2;
}
}break; }break;
case 0x6:{ //Set the register X to NN. case 0x6:{ //Set the register X to NN.
reg[X]=NN; reg[X]=NN;
@ -166,19 +179,69 @@ public:
//std::cout<<(int)reg[X]<<std::endl; //std::cout<<(int)reg[X]<<std::endl;
}break; }break;
case 0x8:{ case 0x8:{
switch(N){
case 0x0:{//VX is set to the value of VY.
reg[X]=reg[Y];
}break;
case 0x1:{//Binary OR VX w/VY.
reg[X]|=reg[Y];
}break;
case 0x2:{//Binary AND VX w/VY.
reg[X]&=reg[Y];
}break;
case 0x3:{//Logical XOR VX w/VY.
reg[X]^=reg[Y];
}break;
case 0x4:{//Add VY to VX, set carry bit if overflow occurs.
reg[0xF]=0;
if ((int)reg[X]+(int)reg[Y]>255){
reg[0xF]=1;
}
reg[X]+=reg[Y];
}break;
case 0x5:{// sets VX to the result of VX - VY.
reg[0xF]=0;
if (reg[X]>reg[Y]){
reg[0xF]=1;
}
reg[X]-=reg[Y];
}break;
case 0x6:{//Shift Right
//reg[X]=reg[Y];
reg[0xF]=reg[X]&0x1;
reg[X]>>=1;
}break;
case 0x7:{//sets VX to the result of VY - VX. It's a reverse subtraction.
reg[0xF]=0;
if (reg[Y]>reg[X]){
reg[0xF]=1;
}
reg[X]=reg[Y]-reg[X];
}break;
case 0xE:{//Shift Left
//std::cout<<"Y is: "<<(int)Y<<std::endl;
//reg[X]=reg[Y];
std::cout<<"Before left shift: "<<(int)reg[X]<<std::endl;
reg[0xF]=(reg[X]&0x80)>>7;
std::cout<<"Register F: "<<(int)reg[0xF]<<std::endl;
reg[X]<<=1;
std::cout<<"After Left shift: "<<(int)reg[X]<<std::endl;
}break;
}
}break; }break;
case 0x9:{ case 0x9:{//If register X is not equal to register Y, skip instruction.
if(reg[X]!=reg[Y]){
pc+=2;
}
}break; }break;
case 0xA:{ //This sets the index register I to the value NNN. case 0xA:{ //This sets the index register I to the value NNN.
index=NNN; index=NNN;
}break; }break;
case 0xB:{ case 0xB:{//Jump w/Offset
pc=NNN+reg[0x0];
}break; }break;
case 0xC:{ case 0xC:{//Random number from 0 to NN.
reg[X]=distrib(gen)&NN;
}break; }break;
case 0xD:{ //Display case 0xD:{ //Display
uint8_t start_X=reg[X]%ScreenWidth(); uint8_t start_X=reg[X]%ScreenWidth();
@ -202,10 +265,69 @@ public:
} }
}break; }break;
case 0xE:{ case 0xE:{
switch (NN){
case 0x9E:{//EX9E: Skip an instruction if key in VX is pressed.
if (GetKey(keymap[reg[X]]).bHeld){
pc+=2;
}
}break;
case 0xA1:{//EXA1: Skip an instruction if key in VX is not pressed.
if (!GetKey(keymap[reg[X]]).bHeld){
pc+=2;
}
}break;
}
}break; }break;
case 0xF:{ case 0xF:{
switch (NN){
case 0x07:{//sets VX to the current value of the delay timer
reg[X]=delay_timer;
}break;
case 0x15:{//sets the delay timer to the value in VX
delay_timer=reg[X];
}break;
case 0x18:{//sets the sound timer to the value in VX
sound_timer=reg[X];
}break;
case 0x1E:{//The index register I will get the value in VX added to it.
reg[0xF]=0;
if (index+reg[X]>=0x1000){
reg[0xF]=1;
}
index+=reg[X];
}break;
case 0x0A:{//This instruction “blocks”; it stops executing instructions and waits for key input
for (int i=0;i<keymap.size();i++){
if (GetKey(keymap[i]).bHeld){
reg[X]=i;
goto pass;
}
}
pc-=2;
pass:;
}break;
case 0x29:{//The index register I is set to the address of the hexadecimal character in VX.
index=0x50+(reg[X]&0xF)*5;
}break;
case 0x33:{//Binary-coded decimal conversion
uint8_t numb=reg[X];//156
memory[index+2]=numb%10;
numb/=10;
memory[index+1]=numb%10;
numb/=10;
memory[index]=numb%10;
}break;
case 0x55:{//Stores registers from V0 to VX in memory pointed by index.
for (int i=0;i<=X;i++){
memory[index+i]=reg[i];
}
}break;
case 0x65:{//Retrieves registers from V0 to VX in memory pointed by index.
for (int i=0;i<=X;i++){
reg[i]=memory[index+i];
}
}break;
}
}break; }break;
} }
} }

Loading…
Cancel
Save