Module 56027

1,773 characters · in no known chunk
Dependencies
Required by (2)
Lazily required by (0)none
Requires (0)none
Lazily requires (0)none
Source Raw
function(e,t,n){"use strict";n.d(t,{B1:()=>P,C0:()=>h,DD:()=>s,Dz:()=>T,Jx:()=>c,LI:()=>l,PG:()=>E,RI:()=>u,Sg:()=>m,T9:()=>o,TV:()=>I,WJ:()=>y,_3:()=>p,aD:()=>v,bV:()=>L,jk:()=>a,lP:()=>D,nI:()=>M,qE:()=>f,r_:()=>r,sq:()=>g,w7:()=>S});let r=["top","right","bottom","left"],i=["start","end"],s=r.reduce((e,t)=>e.concat(t,t+"-"+i[0],t+"-"+i[1]),[]),a=Math.min,o=Math.max,l=Math.round,u=Math.floor,c=e=>({x:e,y:e}),d={left:"right",right:"left",bottom:"top",top:"bottom"},_={start:"end",end:"start"};function f(e,t,n){return o(e,a(t,n))}function p(e,t){return"function"==typeof e?e(t):e}function h(e){return e.split("-")[0]}function m(e){return e.split("-")[1]}function E(e){return"x"===e?"y":"x"}function g(e){return"y"===e?"height":"width"}let A=new Set(["top","bottom"]);function I(e){return A.has(h(e))?"y":"x"}function T(e){return E(I(e))}function S(e,t,n){void 0===n&&(n=!1);let r=m(e),i=T(e),s=g(i),a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=L(a)),[a,L(a)]}function y(e){let t=L(e);return[v(e),t,v(t)]}function v(e){return e.replace(/start|end/g,e=>_[e])}let N=["left","right"],C=["right","left"],R=["top","bottom"],O=["bottom","top"];function b(e,t,n){switch(e){case"top":case"bottom":if(n)return t?C:N;return t?N:C;case"left":case"right":return t?R:O;default:return[]}}function D(e,t,n,r){let i=m(e),s=b(h(e),"start"===n,r);return i&&(s=s.map(e=>e+"-"+i),t&&(s=s.concat(s.map(v)))),s}function L(e){return e.replace(/left|right|bottom|top/g,e=>d[e])}function w(e){return{top:0,right:0,bottom:0,left:0,...e}}function M(e){return"number"!=typeof e?w(e):{top:e,right:e,bottom:e,left:e}}function P(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}}