import{i as _}from"./string.Bl9OLDCw.js";var D=180/Math.PI,I={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function j(t,e,o,l,c,g){var u,p,a;return(u=Math.sqrt(t*t+e*e))&&(t/=u,e/=u),(a=t*o+e*l)&&(o-=t*a,l-=e*a),(p=Math.sqrt(o*o+l*l))&&(o/=p,l/=p,a/=p),t*l<e*o&&(t=-t,e=-e,a=-a,u=-u),{translateX:c,translateY:g,rotate:Math.atan2(e,t)*D,skewX:Math.atan(a)*D,scaleX:u,scaleY:p}}var M;function H(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?I:j(e.a,e.b,e.c,e.d,e.e,e.f)}function K(t){return t==null||(M||(M=document.createElementNS("http://www.w3.org/2000/svg","g")),M.setAttribute("transform",t),!(t=M.transform.baseVal.consolidate()))?I:(t=t.matrix,j(t.a,t.b,t.c,t.d,t.e,t.f))}function A(t,e,o,l){function c(i){return i.length?i.pop()+" ":""}function g(i,n,r,s,f,m){if(i!==r||n!==s){var w=f.push("translate(",null,e,null,o);m.push({i:w-4,x:_(i,r)},{i:w-2,x:_(n,s)})}else(r||s)&&f.push("translate("+r+e+s+o)}function u(i,n,r,s){i!==n?(i-n>180?n+=360:n-i>180&&(i+=360),s.push({i:r.push(c(r)+"rotate(",null,l)-2,x:_(i,n)})):n&&r.push(c(r)+"rotate("+n+l)}function p(i,n,r,s){i!==n?s.push({i:r.push(c(r)+"skewX(",null,l)-2,x:_(i,n)}):n&&r.push(c(r)+"skewX("+n+l)}function a(i,n,r,s,f,m){if(i!==r||n!==s){var w=f.push(c(f)+"scale(",null,",",null,")");m.push({i:w-4,x:_(i,r)},{i:w-2,x:_(n,s)})}else(r!==1||s!==1)&&f.push(c(f)+"scale("+r+","+s+")")}return function(i,n){var r=[],s=[];return i=t(i),n=t(n),g(i.translateX,i.translateY,n.translateX,n.translateY,r,s),u(i.rotate,n.rotate,r,s),p(i.skewX,n.skewX,r,s),a(i.scaleX,i.scaleY,n.scaleX,n.scaleY,r,s),i=n=null,function(f){for(var m=-1,w=s.length,N;++m<w;)r[(N=s[m]).i]=N.x(f);return r.join("")}}}var J=A(H,"px, ","px)","deg)"),Q=A(K,", ",")",")"),k=0,v=0,X=0,C=1e3,T,x,Y=0,h=0,y=0,d=typeof performance=="object"&&performance.now?performance:Date,E=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function O(){return h||(E(L),h=d.now()+y)}function L(){h=0}function S(){this._call=this._time=this._next=null}S.prototype=V.prototype={constructor:S,restart:function(t,e,o){if(typeof t!="function")throw new TypeError("callback is not a function");o=(o==null?O():+o)+(e==null?0:+e),!this._next&&x!==this&&(x?x._next=this:T=this,x=this),this._call=t,this._time=o,q()},stop:function(){this._call&&(this._call=null,this._time=1/0,q())}};function V(t,e,o){var l=new S;return l.restart(t,e,o),l}function W(){O(),++k;for(var t=T,e;t;)(e=h-t._time)>=0&&t._call.call(void 0,e),t=t._next;--k}function F(){h=(Y=d.now())+y,k=v=0;try{W()}finally{k=0,B(),h=0}}function z(){var t=d.now(),e=t-Y;e>C&&(y-=e,Y=t)}function B(){for(var t,e=T,o,l=1/0;e;)e._call?(l>e._time&&(l=e._time),t=e,e=e._next):(o=e._next,e._next=null,e=t?t._next=o:T=o);x=t,q(l)}function q(t){if(!k){v&&(v=clearTimeout(v));var e=t-h;e>24?(t<1/0&&(v=setTimeout(F,t-d.now()-y)),X&&(X=clearInterval(X))):(X||(Y=d.now(),X=setInterval(z,C)),k=1,E(F))}}export{S as T,Q as a,J as i,O as n,V as t};
