PageSourceSearch

https://pika.page/assets/@floating-ui--utils-4a74b5b7a2acfce20e32d…c6e41b13ac9f4b1b75da595eb3bb183e72dcc88e.js

js pika.page collected 2026-09-25 18:52:46 UTC 2,228 bytes, 4 lines download raw bytes

1// @floating-ui/[email protected] downloaded from https://ga.jspm.io/npm:@floating-ui/[email protected]/dist/floating-ui.utils.mjs
2
3const t=["top","right","bottom","left"];const n=["start","end"];const o=t.reduce(((t,o)=>t.concat(o,o+"-"+n[0],o+"-"+n[1])),[]);const r=Math.min;const e=Math.max;const c=Math.round;const i=Math.floor;const u=t=>({x:t,y:t});const f={left:"right",right:"left",bottom:"top",top:"bottom"};const s={start:"end",end:"start"};function a(t,n,o){return e(t,r(n,o))}function h(t,n){return typeof t==="function"?t(n):t}function l(t){return t.split("-")[0]}function p(t){return t.split("-")[1]}function g(t){return t==="x"?"y":"x"}function m(t){return t==="y"?"height":"width"}const b=new Set(["top","bottom"]);function d(t){return b.has(l(t))?"y":"x"}function x(t){return g(d(t))}function y(t,n,o){o===void 0&&(o=false);const r=p(t);const e=x(t);const c=m(e);let i=e==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";n.reference[c]>n.floating[c]&&(i=A(i));return[i,A(i)]}function w(t){const n=A(t);return[M(t),n,M(n)]}function M(t){return t.replace(/start|end/g,(t=>s[t]))}const v=["left","right"];const S=["right","left"];const j=["top","bottom"];const k=["bottom","top"];function q(t,n,o){switch(t){case"top":case"bottom":return o?n?S:v:n?v:S;case"left":case"right":return n?j:k;default:return[]}}function z(t,n,o,r){const e=p(t);let c=q(l(t),o==="start",r);if(e){c=c.map((t=>t+"-"+e));n&&(c=c.concat(c.map(M)))}return c}function A(t){return t.replace(/left|right|bottom|top/g,(t=>f[t]))}function B(t){return{top:0,right:0,bottom:0,left:0,...t}}function C(t){return typeof t!=="number"?B(t):{top:t,right:t,bottom:t,left:t}}function D(t){const{x:n,y:o,width:r,height:e}=t;return{width:r,height:e,top:o,left:n,right:n+r,bottom:o+e,x:n,y:o}}export{n as alignments,a as clamp,u as createCoords,h as evaluate,B as expandPaddingObject,i as floor,p as getAlignment,x as getAlignmentAxis,y as getAlignmentSides,m as getAxisLength,w as getExpandedPlacements,M as getOppositeAlignmentPlacement,g as getOppositeAxis,z as getOppositeAxisPlacements,A as getOppositePlacement,C as getPaddingObject,l as getSide,d as getSideAxis,e as max,r as min,o as placements,D as rectToClientRect,c as round,t as sides};
4

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.