WordPress/wp-includes/js/jquery/ui/effect-size.min.js
desrosj 26335af1ac Build/Test Tools: Update devDependencies.
This updates the following `devDependencies`:

- `dotenv` from `16.4.5` to `16.4.7`
- `dotenv-expand` from `11.0.6` to `12.0.1`
- `postcss` from `8.4.47` to `8.4.49`
- `qunit` from `2.22.0` to `2.23.1`
- `sass` from `1.79.4` to `1.79.6`
- `terser-webpack-plugin` from `5.3.10` to `5.3.11`
- `uglify-js` from `3.17.4` to `3.19.3`
- `uuid` from `9.0.1` to `11.0.3`
- `webpack` from `5.90.2` to `5.97.1`

Additionally, `npm audit fix` has been run.

Follow up to [58585].

See #62220.
Built from https://develop.svn.wordpress.org/trunk@59509


git-svn-id: http://core.svn.wordpress.org/trunk@58895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-12-13 19:06:24 +00:00

9 lines
2.4 KiB
JavaScript

/*!
* jQuery UI Effects Size 1.13.3
* https://jqueryui.com
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license.
* https://jquery.org/license
*/
(t=>{"function"==typeof define&&define.amd?define(["jquery","../version","../effect"],t):t(jQuery)})(function(l){return l.effects.define("size",function(i,e){var f,o=l(this),t=["fontSize"],s=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],n=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],r=i.mode,h="effect"!==r,c=i.scale||"both",d=i.origin||["middle","center"],a=o.css("position"),g=o.position(),m=l.effects.scaledDimensions(o),u=i.from||m,y=i.to||l.effects.scaledDimensions(o,0);l.effects.createPlaceholder(o),"show"===r&&(r=u,u=y,y=r),f={from:{y:u.height/m.height,x:u.width/m.width},to:{y:y.height/m.height,x:y.width/m.width}},"box"!==c&&"both"!==c||(f.from.y!==f.to.y&&(u=l.effects.setTransition(o,s,f.from.y,u),y=l.effects.setTransition(o,s,f.to.y,y)),f.from.x!==f.to.x&&(u=l.effects.setTransition(o,n,f.from.x,u),y=l.effects.setTransition(o,n,f.to.x,y))),"content"!==c&&"both"!==c||f.from.y!==f.to.y&&(u=l.effects.setTransition(o,t,f.from.y,u),y=l.effects.setTransition(o,t,f.to.y,y)),d&&(r=l.effects.getBaseline(d,m),u.top=(m.outerHeight-u.outerHeight)*r.y+g.top,u.left=(m.outerWidth-u.outerWidth)*r.x+g.left,y.top=(m.outerHeight-y.outerHeight)*r.y+g.top,y.left=(m.outerWidth-y.outerWidth)*r.x+g.left),delete u.outerHeight,delete u.outerWidth,o.css(u),"content"!==c&&"both"!==c||(s=s.concat(["marginTop","marginBottom"]).concat(t),n=n.concat(["marginLeft","marginRight"]),o.find("*[width]").each(function(){var t=l(this),e=l.effects.scaledDimensions(t),o={height:e.height*f.from.y,width:e.width*f.from.x,outerHeight:e.outerHeight*f.from.y,outerWidth:e.outerWidth*f.from.x},e={height:e.height*f.to.y,width:e.width*f.to.x,outerHeight:e.height*f.to.y,outerWidth:e.width*f.to.x};f.from.y!==f.to.y&&(o=l.effects.setTransition(t,s,f.from.y,o),e=l.effects.setTransition(t,s,f.to.y,e)),f.from.x!==f.to.x&&(o=l.effects.setTransition(t,n,f.from.x,o),e=l.effects.setTransition(t,n,f.to.x,e)),h&&l.effects.saveStyle(t),t.css(o),t.animate(e,i.duration,i.easing,function(){h&&l.effects.restoreStyle(t)})})),o.animate(y,{queue:!1,duration:i.duration,easing:i.easing,complete:function(){var t=o.offset();0===y.opacity&&o.css("opacity",u.opacity),h||(o.css("position","static"===a?"relative":a).offset(t),l.effects.saveStyle(o)),e()}})})});