UNPKG

css-animator

Version:

Animate elements using CSS classes with support for Angular 2+

3 lines (2 loc) 28.5 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@angular/core")):"function"==typeof define&&define.amd?define("css-animator",["@angular/core"],e):"object"==typeof exports?exports["css-animator"]=e(require("@angular/core")):t["css-animator"]=e(t.ng.core)}(window,function(n){return function(n){var i={};function r(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};n[t].call(e.exports,e,e.exports,r);e.l=!0;return e.exports}r.m=n;r.c=i;r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})};r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});Object.defineProperty(t,"__esModule",{value:!0})};r.t=function(e,t){1&t&&(e=r(e));if(8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);r.r(n);Object.defineProperty(n,"default",{enumerable:!0,value:e});if(2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n};r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};r.d(e,"a",e);return e};r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};r.p="";return r(r.s="./dist/index.js")}({"./dist/angular.js":function(t,e,n){"use strict";n.r(e);var i=n("./dist/angular/animator.module.js");n.d(e,"AnimatorModule",function(){return i.AnimatorModule});var r=n("./dist/angular/animates.directive.js");n.d(e,"AnimatesDirective",function(){return r.AnimatesDirective});var o=n("./dist/angular/animation.service.js");n.d(e,"AnimationService",function(){return o.AnimationService})},"./dist/angular/animates.directive.js":function(t,e,n){"use strict";n.r(e);n.d(e,"AnimatesDirective",function(){return o});var i=n("@angular/core"),r=n("./dist/angular/animation.service.js"),o=function(){function t(t,e){this._elementRef=t;this._animationBuilder=e.builder()}Object.defineProperty(t.prototype,"animates",{set:function(t){this._defaultOptions=t},enumerable:!1,configurable:!0});Object.defineProperty(t.prototype,"animatesOnInit",{set:function(t){this._initOptions=t},enumerable:!1,configurable:!0});Object.defineProperty(t.prototype,"animatesInitMode",{set:function(t){"string"==typeof t&&(this._initMode=t.toLowerCase())},enumerable:!1,configurable:!0});Object.defineProperty(t.prototype,"animationBuilder",{get:function(){return this._animationBuilder},enumerable:!1,configurable:!0});t.prototype.ngOnInit=function(){if(this._initOptions){var t,e=this._animationBuilder.setOptions(this._initOptions);switch(this._initMode){case"show":t=e.show(this._elementRef.nativeElement);break;case"hide":t=e.hide(this._elementRef.nativeElement);break;default:t=e.animate(this._elementRef.nativeElement)}t.then(function(t){return t},function(t){})}};t.prototype.start=function(t){this._started=!0;this.setOptions(t);return this._animationBuilder.animate(this._elementRef.nativeElement).then(function(t){return t},function(t){})};t.prototype.hide=function(t){this.setOptions(t);return this._animationBuilder.setOptions(t).hide(this._elementRef.nativeElement).then(function(t){return t},function(t){})};t.prototype.show=function(t){this.setOptions(t);return this._animationBuilder.show(this._elementRef.nativeElement).then(function(t){return t},function(t){})};t.prototype.animate=function(t){this.setOptions(t);return this._animationBuilder.setOptions(this._defaultOptions).animate(this._elementRef.nativeElement).then(function(t){return t},function(t){})};t.prototype.pause=function(){this._started&&this._animationBuilder.setPlayState("paused").applyPlayState(this._elementRef.nativeElement)};t.prototype.resume=function(){this._started&&this._animationBuilder.setPlayState("running").applyPlayState(this._elementRef.nativeElement)};t.prototype.toggle=function(){this._started&&this._animationBuilder.setPlayState("running"===this._animationBuilder.playState?"paused":"running").applyPlayState(this._elementRef.nativeElement)};t.prototype.stop=function(){this._started=!1;this._animationBuilder.stop(this._elementRef.nativeElement).then(function(t){return t},function(t){})};t.prototype.startOrStop=function(t){this._started?this.stop():this.start(t)};t.prototype.setOptions=function(t){t?this._animationBuilder.setOptions(t):this._animationBuilder.setOptions(this._defaultOptions)};t.ɵfac=i["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"12.2.1",ngImport:i,type:t,deps:[{token:i.ElementRef},{token:r.AnimationService}],target:i["ɵɵFactoryTarget"].Directive});t.ɵdir=i["ɵɵngDeclareDirective"]({minVersion:"12.0.0",version:"12.2.1",type:t,selector:"[animates]",inputs:{animates:"animates",animatesOnInit:"animatesOnInit",animatesInitMode:"animatesInitMode"},exportAs:["animates"],ngImport:i});return t}();i["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"12.2.1",ngImport:i,type:o,decorators:[{type:i.Directive,args:[{selector:"[animates]",exportAs:"animates",inputs:["animates","animatesOnInit","animatesInitMode"]}]}],ctorParameters:function(){return[{type:i.ElementRef,decorators:[{type:i.Inject,args:[i.ElementRef]}]},{type:r.AnimationService,decorators:[{type:i.Inject,args:[r.AnimationService]}]}]}})},"./dist/angular/animation.service.js":function(t,e,n){"use strict";n.r(e);n.d(e,"AnimationService",function(){return o});var i=n("@angular/core"),r=n("./dist/builder.js"),o=function(){function t(){}t.prototype.builder=function(){return new r.AnimationBuilder};t.ɵfac=i["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"12.2.1",ngImport:i,type:t,deps:[],target:i["ɵɵFactoryTarget"].Injectable});t.ɵprov=i["ɵɵngDeclareInjectable"]({minVersion:"12.0.0",version:"12.2.1",ngImport:i,type:t});return t}();i["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"12.2.1",ngImport:i,type:o,decorators:[{type:i.Injectable}]})},"./dist/angular/animator.module.js":function(t,e,n){"use strict";n.r(e);n.d(e,"AnimatorModule",function(){return a});var i=n("@angular/core"),r=n("./dist/angular/animates.directive.js"),o=n("./dist/angular/animation.service.js"),a=function(){function t(){}t.ɵfac=i["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"12.2.1",ngImport:i,type:t,deps:[],target:i["ɵɵFactoryTarget"].NgModule});t.ɵmod=i["ɵɵngDeclareNgModule"]({minVersion:"12.0.0",version:"12.2.1",ngImport:i,type:t,declarations:[r.AnimatesDirective],exports:[r.AnimatesDirective]});t.ɵinj=i["ɵɵngDeclareInjector"]({minVersion:"12.0.0",version:"12.2.1",ngImport:i,type:t,providers:[o.AnimationService]});return t}();i["ɵɵngDeclareClassMetadata"]({minVersion:"12.0.0",version:"12.2.1",ngImport:i,type:a,decorators:[{type:i.NgModule,args:[{declarations:[r.AnimatesDirective],exports:[r.AnimatesDirective],providers:[o.AnimationService]}]}]})},"./dist/builder.js":function(t,e,n){"use strict";n.r(e);var i=n("./dist/builder/animation_builder.js");n.d(e,"AnimationMode",function(){return i.AnimationMode});n.d(e,"AnimationBuilder",function(){return i.AnimationBuilder})},"./dist/builder/animation_builder.js":function(t,e,n){"use strict";n.r(e);n.d(e,"AnimationMode",function(){return c});n.d(e,"AnimationBuilder",function(){return i});var c,s=n("./node_modules/tslib/tslib.es6.js");!function(t){t[t.Animate=0]="Animate";t[t.Show=1]="Show";t[t.Hide=2]="Hide"}(c=c||{});var i=function(){function n(){this.animationOptions=Object.assign({},n.defaults);this.defaultOptions=Object.assign({},this.animationOptions);this.classes=[];this.activeClasses=new Map;this.listeners=new Map;this.timeouts=new Map;this.styles=new Map;this.log("AnimationBuilder created.")}n.prototype.show=function(t){return this.animate(t,c.Show)};n.prototype.hide=function(t){return this.animate(t,c.Hide)};n.prototype.stop=function(t,e){void 0===e&&(e=!0);this.removeTimeouts(t);this.removeListeners(t);e&&this.reset(t,!1);return Promise.resolve(t)};n.prototype.animate=function(i,r){var o=this;void 0===r&&(r=c.Animate);if(n.disabled||this.animationOptions.disabled)return this.animateDisabled(i,r);r===c.Show&&this.hideElement(i);return new Promise(function(t,e){o.removeTimeouts(i);var n=setTimeout(function(){o.reset(i,!0,!1,!0);o.registerAnimationListeners(i,r,t,e);o.saveStyle(i);o.saveClasses(i,r);o.pinElement(i,r);o.nextFrame(function(){o.showElement(i,r);o.applyProperties(i,r)})},o.animationOptions.delay);o.addTimeout(i,n,e);o.log("Timeout "+n+" registered for element",i)})};n.prototype.reset=function(t,e,n,i){void 0===n&&(n=!1);void 0===i&&(i=!1);if(e=void 0===e?!0:e){this.removeTimeouts(t,n);this.removeListeners(t,i)}this.removeStyles(t);this.removeClasses(t)};n.prototype.dispose=function(){this.timeouts.forEach(function(t){var e,n;try{for(var i=Object(s.__values)(t),r=i.next();!r.done;r=i.next()){var o=r.value;clearTimeout(o.timeout)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}});this.listeners.forEach(function(t,e){var n,i;try{for(var r=Object(s.__values)(t),o=r.next();!o.done;o=r.next()){var a=o.value;e.removeEventListener(a.eventName,a.handler)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}});this.classes=[];this.styles=new Map;this.timeouts=new Map;this.listeners=new Map};n.prototype.addAnimationClass=function(t){-1===this.classes.indexOf(t)&&this.classes.push(t);return this};n.prototype.removeAnimationClass=function(t){t=this.classes.indexOf(t);-1!==t&&this.classes.splice(t,1);return this};Object.defineProperty(n,"DEBUG",{get:function(){return n._DEBUG},set:function(t){n._DEBUG=t},enumerable:!1,configurable:!0});Object.defineProperty(n,"disabled",{get:function(){return n._disabled},set:function(t){n._disabled=t},enumerable:!1,configurable:!0});Object.defineProperty(n,"defaults",{get:function(){return n._defaults},enumerable:!1,configurable:!0});n.prototype.animateDisabled=function(t,e){e===c.Show?this.showElement(t,e):e===c.Hide&&this.hideElement(t,e);return Promise.resolve(t)};n.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];n.DEBUG&&console.log.apply(console,Object(s.__spreadArray)(["css-animator:"],Object(s.__read)(t)))};n.prototype.nextFrame=function(t){n.raf(function(){n.raf(t)})};n.prototype.camelCase=function(t){return t.toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()})};n.prototype.hideElement=function(t,e){this.animationOptions.useVisibility?t.style.visibility="hidden":t.setAttribute("hidden","")};n.prototype.showElement=function(t,e){this.animationOptions.pin&&e===c.Show&&(t.style.visibility="visible");this.animationOptions.useVisibility?t.style.visibility="visible":t.removeAttribute("hidden")};n.prototype.pinElement=function(t,e){if(this.animationOptions.pin){e===c.Show&&(t.style.visibility="hidden");this.animationOptions.useVisibility||this.showElement(t);e=this.getPosition(t);t.style.position=this.animationOptions.fixed?"fixed":"absolute";t.style.top=e.top+"px";t.style.left=e.left+"px";t.style.width=e.width+"px";t.style.height=e.height+"px";t.style.margin="0px"}};n.prototype.getPosition=function(t){var e=t.getBoundingClientRect(),n=window.getComputedStyle(t),i=t.offsetLeft,r=t.offsetTop,t=e.width-parseFloat(n.paddingLeft)-parseFloat(n.paddingRight)-parseFloat(n.borderLeftWidth)-parseFloat(n.borderRightWidth),n=e.height-parseFloat(n.paddingTop)-parseFloat(n.paddingBottom)-parseFloat(n.borderTopWidth)-parseFloat(n.borderBottomWidth);if(this.animationOptions.fixed){i=e.left+window.scrollX;r=e.top+window.scrollY}return{left:i,top:r,width:t,height:n}};n.prototype.registerAnimationListeners=function(t,e,n,i){var r,o,a=this,s=this.animationStartEvent(t),u=this.animationEndEvent(t);t.addEventListener(s,r=function(){a.log("Animation start handler fired for element",t);t.removeEventListener(s,r);return r});this.log("Registered animation start listener for element",t);t.addEventListener(u,o=function(){a.log("Animation end handler fired for element",t);t.removeEventListener(u,o);a.removeListeners(t,!1);a.reset(t,!0,!1,!1);e===c.Hide&&a.hideElement(t);e===c.Show&&a.showElement(t);n(t);return o});this.log("Registered animation end listener for element",t);this.addListener(t,s,r);this.addListener(t,u,o,i)};n.prototype.addTimeout=function(t,e,n){this.timeouts.has(t)||this.timeouts.set(t,[]);this.timeouts.get(t).push({timeout:e,reject:n})};n.prototype.addListener=function(t,e,n,i){this.listeners.has(t)||this.listeners.set(t,[]);var r=Object.assign({},this.classes);this.listeners.get(t).push({eventName:e,handler:n,reject:i,classes:r})};n.prototype.removeListeners=function(e,n){var i=this;void 0===n&&(n=!1);if(this.listeners.has(e)){this.listeners.get(e).forEach(function(t){e.removeEventListener(t.eventName,t.handler);i.log("Listener "+t.eventName+" removed for element",e);n&&i.animationOptions.reject&&t.reject&&t.reject("animation_aborted")});this.listeners.delete(e)}};n.prototype.removeTimeouts=function(e,n){var i=this;void 0===n&&(n=!1);if(this.timeouts.has(e)){this.timeouts.get(e).forEach(function(t){clearTimeout(t.timeout);i.log("Timeout "+t.timeout+" removed for element",e);n&&i.animationOptions.reject&&t.reject&&t.reject("animation_aborted")});this.timeouts.delete(e)}};n.prototype.animationEndEvent=function(t){var e,n=document.createElement("endAnimationElement"),i={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(e in i)if(void 0!==n.style[e])return i[e];return null};n.prototype.animationStartEvent=function(t){var e,n=document.createElement("startAnimationElement"),i={animation:"animationstart",OAnimation:"oAnimationStart",MozAnimation:"animationstart",WebkitAnimation:"webkitAnimationStart"};for(e in i)if(void 0!==n.style[e])return i[e];return null};n.prototype.applyProperties=function(t,e){this.applyClasses(t,e);this.applyStyles(t,e)};n.prototype.saveStyle=function(t){var e,n={};for(e in t.style)n[e]=t.style.getPropertyValue(e);this.styles.set(t,n)};n.prototype.applyStyles=function(t,e){this.applyFillMode(t);this.applyTimingFunction(t);this.applyPlayState(t);this.applyDirection(t);this.applyDuration(t);this.applyIterationCount(t)};n.prototype.removeStyles=function(t){if(this.styles.has(t)){var e,n=this.styles.get(t);t.removeAttribute("style");for(e in n)t.style.setProperty(e,n[e]);this.styles.delete(t)}};n.prototype.saveClasses=function(t,e){var n=this.classes.slice(0);switch(e){case c.Show:n.push("animated-show");break;case c.Hide:n.push("animated-hide")}n.push("animated",this.animationOptions.type);this.activeClasses.set(t,n)};n.prototype.applyClasses=function(t,e){var n=this.activeClasses.get(t)||[];(t=t.classList).add.apply(t,Object(s.__spreadArray)(["animated"],Object(s.__read)(n)))};n.prototype.removeClasses=function(t){var e,n=this.activeClasses.get(t)||[];(e=t.classList).remove.apply(e,Object(s.__spreadArray)(["animated","animated-show","animated-hide"],Object(s.__read)(n)));this.activeClasses.delete(t)};n.prototype.applyStyle=function(t,e,n){var i,r=document.createElement("checkStyle"),o={standard:this.camelCase(e),webkit:this.camelCase("-webkit-"+e),mozilla:this.camelCase("-moz-"+e),opera:this.camelCase("-o-"+e),explorer:this.camelCase("-ie-"+e)};for(i in o)if(o.hasOwnProperty(i)&&void 0!==r.style[o[i]]){t.style[o[i]]=null==n?null:n;break}return this};Object.defineProperty(n.prototype,"defaults",{get:function(){return this.defaultOptions},set:function(t){this.defaultOptions=t},enumerable:!1,configurable:!0});n.prototype.setDefaults=function(t){this.defaults=t;return this};Object.defineProperty(n.prototype,"options",{get:function(){return this.animationOptions},set:function(t){this.animationOptions=t},enumerable:!1,configurable:!0});n.prototype.setOptions=function(t){Object.assign(this.options,t);return this};Object.defineProperty(n.prototype,"disabled",{get:function(){return this.animationOptions.disabled},set:function(t){this.animationOptions.disabled=t},enumerable:!1,configurable:!0});Object.defineProperty(n.prototype,"reject",{get:function(){return this.animationOptions.reject},set:function(t){this.animationOptions.reject=t},enumerable:!1,configurable:!0});Object.defineProperty(n.prototype,"pin",{get:function(){return this.animationOptions.pin},set:function(t){this.animationOptions.pin=t},enumerable:!1,configurable:!0});n.prototype.setPin=function(t){this.pin=t;return this};Object.defineProperty(n.prototype,"useVisibility",{get:function(){return this.animationOptions.useVisibility},set:function(t){this.animationOptions.useVisibility=t},enumerable:!1,configurable:!0});n.prototype.setUseVisibility=function(t){this.useVisibility=t;return this};Object.defineProperty(n.prototype,"type",{get:function(){return this.animationOptions.type},set:function(t){this.animationOptions.type=t},enumerable:!1,configurable:!0});n.prototype.setType=function(t){this.type=t;return this};Object.defineProperty(n.prototype,"fillMode",{get:function(){return this.animationOptions.fillMode},set:function(t){this.animationOptions.fillMode=t},enumerable:!1,configurable:!0});n.prototype.setFillMode=function(t){this.fillMode=t;return this};n.prototype.applyFillMode=function(t,e){this.applyStyle(t,"animation-fill-mode",e||this.animationOptions.fillMode);return this};Object.defineProperty(n.prototype,"timingFunction",{get:function(){return this.animationOptions.timingFunction},set:function(t){this.animationOptions.timingFunction=t},enumerable:!1,configurable:!0});n.prototype.setTimingFunction=function(t){this.timingFunction=t;return this};n.prototype.applyTimingFunction=function(t,e){this.applyStyle(t,"animation-timing-function",e||this.animationOptions.timingFunction);return this};Object.defineProperty(n.prototype,"playState",{get:function(){return this.animationOptions.playState},set:function(t){this.animationOptions.playState=t},enumerable:!1,configurable:!0});n.prototype.setPlayState=function(t){this.playState=t;return this};n.prototype.applyPlayState=function(t,e){this.applyStyle(t,"animation-play-state",e||this.animationOptions.playState);return this};Object.defineProperty(n.prototype,"direction",{get:function(){return this.animationOptions.direction},set:function(t){this.animationOptions.direction=t},enumerable:!1,configurable:!0});n.prototype.setDirection=function(t){this.direction=t;return this};n.prototype.applyDirection=function(t,e){this.applyStyle(t,"animation-direction",e||this.animationOptions.direction);return this};Object.defineProperty(n.prototype,"duration",{get:function(){return this.animationOptions.duration},set:function(t){this.animationOptions.duration=t},enumerable:!1,configurable:!0});n.prototype.setDuration=function(t){this.duration=t;return this};n.prototype.applyDuration=function(t,e){this.applyStyle(t,"animation-duration",(e||this.animationOptions.duration)+"ms");return this};Object.defineProperty(n.prototype,"delay",{get:function(){return this.animationOptions.delay},set:function(t){this.animationOptions.delay=t},enumerable:!1,configurable:!0});n.prototype.setDelay=function(t){this.delay=t;return this};n.prototype.applyDelayAsStyle=function(t,e){this.applyStyle(t,"animation-delay",(e||this.animationOptions.delay)+"ms");return this};Object.defineProperty(n.prototype,"iterationCount",{get:function(){return this.animationOptions.iterationCount},set:function(t){this.animationOptions.iterationCount=t},enumerable:!1,configurable:!0});n.prototype.setIterationCount=function(t){this.iterationCount=t;return this};n.prototype.applyIterationCount=function(t,e){this.applyStyle(t,"animation-iteration-count",e||this.animationOptions.iterationCount);return this};n._DEBUG=!1;n._disabled=!1;n._defaults={disabled:!1,fixed:!1,reject:!0,useVisibility:!1,pin:!0,type:"bounce",fillMode:"none",timingFunction:"ease",playState:"running",direction:"normal",duration:1e3,delay:0,iterationCount:1};n.raf=window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout;return n}()},"./dist/contracts.js":function(t,e,n){"use strict";n.r(e);n("./dist/contracts/animation_options.js"),n("./dist/contracts/element_props.js"),n("./dist/contracts/listener_ref.js"),n("./dist/contracts/timeout_ref.js")},"./dist/contracts/animation_options.js":function(t,e,n){"use strict";n.r(e)},"./dist/contracts/element_props.js":function(t,e,n){"use strict";n.r(e)},"./dist/contracts/listener_ref.js":function(t,e,n){"use strict";n.r(e)},"./dist/contracts/timeout_ref.js":function(t,e,n){"use strict";n.r(e)},"./dist/index.js":function(t,e,n){"use strict";n.r(e);var i=n("./dist/builder.js");n.d(e,"AnimationMode",function(){return i.AnimationMode});n.d(e,"AnimationBuilder",function(){return i.AnimationBuilder});var r=n("./dist/angular.js");n.d(e,"AnimatorModule",function(){return r.AnimatorModule});n.d(e,"AnimatesDirective",function(){return r.AnimatesDirective});n.d(e,"AnimationService",function(){return r.AnimationService});n("./dist/contracts.js")},"./node_modules/tslib/tslib.es6.js":function(t,e,n){"use strict";n.r(e);n.d(e,"__extends",function(){return r});n.d(e,"__assign",function(){return o});n.d(e,"__rest",function(){return a});n.d(e,"__decorate",function(){return s});n.d(e,"__param",function(){return u});n.d(e,"__metadata",function(){return c});n.d(e,"__awaiter",function(){return l});n.d(e,"__generator",function(){return p});n.d(e,"__createBinding",function(){return f});n.d(e,"__exportStar",function(){return d});n.d(e,"__values",function(){return m});n.d(e,"__read",function(){return y});n.d(e,"__spread",function(){return h});n.d(e,"__spreadArrays",function(){return v});n.d(e,"__spreadArray",function(){return b});n.d(e,"__await",function(){return g});n.d(e,"__asyncGenerator",function(){return O});n.d(e,"__asyncDelegator",function(){return _});n.d(e,"__asyncValues",function(){return w});n.d(e,"__makeTemplateObject",function(){return j});n.d(e,"__importStar",function(){return A});n.d(e,"__importDefault",function(){return P});n.d(e,"__classPrivateFieldGet",function(){return E});n.d(e,"__classPrivateFieldSet",function(){return x});var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function n(){this.constructor=t}t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function a(t,e){var n={};for(r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function s(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;0<=s;s--)(r=t[s])&&(a=(o<3?r(a):3<o?r(e,n,a):r(e,n))||a);return 3<o&&a&&Object.defineProperty(e,n,a),a}function u(n,i){return function(t,e){i(t,e,n)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,a,s,u){return new(s=s||Promise)(function(n,e){function i(t){try{o(u.next(t))}catch(t){e(t)}}function r(t){try{o(u.throw(t))}catch(t){e(t)}}function o(t){t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(i,r);var e}o((u=u.apply(t,a||[])).next())})}function p(n,i){var r,o,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,o&&(a=2&e[0]?o.return:e[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,e[1])).done)return a;switch((e=(o=0,a)?[2&e[0],a.value]:e)[0]){case 0:case 1:a=e;break;case 4:s.label++;return{value:e[1],done:!1};case 5:s.label++;o=e[1];e=[0];continue;case 7:e=s.ops.pop();s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===e[0]||2===e[0])){s=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]<a[3])){s.label=e[1];break}if(6===e[0]&&s.label<a[1]){s.label=a[1];a=e;break}if(a&&s.label<a[2]){s.label=a[2];s.ops.push(e);break}a[2]&&s.ops.pop();s.trys.pop();continue}e=i.call(n,s)}catch(t){e=[6,t];o=0}finally{r=a=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}var f=Object.create?function(t,e,n,i){void 0===i&&(i=n);Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,i){t[i=void 0===i?n:i]=e[n]};function d(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||f(e,t,n)}function m(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&i>=t.length?void 0:t)&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function h(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(y(arguments[e]));return t}function v(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var i=Array(t),r=0,e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,r++)i[r]=o[a];return i}function b(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||((i=i||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}function g(t){return this instanceof g?(this.v=t,this):new g(t)}function O(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),o=[],a={};return i("next"),i("throw"),i("return"),a[Symbol.asyncIterator]=function(){return this},a;function i(i){r[i]&&(a[i]=function(n){return new Promise(function(t,e){1<o.push([i,n,t,e])||s(i,n)})})}function s(t,e){try{(n=r[t](e)).value instanceof g?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(t){l(o[0][3],t)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function l(t,e){(t(e),o.shift(),o.length)&&s(o[0][0],o[0][1])}}function _(i){var r,t={};return e("next"),e("throw",function(t){throw t}),e("return"),t[Symbol.iterator]=function(){return this},t;function e(e,n){t[e]=i[e]?function(t){return(r=!r)?{value:g(i[e](t)),done:"return"===e}:n?n(t):t}:n}}function w(a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,e=a[Symbol.asyncIterator];return e?e.call(a):(a=m(a),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(o){t[o]=a[o]&&function(r){return new Promise(function(t,e){r=a[o](r),n=t,t=e,i=r.done,e=r.value,Promise.resolve(e).then(function(t){n({value:t,done:i})},t);var n,i})}}}function j(t,e){Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e;return t}var S=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function A(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&f(e,t,n);S(e,t);return e}function P(t){return t&&t.__esModule?t:{default:t}}function E(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)}function x(t,e,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(t,n):r?r.value=n:e.set(t,n),n}},"@angular/core":function(t,e){t.exports=n}})}); //# sourceMappingURL=css-animator.min.js.map