import * as _pixi_sound_lib_filters from '@pixi/sound/lib/filters';
import * as pixi_js from 'pixi.js';
import { ApplicationOptions, Rectangle } from 'pixi.js';
export { Assets, ContainerOptions, Rectangle, SpriteOptions, TextOptions, Texture, TextureSourceLike, Ticker as TickerValue, UPDATE_PRIORITY } from 'pixi.js';
import { S as SoundManager, s as soundUtils } from './index-DZ1shoNp.cjs';
export { b as Sound, c as SoundManagerStatic, a as sound } from './index-DZ1shoNp.cjs';
export { AssetSrc, AssetsBundle, AssetsManifest, LoadParserName, ResolvedAsset, ResolvedSrc, UnresolvedAsset } from 'pixi.js/lib/assets/types';
import { C as CanvasManagerInterface, c as canvasUtils } from './index-1w4bBKAx.cjs';
export { H as CanvasBaseInterface, b as CanvasEvent, _ as CanvasEventNamesType, d as CanvasManagerStatic, e as Container, I as ImageContainer, K as ImageContainerMemory, E as ImageContainerOptions, f as ImageSprite, L as ImageSpriteMemory, F as ImageSpriteOptions, U as MoveInOutProps, W as PushInOutProps, R as RegisteredCanvasComponents, i as RegisteredEvents, J as ShakeEffectProps, X as ShowWithDissolveTransitionProps, Y as ShowWithFadeTransitionProps, S as Sprite, M as SpriteBaseMemory, N as SpriteMemory, T as Text, O as TextMemory, Q as TextureMemory, V as VideoSprite, P as VideoSpriteMemory, G as VideoSpriteOptions, Z as ZoomInOutProps, v as addImage, t as addImageCointainer, A as addVideo, a as canvas, g as canvasComponentDecorator, h as eventDecorator, y as getTexture, w as loadImage, B as loadVideo, m as moveIn, j as moveOut, p as pushIn, k as pushOut, r as removeWithDissolve, l as removeWithFade, s as shakeEffect, x as showImage, u as showImageContainer, D as showVideo, n as showWithDissolve, o as showWithFade, z as zoomIn, q as zoomOut } from './index-1w4bBKAx.cjs';
import { c as characterUtils } from './index-DPlLfwK1.cjs';
export { C as CharacterBaseModel, d as CharacterInterface, a as CharacterStoredClass, R as RegisteredCharacters, g as getAllCharacters, b as getCharacterById, s as saveCharacter } from './index-DPlLfwK1.cjs';
export { CachedMap } from './classes/index.cjs';
import { filters as filters$1 } from '@pixi/sound';
import { P as PauseType, R as RepeatType } from './TickersSequence-_GvVF_1g.cjs';
export { T as TickerArgs, a as TickerHistory, b as TickerHistoryForExport, c as TickersSequence } from './TickersSequence-_GvVF_1g.cjs';
import { HistoryManagerInterface } from './history/index.cjs';
export { HistoryManagerStatic, stepHistory } from './history/index.cjs';
import { GameState } from './interfaces/index.cjs';
export { GameStepStateData } from './interfaces/index.cjs';
import { S as StepLabelType, a as StepLabelPropsType, N as NarrationManagerInterface, L as LabelAbstract, n as narrationUtils } from './index-DiDhb7Kl.cjs';
export { h as ChoiceInterface, C as ChoiceMenuOption, d as ChoiceMenuOptionClose, I as InputInfo, f as Label, i as LabelProps, m as LabelSteps, l as NarrationManagerStatic, R as RegisteredLabels, j as StepLabelProps, k as StepLabelResult, o as StepLabelResultType, b as narration, c as newChoiceOption, e as newCloseChoiceOption, g as newLabel } from './index-DiDhb7Kl.cjs';
import { StorageManagerInterface } from './storage/index.cjs';
export { StorageManagerStatic, storage } from './storage/index.cjs';
import { GameStepState, HistoryInfo, CharacterInterface } from '@drincs/pixi-vn';
import { S as StorageElementType } from './StorageElementType-DTGcnkzF.cjs';
export { a as StorageObjectType } from './StorageElementType-DTGcnkzF.cjs';
import { createExportableElement } from './utils/index.cjs';
import { Devtools } from '@pixi/devtools';
export { C as CanvasBaseItem, b as CanvasBaseItemMemory, a as CanvasGameState, d as ContainerChild, c as ContainerMemory } from './ContainerMemory-Bemxh6ml.cjs';
export { FadeAlphaTicker, FadeAlphaTickerProps, MoveTicker, MoveTickerProps, RegisteredTickers, RotateTicker, RotateTickerProps, Ticker, TickerBase, TickerProgrationExponential, TickerProgrationLinear, TickerProgrationType, TickerTimeoutHistory, ZoomTicker, ZoomTickerProps, tickerDecorator } from './canvas/tickers/index.cjs';
export { H as HistoryGameState } from './HistoryGameState-qeIMl_DH.cjs';
export { a as ChoiceOptionInterface, d as Close, b as CloseChoiceOptionInterface, C as CloseType, D as DialogueInterface, H as HistoryStep, L as LabelRunModeType, O as OpenedLabel, S as StoredChoiceInterface, c as StoredIndexedChoiceInterface } from './OpenedLabel-Dgkgemkv.cjs';
export { N as NarrationGameState } from './NarrationGameState-Cu-OYzph.cjs';
export { H as HistoryChoiceMenuOption, N as NarrationHistory } from './HistoryChoiceMenuOption-unaLLfKR.cjs';
export { E as ExportedSound, c as SoundFilterMemory, S as SoundGameState, a as SoundOptions, b as SoundPlayOptions } from './SoundGameState-BG_iPwjt.cjs';
export { S as StoredClassModel } from './StoredClassModel-CjdhvNgB.cjs';
export { S as StorageGameState } from './StorageGameState-B2kz-u_2.cjs';
import 'lru-cache';
import 'deep-diff';
import 'microdiff';

var version = "1.2.16";

declare const Repeat: RepeatType;
/**
 * Pause the tickers for a duration.
 * @param duration Duration in seconds
 * @returns The pause object
 */
declare function Pause(duration: number): PauseType;
declare const filters: {
    DistortionFilter: typeof filters$1.DistortionFilter;
    EqualizerFilter: typeof filters$1.EqualizerFilter;
    MonoFilter: typeof filters$1.MonoFilter;
    ReverbFilter: typeof filters$1.ReverbFilter;
    StereoFilter: typeof filters$1.StereoFilter;
    StreamFilter: typeof filters$1.StreamFilter;
    TelephoneFilter: typeof filters$1.TelephoneFilter;
};
/**
 * Is a special alias to indicate the game layer.
 */
declare const CANVAS_APP_GAME_LAYER_ALIAS = "__game_layer__";
declare const SYSTEM_RESERVED_STORAGE_KEYS: {
    /**
     * The key of the current dialogue memory
     */
    CURRENT_DIALOGUE_MEMORY_KEY: string;
    /**
     * The key of the last dialogue added in the step memory
     */
    LAST_DIALOGUE_ADDED_IN_STEP_MEMORY_KEY: string;
    /**
     * The key of the current menu options memory
     */
    CURRENT_MENU_OPTIONS_MEMORY_KEY: string;
    /**
     * The key of the last menu options added in the step memory
     */
    LAST_MENU_OPTIONS_ADDED_IN_STEP_MEMORY_KEY: string;
    /**
     * The key of the input memory. This value can be read by pixi-vn json importer
     */
    CURRENT_INPUT_VALUE_MEMORY_KEY: string;
    /**
     * The key of the last input added in the step memory
     */
    LAST_INPUT_ADDED_IN_STEP_MEMORY_KEY: string;
    /**
     * The key of the current input info
     */
    CURRENT_INPUT_INFO_MEMORY_KEY: string;
    /**
     * The key of the characters memory
     */
    CHARACTER_CATEGORY_KEY: string;
    /**
     * This variable is used to add the next dialog text into the current dialog memory.
     * This value was added to introduce Ink Glue functionality https://github.com/inkle/ink/blob/master/Documentation/WritingWithInk.md#glue
     */
    ADD_NEXT_DIALOG_TEXT_INTO_THE_CURRENT_DIALOG_FLAG_KEY: string;
    /**
     * The key of a list of all labels that have been opened during the progression of the steps.
     */
    OPENED_LABELS_COUNTER_KEY: string;
    /**
     * The key of a list of all choices that have been made during the progression of the steps.
     */
    ALL_CHOICES_MADE_KEY: string;
    /**
     * The key of the current step times counter.
     * This value was added to introduce Ink Sequences, cycles and other alternatives https://github.com/inkle/ink/blob/master/Documentation/WritingWithInk.md#sequences-cycles-and-other-alternatives
     */
    CURRENT_STEP_TIMES_COUNTER_KEY: string;
    /**
     * The key of the last dialogue step glued in the step memory
     */
    LAST_STEP_GLUED: string;
};

declare class GameUnifier {
    static init(options: {
        /**
         * This function returns the current step counter. This counter corresponds to the total number of steps that have been executed so far.
         *
         * If your game engine does not have a history of steps, you can return 0.
         */
        getStepCounter: () => number;
        /**
         * This function sets the current step counter.
         *
         * If your game engine does not have a history of steps, you can not set the step counter.
         */
        setStepCounter: (value: number) => void;
        /**
         * This function returns the current state of the game step.
         *
         * If your game engine does not have a history of steps, you can return an empty object.
         */
        getCurrentGameStepState: () => GameStepState;
        /**
         * This function restores the game step state.
         *
         * If your game engine does not have a history of steps, you can return a resolved promise.
         *
         * @param state The state to restore.
         * @param navigate The function to navigate to the restored path.
         */
        restoreGameStepState: (state: GameStepState, navigate: (path: string) => void | Promise<void>) => Promise<void>;
        /**
         * This function returns the number of opened labels.
         *
         * If your game engine does not have a narration system, you can return 0.
         */
        getOpenedLabels: () => number;
        /**
         * This function is called after the narration.goNext() method is executed.
         * It can be used to force the completion of the ticker in the game engine.
         */
        onGoNextEnd?: () => Promise<void>;
        /**
         * This function returns the value of a variable.
         * @param key The key of the variable.
         * @returns The value of the variable.
         */
        getVariable: <T extends StorageElementType>(key: string) => T | undefined;
        /**
         * This function sets the value of a variable.
         * @param key The key of the variable.
         * @param value The value of the variable.
         */
        setVariable: (key: string, value: StorageElementType) => void;
        /**
         * This function removes a variable.
         * @param key The key of the variable.
         */
        removeVariable: (key: string) => void;
        /**
         * This function returns the value of a flag.
         * @param name The name of the flag.
         */
        getFlag: (name: string) => boolean;
        /**
         * This function sets the value of a flag.
         * @param name The name of the flag.
         * @param value The value of the flag.
         */
        setFlag: (name: string, value: boolean) => void;
        /**
         * This function is called after the narration.goNext() method is executed.
         *
         * It can be used to clear old temporary variables.
         *
         * @param openedLabelsNumber The number of opened labels.
         */
        onLabelClosing?: (openedLabelsNumber: number) => void;
        /**
         * Add a history step to the history.
         *
         * If your game engine does not have a history of steps, you can return a resolved promise.
         *
         * @param historyInfo The history information.
         * @param opstions Options to add the step.
         */
        addHistoryItem(historyInfo?: HistoryInfo, opstions?: {
            /**
             * If true, the step will not be added to the history if the current step is the same as the last step.
             */
            ignoreSameStep?: boolean;
        }): void;
        /**
         * This function returns the number of steps that are currently running.
         */
        getCurrentStepsRunningNumber: () => number;
        /**
         * This function returns the character by its id.
         * @param id The id of the character.
         * @returns The character or undefined if it does not exist.
         */
        getCharacter: (id: string) => CharacterInterface | undefined;
    }): void;
    private static _getStepCounter;
    private static _setStepCounter;
    /**
     * Returns the current step counter. This counter corresponds to the total number of steps that have been executed so far.
     */
    static get stepCounter(): number;
    /**
     * Returns the current state of the game step.
     */
    static set stepCounter(value: number);
    private static _getCurrentGameStepState;
    /**
     * Returns the current state of the game step.
     */
    static get currentGameStepState(): GameStepState;
    private static _restoreGameStepState;
    /**
     * Restores the game step state.
     * @param state The state to restore.
     * @param navigate The function to navigate to the restored path.
     */
    static get restoreGameStepState(): (state: GameStepState, navigate: (path: string) => void | Promise<void>) => Promise<void>;
    private static _getOpenedLabels;
    /**
     * Returns the number of opened labels.
     */
    static get openedLabels(): number;
    private static _onGoNextEnd;
    /**
     * This function is called after the narration.goNext() method is executed.
     * It can be used to force the completion of the ticker in the game engine.
     */
    static get onGoNextEnd(): () => Promise<void>;
    private static _getVariable;
    /**
     * This function returns the value of a variable.
     * @param key The key of the variable.
     * @returns The value of the variable.
     */
    static get getVariable(): <T extends StorageElementType>(key: string) => T | undefined;
    private static _setVariable;
    /**
     * This function sets the value of a variable.
     * @param key The key of the variable.
     * @param value The value of the variable.
     */
    static get setVariable(): (key: string, value: StorageElementType) => void;
    private static _removeVariable;
    /**
     * This function removes a variable.
     * @param key The key of the variable.
     */
    static get removeVariable(): (key: string) => void;
    private static _getFlag;
    /**
     * This function returns the value of a flag.
     * @param name The name of the flag.
     */
    static get getFlag(): (name: string) => boolean;
    private static _setFlag;
    /**
     * This function sets the value of a flag.
     * @param name The name of the flag.
     * @param value The value of the flag.
     */
    static get setFlag(): (name: string, value: boolean) => void;
    private static _onLabelClosing;
    /**
     * This function is called after the narration.goNext() method is executed
     * It can be used to clear old temporary variables.
     * @param openedLabelsNumber The number of opened labels.
     */
    static get onLabelClosing(): (openedLabelsNumber: number) => void;
    private static _addHistoryItem;
    /**
     * Add a history step to the history.
     * @param historyInfo The history information.
     * @param opstions Options to add the step.
     */
    static get addHistoryItem(): (historyInfo?: HistoryInfo, opstions?: {
        /**
         * If true, the step will not be added to the history if the current step is the same as the last step.
         */
        ignoreSameStep?: boolean;
    }) => void;
    private static _getCurrentStepsRunningNumber;
    /**
     * Returns the number of steps that are currently running.
     */
    static get currentStepsRunningNumber(): number;
    private static _getCharacter;
    /**
     * This function returns the character by its id.
     * @param id The id of the character.
     * @returns The character or undefined if it does not exist.
     */
    static get getCharacter(): (id: string) => CharacterInterface | undefined;
    static onEnd?: StepLabelType;
    static onError?: (type: "step", error: any, props: StepLabelPropsType) => void;
}

declare namespace Game {
    /**
     * Initialize the Game and PixiJS Application and the interface div.
     * This method should be called before any other method.
     * @param element The html element where I will put the canvas. Example: document.body
     * @param width The width of the canvas
     * @param height The height of the canvas
     * @param options The options of PixiJS Application
     * @param devtoolsOptions The options of the devtools. You can read more about it in the [PixiJS Devtools documentation](https://pixijs.io/devtools/docs/plugin/)
     * @example
     * ```typescript
     * const body = document.body
     * if (!body) {
     *     throw new Error('body element not found')
     * }
     * await Game.initialize(body, {
     *     width: 1920,
     *     height: 1080,
     *     backgroundColor: "#303030"
     * })
     * ```
     */
    function init(element: HTMLElement, options: Partial<ApplicationOptions> & {
        width: number;
        height: number;
    }, devtoolsOptions?: Devtools): Promise<void>;
    /**
     * Clear all game data. This function is used to reset the game.
     */
    function clear(): void;
    /**
     * Get all the game data. It can be used to save the game.
     * @returns The game data
     */
    function exportGameState(): GameState;
    /**
     * Load the save data
     * @param data The save data
     * @param navigate The function to navigate to a path
     */
    function restoreGameState(data: GameState, navigate: (path: string) => void): Promise<void>;
    /**
     * Convert a JSON string to a save data
     * @param json The JSON string
     * @returns The save data
     */
    function jsonToGameState(json: string): GameState;
    /**
     * Function to be executed at the end of the game. It should be set in the game initialization.
     * @example
     * ```typescript
     * Game.onEnd(async (props) => {
     *    props.navigate("/end")
     * })
     * ```
     */
    function onEnd(value: StepLabelType): void;
    /**
     * Function to be executed when an error occurs in the step.
     * @example
     * ```typescript
     * Game.onError((type, error, props) => {
     *    props.notify("An error occurred")
     *    // send a notification to GlitchTip, Sentry, etc...
     * })
     * ```
     */
    function onError(value: (type: "step", error: any, props: StepLabelPropsType) => void): void;
    /**
     * Is a function that will be executed before any step is executed.
     * @param stepId Step id
     * @param label Label
     * @returns
     */
    function onStepStart(value: (stepId: number, label: LabelAbstract<any>) => void | Promise<void>): void;
    /**
     * Is a function that will be executed in {@link Game.onStepStart} if the id of the step is 0
     * and when the user laods a save file.
     * When you load a save file, will be executed all onLoadingLabel functions of the {@link narrationUtils.narration}.openedLabels.
     * It is useful for example to make sure all images used have been cached
     * @param stepId Step id
     * @param label Label
     * @returns
     * @example
     * ```typescript
     * Game.onLoadingLabel(async (stepId, label) => {
     *     await Assets.load('path/to/image1.png')
     *     await Assets.load('path/to/image2.png')
     * })
     * ```
     */
    function onLoadingLabel(value: (stepId: number, label: LabelAbstract<any>) => void | Promise<void>): void;
    /**
     * Is a function that will be executed when the step ends.
     * @param stepId Step id
     * @param label Label
     * @returns
     */
    function onStepEnd(value: (stepId: number, label: LabelAbstract<any>) => void | Promise<void>): void;
}
declare const _default: {
    canvas: CanvasManagerInterface;
    narration: NarrationManagerInterface;
    sound: SoundManager;
    storage: StorageManagerInterface;
    history: HistoryManagerInterface;
    Game: typeof Game;
    GameUnifier: typeof GameUnifier;
    createExportableElement: typeof createExportableElement;
    Assets: pixi_js.AssetsClass;
    Rectangle: typeof Rectangle;
    characterUtils: typeof characterUtils;
    canvasUtils: typeof canvasUtils;
    narrationUtils: typeof narrationUtils;
    soundUtils: typeof soundUtils;
    CANVAS_APP_GAME_LAYER_ALIAS: string;
    filters: {
        DistortionFilter: typeof _pixi_sound_lib_filters.DistortionFilter;
        EqualizerFilter: typeof _pixi_sound_lib_filters.EqualizerFilter;
        MonoFilter: typeof _pixi_sound_lib_filters.MonoFilter;
        ReverbFilter: typeof _pixi_sound_lib_filters.ReverbFilter;
        StereoFilter: typeof _pixi_sound_lib_filters.StereoFilter;
        StreamFilter: typeof _pixi_sound_lib_filters.StreamFilter;
        TelephoneFilter: typeof _pixi_sound_lib_filters.TelephoneFilter;
    };
    Pause: typeof Pause;
    Repeat: "repeat";
    SYSTEM_RESERVED_STORAGE_KEYS: {
        CURRENT_DIALOGUE_MEMORY_KEY: string;
        LAST_DIALOGUE_ADDED_IN_STEP_MEMORY_KEY: string;
        CURRENT_MENU_OPTIONS_MEMORY_KEY: string;
        LAST_MENU_OPTIONS_ADDED_IN_STEP_MEMORY_KEY: string;
        CURRENT_INPUT_VALUE_MEMORY_KEY: string;
        LAST_INPUT_ADDED_IN_STEP_MEMORY_KEY: string;
        CURRENT_INPUT_INFO_MEMORY_KEY: string;
        CHARACTER_CATEGORY_KEY: string;
        ADD_NEXT_DIALOG_TEXT_INTO_THE_CURRENT_DIALOG_FLAG_KEY: string;
        OPENED_LABELS_COUNTER_KEY: string;
        ALL_CHOICES_MADE_KEY: string;
        CURRENT_STEP_TIMES_COUNTER_KEY: string;
        LAST_STEP_GLUED: string;
    };
    PIXIVN_VERSION: string;
};

/**
 * @deprecated Use the `Game.clear` function instead
 */
declare function clearAllGameDatas(): void;
/**
 * @deprecated Use the `Game.exportGameState()` function instead
 */
declare function getSaveData(): GameState;
/**
 * @deprecated Use the `JSON.stringify(Game.exportGameState())` function instead
 */
declare function getSaveJson(): string;
/**
 * @deprecated Use the `Game.restoreGameState(data, navigate)` function instead
 */
declare function loadSaveData(data: GameState, navigate: (path: string) => void): Promise<void>;
/**
 * @deprecated Use the `Game.restoreGameState(JSON.parse(dataString) as GameState, navigate)` function instead
 */
declare function loadSaveJson(dataString: string, navigate: (path: string) => void): Promise<void>;
/**
 * @deprecated Use the `Game.jsonToGameState(json)` function instead
 */
declare function jsonToSaveData(json: string): GameState;

export { CANVAS_APP_GAME_LAYER_ALIAS, CanvasManagerInterface, Game, GameState, GameUnifier, HistoryManagerInterface, LabelAbstract, NarrationManagerInterface, version as PIXIVN_VERSION, Pause, PauseType, Repeat, RepeatType, SYSTEM_RESERVED_STORAGE_KEYS, GameState as SaveData, StepLabelPropsType, StepLabelType, StorageElementType, StorageManagerInterface, clearAllGameDatas, createExportableElement, _default as default, filters, getSaveData, getSaveJson, jsonToSaveData, loadSaveData, loadSaveJson };
