{"version":3,"names":["shouldBeUseWeb","configureLayoutAnimationBatch","makeShareableCloneRecursive","createUpdateManager","animations","update","batchItem","push","length","setImmediate","flush","updateLayoutAnimations","updateLayoutAnimationsManager","viewTag","type","config","undefined"],"sources":["UpdateLayoutAnimations.ts"],"sourcesContent":["'use strict';\nimport { shouldBeUseWeb } from './PlatformChecker';\nimport {\n configureLayoutAnimationBatch,\n makeShareableCloneRecursive,\n} from './core';\nimport type {\n LayoutAnimationFunction,\n LayoutAnimationType,\n} from './layoutReanimation';\nimport type { LayoutAnimationBatchItem } from './layoutReanimation/animationBuilder/commonTypes';\n\nfunction createUpdateManager() {\n const animations: LayoutAnimationBatchItem[] = [];\n\n return {\n update(batchItem: LayoutAnimationBatchItem) {\n animations.push(batchItem);\n if (animations.length === 1) {\n setImmediate(this.flush);\n }\n },\n flush(this: void) {\n configureLayoutAnimationBatch(animations);\n animations.length = 0;\n },\n };\n}\n\nexport let updateLayoutAnimations: (\n viewTag: number,\n type: LayoutAnimationType,\n config?: Keyframe | LayoutAnimationFunction\n) => void;\n\nif (shouldBeUseWeb()) {\n updateLayoutAnimations = () => {\n // no-op\n };\n} else {\n const updateLayoutAnimationsManager = createUpdateManager();\n updateLayoutAnimations = (viewTag, type, config) =>\n updateLayoutAnimationsManager.update({\n viewTag,\n type,\n config: config ? makeShareableCloneRecursive(config) : undefined,\n });\n}\n"],"mappings":"AAAA,YAAY;;AACZ,SAASA,cAAc,QAAQ,mBAAmB;AAClD,SACEC,6BAA6B,EAC7BC,2BAA2B,QACtB,QAAQ;AAOf,SAASC,mBAAmBA,CAAA,EAAG;EAC7B,MAAMC,UAAsC,GAAG,EAAE;EAEjD,OAAO;IACLC,MAAMA,CAACC,SAAmC,EAAE;MAC1CF,UAAU,CAACG,IAAI,CAACD,SAAS,CAAC;MAC1B,IAAIF,UAAU,CAACI,MAAM,KAAK,CAAC,EAAE;QAC3BC,YAAY,CAAC,IAAI,CAACC,KAAK,CAAC;MAC1B;IACF,CAAC;IACDA,KAAKA,CAAA,EAAa;MAChBT,6BAA6B,CAACG,UAAU,CAAC;MACzCA,UAAU,CAACI,MAAM,GAAG,CAAC;IACvB;EACF,CAAC;AACH;AAEA,OAAO,IAAIG,sBAIF;AAET,IAAIX,cAAc,EAAE,EAAE;EACpBW,sBAAsB,GAAGA,CAAA,KAAM;IAC7B;EAAA,CACD;AACH,CAAC,MAAM;EACL,MAAMC,6BAA6B,GAAGT,mBAAmB,EAAE;EAC3DQ,sBAAsB,GAAGA,CAACE,OAAO,EAAEC,IAAI,EAAEC,MAAM,KAC7CH,6BAA6B,CAACP,MAAM,CAAC;IACnCQ,OAAO;IACPC,IAAI;IACJC,MAAM,EAAEA,MAAM,GAAGb,2BAA2B,CAACa,MAAM,CAAC,GAAGC;EACzD,CAAC,CAAC;AACN"}