{"version":3,"names":["_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","ComplexAnimationBuilder","PinwheelIn","constructor","arguments","delayFunction","getDelayFunction","animation","config","getAnimationAndConfig","delay","getDelay","callback","callbackV","initialValues","animations","opacity","transform","scale","rotate","createInstance","PinwheelOut"],"sources":["Pinwheel.ts"],"sourcesContent":["'use strict';\nimport type { BaseAnimationBuilder } from '../animationBuilder';\nimport { ComplexAnimationBuilder } from '../animationBuilder';\nimport type {\n EntryExitAnimationFunction,\n IEntryExitAnimationBuilder,\n} from '../animationBuilder/commonTypes';\n\n/**\n * Entry with change in rotation, scale, and opacity. You can modify the behavior by chaining methods like `.springify()` or `.duration(500)`.\n *\n * You pass it to the `entering` prop on [an Animated component](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#animated-component).\n *\n * @see https://docs.swmansion.com/react-native-reanimated/docs/layout-animations/entering-exiting-animations#pinwheel\n */\nexport class PinwheelIn\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static presetName = 'PinwheelIn';\n\n static createInstance<T extends typeof BaseAnimationBuilder>(\n this: T\n ): InstanceType<T> {\n return new PinwheelIn() as InstanceType<T>;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const [animation, config] = this.getAnimationAndConfig();\n const delay = this.getDelay();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return () => {\n 'worklet';\n return {\n animations: {\n opacity: delayFunction(delay, animation(1, config)),\n transform: [\n {\n scale: delayFunction(delay, animation(1, config)),\n },\n {\n rotate: delayFunction(delay, animation('0', config)),\n },\n ],\n },\n initialValues: {\n opacity: 0,\n transform: [\n {\n scale: 0,\n },\n {\n rotate: '5',\n },\n ],\n ...initialValues,\n },\n callback,\n };\n };\n };\n}\n\n/**\n * Exit with change in rotation, scale, and opacity. You can modify the behavior by chaining methods like `.springify()` or `.duration(500)`.\n *\n * You pass it to the `exiting` prop on [an Animated component](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#animated-component).\n *\n * @see https://docs.swmansion.com/react-native-reanimated/docs/layout-animations/entering-exiting-animations#pinwheel\n */\nexport class PinwheelOut\n extends ComplexAnimationBuilder\n implements IEntryExitAnimationBuilder\n{\n static presetName = 'PinwheelOut';\n\n static createInstance<T extends typeof BaseAnimationBuilder>(\n this: T\n ): InstanceType<T> {\n return new PinwheelOut() as InstanceType<T>;\n }\n\n build = (): EntryExitAnimationFunction => {\n const delayFunction = this.getDelayFunction();\n const [animation, config] = this.getAnimationAndConfig();\n const delay = this.getDelay();\n const callback = this.callbackV;\n const initialValues = this.initialValues;\n\n return () => {\n 'worklet';\n return {\n animations: {\n opacity: delayFunction(delay, animation(0, config)),\n transform: [\n {\n scale: delayFunction(delay, animation(0, config)),\n },\n {\n rotate: delayFunction(delay, animation('5', config)),\n },\n ],\n },\n initialValues: {\n opacity: 1,\n transform: [\n {\n scale: 1,\n },\n {\n rotate: '0',\n },\n ],\n ...initialValues,\n },\n callback,\n };\n };\n };\n}\n"],"mappings":"AAAA,YAAY;;AAAC,SAAAA,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAM,GAAA,QAAAR,GAAA,GAAAS,YAAA,CAAAD,GAAA,2BAAAR,GAAA,gBAAAA,GAAA,GAAAU,MAAA,CAAAV,GAAA;AAAA,SAAAS,aAAAE,KAAA,EAAAC,IAAA,eAAAD,KAAA,iBAAAA,KAAA,kBAAAA,KAAA,MAAA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