Build 594031stable
Module 623577
2,005 characters · in 25868.bd058c114912c1de.jsDependencies
Source Raw
function(e,t,r){"use strict";r.d(t,{P:()=>v,m:()=>g});var n=r(838259),i=r(162563),o=r(47361),a=function(){function e(e,t,r,n){return this.x=e,this.y=t,this.width=r,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,(0,o.C)(this)}return e.prototype.toJSON=function(){return{x:this.x,y:this.y,top:this.top,right:this.right,bottom:this.bottom,left:this.left,width:this.width,height:this.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),s=r(916784),l=r(717205),u=new WeakMap,c=/auto|scroll/,d=/^tb|vertical/,f=/msie|trident/i.test(l.S.navigator&&l.S.navigator.userAgent),p=function(e){return parseFloat(e||"0")},h=function(e,t,r){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=!1),new i.a((r?t:e)||0,(r?e:t)||0)},m=(0,o.C)({devicePixelContentBoxSize:h(),borderBoxSize:h(),contentBoxSize:h(),contentRect:new a(0,0,0,0)}),g=function(e,t){if(void 0===t&&(t=!1),u.has(e)&&!t)return u.get(e);if((0,s.dK)(e))return u.set(e,m),m;var r=getComputedStyle(e),n=(0,s.XJ)(e)&&e.ownerSVGElement&&e.getBBox(),i=!f&&"border-box"===r.boxSizing,l=d.test(r.writingMode||""),g=!n&&c.test(r.overflowY||""),v=!n&&c.test(r.overflowX||""),y=n?0:p(r.paddingTop),b=n?0:p(r.paddingRight),_=n?0:p(r.paddingBottom),w=n?0:p(r.paddingLeft),x=n?0:p(r.borderTopWidth),E=n?0:p(r.borderRightWidth),S=n?0:p(r.borderBottomWidth),k=n?0:p(r.borderLeftWidth),T=w+b,C=y+_,A=k+E,P=x+S,M=v?e.offsetHeight-P-e.clientHeight:0,O=g?e.offsetWidth-A-e.clientWidth:0,R=n?n.width:p(r.width)-(i?T+A:0)-O,I=n?n.height:p(r.height)-(i?C+P:0)-M,L=R+T+O+A,D=I+C+M+P,F=(0,o.C)({devicePixelContentBoxSize:h(Math.round(R*devicePixelRatio),Math.round(I*devicePixelRatio),l),borderBoxSize:h(L,D,l),contentBoxSize:h(R,I,l),contentRect:new a(w,y,R,I)});return u.set(e,F),F},v=function(e,t,r){var i=g(e,r),o=i.borderBoxSize,a=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(t){case n.U.DEVICE_PIXEL_CONTENT_BOX:return s;case n.U.BORDER_BOX:return o;default:return a}}}