"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const t=t=>180*t/Math.PI,a=a=>{const e=t(Math.atan2(a[1],a[0]));return s(e)},e={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:a,rotateZ:a,skewX:a=>t(Math.atan(a[1])),skewY:a=>t(Math.atan(a[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},s=t=>((t%=360)<0&&(t+=360),t),r=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),n=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),o={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:r,scaleY:n,scale:t=>(r(t)+n(t))/2,rotateX:a=>s(t(Math.atan2(a[6],a[5]))),rotateY:a=>s(t(Math.atan2(-a[2],a[0]))),rotateZ:a,rotate:a,skewX:a=>t(Math.atan(a[4])),skewY:a=>t(Math.atan(a[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function l(t){return t.includes("scale")?1:0}function c(t,a){if(!t||"none"===t)return l(a);const s=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,n;if(s)r=o,n=s;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=e,n=a}if(!n)return l(a);const c=r[a],h=n[1].split(",").map(u);return"function"==typeof c?c(h):h[c]}function u(t){return parseFloat(t.trim())}exports.defaultTransformValue=l,exports.parseValueFromTransform=c,exports.readTransformValue=(t,a)=>{const{transform:e="none"}=getComputedStyle(t);return c(e,a)};
//# sourceMappingURL=parse-transform.mjs.js.map
