{"version":3,"file":"gif.cjs","sources":["../../../src/components/pixi/gif.ts"],"sourcesContent":["import { GifSource, GifSprite as PixiGifSprite, type GifSpriteOptions } from 'pixi.js/gif';\nimport { BaseView, type ViewOptions } from './base';\n\n/**\n * A specialized wrapper around the PixiJS GifSprite class that implements leaf node behavior similar to HTML elements\n * that supports additional layout properties.\n * e.g objectFit, objectPosition, backgroundColor, borderColor, and overflow properties.\n */\nexport class LayoutGifSprite extends BaseView<PixiGifSprite> {\n    constructor(opts: (GifSource | GifSpriteOptions) & ViewOptions) {\n        if (opts instanceof GifSource) {\n            opts = { source: opts };\n        }\n        super({\n            ...opts,\n            ClassType: PixiGifSprite,\n        });\n    }\n}\n\n/**\n * A re-export of the PixiJS GifSprite class that ensures the layout is set after construction.\n *\n * The GifSprite object is a specialized sprite for rendering GIF images.\n */\nexport class GifSprite extends PixiGifSprite {\n    constructor(opts: GifSource | GifSpriteOptions) {\n        if (opts instanceof GifSource) {\n            opts = { source: opts };\n        }\n        const { layout, ...options } = opts;\n\n        super(options);\n        this.layout = layout!;\n    }\n}\n"],"names":["BaseView","GifSource","PixiGifSprite"],"mappings":";;;;AAQO,MAAM,wBAAwBA,KAAAA,SAAwB;AAAA,EACzD,YAAY,MAAoD;AAC5D,QAAI,gBAAgBC,IAAAA,WAAW;AACpB,aAAA,EAAE,QAAQ,KAAK;AAAA,IAAA;AAEpB,UAAA;AAAA,MACF,GAAG;AAAA,MACH,WAAWC,IAAAA;AAAAA,IAAA,CACd;AAAA,EAAA;AAET;AAOO,MAAM,kBAAkBA,IAAAA,UAAc;AAAA,EACzC,YAAY,MAAoC;AAC5C,QAAI,gBAAgBD,IAAAA,WAAW;AACpB,aAAA,EAAE,QAAQ,KAAK;AAAA,IAAA;AAE1B,UAAM,EAAE,QAAQ,GAAG,QAAA,IAAY;AAE/B,UAAM,OAAO;AACb,SAAK,SAAS;AAAA,EAAA;AAEtB;;;"}