import{getValueAsType as r,getDefaultValueType as o}from"../../dom/utils/value-types.js";import{valueScaleCorrection as s}from"../../dom/projection/scale-correction.js";import{isTransformProp as i,isTransformOriginProp as t}from"./transform.js";import{buildLayoutProjectionTransform as a,buildLayoutProjectionTransformOrigin as e,buildTransform as f,buildTransformOrigin as n}from"./build-transform.js";import{isCSSVariable as m}from"../../dom/utils/is-css-variable.js";function l(l,d,p,v,c,u){var j,y=l.style,g=l.vars,b=l.transform,h=l.transformKeys,O=l.transformOrigin;h.length=0;var H=!1,x=!1,E=!0;for(var F in d){var K=d[F];if(m(F))g[F]=K;else{var S=o(F),T=r(K,S);if(i(F)){if(H=!0,b[F]=T,h.push(F),!E)continue;K!==(null!==(j=S.default)&&void 0!==j?j:0)&&(E=!1)}else if(t(F))O[F]=T,x=!0;else if(v&&p&&v.isHydrated&&s[F]){var k=s[F].process(K,v,p),q=s[F].applyTo;if(q)for(var w=q.length,z=0;z<w;z++)y[q[z]]=k;else y[F]=k}else y[F]=T}}v&&p&&p.isEnabled&&v.isHydrated?(y.transform=a(v.deltaFinal,v.treeScale,H?b:void 0),u&&(y.transform=u(b,y.transform)),y.transformOrigin=e(v)):(H&&(y.transform=f(l,c,E,u)),x&&(y.transformOrigin=n(O)))}export{l as buildHTMLStyles};
//# sourceMappingURL=build-styles.js.map
