import{__rest as t,__assign as r}from"../../../../node_modules/tslib/tslib.es6.js";import{resolveVariant as i}from"./variants.js";import{findValueType as e,getAnimatableNone as n}from"../dom/utils/value-types.js";import{isNumericalString as o}from"../../utils/is-numerical-string.js";import{resolveFinalValueInKeyframes as a}from"../../utils/resolve-value.js";import{motionValue as l}from"../../value/index.js";import{complex as s}from"../../../../../style-value-types/dist/es/complex/index.js";function u(t,r,i){t.hasValue(r)?t.getValue(r).set(i):t.addValue(r,l(i))}function f(e,n){var o=i(e,n),l=o?e.makeTargetAnimatable(o,!1):{},s=l.transitionEnd,f=void 0===s?{}:s;l.transition;var d=t(l,["transitionEnd","transition"]);for(var m in d=r(r({},d),f)){u(e,m,a(d[m]))}}function d(t,r,i){var a,u,f,d,m=Object.keys(r).filter((function(r){return!t.hasValue(r)})),v=m.length;if(v)for(var p=0;p<v;p++){var c=m[p],g=r[c],j=null;Array.isArray(g)&&(j=g[0]),null===j&&(j=null!==(u=null!==(a=i[c])&&void 0!==a?a:t.readValue(c))&&void 0!==u?u:r[c]),null!=j&&("string"==typeof j&&o(j)?j=parseFloat(j):!e(j)&&s.test(g)&&(j=n(c,g)),t.addValue(c,l(j)),null!==(f=(d=i)[c])&&void 0!==f||(d[c]=j),t.setBaseTarget(c,j))}}function m(t,r){if(r)return(r[t]||r.default||r).from}function v(t,r,i){var e,n,o={};for(var a in t)o[a]=null!==(e=m(a,r))&&void 0!==e?e:null===(n=i.getValue(a))||void 0===n?void 0:n.get();return o}export{d as checkTargetForNewValues,v as getOrigin,m as getOriginFromTransition,f as setTarget};
//# sourceMappingURL=setters.js.map
