import{__spreadArrays as r,__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import{mix as n}from"./mix.js";import{mixColor as o}from"./mix-color.js";import{isNum as t}from"./inc.js";import{pipe as m}from"./pipe.js";import{invariant as i}from"../../../../hey-listen/dist/hey-listen.es.js";import{complex as s}from"../../../../style-value-types/dist/es/complex/index.js";import{color as u}from"../../../../style-value-types/dist/es/color/index.js";function f(r,e){return t(r)?function(o){return n(r,e,o)}:u.test(r)?o(r,e):c(r,e)}var a=function(e,n){var o=r(e),t=o.length,m=e.map((function(r,e){return f(r,n[e])}));return function(r){for(var e=0;e<t;e++)o[e]=m[e](r);return o}},p=function(r,n){var o=e(e({},r),n),t={};for(var m in o)void 0!==r[m]&&void 0!==n[m]&&(t[m]=f(r[m],n[m]));return function(r){for(var e in t)o[e]=t[e](r);return o}};function l(r){for(var e=s.parse(r),n=e.length,o=0,t=0,m=0,i=0;i<n;i++)o||"number"==typeof e[i]?o++:void 0!==e[i].hue?m++:t++;return{parsed:e,numNumbers:o,numRGB:t,numHSL:m}}var c=function(r,e){var n=s.createTransformer(e),o=l(r),t=l(e);return i(o.numHSL===t.numHSL&&o.numRGB===t.numRGB&&o.numNumbers>=t.numNumbers,"Complex values '"+r+"' and '"+e+"' too different to mix. Ensure all colors are of the same type."),m(a(o.parsed,t.parsed),n)};export{a as mixArray,c as mixComplex,p as mixObject};
//# sourceMappingURL=mix-complex.js.map
