Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@antv/g-web-animations-api

Package Overview
Dependencies
Maintainers
64
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/g-web-animations-api - npm Package Compare versions

Comparing version 1.2.21 to 1.2.22

2

dist/index.umd.min.js

@@ -1,2 +0,2 @@

!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports,require("@antv/g-lite")):"function"==typeof define&&define.amd?define(["exports","@antv/g-lite"],i):i(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.WebAnimationsAPI={}),t.window.G)}(this,(function(t,i){"use strict";var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])},e(t,i)};function n(t,i){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var n,r,s=e.call(t),o=[];try{for(;(void 0===i||i-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(e=s.return)&&e.call(s)}finally{if(r)throw r.error}}return o}function r(t,i,e){if(e||2===arguments.length)for(var n,r=0,s=i.length;s>r;r++)!n&&r in i||(n||(n=Array.prototype.slice.call(i,0,r)),n[r]=i[r]);return t.concat(n||Array.prototype.slice.call(i))}var s=function(t){function i(i,e,n,r){var s=t.call(this,i)||this;return s.currentTime=n,s.timelineTime=r,s.target=e,s.type="finish",s.bubbles=!1,s.currentTarget=e,s.defaultPrevented=!1,s.eventPhase=s.AT_TARGET,s.timeStamp=Date.now(),s.currentTime=n,s.timelineTime=r,s}return function(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+i+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}(i,t),i}(i.FederatedEvent),o=0,a=function(){function t(t,i){var e;this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=t,t.animation=this,this.timeline=i,this.id="".concat(o++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null===(e=this.effect)||void 0===e?void 0:e.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return Object.defineProperty(t.prototype,"pending",{get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playState",{get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ready",{get:function(){var t=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise((function(i,e){t.resolveReadyPromise=function(){i(t)},t.rejectReadyPromise=function(){e(Error())}})),this.pending||this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finished",{get:function(){var t=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise((function(i,e){t.resolveFinishedPromise=function(){i(t)},t.rejectFinishedPromise=function(){e(Error())}})),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){var i;isNaN(t=Number(t))||(this.timeline.restart(),this._paused||null===this._startTime||(this._startTime=Number(null===(i=this.timeline)||void 0===i?void 0:i.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startTime",{get:function(){return this._startTime},set:function(t){if(null!==t){if(this.updatePromises(),isNaN(t=Number(t)))return;if(this._paused||this._idle)return;this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){if(t!==this._playbackRate){this.updatePromises();var i=this.currentTime;this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==i&&(this.currentTime=i),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_isFinished",{get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||0>this._playbackRate&&0>=Number(this._currentTime))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalDuration",{get:function(){return this._totalDuration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_needsTick",{get:function(){return this.pending||"running"===this.playState||!this._finishedFlag},enumerable:!1,configurable:!0}),t.prototype.updatePromises=function(){var t=this.oldPlayState,i=this.pending?"pending":this.playState;return this.readyPromise&&i!==t&&("idle"===i?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===i&&(this.readyPromise=void 0)),this.finishedPromise&&i!==t&&("idle"===i?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===i?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=i,this.readyPromise||this.finishedPromise},t.prototype.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},t.prototype.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},t.prototype.finish=function(){this.updatePromises(),this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},t.prototype.cancel=function(){var t=this;if(this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises(),this.oncancel)){var i=new s(null,this,this.currentTime,null);setTimeout((function(){t.oncancel(i)}))}},t.prototype.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},t.prototype.updatePlaybackRate=function(t){this.playbackRate=t},t.prototype.targetAnimations=function(){var t;return(null===(t=this.effect)||void 0===t?void 0:t.target).getAnimations()},t.prototype.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},t.prototype.unmarkTarget=function(){var t=this.targetAnimations(),i=t.indexOf(this);-1!==i&&t.splice(i,1)},t.prototype.tick=function(t,i){this._idle||this._paused||(null===this._startTime?i&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),i&&(this.currentTimePending=!1,this.fireEvents(t))},t.prototype.rewind=function(){if(this.playbackRate<0){if(this._totalDuration>=1/0)throw Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this._totalDuration}else this.currentTime=0},t.prototype.persist=function(){throw Error(i.ERROR_MSG_METHOD_NOT_IMPLEMENTED)},t.prototype.addEventListener=function(t,e,n){throw Error(i.ERROR_MSG_METHOD_NOT_IMPLEMENTED)},t.prototype.removeEventListener=function(t,e,n){throw Error(i.ERROR_MSG_METHOD_NOT_IMPLEMENTED)},t.prototype.dispatchEvent=function(t){throw Error(i.ERROR_MSG_METHOD_NOT_IMPLEMENTED)},t.prototype.commitStyles=function(){throw Error(i.ERROR_MSG_METHOD_NOT_IMPLEMENTED)},t.prototype.ensureAlive=function(){var t,i;this._inEffect=0>this.playbackRate&&0===this.currentTime?!!(null===(t=this.effect)||void 0===t?void 0:t.update(-1)):!!(null===(i=this.effect)||void 0===i?void 0:i.update(this.currentTime)),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},t.prototype.tickCurrentTime=function(t,i){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!i&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())},t.prototype.fireEvents=function(t){var i=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var e=new s(null,this,this.currentTime,t);setTimeout((function(){i.onfinish&&i.onfinish(e)}))}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var n=new s(null,this,this.currentTime,t);this.onframe(n)}this._finishedFlag=!1}},t}(),u=.1,f="function"==typeof Float32Array,c=function(t,i){return 1-3*i+3*t},h=function(t,i){return 3*i-6*t},l=function(t){return 3*t},m=function(t,i,e){return((c(i,e)*t+h(i,e))*t+l(i))*t},p=function(t,i,e){return 3*c(i,e)*t*t+2*h(i,e)*t+l(i)},d=function(t,i,e,n){if(0>t||t>1||0>e||e>1)throw Error("bezier x values must be in [0, 1] range");if(t===i&&e===n)return function(t){return t};for(var r=f?new Float32Array(11):[,,,,,,,,,,,],s=0;11>s;++s)r[s]=m(s*u,t,e);var o=function(i){for(var n=0,s=1;10!==s&&i>=r[s];++s)n+=u;--s;var o=n+(i-r[s])/(r[s+1]-r[s])*u,a=p(o,t,e);return.001>a?0===a?o:function(t,i,e,n,r){var s,o,a=0;do{(s=m(o=i+(e-i)/2,n,r)-t)>0?e=o:i=o}while(Math.abs(s)>1e-7&&10>++a);return o}(i,n,n+u,t,e):function(t,i,e,n){for(var r=0;4>r;++r){var s=p(i,e,n);if(0===s)return i;i-=(m(i,e,n)-t)/s}return i}(i,o,t,e)};return function(t){return 0===t||1===t?t:m(o(t),i,n)}},y=function(t){return null==t},g={}.toString,v=function(t,i){return g.call(t)==="[object "+i+"]"},b=function(t,i,e){return i>t?i:t>e?e:t},T=function(t){return v(t,"Number")},_=function(t){return Math.pow(t,2)},P=function(t){return Math.pow(t,3)},k=function(t){return Math.pow(t,4)},E=function(t){return Math.pow(t,5)},O=function(t){return Math.pow(t,6)},A=function(t){return 1-Math.cos(t*Math.PI/2)},w=function(t){return 1-Math.sqrt(1-t*t)},M=function(t){return t*t*(3*t-2)},N=function(t){for(var i,e=4;t<((i=Math.pow(2,--e))-1)/11;);return 1/Math.pow(4,3-e)-7.5625*Math.pow((3*i-2)/22-t,2)},F=function(t,i){void 0===i&&(i=[]);var e=n(i,2),r=e[0],s=e[1],o=void 0===s?.5:s,a=b(Number(void 0===r?1:r),1,10),u=b(Number(o),.1,2);return 0===t||1===t?t:-a*Math.pow(2,10*(t-1))*Math.sin(2*Math.PI*(t-1-u/(2*Math.PI)*Math.asin(1/a))/u)},R=function(t,i,e){void 0===i&&(i=[]);var r=n(i,4),s=r[0],o=void 0===s?1:s,a=r[1],u=void 0===a?100:a,f=r[2],c=void 0===f?10:f,h=r[3],l=void 0===h?0:h;o=b(o,.1,1e3),u=b(u,.1,1e3),c=b(c,.1,1e3),l=b(l,.1,1e3);var m=Math.sqrt(u/o),p=c/(2*Math.sqrt(u*o)),d=1>p?m*Math.sqrt(1-p*p):0,y=1>p?(p*m-l)/d:-l+m,g=e?e*t/1e3:t;return g=1>p?Math.exp(-g*p*m)*(1*Math.cos(d*g)+y*Math.sin(d*g)):(1+y*g)*Math.exp(-g*m),0===t||1===t?t:1-g},x=function(t,i){void 0===i&&(i=[]);var e=n(i,2),r=e[0],s=void 0===r?10:r;return("start"==e[1]?Math.ceil:Math.floor)(b(t,0,1)*s)/s},S=function(t,i){void 0===i&&(i=[]);var e=n(i,4);return d(e[0],e[1],e[2],e[3])(t)},D=d(.42,0,1,1),j=function(t){return function(i,e,n){return void 0===e&&(e=[]),1-t(1-i,e,n)}},q=function(t){return function(i,e,n){return void 0===e&&(e=[]),.5>i?t(2*i,e,n)/2:1-t(-2*i+2,e,n)/2}},C=function(t){return function(i,e,n){return void 0===e&&(e=[]),.5>i?(1-t(1-2*i,e,n))/2:(t(2*i-1,e,n)+1)/2}},I={steps:x,"step-start":function(t){return x(t,[1,"start"])},"step-end":function(t){return x(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":S,ease:function(t){return S(t,[.25,.1,.25,1])},in:D,out:j(D),"in-out":q(D),"out-in":C(D),"in-quad":_,"out-quad":j(_),"in-out-quad":q(_),"out-in-quad":C(_),"in-cubic":P,"out-cubic":j(P),"in-out-cubic":q(P),"out-in-cubic":C(P),"in-quart":k,"out-quart":j(k),"in-out-quart":q(k),"out-in-quart":C(k),"in-quint":E,"out-quint":j(E),"in-out-quint":q(E),"out-in-quint":C(E),"in-expo":O,"out-expo":j(O),"in-out-expo":q(O),"out-in-expo":C(O),"in-sine":A,"out-sine":j(A),"in-out-sine":q(A),"out-in-sine":C(A),"in-circ":w,"out-circ":j(w),"in-out-circ":q(w),"out-in-circ":C(w),"in-back":M,"out-back":j(M),"in-out-back":q(M),"out-in-back":C(M),"in-bounce":N,"out-bounce":j(N),"in-out-bounce":q(N),"out-in-bounce":C(N),"in-elastic":F,"out-elastic":j(F),"in-out-elastic":q(F),"out-in-elastic":C(F),spring:R,"spring-in":R,"spring-out":j(R),"spring-in-out":q(R),"spring-out-in":C(R)},K=function(t){return I[function(t){return(i=t,"-"===(i=i.replace(/([A-Z])/g,(function(t){return"-".concat(t.toLowerCase())}))).charAt(0)?i.substring(1):i).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim();var i}(t)]||I.linear},W=function(t){return t},G=1,z=.5,L=0;function V(t,i){return function(e){if(e>=1)return 1;var n=1/t;return(e+=i*n)-e%n}}var H="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",U=RegExp("cubic-bezier\\("+H+","+H+","+H+","+H+"\\)"),Z=/steps\(\s*(\d+)\s*\)/,B=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function J(t){var i=U.exec(t);if(i)return d.apply(void 0,r([],n(i.slice(1).map(Number)),!1));var e=Z.exec(t);if(e)return V(Number(e[1]),L);var s=B.exec(t);return s?V(Number(s[1]),{start:G,middle:z,end:L}[s[2]]):K(t)}function Q(t){return Math.abs(function(t){var i;if(0===t.duration||0===t.iterations)return 0;return("auto"===t.duration?0:Number(t.duration))*(null!==(i=t.iterations)&&void 0!==i?i:1)}(t)/(t.playbackRate||1))}var X=0,Y=1,$=2,tt=3;function it(t,i,e){var n=function(t,i,e){if(null===i)return X;var n=e.endTime;return Math.min(e.delay,n)>i?Y:Math.min(e.delay+t+e.endDelay,n)>i?tt:$}(t,i,e),r=function(t,i,e,n,r){switch(n){case Y:return"backwards"===i||"both"===i?0:null;case tt:return e-r;case $:return"forwards"===i||"both"===i?t:null;case X:return null}}(t,e.fill,i,n,e.delay);if(null===r)return null;var s="auto"===e.duration?0:e.duration,o=function(t,i,e,n,r){var s=r;return 0===t?i!==Y&&(s+=e):s+=n/t,s}(s,n,e.iterations,r,e.iterationStart),a=function(t,i,e,n,r,s){var o=t===1/0?i%1:t%1;return 0!==o||e!==$||0===n||0===r&&0!==s||(o=1),o}(o,e.iterationStart,n,e.iterations,r,s),u=function(t,i,e,n){return t===$&&i===1/0?1/0:1===e?Math.floor(n)-1:Math.floor(n)}(n,e.iterations,a,o),f=function(t,i,e){var n=t;if("normal"!==t&&"reverse"!==t){var r=i;"alternate-reverse"===t&&(r+=1),n="normal",r!==1/0&&r%2!=0&&(n="reverse")}return"normal"===n?e:1-e}(e.direction,u,a);return e.currentIteration=u,e.progress=f,e.easingFunction(f)}function et(t,i,e){var n=function(t,i){for(var e={},n=0;t.length>n;n++)for(var r in t[n])if(nt(r)){var s={offset:t[n].offset,computedOffset:t[n].computedOffset,easing:t[n].easing,easingFunction:J(t[n].easing)||i.easingFunction,value:t[n][r]};e[r]=e[r]||[],e[r].push(s)}return e}(t,i),r=function(t,i){var e=[];for(var n in t)for(var r=t[n],s=0;r.length-1>s;s++){var o=s,a=s+1,u=r[o].computedOffset,f=r[a].computedOffset,c=u,h=f;0===s&&(c=-1/0,0===f&&(a=o)),s===r.length-2&&(h=1/0,1===u&&(o=a)),e.push({applyFrom:c,applyTo:h,startOffset:r[o].computedOffset,endOffset:r[a].computedOffset,easingFunction:r[o].easingFunction,property:n,interpolation:st(n,r[o].value,r[a].value,i)})}return e.sort((function(t,i){return t.startOffset-i.startOffset})),e}(n,e);return function(t,i){if(null!==i)r.filter((function(t){return i>=t.applyFrom&&t.applyTo>i})).forEach((function(e){var n=e.endOffset-e.startOffset,r=0===n?0:e.easingFunction((i-e.startOffset)/n);t.setAttribute(e.property,e.interpolation(r))}));else for(var e in n)nt(e)&&t.setAttribute(e,null)}}function nt(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var rt=function(t,e,n){return function(r){var s=ot(t,e,r);return!i.runtime.enableCSSParsing&&T(s)?s:n(s)}};function st(t,e,s,o){var a=i.propertyMetadataCache[t];if(a&&a.syntax&&a.int){var u=i.runtime.styleValueRegistry.getPropertySyntax(a.syntax);if(u){var f=void 0,c=void 0;if(i.runtime.enableCSSParsing){var h=i.runtime.styleValueRegistry.parseProperty(t,e,o),l=i.runtime.styleValueRegistry.parseProperty(t,s,o);f=i.runtime.styleValueRegistry.computeProperty(t,h,o),c=i.runtime.styleValueRegistry.computeProperty(t,l,o)}else{var m=u.parserWithCSSDisabled;f=m?m(e,o):e,c=m?m(s,o):s}var p=u.mixer(f,c,o);if(p){var d=rt.apply(void 0,r([],n(p),!1));return function(t){return 0===t?e:1===t?s:d(t)}}}}return rt(!1,!0,(function(t){return t?s:e}))}function ot(t,i,e){if("number"==typeof t&&"number"==typeof i)return t*(1-e)+i*e;if("boolean"==typeof t&&"boolean"==typeof i||"string"==typeof t&&"string"==typeof i)return.5>e?t:i;if(Array.isArray(t)&&Array.isArray(i)){for(var n=t.length,r=i.length,s=Math.max(n,r),o=[],a=0;s>a;a++)o.push(ot(t[n>a?a:n-1],i[r>a?a:r-1],e));return o}throw Error("Mismatched interpolation arguments "+t+":"+i)}var at=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=W,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return Object.defineProperty(t.prototype,"easing",{get:function(){return this._easing},set:function(t){this.easingFunction=J(t),this._easing=t},enumerable:!1,configurable:!0}),t}();function ut(t,i){if(null===t)return[];Array.isArray(t)||(t=function(t){var i=[];for(var e in t)if(!(e in["easing","offset","composite"])){var n=t[e];Array.isArray(n)||(n=[n]);for(var r=n.length,s=0;r>s;s++){if(!i[s]){var o={};"offset"in t&&(o.offset=Number(t.offset)),"easing"in t&&(o.easing=t.easing),"composite"in t&&(o.composite=t.composite),i[s]=o}null!=n[s]&&(i[s][e]=n[s])}}return i.sort((function(t,i){return(t.computedOffset||0)-(i.computedOffset||0)})),i}(t));for(var e=t.map((function(t){var e={};for(var n in(null==i?void 0:i.composite)&&(e.composite="auto"),t){var r=t[n];if("offset"===n){if(null!==r){if(!isFinite(r=Number(r)))throw Error("Keyframe offsets must be numbers.");if(0>r||r>1)throw Error("Keyframe offsets must be between 0 and 1.");e.computedOffset=r}}else if("composite"===n&&-1===["replace","add","accumulate","auto"].indexOf(r))throw Error("".concat(r," compositing is not supported"));e[n]=r}return void 0===e.offset&&(e.offset=null),void 0===e.easing&&(e.easing=(null==i?void 0:i.easing)||"linear"),void 0===e.composite&&(e.composite="auto"),e})),n=!0,r=-1/0,s=0;e.length>s;s++){var o=e[s].offset;if(y(o))n=!1;else{if(r>o)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");r=o}}return e=e.filter((function(t){return Number(t.offset)>=0&&1>=Number(t.offset)})),n||function(){var t,i,n=e.length;e[n-1].computedOffset=Number(null!==(t=e[n-1].offset)&&void 0!==t?t:1),n>1&&(e[0].computedOffset=Number(null!==(i=e[0].offset)&&void 0!==i?i:0));for(var r=0,s=Number(e[0].computedOffset),o=1;n>o;o++){var a=e[o].computedOffset;if(!y(a)&&!y(s)){for(var u=1;o-r>u;u++)e[r+u].computedOffset=s+(Number(a)-s)*u/(o-r);r=o,s=Number(a)}}}(),e}var ft="backwards|forwards|both|none".split("|"),ct="reverse|alternate|alternate-reverse".split("|");function ht(t,i){var e=new at;return i&&(e.fill="both",e.duration="auto"),"number"!=typeof t||isNaN(t)?void 0!==t&&Object.keys(t).forEach((function(i){if(null!=t[i]&&"auto"!==t[i]){if(("number"==typeof e[i]||"duration"===i)&&("number"!=typeof t[i]||isNaN(t[i])))return;if("fill"===i&&-1===ft.indexOf(t[i]))return;if("direction"===i&&-1===ct.indexOf(t[i]))return;e[i]=t[i]}})):e.duration=t,e}function lt(t,i){return ht(t=mt(null!=t?t:{duration:"auto"}),i)}function mt(t){return"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t}),t}var pt=function(){function t(t,e,n){var r=this;this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=lt(n,!1),this.timing.effect=this,this.timing.activeDuration=Q(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=ut(e,this.timing),this.interpolations=et(this.normalizedKeyframes,this.timing,this.target);var s=i.runtime.globalThis.Proxy;this.computedTiming=s?new s(this.timing,{get:function(t,i){return"duration"===i?"auto"===t.duration?0:t.duration:"fill"===i?"auto"===t.fill?"none":t.fill:"localTime"===i?r.animation&&r.animation.currentTime||null:"currentIteration"===i?r.animation&&"running"===r.animation.playState?t.currentIteration||0:null:"progress"===i?r.animation&&"running"===r.animation.playState?t.progress||0:null:t[i]},set:function(){return!0}}):this.timing}return t.prototype.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},t.prototype.update=function(t){return null!==t&&(this.timeFraction=it(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},t.prototype.getKeyframes=function(){return this.normalizedKeyframes},t.prototype.setKeyframes=function(t){this.normalizedKeyframes=ut(t)},t.prototype.getComputedTiming=function(){return this.computedTiming},t.prototype.getTiming=function(){return this.timing},t.prototype.updateTiming=function(t){var i=this;Object.keys(t||{}).forEach((function(e){i.timing[e]=t[e]}))},t}();function dt(t,i){return Number(t.id)-Number(i.id)}var yt=function(){function t(t){var i=this;this.document=t,this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function(t){i.currentTime=t,i.discardAnimations(),0===i.animations.length?i.timelineTicking=!1:i.requestAnimationFrame(i.webAnimationsNextTick)},this.processRafCallbacks=function(t){var e=i.rafCallbacks;i.rafCallbacks=[],Number(i.currentTime)>t&&(t=Number(i.currentTime)),i.animations.sort(dt),i.animations=i.tick(t,!0,i.animations)[0],e.forEach((function(i){i[1](t)})),i.applyPendingEffects()}}return t.prototype.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},t.prototype.isTicking=function(){return this.inTick},t.prototype.play=function(t,i,e){var n=new pt(t,i,e),r=new a(n,this);return this.animations.push(r),this.restartWebAnimationsNextTick(),r.updatePromises(),r.play(),r.updatePromises(),r},t.prototype.applyDirtiedAnimation=function(t){var i=this;if(!this.inTick){t.markTarget();var e=t.targetAnimations();e.sort(dt),this.tick(Number(this.currentTime),!1,e.slice())[1].forEach((function(t){var e=i.animations.indexOf(t);-1!==e&&i.animations.splice(e,1)})),this.applyPendingEffects()}},t.prototype.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame((function(){})),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},t.prototype.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},t.prototype.applyPendingEffects=function(){this.pendingEffects.forEach((function(t){null==t||t.applyInterpolations()})),this.pendingEffects=[]},t.prototype.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter((function(t){return t.updatePromises()}))},t.prototype.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter((function(t){return"finished"!==t.playState&&"idle"!==t.playState}))},t.prototype.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},t.prototype.rAF=function(t){var i=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([i,t]),i},t.prototype.requestAnimationFrame=function(t){var i=this;return this.rAF((function(e){i.updateAnimationsPromises(),t(e),i.updateAnimationsPromises()}))},t.prototype.tick=function(t,i,e){var s,o,a=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var u=[],f=[],c=[],h=[];return e.forEach((function(e){e.tick(t,i),e._inEffect?(f.push(e.effect),e.markTarget()):(u.push(e.effect),e.unmarkTarget()),e._needsTick&&(a.ticking=!0);var n=e._inEffect||e._needsTick;e._inTimeline=n,n?c.push(e):h.push(e)})),(s=this.pendingEffects).push.apply(s,r([],n(u),!1)),(o=this.pendingEffects).push.apply(o,r([],n(f),!1)),this.ticking&&this.requestAnimationFrame((function(){})),this.inTick=!1,[c,h]},t}();i.runtime.EasingFunction=J,i.runtime.AnimationTimeline=yt,t.Animation=a,t.AnimationEvent=s,t.AnimationTimeline=yt,t.EasingFunctions=I,t.KeyframeEffect=pt,t.compareAnimations=dt,t.makeTiming=ht,t.normalizeKeyframes=ut,t.normalizeTimingInput=lt,t.numericTimingToObject=mt}));
!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports,require("@antv/g-lite")):"function"==typeof define&&define.amd?define(["exports","@antv/g-lite"],i):i(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.WebAnimationsAPI={}),t.window.G)}(this,(function(t,i){"use strict";var e=function(t,i){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])},e(t,i)};function n(t,i){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var n,r,s=e.call(t),o=[];try{for(;(void 0===i||i-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(e=s.return)&&e.call(s)}finally{if(r)throw r.error}}return o}function r(t,i,e){if(e||2===arguments.length)for(var n,r=0,s=i.length;s>r;r++)!n&&r in i||(n||(n=Array.prototype.slice.call(i,0,r)),n[r]=i[r]);return t.concat(n||Array.prototype.slice.call(i))}var s=function(t){function i(i,e,n,r){var s=t.call(this,i)||this;return s.currentTime=n,s.timelineTime=r,s.target=e,s.type="finish",s.bubbles=!1,s.currentTarget=e,s.defaultPrevented=!1,s.eventPhase=s.AT_TARGET,s.timeStamp=Date.now(),s.currentTime=n,s.timelineTime=r,s}return function(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+i+" is not a constructor or null");function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}(i,t),i}(i.FederatedEvent),o=0,a=function(){function t(t,i){var e;this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=t,t.animation=this,this.timeline=i,this.id="".concat(o++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null===(e=this.effect)||void 0===e?void 0:e.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return Object.defineProperty(t.prototype,"pending",{get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playState",{get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ready",{get:function(){var t=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise((function(i,e){t.resolveReadyPromise=function(){i(t)},t.rejectReadyPromise=function(){e(Error())}})),this.pending||this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finished",{get:function(){var t=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise((function(i,e){t.resolveFinishedPromise=function(){i(t)},t.rejectFinishedPromise=function(){e(Error())}})),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){var i;isNaN(t=Number(t))||(this.timeline.restart(),this._paused||null===this._startTime||(this._startTime=Number(null===(i=this.timeline)||void 0===i?void 0:i.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startTime",{get:function(){return this._startTime},set:function(t){if(null!==t){if(this.updatePromises(),isNaN(t=Number(t)))return;if(this._paused||this._idle)return;this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){if(t!==this._playbackRate){this.updatePromises();var i=this.currentTime;this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==i&&(this.currentTime=i),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_isFinished",{get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||0>this._playbackRate&&0>=Number(this._currentTime))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalDuration",{get:function(){return this._totalDuration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_needsTick",{get:function(){return this.pending||"running"===this.playState||!this._finishedFlag},enumerable:!1,configurable:!0}),t.prototype.updatePromises=function(){var t=this.oldPlayState,i=this.pending?"pending":this.playState;return this.readyPromise&&i!==t&&("idle"===i?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===i&&(this.readyPromise=void 0)),this.finishedPromise&&i!==t&&("idle"===i?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===i?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=i,this.readyPromise||this.finishedPromise},t.prototype.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},t.prototype.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},t.prototype.finish=function(){this.updatePromises(),this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},t.prototype.cancel=function(){var t=this;if(this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises(),this.oncancel)){var i=new s(null,this,this.currentTime,null);setTimeout((function(){t.oncancel(i)}))}},t.prototype.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},t.prototype.updatePlaybackRate=function(t){this.playbackRate=t},t.prototype.targetAnimations=function(){var t;return(null===(t=this.effect)||void 0===t?void 0:t.target).getAnimations()},t.prototype.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},t.prototype.unmarkTarget=function(){var t=this.targetAnimations(),i=t.indexOf(this);-1!==i&&t.splice(i,1)},t.prototype.tick=function(t,i){this._idle||this._paused||(null===this._startTime?i&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),i&&(this.currentTimePending=!1,this.fireEvents(t))},t.prototype.rewind=function(){if(this.playbackRate<0){if(this._totalDuration>=1/0)throw Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this._totalDuration}else this.currentTime=0},t.prototype.persist=function(){throw Error(i.ERROR_MSG_METHOD_NOT_IMPLEMENTED)},t.prototype.addEventListener=function(t,e,n){throw Error(i.ERROR_MSG_METHOD_NOT_IMPLEMENTED)},t.prototype.removeEventListener=function(t,e,n){throw Error(i.ERROR_MSG_METHOD_NOT_IMPLEMENTED)},t.prototype.dispatchEvent=function(t){throw Error(i.ERROR_MSG_METHOD_NOT_IMPLEMENTED)},t.prototype.commitStyles=function(){throw Error(i.ERROR_MSG_METHOD_NOT_IMPLEMENTED)},t.prototype.ensureAlive=function(){var t,i;this._inEffect=0>this.playbackRate&&0===this.currentTime?!!(null===(t=this.effect)||void 0===t?void 0:t.update(-1)):!!(null===(i=this.effect)||void 0===i?void 0:i.update(this.currentTime)),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},t.prototype.tickCurrentTime=function(t,i){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!i&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())},t.prototype.fireEvents=function(t){var i=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var e=new s(null,this,this.currentTime,t);setTimeout((function(){i.onfinish&&i.onfinish(e)}))}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var n=new s(null,this,this.currentTime,t);this.onframe(n)}this._finishedFlag=!1}},t}(),u=.1,f="function"==typeof Float32Array,c=function(t,i){return 1-3*i+3*t},h=function(t,i){return 3*i-6*t},l=function(t){return 3*t},m=function(t,i,e){return((c(i,e)*t+h(i,e))*t+l(i))*t},p=function(t,i,e){return 3*c(i,e)*t*t+2*h(i,e)*t+l(i)},d=function(t,i,e,n){if(0>t||t>1||0>e||e>1)throw Error("bezier x values must be in [0, 1] range");if(t===i&&e===n)return function(t){return t};for(var r=f?new Float32Array(11):[,,,,,,,,,,,],s=0;11>s;++s)r[s]=m(s*u,t,e);var o=function(i){for(var n=0,s=1;10!==s&&i>=r[s];++s)n+=u;--s;var o=n+(i-r[s])/(r[s+1]-r[s])*u,a=p(o,t,e);return.001>a?0===a?o:function(t,i,e,n,r){var s,o,a=0;do{(s=m(o=i+(e-i)/2,n,r)-t)>0?e=o:i=o}while(Math.abs(s)>1e-7&&10>++a);return o}(i,n,n+u,t,e):function(t,i,e,n){for(var r=0;4>r;++r){var s=p(i,e,n);if(0===s)return i;i-=(m(i,e,n)-t)/s}return i}(i,o,t,e)};return function(t){return 0===t||1===t?t:m(o(t),i,n)}},y=function(t){return null==t},g={}.toString,v=function(t,i){return g.call(t)==="[object "+i+"]"},b=function(t,i,e){return i>t?i:t>e?e:t},T=function(t){return v(t,"Number")},_=function(t){return Math.pow(t,2)},P=function(t){return Math.pow(t,3)},k=function(t){return Math.pow(t,4)},E=function(t){return Math.pow(t,5)},O=function(t){return Math.pow(t,6)},A=function(t){return 1-Math.cos(t*Math.PI/2)},w=function(t){return 1-Math.sqrt(1-t*t)},M=function(t){return t*t*(3*t-2)},N=function(t){for(var i,e=4;t<((i=Math.pow(2,--e))-1)/11;);return 1/Math.pow(4,3-e)-7.5625*Math.pow((3*i-2)/22-t,2)},F=function(t,i){void 0===i&&(i=[]);var e=n(i,2),r=e[0],s=e[1],o=void 0===s?.5:s,a=b(Number(void 0===r?1:r),1,10),u=b(Number(o),.1,2);return 0===t||1===t?t:-a*Math.pow(2,10*(t-1))*Math.sin(2*Math.PI*(t-1-u/(2*Math.PI)*Math.asin(1/a))/u)},R=function(t,i,e){void 0===i&&(i=[]);var r=n(i,4),s=r[0],o=void 0===s?1:s,a=r[1],u=void 0===a?100:a,f=r[2],c=void 0===f?10:f,h=r[3],l=void 0===h?0:h;o=b(o,.1,1e3),u=b(u,.1,1e3),c=b(c,.1,1e3),l=b(l,.1,1e3);var m=Math.sqrt(u/o),p=c/(2*Math.sqrt(u*o)),d=1>p?m*Math.sqrt(1-p*p):0,y=1>p?(p*m-l)/d:-l+m,g=e?e*t/1e3:t;return g=1>p?Math.exp(-g*p*m)*(1*Math.cos(d*g)+y*Math.sin(d*g)):(1+y*g)*Math.exp(-g*m),0===t||1===t?t:1-g},x=function(t,i){void 0===i&&(i=[]);var e=n(i,2),r=e[0],s=void 0===r?10:r;return("start"==e[1]?Math.ceil:Math.floor)(b(t,0,1)*s)/s},S=function(t,i){void 0===i&&(i=[]);var e=n(i,4);return d(e[0],e[1],e[2],e[3])(t)},D=d(.42,0,1,1),j=function(t){return function(i,e,n){return void 0===e&&(e=[]),1-t(1-i,e,n)}},q=function(t){return function(i,e,n){return void 0===e&&(e=[]),.5>i?t(2*i,e,n)/2:1-t(-2*i+2,e,n)/2}},C=function(t){return function(i,e,n){return void 0===e&&(e=[]),.5>i?(1-t(1-2*i,e,n))/2:(t(2*i-1,e,n)+1)/2}},I={steps:x,"step-start":function(t){return x(t,[1,"start"])},"step-end":function(t){return x(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":S,ease:function(t){return S(t,[.25,.1,.25,1])},in:D,out:j(D),"in-out":q(D),"out-in":C(D),"in-quad":_,"out-quad":j(_),"in-out-quad":q(_),"out-in-quad":C(_),"in-cubic":P,"out-cubic":j(P),"in-out-cubic":q(P),"out-in-cubic":C(P),"in-quart":k,"out-quart":j(k),"in-out-quart":q(k),"out-in-quart":C(k),"in-quint":E,"out-quint":j(E),"in-out-quint":q(E),"out-in-quint":C(E),"in-expo":O,"out-expo":j(O),"in-out-expo":q(O),"out-in-expo":C(O),"in-sine":A,"out-sine":j(A),"in-out-sine":q(A),"out-in-sine":C(A),"in-circ":w,"out-circ":j(w),"in-out-circ":q(w),"out-in-circ":C(w),"in-back":M,"out-back":j(M),"in-out-back":q(M),"out-in-back":C(M),"in-bounce":N,"out-bounce":j(N),"in-out-bounce":q(N),"out-in-bounce":C(N),"in-elastic":F,"out-elastic":j(F),"in-out-elastic":q(F),"out-in-elastic":C(F),spring:R,"spring-in":R,"spring-out":j(R),"spring-in-out":q(R),"spring-out-in":C(R)},K=function(t){return I[function(t){return(i=t,"-"===(i=i.replace(/([A-Z])/g,(function(t){return"-".concat(t.toLowerCase())}))).charAt(0)?i.substring(1):i).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim();var i}(t)]||I.linear},W=function(t){return t},G=1,z=.5,L=0;function V(t,i){return function(e){if(e>=1)return 1;var n=1/t;return(e+=i*n)-e%n}}var H="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",U=RegExp("cubic-bezier\\("+H+","+H+","+H+","+H+"\\)"),Z=/steps\(\s*(\d+)\s*\)/,B=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function J(t){var i=U.exec(t);if(i)return d.apply(void 0,r([],n(i.slice(1).map(Number)),!1));var e=Z.exec(t);if(e)return V(Number(e[1]),L);var s=B.exec(t);return s?V(Number(s[1]),{start:G,middle:z,end:L}[s[2]]):K(t)}function Q(t){return Math.abs(function(t){var i;if(0===t.duration||0===t.iterations)return 0;return("auto"===t.duration?0:Number(t.duration))*(null!==(i=t.iterations)&&void 0!==i?i:1)}(t)/(t.playbackRate||1))}var X=0,Y=1,$=2,tt=3;function it(t,i,e){var n=function(t,i,e){if(null===i)return X;var n=e.endTime;return Math.min(e.delay,n)>i?Y:Math.min(e.delay+t+e.endDelay,n)>i?tt:$}(t,i,e),r=function(t,i,e,n,r){switch(n){case Y:return"backwards"===i||"both"===i?0:null;case tt:return e-r;case $:return"forwards"===i||"both"===i?t:null;case X:return null}}(t,e.fill,i,n,e.delay);if(null===r)return null;var s="auto"===e.duration?0:e.duration,o=function(t,i,e,n,r){var s=r;return 0===t?i!==Y&&(s+=e):s+=n/t,s}(s,n,e.iterations,r,e.iterationStart),a=function(t,i,e,n,r,s){var o=t===1/0?i%1:t%1;return 0!==o||e!==$||0===n||0===r&&0!==s||(o=1),o}(o,e.iterationStart,n,e.iterations,r,s),u=function(t,i,e,n){return t===$&&i===1/0?1/0:1===e?Math.floor(n)-1:Math.floor(n)}(n,e.iterations,a,o),f=function(t,i,e){var n=t;if("normal"!==t&&"reverse"!==t){var r=i;"alternate-reverse"===t&&(r+=1),n="normal",r!==1/0&&r%2!=0&&(n="reverse")}return"normal"===n?e:1-e}(e.direction,u,a);return e.currentIteration=u,e.progress=f,e.easingFunction(f)}function et(t,i,e){var n=function(t,i){for(var e={},n=0;t.length>n;n++)for(var r in t[n])if(nt(r)){var s={offset:t[n].offset,computedOffset:t[n].computedOffset,easing:t[n].easing,easingFunction:J(t[n].easing)||i.easingFunction,value:t[n][r]};e[r]=e[r]||[],e[r].push(s)}return e}(t,i),r=function(t,i){var e=[];for(var n in t)for(var r=t[n],s=0;r.length-1>s;s++){var o=s,a=s+1,u=r[o].computedOffset,f=r[a].computedOffset,c=u,h=f;0===s&&(c=-1/0,0===f&&(a=o)),s===r.length-2&&(h=1/0,1===u&&(o=a)),e.push({applyFrom:c,applyTo:h,startOffset:r[o].computedOffset,endOffset:r[a].computedOffset,easingFunction:r[o].easingFunction,property:n,interpolation:st(n,r[o].value,r[a].value,i)})}return e.sort((function(t,i){return t.startOffset-i.startOffset})),e}(n,e);return function(t,i){if(null!==i)r.filter((function(t){return i>=t.applyFrom&&t.applyTo>i})).forEach((function(e){var n=e.endOffset-e.startOffset,r=0===n?0:e.easingFunction((i-e.startOffset)/n);t.setAttribute(e.property,e.interpolation(r),!1,!1)}));else for(var e in n)nt(e)&&t.setAttribute(e,null)}}function nt(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var rt=function(t,e,n){return function(r){var s=ot(t,e,r);return!i.runtime.enableCSSParsing&&T(s)?s:n(s)}};function st(t,e,s,o){var a=i.propertyMetadataCache[t];if(a&&a.syntax&&a.int){var u=i.runtime.styleValueRegistry.getPropertySyntax(a.syntax);if(u){var f=void 0,c=void 0;if(i.runtime.enableCSSParsing){var h=i.runtime.styleValueRegistry.parseProperty(t,e,o,!1),l=i.runtime.styleValueRegistry.parseProperty(t,s,o,!1);f=i.runtime.styleValueRegistry.computeProperty(t,h,o,!1),c=i.runtime.styleValueRegistry.computeProperty(t,l,o,!1)}else{var m=u.parserWithCSSDisabled;f=m?m(e,o):e,c=m?m(s,o):s}var p=u.mixer(f,c,o);if(p){var d=rt.apply(void 0,r([],n(p),!1));return function(t){return 0===t?e:1===t?s:d(t)}}}}return rt(!1,!0,(function(t){return t?s:e}))}function ot(t,i,e){if("number"==typeof t&&"number"==typeof i)return t*(1-e)+i*e;if("boolean"==typeof t&&"boolean"==typeof i||"string"==typeof t&&"string"==typeof i)return.5>e?t:i;if(Array.isArray(t)&&Array.isArray(i)){for(var n=t.length,r=i.length,s=Math.max(n,r),o=[],a=0;s>a;a++)o.push(ot(t[n>a?a:n-1],i[r>a?a:r-1],e));return o}throw Error("Mismatched interpolation arguments "+t+":"+i)}var at=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=W,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return Object.defineProperty(t.prototype,"easing",{get:function(){return this._easing},set:function(t){this.easingFunction=J(t),this._easing=t},enumerable:!1,configurable:!0}),t}();function ut(t,i){if(null===t)return[];Array.isArray(t)||(t=function(t){var i=[];for(var e in t)if(!(e in["easing","offset","composite"])){var n=t[e];Array.isArray(n)||(n=[n]);for(var r=n.length,s=0;r>s;s++){if(!i[s]){var o={};"offset"in t&&(o.offset=Number(t.offset)),"easing"in t&&(o.easing=t.easing),"composite"in t&&(o.composite=t.composite),i[s]=o}null!=n[s]&&(i[s][e]=n[s])}}return i.sort((function(t,i){return(t.computedOffset||0)-(i.computedOffset||0)})),i}(t));for(var e=t.map((function(t){var e={};for(var n in(null==i?void 0:i.composite)&&(e.composite="auto"),t){var r=t[n];if("offset"===n){if(null!==r){if(!isFinite(r=Number(r)))throw Error("Keyframe offsets must be numbers.");if(0>r||r>1)throw Error("Keyframe offsets must be between 0 and 1.");e.computedOffset=r}}else if("composite"===n&&-1===["replace","add","accumulate","auto"].indexOf(r))throw Error("".concat(r," compositing is not supported"));e[n]=r}return void 0===e.offset&&(e.offset=null),void 0===e.easing&&(e.easing=(null==i?void 0:i.easing)||"linear"),void 0===e.composite&&(e.composite="auto"),e})),n=!0,r=-1/0,s=0;e.length>s;s++){var o=e[s].offset;if(y(o))n=!1;else{if(r>o)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");r=o}}return e=e.filter((function(t){return Number(t.offset)>=0&&1>=Number(t.offset)})),n||function(){var t,i,n=e.length;e[n-1].computedOffset=Number(null!==(t=e[n-1].offset)&&void 0!==t?t:1),n>1&&(e[0].computedOffset=Number(null!==(i=e[0].offset)&&void 0!==i?i:0));for(var r=0,s=Number(e[0].computedOffset),o=1;n>o;o++){var a=e[o].computedOffset;if(!y(a)&&!y(s)){for(var u=1;o-r>u;u++)e[r+u].computedOffset=s+(Number(a)-s)*u/(o-r);r=o,s=Number(a)}}}(),e}var ft="backwards|forwards|both|none".split("|"),ct="reverse|alternate|alternate-reverse".split("|");function ht(t,i){var e=new at;return i&&(e.fill="both",e.duration="auto"),"number"!=typeof t||isNaN(t)?void 0!==t&&Object.keys(t).forEach((function(i){if(null!=t[i]&&"auto"!==t[i]){if(("number"==typeof e[i]||"duration"===i)&&("number"!=typeof t[i]||isNaN(t[i])))return;if("fill"===i&&-1===ft.indexOf(t[i]))return;if("direction"===i&&-1===ct.indexOf(t[i]))return;e[i]=t[i]}})):e.duration=t,e}function lt(t,i){return ht(t=mt(null!=t?t:{duration:"auto"}),i)}function mt(t){return"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t}),t}var pt=function(){function t(t,e,n){var r=this;this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=lt(n,!1),this.timing.effect=this,this.timing.activeDuration=Q(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=ut(e,this.timing),this.interpolations=et(this.normalizedKeyframes,this.timing,this.target);var s=i.runtime.globalThis.Proxy;this.computedTiming=s?new s(this.timing,{get:function(t,i){return"duration"===i?"auto"===t.duration?0:t.duration:"fill"===i?"auto"===t.fill?"none":t.fill:"localTime"===i?r.animation&&r.animation.currentTime||null:"currentIteration"===i?r.animation&&"running"===r.animation.playState?t.currentIteration||0:null:"progress"===i?r.animation&&"running"===r.animation.playState?t.progress||0:null:t[i]},set:function(){return!0}}):this.timing}return t.prototype.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},t.prototype.update=function(t){return null!==t&&(this.timeFraction=it(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},t.prototype.getKeyframes=function(){return this.normalizedKeyframes},t.prototype.setKeyframes=function(t){this.normalizedKeyframes=ut(t)},t.prototype.getComputedTiming=function(){return this.computedTiming},t.prototype.getTiming=function(){return this.timing},t.prototype.updateTiming=function(t){var i=this;Object.keys(t||{}).forEach((function(e){i.timing[e]=t[e]}))},t}();function dt(t,i){return Number(t.id)-Number(i.id)}var yt=function(){function t(t){var i=this;this.document=t,this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function(t){i.currentTime=t,i.discardAnimations(),0===i.animations.length?i.timelineTicking=!1:i.requestAnimationFrame(i.webAnimationsNextTick)},this.processRafCallbacks=function(t){var e=i.rafCallbacks;i.rafCallbacks=[],Number(i.currentTime)>t&&(t=Number(i.currentTime)),i.animations.sort(dt),i.animations=i.tick(t,!0,i.animations)[0],e.forEach((function(i){i[1](t)})),i.applyPendingEffects()}}return t.prototype.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},t.prototype.isTicking=function(){return this.inTick},t.prototype.play=function(t,i,e){var n=new pt(t,i,e),r=new a(n,this);return this.animations.push(r),this.restartWebAnimationsNextTick(),r.updatePromises(),r.play(),r.updatePromises(),r},t.prototype.applyDirtiedAnimation=function(t){var i=this;if(!this.inTick){t.markTarget();var e=t.targetAnimations();e.sort(dt),this.tick(Number(this.currentTime),!1,e.slice())[1].forEach((function(t){var e=i.animations.indexOf(t);-1!==e&&i.animations.splice(e,1)})),this.applyPendingEffects()}},t.prototype.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame((function(){})),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},t.prototype.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},t.prototype.applyPendingEffects=function(){this.pendingEffects.forEach((function(t){null==t||t.applyInterpolations()})),this.pendingEffects=[]},t.prototype.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter((function(t){return t.updatePromises()}))},t.prototype.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter((function(t){return"finished"!==t.playState&&"idle"!==t.playState}))},t.prototype.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},t.prototype.rAF=function(t){var i=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([i,t]),i},t.prototype.requestAnimationFrame=function(t){var i=this;return this.rAF((function(e){i.updateAnimationsPromises(),t(e),i.updateAnimationsPromises()}))},t.prototype.tick=function(t,i,e){var s,o,a=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var u=[],f=[],c=[],h=[];return e.forEach((function(e){e.tick(t,i),e._inEffect?(f.push(e.effect),e.markTarget()):(u.push(e.effect),e.unmarkTarget()),e._needsTick&&(a.ticking=!0);var n=e._inEffect||e._needsTick;e._inTimeline=n,n?c.push(e):h.push(e)})),(s=this.pendingEffects).push.apply(s,r([],n(u),!1)),(o=this.pendingEffects).push.apply(o,r([],n(f),!1)),this.ticking&&this.requestAnimationFrame((function(){})),this.inTick=!1,[c,h]},t}();i.runtime.EasingFunction=J,i.runtime.AnimationTimeline=yt,t.Animation=a,t.AnimationEvent=s,t.AnimationTimeline=yt,t.EasingFunctions=I,t.KeyframeEffect=pt,t.compareAnimations=dt,t.makeTiming=ht,t.normalizeKeyframes=ut,t.normalizeTimingInput=lt,t.numericTimingToObject=mt}));
//# sourceMappingURL=index.umd.min.js.map
{
"name": "@antv/g-web-animations-api",
"version": "1.2.21",
"version": "1.2.22",
"description": "A simple implementation of Web Animations API.",

@@ -39,3 +39,3 @@ "keywords": [

"tslib": "^2.5.3",
"@antv/g-lite": "1.2.20"
"@antv/g-lite": "1.2.21"
},

@@ -42,0 +42,0 @@ "publishConfig": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc