{"version":3,"sources":["webpack:///./node_modules/tiny-slider/src/helpers/jsTransform.js"],"names":["jsTransform","element","attr","prefix","postfix","to","duration","callback","tick","Math","min","unit","indexOf","from","replace","Number","style","positionTick","setTimeout","moveElement"],"mappings":"0FAAO,SAASA,EAAYC,EAASC,EAAMC,EAAQC,EAASC,EAAIC,EAAUC,GACxE,IAAIC,EAAOC,KAAKC,IAAIJ,EAAU,IAC1BK,EAAQN,EAAGO,QAAQ,MAAQ,EAAK,IAAM,KAEtCC,GADAR,EAAKA,EAAGS,QAAQH,EAAM,IACfI,OAAOd,EAAQe,MAAMd,GAAMY,QAAQX,EAAQ,IAAIW,QAAQV,EAAS,IAAIU,QAAQH,EAAM,MACzFM,GAAgBZ,EAAKQ,GAAQP,EAAWE,EAG5CU,YACA,SAASC,IACPb,GAAYE,EACZK,GAAQI,EACRhB,EAAQe,MAAMd,GAAQC,EAASU,EAAOF,EAAOP,EACzCE,EAAW,EACbY,WAAWC,EAAaX,GAExBD,MARoBC,GAR1B","file":"jsTransform.7a82d2dc.js","sourcesContent":["export function jsTransform(element, attr, prefix, postfix, to, duration, callback) {\n var tick = Math.min(duration, 10),\n unit = (to.indexOf('%') >= 0) ? '%' : 'px',\n to = to.replace(unit, ''),\n from = Number(element.style[attr].replace(prefix, '').replace(postfix, '').replace(unit, '')),\n positionTick = (to - from) / duration * tick,\n running;\n\n setTimeout(moveElement, tick);\n function moveElement() {\n duration -= tick;\n from += positionTick;\n element.style[attr] = prefix + from + unit + postfix;\n if (duration > 0) { \n setTimeout(moveElement, tick); \n } else {\n callback();\n }\n }\n}"],"sourceRoot":""}