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

@antv/g-web-animations-api

Package Overview
Dependencies
Maintainers
63
Versions
104
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.0.21 to 1.0.22

2

dist/index.umd.min.js

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

!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";function e(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function n(t,i){for(var e=0;i.length>e;e++){var n=i[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(r=void 0,"symbol"==typeof(r=function(t,i){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,i||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===i?String:Number)(t)}(n.key,"string"))?r:r+""),n)}var r}function r(t,i,e){return i&&n(t.prototype,i),e&&n(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function o(t,i){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},o(t,i)}function a(t,i){if(i&&("object"==typeof i||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function u(t){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,n=s(t);if(i){var r=s(this).constructor;e=Reflect.construct(n,arguments,r)}else e=n.apply(this,arguments);return a(this,e)}}function f(t,i){return function(t){if(Array.isArray(t))return t}(t)||function(t,i){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,r,s,o,a=[],u=!0,f=!1;try{if(s=(e=e.call(t)).next,0===i){if(Object(e)!==e)return;u=!1}else for(;!(u=(n=s.call(e)).done)&&(a.push(n.value),a.length!==i);u=!0);}catch(t){f=!0,r=t}finally{try{if(!u&&null!=e.return&&(o=e.return(),Object(o)!==o))return}finally{if(f)throw r}}return a}}(t,i)||c(t,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||c(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,i){if(t){if("string"==typeof t)return l(t,i);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?l(t,i):void 0}}function l(t,i){(null==i||i>t.length)&&(i=t.length);for(var e=0,n=Array(i);i>e;e++)n[e]=t[e];return n}var m=function(t){!function(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),i&&o(t,i)}(n,t);var i=u(n);function n(t,r,s,o){var a;return e(this,n),(a=i.call(this,t)).currentTime=void 0,a.timelineTime=void 0,a.currentTime=s,a.timelineTime=o,a.target=r,a.type="finish",a.bubbles=!1,a.currentTarget=r,a.defaultPrevented=!1,a.eventPhase=a.AT_TARGET,a.timeStamp=Date.now(),a.currentTime=s,a.timelineTime=o,a}return r(n)}(i.FederatedEvent),d=0,p=function(){function t(i,n){var r;e(this,t),this.effect=void 0,this.timeline=void 0,this.id=void 0,this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this.oldPlayState=void 0,this._holdTime=void 0,this.readyPromise=void 0,this.finishedPromise=void 0,this.resolveReadyPromise=void 0,this.rejectReadyPromise=void 0,this.resolveFinishedPromise=void 0,this.rejectFinishedPromise=void 0,this.onfinish=void 0,this.oncancel=void 0,this.onframe=void 0,this._currentTime=0,this._startTime=void 0,this._playbackRate=1,this._totalDuration=void 0,this._inEffect=void 0,this._inTimeline=!0,this.onremove=void 0,this.effect=i,i.animation=this,this.timeline=n,this.id="".concat(d++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null===(r=this.effect)||void 0===r?void 0:r.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return r(t,[{key:"pending",get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"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}},{key:"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}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){if(!isNaN(t=Number(t))){var i;if(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))}}},{key:"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()}}},{key:"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()}}},{key:"_isFinished",get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||0>this._playbackRate&&0>=Number(this._currentTime))}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||"running"===this.playState||!this._finishedFlag}},{key:"updatePromises",value: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}},{key:"play",value: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()}},{key:"pause",value: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()}},{key:"finish",value: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())}},{key:"cancel",value:function(){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())}},{key:"reverse",value:function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()}},{key:"updatePlaybackRate",value:function(t){this.playbackRate=t}},{key:"targetAnimations",value:function(){var t;return(null===(t=this.effect)||void 0===t?void 0:t.target).getAnimations()}},{key:"markTarget",value:function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)}},{key:"unmarkTarget",value:function(){var t=this.targetAnimations(),i=t.indexOf(this);-1!==i&&t.splice(i,1)}},{key:"tick",value: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))}},{key:"rewind",value: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}},{key:"persist",value:function(){throw Error(i.ERROR_MSG_METHOD_NOT_IMPLEMENTED)}},{key:"addEventListener",value:function(t,e,n){throw Error(i.ERROR_MSG_METHOD_NOT_IMPLEMENTED)}},{key:"removeEventListener",value:function(t,e,n){throw Error(i.ERROR_MSG_METHOD_NOT_IMPLEMENTED)}},{key:"dispatchEvent",value:function(t){throw Error(i.ERROR_MSG_METHOD_NOT_IMPLEMENTED)}},{key:"commitStyles",value:function(){throw Error(i.ERROR_MSG_METHOD_NOT_IMPLEMENTED)}},{key:"ensureAlive",value:function(){var t,i;0>this.playbackRate&&0===this.currentTime?this._inEffect=!!(null===(t=this.effect)||void 0===t?void 0:t.update(-1)):this._inEffect=!!(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))}},{key:"tickCurrentTime",value:function(t,i){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!i&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())}},{key:"fireEvents",value:function(t){var i=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var e=new m(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 m(null,this,this.currentTime,t);this.onframe(n)}this._finishedFlag=!1}}}]),t}(),v=.1,y="function"==typeof Float32Array,g=function(t,i){return 1-3*i+3*t},b=function(t,i){return 3*i-6*t},T=function(t){return 3*t},_=function(t,i,e){return((g(i,e)*t+b(i,e))*t+T(i))*t},k=function(t,i,e){return 3*g(i,e)*t*t+2*b(i,e)*t+T(i)},P=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=y?new Float32Array(11):[,,,,,,,,,,,],s=0;11>s;++s)r[s]=_(s*v,t,e);var o=function(i){for(var n=0,s=1;10!==s&&i>=r[s];++s)n+=v;--s;var o=n+(i-r[s])/(r[s+1]-r[s])*v,a=k(o,t,e);return.001>a?0===a?o:function(t,i,e,n,r){var s,o,a=0;do{(s=_(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+v,t,e):function(t,i,e,n){for(var r=0;4>r;++r){var s=k(i,e,n);if(0===s)return i;i-=(_(i,e,n)-t)/s}return i}(i,o,t,e)};return function(t){return 0===t||1===t?t:_(o(t),i,n)}},E=function(t){return null==t},w=function(t,i,e){return i>t?i:t>e?e:t},O=function(t){return Math.pow(t,2)},A=function(t){return Math.pow(t,3)},R=function(t){return Math.pow(t,4)},M=function(t){return Math.pow(t,5)},F=function(t){return Math.pow(t,6)},N=function(t){return 1-Math.cos(t*Math.PI/2)},S=function(t){return 1-Math.sqrt(1-t*t)},x=function(t){return t*t*(3*t-2)},D=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)},j=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=f(i,2),n=e[0],r=void 0===n?1:n,s=e[1],o=void 0===s?.5:s,a=w(Number(r),1,10),u=w(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)},I=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=arguments.length>2?arguments[2]:void 0,n=f(i,4),r=n[0],s=void 0===r?1:r,o=n[1],a=void 0===o?100:o,u=n[2],h=void 0===u?10:u,c=n[3],l=void 0===c?0:c;s=w(s,.1,1e3),a=w(a,.1,1e3),h=w(h,.1,1e3),l=w(l,.1,1e3);var m=Math.sqrt(a/s),d=h/(2*Math.sqrt(a*s)),p=1>d?m*Math.sqrt(1-d*d):0,v=1,y=1>d?(d*m-l)/p:-l+m,g=e?e*t/1e3:t;return g=1>d?Math.exp(-g*d*m)*(v*Math.cos(p*g)+y*Math.sin(p*g)):(v+y*g)*Math.exp(-g*m),0===t||1===t?t:1-g},q=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=f(i,2),n=e[0],r=void 0===n?10:n,s=e[1],o="start"==s?Math.ceil:Math.floor;return o(w(t,0,1)*r)/r},C=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=f(i,4),n=e[0],r=e[1],s=e[2],o=e[3];return P(n,r,s,o)(t)},K=P(.42,0,1,1),z=function(t){return function(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return 1-t(1-i,e,n)}},G=function(t){return function(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return.5>i?t(2*i,e,n)/2:1-t(-2*i+2,e,n)/2}},W=function(t){return function(i){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return.5>i?(1-t(1-2*i,e,n))/2:(t(2*i-1,e,n)+1)/2}},L={steps:q,"step-start":function(t){return q(t,[1,"start"])},"step-end":function(t){return q(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":C,ease:function(t){return C(t,[.25,.1,.25,1])},in:K,out:z(K),"in-out":G(K),"out-in":W(K),"in-quad":O,"out-quad":z(O),"in-out-quad":G(O),"out-in-quad":W(O),"in-cubic":A,"out-cubic":z(A),"in-out-cubic":G(A),"out-in-cubic":W(A),"in-quart":R,"out-quart":z(R),"in-out-quart":G(R),"out-in-quart":W(R),"in-quint":M,"out-quint":z(M),"in-out-quint":G(M),"out-in-quint":W(M),"in-expo":F,"out-expo":z(F),"in-out-expo":G(F),"out-in-expo":W(F),"in-sine":N,"out-sine":z(N),"in-out-sine":G(N),"out-in-sine":W(N),"in-circ":S,"out-circ":z(S),"in-out-circ":G(S),"out-in-circ":W(S),"in-back":x,"out-back":z(x),"in-out-back":G(x),"out-in-back":W(x),"in-bounce":D,"out-bounce":z(D),"in-out-bounce":G(D),"out-in-bounce":W(D),"in-elastic":j,"out-elastic":z(j),"in-out-elastic":G(j),"out-in-elastic":W(j),spring:I,"spring-in":I,"spring-out":z(I),"spring-in-out":G(I),"spring-out-in":W(I)},V=function(t){return t};function H(t,i){return function(e){if(e>=1)return 1;var n=1/t;return(e+=i*n)-e%n}}var B="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",U=RegExp("cubic-bezier\\("+B+","+B+","+B+","+B+"\\)"),Z=/steps\(\s*(\d+)\s*\)/,$=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function J(t){var i=U.exec(t);if(i)return P.apply(void 0,h(i.slice(1).map(Number)));var e=Z.exec(t);if(e)return H(Number(e[1]),0);var n=$.exec(t);return n?H(Number(n[1]),{start:1,middle:.5,end:0}[n[2]]):L[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)]||L.linear}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))}function X(t,i,e){var n=function(t,i,e){if(null===i)return 0;var n=e.endTime;return Math.min(e.delay,n)>i?1:Math.min(e.delay+t+e.endDelay,n)>i?3:2}(t,i,e),r=function(t,i,e,n,r){switch(n){case 1:return"backwards"===i||"both"===i?0:null;case 3:return e-r;case 2:return"forwards"===i||"both"===i?t:null;case 0: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?1!==i&&(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||2!==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 2===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 Y(t,i,e){var n=function(t,i){for(var e={},n=0;t.length>n;n++)for(var r in t[n])if(tt(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,h=u,c=f;0===s&&(h=-1/0,0===f&&(a=o)),s===r.length-2&&(c=1/0,1===u&&(o=a)),e.push({applyFrom:h,applyTo:c,startOffset:r[o].computedOffset,endOffset:r[a].computedOffset,easingFunction:r[o].easingFunction,property:n,interpolation:et(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.style[e.property]=e.interpolation(r)}));else for(var e in n)tt(e)&&(t.style[e]=null)}}function tt(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var it=function(t,i,e){return function(n){return e(nt(t,i,n))}};function et(t,e,n,r){var s=i.propertyMetadataCache[t];if(s&&s.syntax&&s.int){var o=i.runtime.styleValueRegistry.getPropertySyntax(s.syntax);if(o){var a=i.runtime.styleValueRegistry.parseProperty(t,e,r),u=i.runtime.styleValueRegistry.parseProperty(t,n,r),f=i.runtime.styleValueRegistry.computeProperty(t,a,r),c=i.runtime.styleValueRegistry.computeProperty(t,u,r),l=o.mixer(f,c,r);if(l){var m=it.apply(void 0,h(l));return function(t){return 0===t?e:1===t?n:m(t)}}}}return it(!1,!0,(function(t){return t?n:e}))}function nt(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)&&t.length===i.length){for(var n=[],r=0;t.length>r;r++)n.push(nt(t[r],i[r],e));return n}throw Error("Mismatched interpolation arguments "+t+":"+i)}var rt=function(){function t(){e(this,t),this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=V,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.playbackRate=void 0,this.effect=void 0,this.composite=void 0,this.activeDuration=void 0,this.endTime=void 0,this.currentIteration=null,this.progress=null}return r(t,[{key:"easing",get:function(){return this._easing},set:function(t){this.easingFunction=J(t),this._easing=t}}]),t}();function st(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(E(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(!E(a)&&!E(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 ot="backwards|forwards|both|none".split("|"),at="reverse|alternate|alternate-reverse".split("|");function ut(t,i){var e=new rt;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===ot.indexOf(t[i]))return;if("direction"===i&&-1===at.indexOf(t[i]))return;e[i]=t[i]}})):e.duration=t,e}function ft(t,i){var e;return ut(t=ht(null!==(e=t)&&void 0!==e?e:{duration:"auto"}),i)}function ht(t){return"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t}),t}var ct=function(){function t(i,n,r){var s=this;e(this,t),this.composite="replace",this.iterationComposite="replace",this.target=void 0,this.animation=void 0,this.timing=void 0,this.computedTiming=void 0,this.normalizedKeyframes=void 0,this.timeFraction=void 0,this.interpolations=void 0,this.target=i,this.timing=ft(r,!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=st(n,this.timing),this.interpolations=Y(this.normalizedKeyframes,this.timing,this.target),this.computedTiming=new Proxy(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?s.animation&&s.animation.currentTime||null:"currentIteration"===i?s.animation&&"running"===s.animation.playState?t.currentIteration||0:null:"progress"===i?s.animation&&"running"===s.animation.playState?t.progress||0:null:t[i]},set:function(){return!0}})}return r(t,[{key:"applyInterpolations",value:function(){this.interpolations(this.target,Number(this.timeFraction))}},{key:"update",value:function(t){return null!==t&&(this.timeFraction=X(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)}},{key:"getKeyframes",value:function(){return this.normalizedKeyframes}},{key:"setKeyframes",value:function(t){this.normalizedKeyframes=st(t)}},{key:"getComputedTiming",value:function(){return this.computedTiming}},{key:"getTiming",value:function(){return this.timing}},{key:"updateTiming",value:function(t){var i=this;Object.keys(t||{}).forEach((function(e){i.timing=t[e]}))}}]),t}();function lt(t,i){return Number(t.id)-Number(i.id)}var mt=function(){function t(i){var n=this;e(this,t),this.document=void 0,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.frameId=void 0,this.webAnimationsNextTick=function(t){n.currentTime=t,n.discardAnimations(),0===n.animations.length?n.timelineTicking=!1:n.requestAnimationFrame(n.webAnimationsNextTick)},this.processRafCallbacks=function(t){var i=n.rafCallbacks;n.rafCallbacks=[],Number(n.currentTime)>t&&(t=Number(n.currentTime)),n.animations.sort(lt),n.animations=n.tick(t,!0,n.animations)[0],i.forEach((function(i){i[1](t)})),n.applyPendingEffects()},this.document=i}return r(t,[{key:"getAnimations",value:function(){return this.discardAnimations(),this.animations.slice()}},{key:"isTicking",value:function(){return this.inTick}},{key:"play",value:function(t,i,e){var n=new ct(t,i,e),r=new p(n,this);return this.animations.push(r),this.restartWebAnimationsNextTick(),r.updatePromises(),r.play(),r.updatePromises(),r}},{key:"applyDirtiedAnimation",value:function(t){var i=this;if(!this.inTick){t.markTarget();var e=t.targetAnimations();e.sort(lt),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()}}},{key:"restart",value:function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame((function(){})),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame}},{key:"destroy",value:function(){this.document.defaultView.cancelAnimationFrame(this.frameId)}},{key:"applyPendingEffects",value:function(){this.pendingEffects.forEach((function(t){null==t||t.applyInterpolations()})),this.pendingEffects=[]}},{key:"updateAnimationsPromises",value:function(){this.animationsWithPromises=this.animationsWithPromises.filter((function(t){return t.updatePromises()}))}},{key:"discardAnimations",value:function(){this.updateAnimationsPromises(),this.animations=this.animations.filter((function(t){return"finished"!==t.playState&&"idle"!==t.playState}))}},{key:"restartWebAnimationsNextTick",value:function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))}},{key:"rAF",value: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}},{key:"requestAnimationFrame",value:function(t){var i=this;return this.rAF((function(e){i.updateAnimationsPromises(),t(e),i.updateAnimationsPromises()}))}},{key:"tick",value:function(t,i,e){var n,r,s=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var o=[],a=[],u=[],f=[];return e.forEach((function(e){e.tick(t,i),e._inEffect?(a.push(e.effect),e.markTarget()):(o.push(e.effect),e.unmarkTarget()),e._needsTick&&(s.ticking=!0);var n=e._inEffect||e._needsTick;e._inTimeline=n,n?u.push(e):f.push(e)})),(n=this.pendingEffects).push.apply(n,o),(r=this.pendingEffects).push.apply(r,a),this.ticking&&this.requestAnimationFrame((function(){})),this.inTick=!1,[u,f]}}]),t}();i.runtime.EasingFunction=J,i.runtime.AnimationTimeline=mt,t.Animation=p,t.AnimationEvent=m,t.AnimationTimeline=mt,t.KeyframeEffect=ct,t.compareAnimations=lt,t.makeTiming=ut,t.normalizeKeyframes=st,t.normalizeTimingInput=ft,t.numericTimingToObject=ht,Object.defineProperty(t,"__esModule",{value:!0})}));
!function(i,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@antv/g-lite")):"function"==typeof define&&define.amd?define(["exports","@antv/g-lite"],t):t(((i="undefined"!=typeof globalThis?globalThis:i||self).G=i.G||{},i.G.WebAnimationsAPI={}),i.window.G)}(this,(function(i,t){"use strict";function e(i,t){for(var e=0;t.length>e;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,(r=void 0,"symbol"==typeof(r=function(i,t){if("object"!=typeof i||null===i)return i;var e=i[Symbol.toPrimitive];if(void 0!==e){var n=e.call(i,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(i)}(n.key,"string"))?r:r+""),n)}var r}function n(i,t,n){return t&&e(i.prototype,t),n&&e(i,n),Object.defineProperty(i,"prototype",{writable:!1}),i}function r(i,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,t){return i.__proto__=t,i},r(i,t)}var s=function(i){var t,e;function n(t,e,n,r){var s;return(s=i.call(this,t)||this).currentTime=void 0,s.timelineTime=void 0,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(t=n).prototype=Object.create((e=i).prototype),t.prototype.constructor=t,r(t,e),n}(t.FederatedEvent),o=0,a=function(){function i(i,t){var e;this.effect=void 0,this.timeline=void 0,this.id=void 0,this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this.oldPlayState=void 0,this._holdTime=void 0,this.readyPromise=void 0,this.finishedPromise=void 0,this.resolveReadyPromise=void 0,this.rejectReadyPromise=void 0,this.resolveFinishedPromise=void 0,this.rejectFinishedPromise=void 0,this.onfinish=void 0,this.oncancel=void 0,this.onframe=void 0,this._currentTime=0,this._startTime=void 0,this._playbackRate=1,this._totalDuration=void 0,this._inEffect=void 0,this._inTimeline=!0,this.onremove=void 0,this.effect=i,i.animation=this,this.timeline=t,this.id=""+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()}var e=i.prototype;return e.updatePromises=function(){var i=this.oldPlayState,t=this.pending?"pending":this.playState;return this.readyPromise&&t!==i&&("idle"===t?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===i?this.resolveReadyPromise():"pending"===t&&(this.readyPromise=void 0)),this.finishedPromise&&t!==i&&("idle"===t?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===t?this.resolveFinishedPromise():"finished"===i&&(this.finishedPromise=void 0)),this.oldPlayState=t,this.readyPromise||this.finishedPromise},e.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()},e.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()},e.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())},e.cancel=function(){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())},e.reverse=function(){this.updatePromises();var i=this.currentTime;this.playbackRate*=-1,this.play(),null!==i&&(this.currentTime=i),this.updatePromises()},e.updatePlaybackRate=function(i){this.playbackRate=i},e.targetAnimations=function(){var i;return(null===(i=this.effect)||void 0===i?void 0:i.target).getAnimations()},e.markTarget=function(){var i=this.targetAnimations();-1===i.indexOf(this)&&i.push(this)},e.unmarkTarget=function(){var i=this.targetAnimations(),t=i.indexOf(this);-1!==t&&i.splice(t,1)},e.tick=function(i,t){this._idle||this._paused||(null===this._startTime?t&&(this.startTime=i-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((i-this._startTime)*this.playbackRate)),t&&(this.currentTimePending=!1,this.fireEvents(i))},e.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},e.persist=function(){throw Error(t.ERROR_MSG_METHOD_NOT_IMPLEMENTED)},e.addEventListener=function(i,e,n){throw Error(t.ERROR_MSG_METHOD_NOT_IMPLEMENTED)},e.removeEventListener=function(i,e,n){throw Error(t.ERROR_MSG_METHOD_NOT_IMPLEMENTED)},e.dispatchEvent=function(i){throw Error(t.ERROR_MSG_METHOD_NOT_IMPLEMENTED)},e.commitStyles=function(){throw Error(t.ERROR_MSG_METHOD_NOT_IMPLEMENTED)},e.ensureAlive=function(){var i,t;0>this.playbackRate&&0===this.currentTime?this._inEffect=!!(null===(i=this.effect)||void 0===i?void 0:i.update(-1)):this._inEffect=!!(null===(t=this.effect)||void 0===t?void 0:t.update(this.currentTime));this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},e.tickCurrentTime=function(i,t){i!==this._currentTime&&(this._currentTime=i,this._isFinished&&!t&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())},e.fireEvents=function(i){var t=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var e=new s(null,this,this.currentTime,i);setTimeout((function(){t.onfinish&&t.onfinish(e)}))}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var n=new s(null,this,this.currentTime,i);this.onframe(n)}this._finishedFlag=!1}},n(i,[{key:"pending",get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var i=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise((function(t,e){i.resolveReadyPromise=function(){t(i)},i.rejectReadyPromise=function(){e(Error())}})),this.pending||this.resolveReadyPromise()),this.readyPromise}},{key:"finished",get:function(){var i=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise((function(t,e){i.resolveFinishedPromise=function(){t(i)},i.rejectFinishedPromise=function(){e(Error())}})),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(i){if(!isNaN(i=Number(i))){var t;if(this.timeline.restart(),!this._paused&&null!==this._startTime)this._startTime=Number(null===(t=this.timeline)||void 0===t?void 0:t.currentTime)-i/this.playbackRate;this.currentTimePending=!1,this._currentTime!==i&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(i,!0),this.timeline.applyDirtiedAnimation(this))}}},{key:"startTime",get:function(){return this._startTime},set:function(i){if(null!==i){if(this.updatePromises(),isNaN(i=Number(i)))return;if(this._paused||this._idle)return;this._startTime=i,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(i){if(i!==this._playbackRate){this.updatePromises();var t=this.currentTime;this._playbackRate=i,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==t&&(this.currentTime=t),this.updatePromises()}}},{key:"_isFinished",get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||0>this._playbackRate&&0>=Number(this._currentTime))}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||"running"===this.playState||!this._finishedFlag}}]),i}(),u=.1,h="function"==typeof Float32Array,f=function(i,t){return 1-3*t+3*i},c=function(i,t){return 3*t-6*i},m=function(i){return 3*i},l=function(i,t,e){return((f(t,e)*i+c(t,e))*i+m(t))*i},d=function(i,t,e){return 3*f(t,e)*i*i+2*c(t,e)*i+m(t)},p=function(i,t,e,n){if(0>i||i>1||0>e||e>1)throw Error("bezier x values must be in [0, 1] range");if(i===t&&e===n)return function(i){return i};for(var r=h?new Float32Array(11):[,,,,,,,,,,,],s=0;11>s;++s)r[s]=l(s*u,i,e);var o=function(t){for(var n=0,s=1;10!==s&&t>=r[s];++s)n+=u;--s;var o=n+(t-r[s])/(r[s+1]-r[s])*u,a=d(o,i,e);return.001>a?0===a?o:function(i,t,e,n,r){var s,o,a=0;do{(s=l(o=t+(e-t)/2,n,r)-i)>0?e=o:t=o}while(Math.abs(s)>1e-7&&10>++a);return o}(t,n,n+u,i,e):function(i,t,e,n){for(var r=0;4>r;++r){var s=d(t,e,n);if(0===s)return t;t-=(l(t,e,n)-i)/s}return t}(t,o,i,e)};return function(i){return 0===i||1===i?i:l(o(i),t,n)}},v=function(i){return null==i},y=function(i,t,e){return t>i?t:i>e?e:i},g=function(i){return Math.pow(i,2)},T=function(i){return Math.pow(i,3)},_=function(i){return Math.pow(i,4)},b=function(i){return Math.pow(i,5)},P=function(i){return Math.pow(i,6)},k=function(i){return 1-Math.cos(i*Math.PI/2)},E=function(i){return 1-Math.sqrt(1-i*i)},A=function(i){return i*i*(3*i-2)},w=function(i){for(var t,e=4;i<((t=Math.pow(2,--e))-1)/11;);return 1/Math.pow(4,3-e)-7.5625*Math.pow((3*t-2)/22-i,2)},O=function(i,t){void 0===t&&(t=[]);var e=t[0],n=t[1],r=void 0===n?.5:n,s=y(Number(void 0===e?1:e),1,10),o=y(Number(r),.1,2);return 0===i||1===i?i:-s*Math.pow(2,10*(i-1))*Math.sin(2*Math.PI*(i-1-o/(2*Math.PI)*Math.asin(1/s))/o)},R=function(i,t,e){void 0===t&&(t=[]);var n=t[0],r=void 0===n?1:n,s=t[1],o=void 0===s?100:s,a=t[2],u=void 0===a?10:a,h=t[3],f=void 0===h?0:h;r=y(r,.1,1e3),o=y(o,.1,1e3),u=y(u,.1,1e3),f=y(f,.1,1e3);var c=Math.sqrt(o/r),m=u/(2*Math.sqrt(o*r)),l=1>m?c*Math.sqrt(1-m*m):0,d=1>m?(m*c-f)/l:-f+c,p=e?e*i/1e3:i;return p=1>m?Math.exp(-p*m*c)*(1*Math.cos(l*p)+d*Math.sin(l*p)):(1+d*p)*Math.exp(-p*c),0===i||1===i?i:1-p},F=function(i,t){void 0===t&&(t=[]);var e=t[0],n=void 0===e?10:e;return("start"==t[1]?Math.ceil:Math.floor)(y(i,0,1)*n)/n},M=function(i,t){void 0===t&&(t=[]);return p(t[0],t[1],t[2],t[3])(i)},N=p(.42,0,1,1),D=function(i){return function(t,e,n){return void 0===e&&(e=[]),1-i(1-t,e,n)}},x=function(i){return function(t,e,n){return void 0===e&&(e=[]),.5>t?i(2*t,e,n)/2:1-i(-2*t+2,e,n)/2}},S=function(i){return function(t,e,n){return void 0===e&&(e=[]),.5>t?(1-i(1-2*t,e,n))/2:(i(2*t-1,e,n)+1)/2}},q={steps:F,"step-start":function(i){return F(i,[1,"start"])},"step-end":function(i){return F(i,[1,"end"])},linear:function(i){return i},"cubic-bezier":M,ease:function(i){return M(i,[.25,.1,.25,1])},in:N,out:D(N),"in-out":x(N),"out-in":S(N),"in-quad":g,"out-quad":D(g),"in-out-quad":x(g),"out-in-quad":S(g),"in-cubic":T,"out-cubic":D(T),"in-out-cubic":x(T),"out-in-cubic":S(T),"in-quart":_,"out-quart":D(_),"in-out-quart":x(_),"out-in-quart":S(_),"in-quint":b,"out-quint":D(b),"in-out-quint":x(b),"out-in-quint":S(b),"in-expo":P,"out-expo":D(P),"in-out-expo":x(P),"out-in-expo":S(P),"in-sine":k,"out-sine":D(k),"in-out-sine":x(k),"out-in-sine":S(k),"in-circ":E,"out-circ":D(E),"in-out-circ":x(E),"out-in-circ":S(E),"in-back":A,"out-back":D(A),"in-out-back":x(A),"out-in-back":S(A),"in-bounce":w,"out-bounce":D(w),"in-out-bounce":x(w),"out-in-bounce":S(w),"in-elastic":O,"out-elastic":D(O),"in-out-elastic":x(O),"out-in-elastic":S(O),spring:R,"spring-in":R,"spring-out":D(R),"spring-in-out":x(R),"spring-out-in":S(R)},I=function(i){return i};function j(i,t){return function(e){if(e>=1)return 1;var n=1/i;return(e+=t*n)-e%n}}var C="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",K=RegExp("cubic-bezier\\("+C+","+C+","+C+","+C+"\\)"),z=/steps\(\s*(\d+)\s*\)/,G=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function W(i){var t=K.exec(i);if(t)return p.apply(void 0,t.slice(1).map(Number));var e=z.exec(i);if(e)return j(Number(e[1]),0);var n=G.exec(i);return n?j(Number(n[1]),{start:1,middle:.5,end:0}[n[2]]):q[function(i){return(t=i,"-"===(t=t.replace(/([A-Z])/g,(function(i){return"-"+i.toLowerCase()}))).charAt(0)?t.substring(1):t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim();var t}(i)]||q.linear}function L(i){return Math.abs(function(i){var t;if(0===i.duration||0===i.iterations)return 0;return("auto"===i.duration?0:Number(i.duration))*(null!==(t=i.iterations)&&void 0!==t?t:1)}(i)/(i.playbackRate||1))}function V(i,t,e){var n=function(i,t,e){if(null===t)return 0;var n=e.endTime;return Math.min(e.delay,n)>t?1:Math.min(e.delay+i+e.endDelay,n)>t?3:2}(i,t,e),r=function(i,t,e,n,r){switch(n){case 1:return"backwards"===t||"both"===t?0:null;case 3:return e-r;case 2:return"forwards"===t||"both"===t?i:null;case 0:return null}}(i,e.fill,t,n,e.delay);if(null===r)return null;var s="auto"===e.duration?0:e.duration,o=function(i,t,e,n,r){var s=r;return 0===i?1!==t&&(s+=e):s+=n/i,s}(s,n,e.iterations,r,e.iterationStart),a=function(i,t,e,n,r,s){var o=i===1/0?t%1:i%1;return 0!==o||2!==e||0===n||0===r&&0!==s||(o=1),o}(o,e.iterationStart,n,e.iterations,r,s),u=function(i,t,e,n){return 2===i&&t===1/0?1/0:1===e?Math.floor(n)-1:Math.floor(n)}(n,e.iterations,a,o),h=function(i,t,e){var n=i;if("normal"!==i&&"reverse"!==i){var r=t;"alternate-reverse"===i&&(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=h,e.easingFunction(h)}function H(i,t,e){var n=function(i,t){for(var e={},n=0;i.length>n;n++)for(var r in i[n])if(U(r)){var s={offset:i[n].offset,computedOffset:i[n].computedOffset,easing:i[n].easing,easingFunction:W(i[n].easing)||t.easingFunction,value:i[n][r]};e[r]=e[r]||[],e[r].push(s)}return e}(i,t),r=function(i,t){var e=[];for(var n in i)for(var r=i[n],s=0;r.length-1>s;s++){var o=s,a=s+1,u=r[o].computedOffset,h=r[a].computedOffset,f=u,c=h;0===s&&(f=-1/0,0===h&&(a=o)),s===r.length-2&&(c=1/0,1===u&&(o=a)),e.push({applyFrom:f,applyTo:c,startOffset:r[o].computedOffset,endOffset:r[a].computedOffset,easingFunction:r[o].easingFunction,property:n,interpolation:B(n,r[o].value,r[a].value,t)})}return e.sort((function(i,t){return i.startOffset-t.startOffset})),e}(n,e);return function(i,t){if(null!==t)r.filter((function(i){return t>=i.applyFrom&&i.applyTo>t})).forEach((function(e){var n=e.endOffset-e.startOffset,r=0===n?0:e.easingFunction((t-e.startOffset)/n);i.style[e.property]=e.interpolation(r)}));else for(var e in n)U(e)&&(i.style[e]=null)}}function U(i){return"offset"!==i&&"easing"!==i&&"composite"!==i&&"computedOffset"!==i}var Z=function(i,t,e){return function(n){return e(J(i,t,n))}};function B(i,e,n,r){var s=t.propertyMetadataCache[i];if(s&&s.syntax&&s.int){var o=t.runtime.styleValueRegistry.getPropertySyntax(s.syntax);if(o){var a=t.runtime.styleValueRegistry.parseProperty(i,e,r),u=t.runtime.styleValueRegistry.parseProperty(i,n,r),h=t.runtime.styleValueRegistry.computeProperty(i,a,r),f=t.runtime.styleValueRegistry.computeProperty(i,u,r),c=o.mixer(h,f,r);if(c){var m=Z.apply(void 0,c);return function(i){return 0===i?e:1===i?n:m(i)}}}}return Z(!1,!0,(function(i){return i?n:e}))}function J(i,t,e){if("number"==typeof i&&"number"==typeof t)return i*(1-e)+t*e;if("boolean"==typeof i&&"boolean"==typeof t||"string"==typeof i&&"string"==typeof t)return.5>e?i:t;if(Array.isArray(i)&&Array.isArray(t)&&i.length===t.length){for(var n=[],r=0;i.length>r;r++)n.push(J(i[r],t[r],e));return n}throw Error("Mismatched interpolation arguments "+i+":"+t)}var Q=function(){function i(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=I,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.playbackRate=void 0,this.effect=void 0,this.composite=void 0,this.activeDuration=void 0,this.endTime=void 0,this.currentIteration=null,this.progress=null}return n(i,[{key:"easing",get:function(){return this._easing},set:function(i){this.easingFunction=W(i),this._easing=i}}]),i}();function X(i,t){if(null===i)return[];Array.isArray(i)||(i=function(i){var t=[];for(var e in i)if(!(e in["easing","offset","composite"])){var n=i[e];Array.isArray(n)||(n=[n]);for(var r=n.length,s=0;r>s;s++){if(!t[s]){var o={};"offset"in i&&(o.offset=Number(i.offset)),"easing"in i&&(o.easing=i.easing),"composite"in i&&(o.composite=i.composite),t[s]=o}null!=n[s]&&(t[s][e]=n[s])}}return t.sort((function(i,t){return(i.computedOffset||0)-(t.computedOffset||0)})),t}(i));for(var e=i.map((function(i){var e={};for(var n in(null==t?void 0:t.composite)&&(e.composite="auto"),i){var r=i[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(r+" compositing is not supported");e[n]=r}return void 0===e.offset&&(e.offset=null),void 0===e.easing&&(e.easing=(null==t?void 0:t.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(v(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(i){return Number(i.offset)>=0&&1>=Number(i.offset)})),n||function(){var i,t,n=e.length;e[n-1].computedOffset=Number(null!==(i=e[n-1].offset)&&void 0!==i?i:1),n>1&&(e[0].computedOffset=Number(null!==(t=e[0].offset)&&void 0!==t?t:0));for(var r=0,s=Number(e[0].computedOffset),o=1;n>o;o++){var a=e[o].computedOffset;if(!v(a)&&!v(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 Y="backwards|forwards|both|none".split("|"),$="reverse|alternate|alternate-reverse".split("|");function ii(i,t){var e=new Q;return t&&(e.fill="both",e.duration="auto"),"number"!=typeof i||isNaN(i)?void 0!==i&&Object.keys(i).forEach((function(t){if(null!=i[t]&&"auto"!==i[t]){if(("number"==typeof e[t]||"duration"===t)&&("number"!=typeof i[t]||isNaN(i[t])))return;if("fill"===t&&-1===Y.indexOf(i[t]))return;if("direction"===t&&-1===$.indexOf(i[t]))return;e[t]=i[t]}})):e.duration=i,e}function ti(i,t){var e;return ii(i=ei(null!==(e=i)&&void 0!==e?e:{duration:"auto"}),t)}function ei(i){return"number"==typeof i&&(i=isNaN(i)?{duration:"auto"}:{duration:i}),i}var ni=function(){function i(i,t,e){var n=this;this.composite="replace",this.iterationComposite="replace",this.target=void 0,this.animation=void 0,this.timing=void 0,this.computedTiming=void 0,this.normalizedKeyframes=void 0,this.timeFraction=void 0,this.interpolations=void 0,this.target=i,this.timing=ti(e,!1),this.timing.effect=this,this.timing.activeDuration=L(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=X(t,this.timing),this.interpolations=H(this.normalizedKeyframes,this.timing,this.target),this.computedTiming=new Proxy(this.timing,{get:function(i,t){return"duration"===t?"auto"===i.duration?0:i.duration:"fill"===t?"auto"===i.fill?"none":i.fill:"localTime"===t?n.animation&&n.animation.currentTime||null:"currentIteration"===t?n.animation&&"running"===n.animation.playState?i.currentIteration||0:null:"progress"===t?n.animation&&"running"===n.animation.playState?i.progress||0:null:i[t]},set:function(){return!0}})}var t=i.prototype;return t.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},t.update=function(i){return null!==i&&(this.timeFraction=V(this.timing.activeDuration,i,this.timing),null!==this.timeFraction)},t.getKeyframes=function(){return this.normalizedKeyframes},t.setKeyframes=function(i){this.normalizedKeyframes=X(i)},t.getComputedTiming=function(){return this.computedTiming},t.getTiming=function(){return this.timing},t.updateTiming=function(i){var t=this;Object.keys(i||{}).forEach((function(e){t.timing=i[e]}))},i}();function ri(i,t){return Number(i.id)-Number(t.id)}var si=function(){function i(i){var t=this;this.document=void 0,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.frameId=void 0,this.webAnimationsNextTick=function(i){t.currentTime=i,t.discardAnimations(),0===t.animations.length?t.timelineTicking=!1:t.requestAnimationFrame(t.webAnimationsNextTick)},this.processRafCallbacks=function(i){var e=t.rafCallbacks;t.rafCallbacks=[],Number(t.currentTime)>i&&(i=Number(t.currentTime)),t.animations.sort(ri),t.animations=t.tick(i,!0,t.animations)[0],e.forEach((function(t){t[1](i)})),t.applyPendingEffects()},this.document=i}var t=i.prototype;return t.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},t.isTicking=function(){return this.inTick},t.play=function(i,t,e){var n=new ni(i,t,e),r=new a(n,this);return this.animations.push(r),this.restartWebAnimationsNextTick(),r.updatePromises(),r.play(),r.updatePromises(),r},t.applyDirtiedAnimation=function(i){var t=this;if(!this.inTick){i.markTarget();var e=i.targetAnimations();e.sort(ri),this.tick(Number(this.currentTime),!1,e.slice())[1].forEach((function(i){var e=t.animations.indexOf(i);-1!==e&&t.animations.splice(e,1)})),this.applyPendingEffects()}},t.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame((function(){})),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},t.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},t.applyPendingEffects=function(){this.pendingEffects.forEach((function(i){null==i||i.applyInterpolations()})),this.pendingEffects=[]},t.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter((function(i){return i.updatePromises()}))},t.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter((function(i){return"finished"!==i.playState&&"idle"!==i.playState}))},t.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},t.rAF=function(i){var t=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([t,i]),t},t.requestAnimationFrame=function(i){var t=this;return this.rAF((function(e){t.updateAnimationsPromises(),i(e),t.updateAnimationsPromises()}))},t.tick=function(i,t,e){var n,r,s=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=i,this.ticking=!1;var o=[],a=[],u=[],h=[];return e.forEach((function(e){e.tick(i,t),e._inEffect?(a.push(e.effect),e.markTarget()):(o.push(e.effect),e.unmarkTarget()),e._needsTick&&(s.ticking=!0);var n=e._inEffect||e._needsTick;e._inTimeline=n,n?u.push(e):h.push(e)})),(n=this.pendingEffects).push.apply(n,o),(r=this.pendingEffects).push.apply(r,a),this.ticking&&this.requestAnimationFrame((function(){})),this.inTick=!1,[u,h]},i}();t.runtime.EasingFunction=W,t.runtime.AnimationTimeline=si,i.Animation=a,i.AnimationEvent=s,i.AnimationTimeline=si,i.KeyframeEffect=ni,i.compareAnimations=ri,i.makeTiming=ii,i.normalizeKeyframes=X,i.normalizeTimingInput=ti,i.numericTimingToObject=ei,Object.defineProperty(i,"__esModule",{value:!0})}));
{
"name": "@antv/g-web-animations-api",
"version": "1.0.21",
"version": "1.0.22",
"description": "A simple implementation of Web Animations API.",

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

},
"gitHead": "a4ea86f17b561d0483129ca2022586fcd9e42b7b"
"gitHead": "c3c09705bf97040bbec01d94f55c27cc6f14d230"
}

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

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

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

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