WordPress/wp-includes/js/jquery/ui/effect.min.js

19 lines
17 KiB
JavaScript
Raw Normal View History

/*!
* jQuery UI Effects 1.13.0
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*/
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(u){"use strict";u.ui=u.ui||{},u.ui.version="1.13.0";var a=u,n={},e=n.toString,f=/^([\-+])=\s*(\d+\.?\d*)/,t=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16),t[4]?(parseInt(t[4],16)/255).toFixed(2):1]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16),t[4]?(parseInt(t[4]+t[4],16)/255).toFixed(2):1]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=a.Color=function(t,e,n,r){return new a.Color.fn.parse(t,e,n,r)},d={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},p={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},s=l.support={},r=a("<p>")[0],h=a.each;
/*!
* jQuery Color Animations v2.2.0
* https://github.com/jquery/jquery-color
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* Date: Sun May 10 09:02:36 2020 +0200
*/function g(t){return null==t?t+"":"object"==typeof t?n[e.call(t)]||"object":typeof t}function m(t,e,n){var r=p[e.type]||{};return null==t?n||!e.def?null:e.def:(t=r.floor?~~t:parseFloat(t),isNaN(t)?e.def:r.mod?(t+r.mod)%r.mod:Math.min(r.max,Math.max(0,t)))}function c(r){var o=l(),i=o._rgba=[];return r=r.toLowerCase(),h(t,function(t,e){var n=e.re.exec(r),n=n&&e.parse(n),e=e.space||"rgba";if(n)return n=o[e](n),o[d[e].cache]=n[d[e].cache],i=o._rgba=n._rgba,!1}),i.length?("0,0,0,0"===i.join()&&a.extend(i,M.transparent),o):M[r]}function o(t,e,n){return 6*(n=(n+1)%1)<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}r.style.cssText="background-color:rgba(1,1,1,.5)",s.rgba=-1<r.style.backgroundColor.indexOf("rgba"),h(d,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),a.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){n["[object "+e+"]"]=e.toLowerCase()}),(l.fn=a.extend(l.prototype,{parse:function(o,t,e,n){if(void 0===o)return this._rgba=[null,null,null,null],this;(o.jquery||o.nodeType)&&(o=a(o).css(t),t=void 0);var i=this,r=g(o),s=this._rgba=[];return void 0!==t&&(o=[o,t,e,n],r="array"),"string"===r?this.parse(c(o)||M._default):"array"===r?(h(d.rgba.props,function(t,e){s[e.idx]=m(o[e.idx],e)}),this):"object"===r?(h(d,o instanceof l?function(t,e){o[e.cache]&&(i[e.cache]=o[e.cache].slice())}:function(t,n){var r=n.cache;h(n.props,function(t,e){if(!i[r]&&n.to){if("alpha"===t||null==o[t])return;i[r]=n.to(i._rgba)}i[r][e.idx]=m(o[t],e,!0)}),i[r]&&a.inArray(null,i[r].slice(0,3))<0&&(null==i[r][3]&&(i[r][3]=1),n.from&&(i._rgba=n.from(i[r])))}),this):void 0},is:function(t){var o=l(t),i=!0,s=this;return h(d,function(t,e){var n,r=o[e.cache];return r&&(n=s[e.cache]||e.to&&e.to(s._rgba)||[],h(e.props,function(t,e){if(null!=r[e.idx])return i=r[e.idx]===n[e.idx]})),i}),i},_space:function(){var n=[],r=this;return h(d,function(t,e){r[e.cache]&&n.push(t)}),n.pop()},transition:function(t,s){var e=(f=l(t))._space(),n=d[e],t=0===this.alpha()?l("transparent"):this,a=t[n.cache]||n.to(t._rgba),c=a.slice(),f=f[n.cache];return h(n.props,function(t,e){var n=e.idx,r=a[n],o=f[n],i=p[e.type]||{};null!==o&&(null===r?c[n]=o:(i.mod&&(o-r>i.mod/2?r+=i.mod:r-o>i.mod/2&&(r-=i.mod)),c[n]=m((o-r)*s+r,e)))}),this[e](c)},blend:function(t){if(1===this._rgba[3])return this;var e=this._rgba.slice(),n=e.pop(),r=l(t)._rgba;return l(a.map(e,function(t,e){return(1-n)*r[e]+n*t}))},toRgbaString:function(){var t="rgba(",e=a.map(this._rgba,function(t,e){return null!=t?t:2<e?1:0});return 1===e[3]&&(e.pop(),t="rgb("),t+e.join()+")"},toHslaString:function(){var t="hsla(",e=a.map(this.hsla(),function(t,e){return null==t&&(t=2<e?1:0),t=e&&e<3?Math.round(100*t)+"%":t});return 1===e[3]&&(e.pop(),t="hsl("),t+e.join()+")"},toHexString:function(t){var e=this._rgba.slice(),n=e.pop();return t&&e.push(~~(255*n)),"#"+a.map(e,function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}})).parse.prototype=l.fn,d.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/255,n=t[1]/255,r=t[2]/255,o=t[3],i=Math.max(e,n,r),s=Math.min(e,n,r),a=i-s,c=i+s,t=.5*c,n=s===i?0:e===i?60*(n-r)/a+360:n===i?60*(r-e)/a+120:60*(e-n)/a+240,c=0==a?0:t<=.5?a/c:a/(2-c);return[Math.round(n)%360,c,t,null==o?1:o]},d.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,n=t[1],r=t[2],t=t[3],n=r<=.5?r*(1+n):r+n-r*n,r=2*r-n;return[Math.round(255*o(r,n,e+1/3)),Math.round(255*o(r,n,e)),Math.round(255*o(r,n,e-1/3)),t]},h(d,function(c,t){var e=t.props,i=t.cache,s=t.to,a=t.from;l.fn[c]=function(t){if(s&&!this[i]&&(this[i]=s(this._rgba)),void 0===t)return this[i].slice();var n=g(t),r="array"===n||"object"===n?t:arguments,o=this[i].slice();return h(e,function(t,e){t=r["object"===n?t:e.idx];null==t&&(t=o[e.idx]),o[e.idx]=m(t,e)}),a?((t=l(a(o)))[i]=o,t):l(o)},h(e,function(s,a){l.fn[s]||(l.fn[s]=function(t){var e,n=g(t),r="alpha"===s?this._hsla?"hsla":"rgba":c,o=this[r](),i=o[a