text: var cssflipper=function(){"use strict";return function(t){void 0===t&&(t={});var e=t.target,r=t.from,n=t.to,s=t.duration;void 0===s&&(s=500);var i=t.easing;void 0===i&&(i=[.77,.5,.175,1]);var o=function(t){return t instanceof Element||t instanceof HTMLDocument},a=function(t){return o(t)?t:document.querySelector(t)};if(o(a(e))){s=.001*s+"s";var l=a(e);if(l.classList.contains("is-flipping"))console.log("cssFlipper is animating --\x3e",l);else{var c=function(t){var e=window.getComputedStyle(t),r=("none"!=e.getPropertyValue("transform")?e.getPropertyValue("transform"):"matrix(0,0,0,0,0,0)").split("(")[1].split(")")[0].split(","),n=r[0],s=r[1];return Math.round(Math.atan2(s,n)*(180/Math.PI))};l.classList.add("is-flipping");var f=c(l);l.style.transform="rotate(0)";var g=l.getBoundingClientRect();l.removeAttribute("style"),console.log("from Angle --\x3e",f),l.addEventListener("transitionend",function(){this.removeAttribute("style"),this.classList.remove("is-flipping")}),"object"==typeof i&&(i="cubic-bezier("+i[0]+","+i[1]+","+i[2]+","+i[3]+")"),l.style.transition="none",l.classList.remove(r),l.classList.add(n);var p=c(l);console.log("toAngle --\x3e",p),l.style.transform="rotate(0)";var u=l.getBoundingClientRect(),d=g.top+g.height/2-(u.top+u.height/2),m=g.left+g.width/2-(u.left+u.width/2),v=g.width/u.width,h=g.height/u.height;l.style.transformOrigin="center center",l.style.transform="translateX("+m+"px) translateY("+d+"px) rotateZ("+f+"deg) scaleX("+v+") scaleY("+h+")",l.offsetHeight,l.style.transition="transform "+s+" "+i,l.style.transform="translateX(0) translateY(0) rotateZ("+p+"deg) scale(1)"}}else console.error("cssFlipper --\x3e please specify a target")}}();