AUI.add("liferay-crop-region",(t=>{const e=t.Lang,i=function CropRegion(){};i.prototype={_getCropRegion(t,e){const i=this;let h;if(Liferay.Util.getCropRegion)h=Liferay.Util.getCropRegion(t,e);else{const g=i._getImgNaturalSize(t),r=g.width/t.width(),a=g.height/t.height();h={height:e.height?e.height*a:g.height,width:e.width?e.width*r:g.width,x:e.x?Math.max(e.x*r,0):0,y:e.y?Math.max(e.y*a,0):0}}return h},_getImgNaturalSize(t){let i=t.get("naturalHeight"),h=t.get("naturalWidth");if(e.isUndefined(i)||e.isUndefined(h)){const e=new Image;e.src=t.attr("src"),i=e.height,h=e.width}return{height:i,width:h}}},Liferay.CropRegion=i}),"",{requires:["aui-base"]});
//# sourceMappingURL=crop_region.js.map