import{I as e,_ as t,g as n}from"./auth-CwtlbtVe.js";function r(e){return typeof e==`string`?e.endsWith(`px`)?Number(e.slice(0,e.length-2)):Number(e):e}function i(e){if(e!=null)return typeof e==`number`?`${e}px`:e.endsWith(`px`)?e:`${e}px`}function a(e,t){let n=e.trim().split(/\s+/g),r={top:n[0]};switch(n.length){case 1:r.right=n[0],r.bottom=n[0],r.left=n[0];break;case 2:r.right=n[1],r.left=n[1],r.bottom=n[0];break;case 3:r.right=n[1],r.bottom=n[2],r.left=n[1];break;case 4:r.right=n[1],r.bottom=n[2],r.left=n[3];break;default:throw Error(`[seemly/getMargin]:`+e+` is not a valid value.`)}return t===void 0?r:r[t]}function o(e,t){let[n,r]=e.split(` `);return t?t===`row`?n:r:{row:n,col:r||n}}function s(r){return r.some(r=>e(r)?!(r.type===n||r.type===t&&!s(r.children)):!0)?r:null}function c(e,t){return e&&s(e())||t()}function l(e,t,n){return e&&s(e(t))||n(t)}function u(e,t){return t(e&&s(e())||null)}function d(e){return!(e&&s(e()))}export{u as a,a as c,l as i,i as l,d as n,r as o,c as r,o as s,s as t};