1) All these methods are in the @dxtmisha/functional-basic library.
2) Everything that is exported can be used.
3) Use what is in this library if it exists; do not use other libraries if there is an analogue here. Do not create new ones if an analogue already exists here.

The following is the content of "exports" from package.json:
{
  ".": {
    "import": "./dist/library.js",
    "types": "./dist/library.d.ts"
  },
  "./ai-types": "./ai-types.txt",
  "./style": "./dist/style.css",
  "./types/*": "./dist/*",
  "./types/**/*.d.ts": "./dist/**/*.d.ts"
}

// File: library.d.ts
/** Adds a highlight tag to matches in a string.
 * @param value input string
 * @param search search string or RegExp
 * @param className CSS class for highlight
 * @param shouldEscape escape string flag
 */
export declare function addTagHighlightMatch(value: string, search?: string | RegExp, className?: string, shouldEscape?: boolean): string;

/** Converts a value to a string.
 * @param value value to convert
 * @param isArrayString convert arrays to strings
 * @param trim trim result
 */
export declare function anyToString<V>(value: V, isArrayString?: boolean, trim?: boolean): string;

/** HTTP request utility class. */
export declare class Api {
    /** Check if localhost. */
    static isLocalhost(): boolean;
    /** Get ApiInstance singleton. */
    static getItem(): ApiInstance;
    /** Get last request status. */
    static getStatus(): ApiStatus;
    /** Get response handler. */
    static getResponse(): ApiResponse;
    /** Get hydration handler. */
    static getHydration(): ApiHydration;
    /** Get client hydration script string. */
    static getHydrationScript(): string;
    /** Get base origin URL. */
    static getOrigin(): string;
    /** Get full script URL. */
    static getUrl(path: string, api?: boolean): string;
    /** Get request body data. */
    static getBody(request?: ApiFetch['request'], method?: ApiMethodItem): string | FormData | undefined;
    /** Get GET request query string. */
    static getBodyForGet(request: ApiFetch['request'], path?: string, method?: ApiMethodItem): string;
    /** Set default headers. */
    static setHeaders(headers: Record<string, string>): void;
    /** Set default request data. */
    static setRequestDefault(request: Record<string, any>): void;
    /** Set base script URL. */
    static setUrl(url: string): void;
    /** Set pre-request callback. */
    static setPreparation(callback: (apiFetch: ApiFetch) => Promise<void>): void;
    /** Set post-request callback. */
    static setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): void;
    /** Set request timeout. */
    static setTimeout(timeout: number): void;
    /** Set base origin. */
    static setOrigin(origin: string): void;
    /** Set full API config. */
    static setConfig(config?: ApiConfig): void;
    /** Execute request. */
    static request<T>(pathRequest: string | ApiFetch): Promise<T>;
    /** Send GET request. */
    static get<T>(request: ApiFetch): Promise<T>;
    /** Send POST request. */
    static post<T>(request: ApiFetch): Promise<T>;
    /** Send PUT request. */
    static put<T>(request: ApiFetch): Promise<T>;
    /** Send PATCH request. */
    static patch<T>(request: ApiFetch): Promise<T>;
    /** Send DELETE request. */
    static delete<T>(request: ApiFetch): Promise<T>;
}

/** API response caching. */
export declare class ApiCache {
    /** Initialize cache storage with listeners. */
    static init(getListener: (key: string) => Promise<ApiCacheItem | undefined>, setListener: (key: string, value: ApiCacheItem) => Promise<boolean>, removeListener: (key: string) => Promise<boolean>, cacheStepAgeClearOld?: number): void;
    /** Clear all cache. */
    static reset(): void;
    /** Get from cache by key. */
    static get<T>(key: string): Promise<T | undefined>;
    /** Get from cache using fetch options. */
    static getByFetch<T>(fetch: ApiFetch): Promise<T | undefined>;
    /** Save to cache. */
    static set<T>(key: string, value: T, age?: number): Promise<void>;
    /** Save to cache using fetch options. */
    static setByFetch<T>(fetch: ApiFetch, value: T): Promise<void>;
    /** Remove from cache. */
    static remove(key: string): Promise<void>;
}

/** Cached API item. */
export declare type ApiCacheItem<T = any> = {
    value: T;
    age?: number;
    cacheAge: number;
};

/** Cache list record. */
export declare type ApiCacheList = Record<string, ApiCacheItem>;

/** API Configuration. */
export declare type ApiConfig = {
    urlRoot?: string;
    origin?: string;
    headers?: Record<string, string>;
    requestDefault?: Record<string, any>;
    preparation?: (apiFetch: ApiFetch) => Promise<void>;
    end?: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>;
    timeout?: number;
};

/** API data wrapper. */
export declare type ApiData<T = any> = T extends any[] ? T : ApiDataItem<T>;

/** API data item. */
export declare type ApiDataItem<T = any> = T & ApiDataValidation & {
    data?: T;
    success?: boolean;
    statusObject?: ApiStatusItem;
};

/** Processes data from API request. */
export declare class ApiDataReturn<T = any> {
    constructor(apiFetch: ApiFetch, query: Response, end: ApiPreparationEnd);
    /** Read data from response. */
    init(): Promise<this>;
    /** Get processed data. */
    get(): ApiData<T>;
    /** Get processed data with status. */
    getAndStatus(status: ApiStatus): ApiData<T>;
    /** Get raw API data. */
    getData(): ApiData<T> | undefined;
}

/** API validation metadata. */
export declare type ApiDataValidation = {
    status?: ApiStatusType;
    code?: string | number;
    message?: string;
};

/** Manages default request data. */
export declare class ApiDefault {
    /** Check if default data exists. */
    is(): boolean;
    /** Get default data. */
    get(): ApiDefaultValue | undefined;
    /** Merge defaults into request. */
    request(request: ApiFetch['request']): ApiFetch['request'];
    /** Set defaults. */
    set(request: ApiDefaultValue): this;
}

/** Default API request data. */
export declare type ApiDefaultValue = Record<string, any>;

/** API fetch options. */
export declare type ApiFetch = {
    api?: boolean;
    path?: string;
    pathFull?: string;
    method?: ApiMethod;
    request?: FormData | Record<string, any> | string;
    auth?: boolean;
    headers?: Record<string, string> | null;
    type?: string;
    toData?: boolean;
    global?: boolean;
    devMode?: boolean;
    hideError?: boolean;
    hideLoading?: boolean;
    retry?: number;
    retryDelay?: number;
    queryReturn?: (query: Response) => Promise<any | ApiDataValidation>;
    globalPreparation?: boolean;
    globalEnd?: boolean;
    init?: RequestInit;
    timeout?: number;
    controller?: AbortController;
    cache?: number;
    enableClientCache?: boolean;
    cacheId?: number | string;
    endResetLimit?: number;
};

/** Manages HTTP headers. */
export declare class ApiHeaders {
    /** Get merged headers. */
    get(value?: Record<string, string> | null, type?: string | undefined | null): Record<string, string> | undefined;
    /** Get headers based on request data. */
    getByRequest(request: ApiFetch['request'], value?: Record<string, string> | null, type?: string): Record<string, string> | undefined;
    /** Set default headers. */
    set(headers: Record<string, string>): this;
}

/** Collects API data for SSR hydration. */
export declare class ApiHydration {
    /** Init response with hydration data. */
    initResponse(response: ApiResponse): void;
    /** Save response for client. */
    toClient<T>(apiFetch: ApiFetch, response: T): void;
    /** Get hydration script string. */
    toString(): string;
}

/** Hydration item. */
export declare type ApiHydrationItem = {
    path: string;
    method: ApiMethod;
    request?: ApiFetch['request'];
    response: any;
};

/** List of hydration items. */
export declare type ApiHydrationList = ApiHydrationItem[];

/** Core fetch manager. */
export declare class ApiInstance {
    constructor(url?: string, options?: ApiInstanceOptions);
    /** Check if localhost. */
    isLocalhost(): boolean;
    /** Get last status. */
    getStatus(): ApiStatus;
    /** Get response handler. */
    getResponse(): ApiResponse;
    /** Get hydration handler. */
    getHydration(): ApiHydration;
    /** Get base origin. */
    getOrigin(): string;
    /** Get full script URL. */
    getUrl(path: string, api?: boolean): string;
    /** Get request body. */
    getBody(request?: ApiFetch['request'], method?: ApiMethodItem): string | FormData | undefined;
    /** Get query string for GET. */
    getBodyForGet(request: ApiFetch['request'], path?: string, method?: ApiMethodItem): string;
    /** Get hydration script. */
    getHydrationScript(): string;
    /** Set default headers. */
    setHeaders(headers: Record<string, string>): this;
    /** Set default request data. */
    setRequestDefault(request: Record<string, any>): this;
    /** Set base URL. */
    setUrl(url: string): this;
    /** Set pre-request hook. */
    setPreparation(callback: (apiFetch: ApiFetch) => Promise<void>): this;
    /** Set post-request hook. */
    setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): this;
    /** Set timeout. */
    setTimeout(timeout: number): this;
    /** Set origin. */
    setOrigin(origin: string): this;
    /** Execute request. */
    request<T>(pathRequest: string | ApiFetch): Promise<T>;
    /** GET request. */
    get<T>(request: ApiFetch): Promise<T>;
    /** POST request. */
    post<T>(request: ApiFetch): Promise<T>;
    /** PUT request. */
    put<T>(request: ApiFetch): Promise<T>;
    /** PATCH request. */
    patch<T>(request: ApiFetch): Promise<T>;
    /** DELETE request. */
    delete<T>(request: ApiFetch): Promise<T>;
}

/** API instance configuration. */
export declare type ApiInstanceOptions = {
    headersClass?: typeof ApiHeaders;
    requestDefaultClass?: typeof ApiDefault;
    statusClass?: typeof ApiStatus;
    responseClass?: typeof ApiResponse;
    preparationClass?: typeof ApiPreparation;
    loadingClass?: LoadingInstance;
    errorCenterClass?: ErrorCenterInstance;
    hydrationClass?: typeof ApiHydration;
};

/** HTTP Method type. */
export declare type ApiMethod = string & ApiMethodItem;

/** Supported HTTP methods. */
export declare enum ApiMethodItem {
    delete = "DELETE",
    get = "GET",
    post = "POST",
    put = "PUT",
    patch = "PATCH"
}

/** Request preparation hooks. */
export declare class ApiPreparation {
    /** Run pre-request preparation. */
    make(active: boolean, apiFetch: ApiFetch): Promise<void>;
    /** Run post-request analysis. */
    makeEnd(active: boolean, query: Response, apiFetch: ApiFetch): Promise<ApiPreparationEnd>;
    /** Set pre-request callback. */
    set(callback: (apiFetch: ApiFetch) => Promise<void>): this;
    /** Set post-request callback. */
    setEnd(callback: (query: Response, apiFetch: ApiFetch) => Promise<ApiPreparationEnd>): this;
}

/** Hook result. */
export declare type ApiPreparationEnd = {
    reset?: boolean;
    data?: any;
};

/** Manages API response mocks and cache. */
export declare class ApiResponse {
    constructor(requestDefault: ApiDefault);
    /** Get cached or global response. */
    get(path: string | undefined, method: ApiMethod, request?: ApiFetch['request'], devMode?: boolean): ApiResponseItem | undefined;
    /** Get list of cached responses. */
    getList(): (ApiResponseItem & Record<string, any>)[];
    /** Add response to cache. */
    add(response: ApiResponseItem | ApiResponseItem[]): this;
    /** Set dev mode. */
    setDevMode(devMode: boolean): this;
    /** Run emulator if available. */
    emulator<T>(apiFetch: ApiFetch): Promise<T | undefined>;
}

/** Mock descriptor. */
export declare type ApiResponseItem = {
    path: string | RegExp;
    method: ApiMethod;
    request?: ApiFetch['request'] | '*any';
    response: any | ((request?: ApiFetch['request']) => any);
    disable?: any;
    isForGlobal?: boolean;
    lag?: any;
};

/** API status manager. */
export declare class ApiStatus {
    /** Get status data. */
    get(): ApiStatusItem | undefined;
    /** Get HTTP status code. */
    getStatus(): number | undefined;
    /** Get status text. */
    getStatusText(): string | undefined;
    /** Get status type. */
    getStatusType(): ApiStatusType | undefined;
    /** Get result code. */
    getCode(): string | undefined;
    /** Get error message. */
    getError(): string | undefined;
    /** Get last response data. */
    getResponse<T>(): T | undefined;
    /** Get status message. */
    getMessage(): string;
    /** Set status data. */
    set(data: ApiStatusItem): this;
    /** Set HTTP status. */
    setStatus(status?: number, statusText?: string): this;
    /** Set error message. */
    setError(error?: string): this;
    /** Set last response data. */
    setLastResponse(response?: any): this;
    /** Set status type. */
    setLastStatus(status?: ApiStatusType): this;
    /** Set execution code. */
    setLastCode(code?: string): this;
    /** Set message. */
    setLastMessage(message?: string): this;
}

/** Status record. */
export declare type ApiStatusItem = {
    status?: number;
    statusText?: string;
    error?: string;
    lastResponse?: any;
    lastStatus?: ApiStatusType;
    lastCode?: string;
    lastMessage?: string;
};

export declare type ApiStatusType = 'success' | 'error' | 'warning' | 'info';

/** Template applier. */
export declare const applyTemplate: (text: string, replacement?: Record<string, string | number | boolean> | string[]) => string;

export declare type ArrayToItem<T> = T extends any[] ? T[number] : T;

/** Create filled array. */
export declare function arrFill<T>(value: T, count: number): T[];

/** Blob to Base64. */
export declare function blobToBase64(blob: Blob, clean?: boolean): Promise<string | undefined>;

/** BroadcastChannel manager. */
export declare class BroadcastMessage<Message = any> {
    constructor(name: string, callback?: ((event: MessageEvent<Message>) => void) | undefined, callbackError?: ((event: MessageEvent<Message>) => void) | undefined, errorCenter?: ErrorCenterInstance);
    /** Get BroadcastChannel instance. */
    getChannel(): BroadcastChannel | undefined;
    /** Send message. */
    post(message: Message): this;
    /** Set message callback. */
    setCallback(callback: (event: MessageEvent<Message>) => void): this;
    /** Set error callback. */
    setCallbackError(callbackError: (event: MessageEvent<Message>) => void): this;
    /** Close channel. */
    destroy(): this;
}

/** Memory cache. @deprecated */
declare class Cache_2 {
    /** Get or compute cached value. */
    get<T>(name: string, callback: () => T, comparison?: any[]): T;
    /** Get or compute cached value async. */
    getAsync<T>(name: string, callback: () => T, comparison?: any[]): Promise<T>;
}
export { Cache_2 as Cache }

/** Cache item with dependencies. @deprecated */
export declare class CacheItem<T> {
    constructor(callback: () => T);
    /** Get cached value. */
    getCache(comparison: any[]): T;
    /** Get previous cached value. */
    getCacheOld(): T | undefined;
    /** Get cached value async. */
    getCacheAsync(comparison: any[]): Promise<T>;
}

/** Persistent static cache. @deprecated */
export declare class CacheStatic {
    /** Get cached value. */
    static get<T>(name: string, callback: () => T, comparison?: any[]): T;
    /** Get cached value async. */
    static getAsync<T>(name: string, callback: () => T, comparison?: any[]): Promise<T>;
}

/** Capitalize first letter. */
export declare function capitalize(value: string, isLocale?: boolean): string;

/** Cookie manager. */
export declare class Cookie<T> {
    constructor(name: string);
    /** Get instance by name. */
    static getInstance<T>(name: string): Cookie<unknown>;
    /** Get value or default. */
    get(defaultValue?: T | string | (() => (T | string)), options?: CookieOptions): string | T | undefined;
    /** Set value. */
    set(value?: T | string | (() => (T | string)), options?: CookieOptions): void;
    /** Remove cookie. */
    remove(): void;
}

/** Cookie blocking status. */
export declare class CookieBlock {
    static getItem(): CookieBlockInstance;
    static get(): boolean;
    static set(value: boolean): void;
}

export declare class CookieBlockInstance {
    get(): boolean;
    set(value: boolean): void;
}

export declare type CookieOptions = {
    age?: number;
    sameSite?: CookieSameSite_2;
    path?: string;
    domain?: string;
    secure?: boolean;
    httpOnly?: boolean;
    partitioned?: boolean;
    arguments?: string[] | Record<string, string | number | boolean>;
};

declare type CookieSameSite_2 = 'strict' | 'lax';
export { CookieSameSite_2 as CookieSameSite }

/** Cross-environment cookie storage. */
export declare class CookieStorage {
    /** Set custom listeners. */
    static init(getListener?: (key: string) => any | undefined, getListenerRaw?: () => string, setListener?: (key: string, value: any, cookie: string, options?: CookieOptions) => void): void;
    /** Clear storage. */
    static reset(): void;
    /** Get cookie value. */
    static get<T>(name: string, defaultValue?: T | (() => T)): T | undefined;
    /** Set cookie value. */
    static set<T>(name: string, value: T | (() => T), options?: CookieOptions): T;
    /** Remove cookie. */
    static remove(name: string): void;
    /** Refresh from source. */
    static update(): void;
}

/** Deep copy object. */
export declare function copyObject<T>(value: T): T;

/** Shallow copy with source merge. */
export declare function copyObjectLite<T, R = T>(value: T, source?: any): R;

/** Create DOM element.
 * @remarks Client-only. Returns undefined in SSR.
 */
export declare function createElement<T extends HTMLElement>(parentElement?: HTMLElement, tagName?: string, options?: Partial<T> | Record<keyof T, T[keyof T]> | ((element: T) => void), referenceElement?: HTMLElement): T | undefined;

/** Local/Session storage wrapper. */
export declare class DataStorage<T> {
    constructor(name: string, isSession?: boolean, errorCenter?: ErrorCenterInstance);
    static setPrefix(newPrefix: string): void;
    /** Get data. */
    get(defaultValue?: T | (() => T), cache?: number): T | undefined;
    /** Set data. */
    set(value?: T | (() => T)): T | undefined;
    /** Remove data. */
    remove(): this;
    /** Sync data. */
    update(): this;
}

/** Date manipulation utility.
 * @remarks SSR unstable if initialized without specific date.
 */
export declare class Datetime {
    constructor(date?: NumberOrStringOrDate, type?: GeoDate, code?: string);
    getIntl(): GeoIntl;
    getDate(): Date;
    getType(): GeoDate;
    getHoursType(): GeoHours;
    getHour24(): boolean;
    getTimeZoneOffset(): number;
    getTimeZone(style?: GeoTimeZoneStyle): string;
    getFirstDayCode(): GeoFirstDay;
    getYear(): number;
    getMonth(): number;
    getDay(): number;
    getHour(): number;
    getMinute(): number;
    getSecond(): number;
    getMaxDay(): number;
    locale(type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions): string;
    localeYear(style?: Intl.DateTimeFormatOptions['year']): string;
    localeMonth(style?: Intl.DateTimeFormatOptions['month']): string;
    localeDay(style?: Intl.DateTimeFormatOptions['day']): string;
    localeHour(style?: Intl.DateTimeFormatOptions['hour']): string;
    localeMinute(style?: Intl.DateTimeFormatOptions['minute']): string;
    localeSecond(style?: Intl.DateTimeFormatOptions['second']): string;
    standard(timeZone?: boolean): string;
    setDate(value: NumberOrStringOrDate): this;
    setType(value: GeoDate): this;
    setHour24(value: boolean): this;
    setCode(code: string): this;
    setWatch(watch: (date: Date, type: GeoDate, hour24: boolean) => void): this;
    setYear(value: number): this;
    setMonth(value: number): this;
    setDay(value: number): this;
    setHour(value: number): this;
    setMinute(value: number): this;
    setSecond(value: number): this;
    moveByYear(value: number): this;
    moveByMonth(value: number): this;
    moveByDay(value: number): this;
    moveByHour(value: number): this;
    moveByMinute(value: number): this;
    moveBySecond(value: number): this;
    moveMonthFirst(): this;
    moveMonthLast(): this;
    moveMonthNext(): this;
    moveMonthPrevious(): this;
    moveWeekdayFirst(): this;
    moveWeekdayLast(): this;
    moveWeekdayFirstByMonth(): this;
    moveWeekdayLastByMonth(): this;
    moveWeekdayNext(): this;
    moveWeekdayPrevious(): this;
    moveDayFirst(): this;
    moveDayLast(): this;
    moveDayNext(): this;
    moveDayPrevious(): this;
    clone(): Date;
    cloneClass(): Datetime;
    cloneMonthFirst(): Datetime;
    cloneMonthLast(): Datetime;
    cloneMonthNext(): Datetime;
    cloneMonthPrevious(): Datetime;
    cloneWeekdayFirst(): Datetime;
    cloneWeekdayLast(): Datetime;
    cloneWeekdayFirstByMonth(): Datetime;
    cloneWeekdayLastByMonth(): Datetime;
    cloneWeekdayNext(): Datetime;
    cloneWeekdayPrevious(): Datetime;
    cloneDayFirst(): Datetime;
    cloneDayLast(): Datetime;
    cloneDayNext(): Datetime;
    cloneDayPrevious(): Datetime;
}

/** DOM query first element. */
export declare function domQuerySelector<E extends Element = Element>(selectors: string): E | undefined;

/** DOM query all elements. */
export declare function domQuerySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E> | undefined;

export declare type ElementOrString<E extends ElementOrWindow> = E | string;

export declare type ElementOrWindow = HTMLElement | Window;

export declare type EmptyValue = Undefined | 0 | false | '' | 'undefined' | 'null' | '0' | 'false' | '[]';

/** Encode string for HTML attributes. */
export declare function encodeAttribute(text: string): string;

/** Simple HTML attribute encoding. */
export declare function encodeLiteAttribute(text: string): string;

/** Resize image if exceeds max size. */
export declare function ensureMaxSize(file: Uint8Array, compress?: number, type?: string): Promise<string>;

/** Global error management. */
export declare class ErrorCenter {
    static getItem(): ErrorCenterInstance;
    static has(code: string, group?: string): boolean;
    static get(code: string, group?: string): ErrorCenterCauseItem | undefined;
    static add(cause: ErrorCenterCauseItem): void;
    static addList(causes: ErrorCenterCauseList): void;
    static addHandler(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): void;
    static addHandlerList(handlers: ErrorCenterHandlerList): void;
    static on(cause: ErrorCenterCauseItem): void;
}

export declare type ErrorCenterCauseItem = {
    group?: ErrorCenterGroup;
    code: string;
    priority?: number;
    label?: string;
    message?: string;
    details?: any;
};

export declare type ErrorCenterCauseList = ErrorCenterCauseItem[];

export declare type ErrorCenterGroup = string | undefined;

/** Registry for error handlers. */
export declare class ErrorCenterHandler {
    constructor(handlers?: ErrorCenterHandlerList);
    has(group: ErrorCenterGroup): boolean;
    get(group: ErrorCenterGroup): ErrorCenterHandlerItem | undefined;
    add(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): this;
    addList(handlers: ErrorCenterHandlerList): this;
    on(cause: ErrorCenterCauseItem): this;
}

export declare type ErrorCenterHandlerCallback = (cause: ErrorCenterCauseItem) => void;

export declare type ErrorCenterHandlerItem = {
    group?: ErrorCenterGroup;
    handlers: ErrorCenterHandlerCallback[];
};

export declare type ErrorCenterHandlerList = ErrorCenterHandlerItem[];

/** Error context instance. */
export declare class ErrorCenterInstance {
    constructor(causes?: ErrorCenterCauseList, handler?: ErrorCenterHandler);
    has(code: string, group?: string): boolean;
    get(code: string, group?: string): ErrorCenterCauseItem | undefined;
    add(cause: ErrorCenterCauseItem): this;
    addList(causes: ErrorCenterCauseList): this;
    addHandler(group: ErrorCenterGroup, handler: ErrorCenterHandlerCallback): this;
    addHandlerList(handlers: ErrorCenterHandlerList): this;
    on(cause: ErrorCenterCauseItem): this;
}

/** Escape string for RegExp. */
export declare function escapeExp(value: string): string;

export declare type EventActivityItem<E extends ElementOrWindow> = {
    element: E | undefined;
    type: string;
    listener?: (event: any | Event) => void;
    observer?: ResizeObserver;
};

/** Lifecycle-controlled event listener wrapper. */
export declare class EventItem<E extends ElementOrWindow, O extends Event, D extends Record<string, any> = Record<string, any>> {
    constructor(elementSelector?: ElementOrString<E>, type?: string | string[], listener?: EventListenerDetail<O, D> | undefined, options?: EventOptions, detail?: D | undefined);
    isActive(): boolean;
    getElement(): E | undefined;
    setElement(elementSelector?: ElementOrString<E>): this;
    setElementControl<EC extends HTMLElement>(elementSelector?: ElementOrString<EC>): this;
    setType(type: string | string[]): this;
    setListener(listener: EventListenerDetail<O, D>): this;
    setOptions(options?: EventOptions): this;
    setDetail(detail?: D): this;
    dispatch(detail?: D | undefined): this;
    start(): this;
    stop(): this;
    toggle(activity: boolean): this;
    reset(): this;
}

export declare type EventListenerDetail<O extends Event, D extends Record<string, any>> = (event: O, detail?: D) => void;

export declare type EventOptions = AddEventListenerOptions | boolean | undefined;

/** Stop event propagation. */
export declare function eventStopPropagation(event: Event): void;

/** Execute value as function if applicable. */
export declare function executeFunction<T>(callback: T | FunctionArgs<any, T>, ...args: any[]): T;

/** Execute async or sync function. */
export declare function executePromise<T>(callback: ((...args: any[]) => Promise<T>) | ((...args: any[]) => T) | T, ...args: any[]): Promise<T>;

/** Iterate object/array and map results. */
export declare function forEach<T, R, D extends T[] | Record<string, T> | Map<string, T> | Set<T> = T[] | Record<string, T> | Map<string, T> | Set<T>, K = D extends T[] ? number : string>(data: D & (T[] | Record<string, T> | Map<string, T> | Set<T>), callback: (item: T, key: K, dataMain: typeof data) => R, saveUndefined?: boolean): R[];

/** Data list formatter. */
export declare class Formatters<Options extends FormattersOptionsList = FormattersOptionsList, List extends FormattersListProp = FormattersListProp, Item extends FormattersItemProp<List> = FormattersItemProp<List>> {
    constructor(options: Options, list?: List | undefined);
    is(): boolean;
    isArray(): this is this & { list: FormattersList<Item>; };
    length(): number;
    getList(): FormattersList<Item>;
    getOptions(): Options;
    setList(list?: List): this;
    /** Formats data and appends 'Format' properties. */
    to(): FormattersReturn<List, Options>;
}

export declare type FormattersCapitalize<K extends string> = K extends `${infer First}.${infer Rest}` ? `${First}${Capitalize<FormattersCapitalize<Rest>>}` : K;
export declare type FormattersColumns<T extends FormattersOptionsList> = (keyof T & string)[];
export declare type FormattersDataItem<T extends FormattersListItem, KT extends string[]> = { [K in keyof T | FormattersKey<KT[number]>]: K extends keyof T ? T[K] : string; };
export declare type FormattersItemProp<List extends FormattersListProp> = ArrayToItem<List>;
export declare type FormattersKey<K, A extends string = 'Format'> = K extends string ? `${FormattersCapitalize<K>}${A}` : never;
export declare type FormattersList<Item extends FormattersListItem> = Item[];
export declare type FormattersListColumnItem<T extends FormattersListItem, O extends FormattersOptionsList> = FormattersDataItem<T, FormattersColumns<O>>;
export declare type FormattersListColumns<T extends FormattersListItem, O extends FormattersOptionsList> = FormattersListFormat<T, FormattersColumns<O>>;
export declare type FormattersListFormat<T extends FormattersListItem, K extends string[]> = FormattersDataItem<T, K>[];
export declare type FormattersListItem = Record<string, any>;
export declare type FormattersListProp = FormattersList<FormattersListItem> | FormattersListItem;

export declare type FormattersOptionsCurrency = { currencyPropName?: string; options?: string | Intl.NumberFormatOptions; numberOnly?: boolean; };
export declare type FormattersOptionsDate = { type?: GeoDate; options?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions; hour24?: boolean; };
export declare type FormattersOptionsInformation<Type extends FormattersType> = Type extends FormattersType.currency ? FormattersOptionsCurrency : Type extends FormattersType.date ? FormattersOptionsDate : Type extends FormattersType.name ? FormattersOptionsName : Type extends FormattersType.number ? FormattersOptionsNumber : Type extends FormattersType.plural ? FormattersOptionsPlural : Type extends FormattersType.unit ? FormattersOptionsUnit : Record<string, any>;
export declare type FormattersOptionsItem<Type extends FormattersType = FormattersType, R = string> = { type?: Type; transformation?: (valueOriginal: any, item: any, options?: FormattersOptionsInformation<Type>) => R; options?: FormattersOptionsInformation<Type>; };
export declare type FormattersOptionsList = Record<string, FormattersOptionsItem>;
export declare type FormattersOptionsName = { lastPropName?: string; firstPropName?: string; surname?: string; short?: boolean; };
export declare type FormattersOptionsNumber = { options?: Intl.NumberFormatOptions; };
export declare type FormattersOptionsPlural = { words: string; options?: Intl.PluralRulesOptions; optionsNumber?: Intl.NumberFormatOptions; };
export declare type FormattersOptionsUnit = { unit: string | Intl.NumberFormatOptions; };
export declare type FormattersReturn<List extends FormattersListProp, Options extends FormattersOptionsList = FormattersOptionsList, Item extends FormattersItemProp<List> = FormattersItemProp<List>> = List extends any[] ? FormattersListColumns<Item, Options> : (FormattersListColumnItem<Item, Options> | undefined);

export declare enum FormattersType {
    currency = "currency",
    date = "date",
    name = "name",
    number = "number",
    plural = "plural",
    unit = "unit"
}

/** Cyclic requestAnimationFrame. */
export declare function frame(callback: () => void, next?: () => boolean, end?: () => void): void;

export declare type FunctionAnyType<T = any, R = any> = (...args: T[]) => R;
export declare type FunctionArgs<T, R> = (...args: T[]) => R;
export declare type FunctionReturn<R = any> = () => R;
export declare type FunctionVoid = () => void;

/** Geographical data manager. */
export declare class Geo {
    static getObject(): GeoInstance;
    static get(): GeoItemFull;
    static getCountry(): string;
    static getLanguage(): string;
    static getStandard(): string;
    static getFirstDay(): string;
    static getLocation(): string;
    static getItem(): GeoItemFull;
    static getList(): GeoItem[];
    static getByCode(code?: string): GeoItemFull;
    static getByCodeFull(code: string): GeoItem | undefined;
    static getByCountry(country: string): GeoItem | undefined;
    static getByLanguage(language: string): GeoItem | undefined;
    static getTimezone(): number;
    static getTimezoneFormat(): string;
    static find(code: string): GeoItemFull;
    static toStandard(item: GeoItem): string;
    static set(code: string, save?: boolean): void;
    static setTimezone(timezone: number): void;
}

export declare const GEO_FLAG_ICON_NAME = "f";

export declare type GeoDate = 'full' | 'datetime' | 'date' | 'year-month' | 'year' | 'month' | 'day' | 'day-month' | 'time' | 'hour-minute' | 'hour' | 'minute' | 'second';
export declare type GeoFirstDay = 1 | 6 | 0;

/** Flag and country info. */
export declare class GeoFlag {
    static flags: Record<string, string>;
    constructor(code?: string);
    get(code?: string): GeoFlagItem | undefined;
    getFlag(code?: string): string | undefined;
    getList(codes?: string[]): GeoFlagItem[];
    getNational(codes?: string[]): GeoFlagNational[];
    setCode(code: string): this;
}

export declare interface GeoFlagItem {
    language: string;
    country: string;
    standard: string;
    icon?: string;
    label: string;
    value: string;
}

export declare interface GeoFlagNational extends GeoFlagItem {
    description: string;
    nationalLanguage: string;
    nationalCountry: string;
}

export declare type GeoHours = '12' | '24';

/** Geo context instance. */
export declare class GeoInstance {
    constructor();
    get(): GeoItemFull;
    getCountry(): string;
    getLanguage(): string;
    getStandard(): string;
    getFirstDay(): string;
    getLocation(): string;
    getItem(): GeoItemFull;
    getList(): GeoItem[];
    getByCode(code?: string): GeoItemFull;
    getByCodeFull(code: string): GeoItem | undefined;
    getByCountry(country: string): GeoItem | undefined;
    getByLanguage(language: string): GeoItem | undefined;
    getTimezone(): number;
    getTimezoneFormat(): string;
    find(code: string): GeoItemFull;
    toStandard(item: GeoItem): string;
    set(code: string, save?: boolean): void;
    setTimezone(timezone: number): void;
}

/** Internationalization API wrapper. */
export declare class GeoIntl {
    static isItem(code?: string): boolean;
    static getLocation(code?: string): string;
    static getInstance(code?: string): GeoIntl;
    constructor(code?: string, errorCenter?: ErrorCenterInstance);
    getLocation(): string;
    getFirstDay(): string;
    display(value?: string, typeOptions?: Intl.DisplayNamesOptions['type'] | Intl.DisplayNamesOptions): string;
    languageName(value?: string, style?: Intl.RelativeTimeFormatStyle): string;
    countryName(value?: string, style?: Intl.RelativeTimeFormatStyle): string;
    fullName(last: string, first: string, surname?: string, short?: boolean): string;
    number(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
    decimal(): string;
    currency(value: NumberOrString, currencyOptions?: string | Intl.NumberFormatOptions, numberOnly?: boolean): string;
    currencySymbol(currency: string, currencyDisplay?: keyof Intl.NumberFormatOptionsCurrencyDisplayRegistry): string;
    unit(value: NumberOrString, unitOptions?: string | Intl.NumberFormatOptions): string;
    sizeFile(value: NumberOrString, unitOptions?: 'byte' | 'kilobyte' | 'megabyte' | 'gigabyte' | 'terabyte' | 'petabyte' | Intl.NumberFormatOptions): string;
    percent(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
    percentBy100(value: NumberOrString, options?: Intl.NumberFormatOptions): string;
    plural(value: NumberOrString, words: string, options?: Intl.PluralRulesOptions, optionsNumber?: Intl.NumberFormatOptions): string;
    date(value: NumberOrStringOrDate, type?: GeoDate, styleOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, hour24?: boolean): string;
    relative(value: NumberOrStringOrDate, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, todayValue?: Date): string;
    relativeLimit(value: NumberOrStringOrDate, limit: number, todayValue?: Date, relativeOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions, dateOptions?: Intl.DateTimeFormatOptions['month'] | Intl.DateTimeFormatOptions, type?: GeoDate, hour24?: boolean): string;
    relativeByValue(value: NumberOrString, unit: Intl.RelativeTimeFormatUnit, styleOptions?: Intl.RelativeTimeFormatStyle | Intl.RelativeTimeFormatOptions): string;
    month(value?: NumberOrStringOrDate, style?: Intl.DateTimeFormatOptions['month']): string;
    months(style?: Intl.DateTimeFormatOptions['month']): ItemValue<number | undefined>[];
    weekday(value?: NumberOrStringOrDate, style?: Intl.DateTimeFormatOptions['weekday']): string;
    weekdays(style?: Intl.DateTimeFormatOptions['weekday']): ItemValue<number | undefined>[];
    time(value: NumberOrStringOrDate): string;
    sort<T>(data: T[], compareFn?: (a: T, b: T) => [string, string]): T[];
}

export declare interface GeoItem {
    country: string;
    countryAlternative?: string[];
    language: string;
    languageAlternative?: string[];
    firstDay?: string | null;
    zone?: string | null;
    phoneCode?: string;
    phoneWithin?: string;
    phoneMask?: string | string[];
    nameFormat?: 'fl' | 'fsl' | 'lf' | 'lsf' | string;
}

export declare interface GeoItemFull extends Omit<GeoItem, 'firstDay'> {
    standard: string;
    firstDay: string;
}

/** Phone mask and country code info. */
export declare class GeoPhone {
    static get(code: string): GeoPhoneValue | undefined;
    static getByPhone(phone: string): GeoPhoneMapInfo;
    static getByCode(code: string): GeoPhoneMap | undefined;
    static getList(): GeoPhoneValue[];
    static getMap(): Record<string, GeoPhoneMap>;
    static toMask(phone: string, masks?: string[]): string | undefined;
    static removeZero(phone: string): string;
}

export declare interface GeoPhoneMap {
    items: GeoPhoneValue[];
    info: GeoPhoneValue | undefined;
    value: string | undefined;
    mask: string[];
    maskFull: string[];
    next: Record<string, GeoPhoneMap>;
}

export declare interface GeoPhoneMapInfo {
    item?: GeoPhoneMap;
    phone?: string;
}

export declare interface GeoPhoneValue {
    phone: number;
    within: number;
    mask: string[];
    value: string;
}

export declare type GeoTimeZoneStyle = 'minute' | 'hour' | 'ISO8601' | 'RFC';

/** Split string for highlight rendering. */
export declare function getArrayHighlightMatch(value: string, search?: string | RegExp): HighlightMatchItem[];

/** Get element attributes. */
export declare function getAttributes<E extends ElementOrWindow>(element?: ElementOrString<E>): Record<string, string | undefined>;

/** Get clipboard text. */
export declare function getClipboardData(event?: ClipboardEvent): Promise<string>;

/** Get values of a specific column. */
export declare function getColumn<T, K extends keyof T>(array: ObjectOrArray<T>, column: K): (T[K] | undefined)[];

/** Get current formatted date.
 * @remarks Client-only for SSR stability.
 */
export declare function getCurrentDate(format?: GeoDate): string;

/** Get timestamp. @remarks SSR warning: hydration mismatch likely. */
export declare function getCurrentTime(): number;

/** Get element by selector. */
export declare function getElement<E extends ElementOrWindow, R extends Exclude<E, Window>>(element?: ElementOrString<E>): R | undefined;

/** Get or generate element ID. */
export declare function getElementId<E extends ElementOrWindow>(element?: ElementOrString<E>, selector?: string): string;

/** Get HTMLImageElement from source. */
export declare function getElementImage(image: HTMLImageElement | string): HTMLImageElement | undefined;

/** Get element property value. */
export declare function getElementItem<T extends ElementOrWindow, K extends keyof T, D>(element: ElementOrString<T>, index: K | string, defaultValue?: D): T[K] | D | undefined;

export declare function getElementOrWindow<E extends ElementOrWindow>(element?: ElementOrString<E>): E | undefined;

/** Generate hydration script tag. */
export declare function getElementSafeScript(id: string, data: any): string;

/** Exact phrase RegExp. */
export declare function getExactSearchExp(search: string): RegExp;

/** Pattern-based RegExp creator. */
export declare function getExp(value: string, flags?: string, pattern?: string): RegExp;

/** Parse hydration JSON from script tag. */
export declare function getHydrationData<T>(id: string, defaultValue: T, remove?: boolean): T;

/** Get value from object by path. */
export declare function getItemByPath<T extends Record<string, any>, R = string>(item: T, path: string): R | undefined;

/** Get KeyboardEvent key. */
export declare function getKey(event: KeyboardEvent): string;

export declare function getLengthOfAllArray(value: ObjectOrArray<string>): number[];

export declare function getMaxLengthAllArray(data: ObjectOrArray<string>): number;

export declare function getMinLengthAllArray(data: ObjectOrArray<string>): number;

/** Get mouse/touch coordinates. */
export declare function getMouseClient(event: MouseEvent & TouchEvent): ImageCoordinator;
export declare function getMouseClientX(event: MouseEvent & TouchEvent): number;
export declare function getMouseClientY(event: MouseEvent & TouchEvent): number;

/** Pick object keys. */
export declare function getObjectByKeys<T extends Record<string, any>, K extends keyof T>(data: T, keys: K[]): Pick<T, K>;

/** Remove properties by value. */
export declare function getObjectNoUndefined<T extends Record<string | number, any>>(data: T, exception?: any): T;

/** Ensure value is object. */
export declare function getObjectOrNone<T>(value: T): T & Record<string, any>;

/** Strip non-alphanumeric. */
export declare function getOnlyText(text: any): string;

/** Random text generator. */
export declare function getRandomText(min: number, max: number, symbol?: string, lengthMin?: number, lengthMax?: number): string;

/** Convert object to key-value string. */
export declare function getRequestString(request: Record<string, any> | any[], sign?: string, separator?: string, subKey?: string): string;

/** Multi-word search RegExp. */
export declare function getSearchExp(search: string, limit?: number): RegExp;

/** Word-separating search RegExp. */
export declare function getSeparatingSearchExp(search: string | RegExp, limit?: number): RegExp;

export declare function getStepPercent(min: number | undefined, max: number): number;

export declare function getStepValue(min: number | undefined, max: number): number;

/** Application-wide global storage. */
export declare class Global {
    static getItem(): Record<string, any>;
    static get<R = any>(name: string): R;
    static add(data: Record<string, any>): void;
}

/** Scroll container to element. */
export declare function goScroll(selector: string, elementTo: HTMLElement | undefined, elementCenter?: HTMLElement): void;

/** Smooth scroll to element. */
export declare function goScrollSmooth<E extends HTMLElement>(element: E, options?: ScrollIntoViewOptions, shift?: number): void;

export declare function goScrollTo(element?: HTMLElement, elementTo?: HTMLElement, behavior?: ScrollBehavior): void;

/** Web Share API wrapper. */
export declare function handleShare(data: ShareData): Promise<boolean>;

/** URL Hash storage. */
export declare class Hash {
    static getItem(): HashInstance;
    static get<T>(name: string, defaultValue?: T | (() => T)): T;
    static set<T>(name: string, callback: T | (() => T)): void;
    static addWatch<T>(name: string, callback: (value: T) => void): void;
    static removeWatch<T>(name: string, callback: (value: T) => void): void;
    static reload(): void;
}

/** Hash state instance. */
export declare class HashInstance {
    get<T>(name: string, defaultValue?: T | (() => T)): T;
    set<T>(name: string, callback: T | (() => T)): this;
    addWatch<T>(name: string, callback: (value: T) => void): this;
    removeWatch<T>(name: string, callback: (value: T) => void): this;
    reload(): this;
}

export declare type HighlightMatchItem = {
    text: string;
    isMatch: boolean;
};

/** Icon registry and loader. */
export declare class Icons {
    static is(index: string): boolean;
    static get(index: string, url?: string, wait?: number): Promise<string>;
    static getAsync(index: string, url?: string): string;
    static getNameList(): string[];
    static getUrlGlobal(): string;
    static add(index: string, file: IconsItem): void;
    static addLoad(index: string): void;
    static addGlobal(index: string, file: string): void;
    static addByList(list: Record<string, IconsItem>): void;
    static setUrl(url: string): void;
    static setConfig(config: IconsConfig): void;
}

export declare type IconsConfig = {
    url?: string;
    list?: Record<string, IconsItem>;
};

export declare type IconsItem = string | Promise<string | any> | (() => Promise<string | any>);

export declare type ImageCoordinator = {
    x: number;
    y: number;
};

export declare function inArray<T>(array: T[], value: T): boolean;

/** Init element ID listener for SSR context. */
export declare function initGetElementId(newListener: () => string | number): void;

export declare function initScrollbarOffset(): Promise<void>;

/** Compute key intersection. */
export declare function intersectKey<T, KT extends keyof T, C, KC extends keyof C>(data?: T, comparison?: C): Record<KT & KC, T[KT]>;

/** Check API success flag. */
export declare const isApiSuccess: <T>(data: ApiData<T>) => boolean;

export declare function isArray<T, R>(value: T): value is Extract<T, R[]>;

export declare function isDifferent<T>(value: ObjectItem<T>, old: ObjectItem<T>): boolean;

export declare function isDomData(): boolean;

/** Check for window object. */
export declare function isDomRuntime(): boolean;

/** Check element visibility (not display: none). */
export declare function isElementVisible<E extends ElementOrWindow>(elementSelectors?: ElementOrString<E>): boolean;

/** Check Enter/Space key. */
export declare const isEnter: (event: KeyboardEvent, isInputElement?: boolean) => boolean;

/** Check if value is not empty. */
export declare function isFilled<T>(value: T, zeroTrue?: boolean): value is Exclude<T, EmptyValue>;

export declare function isFloat(value: any): boolean;

export declare function isFunction<T>(callback: T): callback is Extract<T, FunctionArgs<any, any>>;

/** Check if element is in DOM. */
export declare function isInDom<E extends ElementOrWindow>(element?: ElementOrString<E>): boolean;

/** Check if input/editable element. */
export declare const isInput: (element: HTMLElement | EventTarget | null) => boolean;

export declare function isIntegerBetween(value: number, between: number): boolean;

export declare function isNull<T>(value: T): value is Extract<T, Undefined>;

export declare function isNumber(value: any): boolean;

export declare function isObject<T>(value: T): value is Extract<T, Record<any, any>>;

export declare function isObjectNotArray<T>(value: T): value is Exclude<Extract<T, Record<any, any>>, any[] | undefined | null>;

export declare function isOnLine(): boolean;

export declare function isSelected<T, S>(value: T, selected: T | T[] | S): boolean;

export declare function isSelectedByList<T>(values: T | T[], selected: T | T[]): boolean;

export declare function isShare(): boolean;

export declare function isString<T>(value: T): value is Extract<T, string>;

export declare function isWindow<E>(element: E): element is Extract<E, Window>;

export declare type Item<V> = { index: string; value: V; };
export declare type ItemList<T = any> = Record<string, T>;
export declare type ItemName<V> = { name: string | number; value: V; };
export declare type ItemValue<V> = { label: string; value: V; };

/** Global loading indicator. */
export declare class Loading {
    static is(): boolean;
    static get(): number;
    static getItem(): LoadingInstance;
    static show(): void;
    static hide(): void;
    static registrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
    static unregistrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
}

export declare type LoadingDetail = { loading: boolean; };

/** Loader context instance. */
export declare class LoadingInstance {
    constructor(eventName?: string);
    is(): boolean;
    get(): number;
    show(): void;
    hide(): void;
    registrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
    unregistrationEvent(listener: EventListenerDetail<CustomEvent, LoadingDetail>, element?: ElementOrString<HTMLElement>): void;
}

export declare type LoadingRegistrationItem = {
    item: EventItem<Window, CustomEvent, LoadingDetail>;
    listener: EventListenerDetail<CustomEvent, LoadingDetail>;
    element?: ElementOrString<HTMLElement>;
};

/** Unified SEO Meta tag manager. */
export declare class Meta extends MetaManager<MetaTag[]> {
    constructor();
    getOg(): MetaOg;
    getTwitter(): MetaTwitter;
    getTitle(): string;
    getKeywords(): string;
    getDescription(): string;
    getImage(): string;
    getCanonical(): string;
    getRobots(): MetaRobots;
    getAuthor(): string;
    getSiteName(): string;
    getLocale(): string;
    setTitle(title: string): this;
    setKeywords(keywords: string | string[]): this;
    setDescription(description: string): this;
    setImage(image: string): this;
    setCanonical(canonical: string): this;
    setRobots(robots: MetaRobots): this;
    setAuthor(author: string): this;
    setSiteName(siteName: string): this;
    setLocale(locale: string): this;
    setSuffix(suffix?: string): void;
    html(): string;
    htmlTitle(): string;
}

export declare type MetaList<T extends readonly string[]> = { [K in T[number]]?: string; };

/** Meta tag base manager. */
export declare class MetaManager<T extends readonly string[], Key extends keyof MetaList<T> = keyof MetaList<T>> {
    constructor(listMeta: T, isProperty?: boolean);
    getListMeta(): T;
    get(name: Key): string;
    getItems(): MetaList<T>;
    html(): string;
    set(name: Key, content: string): this;
    setByList(metaList: MetaList<T>): this;
}

/** Open Graph manager. */
export declare class MetaOg extends MetaManager<MetaOpenGraphTag[]> {
    constructor();
    getTitle(): string;
    getType(): MetaOpenGraphType;
    getUrl(): string;
    getImage(): string;
    getDescription(): string;
    getLocale(): string;
    getSiteName(): string;
    setTitle(title: string): this;
    setType(type: MetaOpenGraphType): this;
    setUrl(url: string): this;
    setImage(url: string): this;
    setDescription(description: string): this;
    setLocale(locale: string): this;
    setSiteName(siteName: string): this;
}

export declare enum MetaOpenGraphAge { newborn = "newborn", infant = "infant", toddler = "toddler", kids = "kids", adult = "adult" }
export declare enum MetaOpenGraphAvailability { inStock = "in stock", outOfStock = "out of stock", preorder = "preorder", backorder = "backorder", discontinued = "discontinued", pending = "pending" }
export declare enum MetaOpenGraphCondition { new = "new", used = "used", refurbished = "refurbished" }
export declare enum MetaOpenGraphGender { female = "female", male = "male", unisex = "unisex" }

/** Common OG tags. */
export declare enum MetaOpenGraphTag {
    title = "og:title",
    type = "og:type",
    url = "og:url",
    image = "og:image",
    description = "og:description",
    locale = "og:locale",
    siteName = "og:site_name",
    imageUrl = "og:image:url",
    imageSecureUrl = "og:image:secure_url",
    imageType = "og:image:type",
    imageWidth = "og:image:width",
    imageHeight = "og:image:height",
    articlePublishedTime = "article:published_time",
    articleModifiedTime = "article:modified_time",
    productPriceAmount = "product:price:amount",
    productPriceCurrency = "product:price:currency"
}

export declare enum MetaOpenGraphType {
    website = "website",
    article = "article",
    video = "video.other",
    videoTvShow = "video.tv_show",
    videoEpisode = "video.episode",
    videoMovie = "video.movie",
    musicAlbum = "music.album",
    musicPlaylist = "music.playlist",
    musicSong = "music.song",
    product = "product",
    profile = "profile",
    book = "book"
}

export declare enum MetaRobots {
    indexFollow = "index, follow",
    noIndexFollow = "noindex, follow",
    indexNoFollow = "index, nofollow",
    noIndexNoFollow = "noindex, nofollow",
    noArchive = "noarchive",
    noSnippet = "nosnippet",
    noImageIndex = "noimageindex",
    noTranslate = "notranslate",
    none = "none"
}

/** Static SEO manager singleton. */
export declare class MetaStatic {
    static getItem(): Meta;
    static getOg(): MetaOg;
    static getTwitter(): MetaTwitter;
    static getTitle(): string;
    static getKeywords(): string;
    static getDescription(): string;
    static getImage(): string;
    static getCanonical(): string;
    static getRobots(): MetaRobots;
    static getAuthor(): string;
    static getSiteName(): string;
    static getLocale(): string;
    static setTitle(title: string): typeof MetaStatic;
    static setKeywords(keywords: string | string[]): typeof MetaStatic;
    static setDescription(description: string): typeof MetaStatic;
    static setImage(image: string): typeof MetaStatic;
    static setCanonical(canonical: string): typeof MetaStatic;
    static setRobots(robots: MetaRobots): typeof MetaStatic;
    static setAuthor(author: string): typeof MetaStatic;
    static setSiteName(siteName: string): typeof MetaStatic;
    static setLocale(locale: string): typeof MetaStatic;
    static setSuffix(suffix?: string): typeof MetaStatic;
    static html(): string;
    static htmlTitle(): string;
}

export declare enum MetaTag {
    title = "title",
    description = "description",
    keywords = "keywords",
    canonical = "canonical",
    robots = "robots",
    author = "author"
}

/** Twitter Card manager. */
export declare class MetaTwitter {
    getCard(): MetaTwitterCard;
    getSite(): string;
    getCreator(): string;
    getUrl(): string;
    getTitle(): string;
    getDescription(): string;
    getImage(): string;
    setCard(card: MetaTwitterCard): this;
    setSite(site: string): this;
    setCreator(creator: string): this;
    setUrl(url: string): this;
    setTitle(title: string): this;
    setDescription(description: string): this;
    setImage(image: string): this;
}

export declare enum MetaTwitterCard {
    summary = "summary",
    summaryLargeImage = "summary_large_image",
    app = "app",
    player = "player"
}

/** Twitter Card tags. */
export declare enum MetaTwitterTag {
    card = "twitter:card",
    site = "twitter:site",
    creator = "twitter:creator",
    url = "twitter:url",
    title = "twitter:title",
    description = "twitter:description",
    image = "twitter:image",
    player = "twitter:player",
    playerWidth = "twitter:player:width",
    playerHeight = "twitter:player:height"
}

export declare type NormalOrArray<T = NumberOrString> = T | T[];
export declare type NormalOrPromise<T> = T | Promise<T>;
export declare type NumberOrString = number | string;
export declare type NumberOrStringOrBoolean = number | string | boolean;
export declare type NumberOrStringOrDate = NumberOrString | Date;
export declare type ObjectItem<T = any> = Record<string, T>;
export declare type ObjectOrArray<T = any> = T[] | ObjectItem<T>;

/** Random integer. */
export declare function random(min: number, max: number): number;

/** Remove prefix from string. */
export declare function removeCommonPrefix(mainStr: string, prefix: string): string;

export declare const replaceComponentName: (text: string | undefined, name: string, componentName: string) => string | undefined;

/** Recursive object merge. */
export declare function replaceRecursive<I>(array: ObjectItem<I>, replacement?: ObjectOrArray<I>, isMerge?: boolean): ObjectItem<I>;

/** Template replacement. */
export declare function replaceTemplate(value: string, replaces: Record<string, string | FunctionReturn<string>>): string;

/** Resize image by constraints. */
export declare function resizeImageByMax(image: HTMLImageElement | string, maxSize: number, type?: ResizeImageByMaxType, typeData?: string): string | undefined;

declare type ResizeImageByMaxType = 'auto' | 'width' | 'height';

/** Pausable/resumable timer. */
export declare class ResumableTimer {
    constructor(callback: FunctionVoid, delay?: number, blockStart?: boolean);
    resume(): this;
    pause(): this;
    reset(): this;
    clear(): this;
}

/** Scrollbar width measurement. */
export declare class ScrollbarWidth {
    static is(): Promise<boolean>;
    static get(): Promise<number>;
    static getStorage(): DataStorage<number>;
    static getCalculate(): boolean;
}

export declare type SearchCache<T extends SearchItem> = SearchCacheItem<T>[];
export declare type SearchCacheItem<T extends SearchItem> = { item: T; value: string; };
export declare type SearchColumn<T extends SearchItem> = { [K in keyof T]-?: NonNullable<T[K]> extends object ? K | SearchColumnPath<K, keyof NonNullable<T[K]>> : K; }[keyof T];
export declare type SearchColumnPath<K, P> = K extends string ? P extends string ? `${K}.${P}` : never : never;
export declare type SearchColumns<T extends SearchItem> = (SearchColumn<T> & string)[];
export declare type SearchFormatCapitalize<K extends string> = K extends `${infer First}.${infer Rest}` ? `${First}${Capitalize<SearchFormatCapitalize<Rest>>}` : K;
export declare type SearchFormatItem<T extends SearchItem, KT extends string[]> = { [K in keyof T | SearchFormatKey<KT[number]>]: K extends keyof T ? T[K] : string; } & { searchActive?: boolean; };
export declare type SearchFormatKey<K> = K extends string ? `${SearchFormatCapitalize<K>}Search` : never;
export declare type SearchFormatList<T extends SearchItem, K extends string[]> = SearchFormatItem<T, K>[];
export declare type SearchItem = Record<string, any>;

/** Searchable list manager. */
export declare class SearchList<T extends SearchItem, K extends SearchColumns<T>> {
    constructor(list: SearchListValue<T>, columns?: K, value?: string, options?: SearchOptions);
    getData(): SearchListData<T, K>;
    getList(): SearchListValue<T>;
    getColumns(): K | undefined;
    getItem(): SearchListItem;
    getValue(): string | undefined;
    getOptions(): SearchListOptions;
    setList(list: SearchListValue<T>): this;
    setColumns(columns?: K): this;
    setValue(value?: string): this;
    setOptions(options: SearchOptions): this;
    to(): SearchFormatList<T, K>;
}

/** Internal search data processor. */
export declare class SearchListData<T extends SearchItem, K extends SearchColumns<T>> {
    constructor(list: SearchListValue<T>, columns: K | undefined, item: SearchListItem, options: SearchListOptions);
    is(): this is this & { list: T[]; columns: string[]; };
    isList(): this is this & { list: T[]; };
    getList(): SearchListValue<T>;
    getColumns(): K | undefined;
    setList(list: SearchListValue<T>): this;
    setColumns(columns?: SearchColumns<T>): this;
    findCacheItem(item: T): SearchCacheItem<T> | undefined;
    forEach(callback: (item: SearchCacheItem<T>['item'], value: SearchCacheItem<T>['value']) => SearchFormatItem<T, K> | undefined): SearchFormatList<T, K>;
    toFormatItem(item: T, selection: boolean): SearchFormatItem<T, K>;
}

/** Individual search item state. */
export declare class SearchListItem {
    constructor(value: string | undefined, options: SearchListOptions);
    is(): this is this & { value: string; };
    isSearch(): boolean;
    get(): string;
    set(value?: string): this;
}

/** Logic for matching strings in search. */
export declare class SearchListMatcher {
    constructor(item: SearchListItem, options: SearchListOptions);
    is(): boolean;
    isSelection(value: SearchCacheItem<any>['value']): boolean;
    get(): RegExp | undefined;
    update(): void;
}

/** Search options manager. */
export declare class SearchListOptions {
    constructor(options?: SearchOptions | undefined);
    getOptions(): SearchOptions;
    getLimit(): number;
    getReturnEverything(): boolean;
    getDelay(): number;
    getFindExactMatch(): boolean;
    getClassName(): string;
    setOptions(options: SearchOptions): this;
}

export declare type SearchListValue<T extends SearchItem> = T[] | undefined;
export declare type SearchOptions = {
    limit?: number;
    returnEverything?: boolean;
    delay?: number;
    findExactMatch?: boolean;
    classSearchName?: string;
};

/** Seconds to HH:MM:SS string. */
export declare function secondToTime(second: number | string | undefined, hasHour?: boolean): string;

/** Context-isolated server storage for SSR. */
export declare class ServerStorage {
    static init(listener: () => Record<string, any> | undefined): typeof ServerStorage;
    static reset(): void;
    static has(key: string): boolean;
    static get<T = any>(key: string, defaultValue?: () => T, hydration?: boolean): T;
    static set<T = any>(key: string, value: () => T, hydration?: boolean): T;
    static setErrorStatus(hide: boolean): void;
    static remove(key: string): void;
    static toString(): string;
}

/** Set element property by index. */
export declare function setElementItem<E extends ElementOrWindow, K extends keyof E, V extends E[K] = E[K]>(element: ElementOrString<E>, index: K, value: V | Record<string, V>): E | undefined;

/** Dynamic value state modifier for multiple/maxlength support. */
export declare function setValues<T>(selected: T | T[] | undefined, value: any, { multiple, maxlength, alwaysChange, notEmpty }: {
    multiple?: boolean | undefined;
    maxlength?: number | undefined;
    alwaysChange?: boolean | undefined;
    notEmpty?: boolean | undefined;
}): T | T[] | undefined;

/** Delay execution. */
export declare function sleep(ms: number): Promise<void>;

/** Copy object properties into another by start index. */
export declare function splice<I>(array: ObjectItem<I>, replacement?: ObjectItem<I> | I, indexStart?: string): ObjectItem<I>;

/** Callback registry for storage changes. */
export declare class StorageCallback<T = any, Callback = (value: T) => void | Promise<void>> {
    constructor(name: string, group?: string);
    static getInstance<T>(name: string, group?: string): StorageCallback<T, (value: T) => void | Promise<void>>;
    isLoading(): boolean;
    getName(): string;
    getLoading(): boolean;
    addCallback(callback: Callback, isOnce?: boolean): this;
    removeCallback(callback: Callback): this;
    preparation(): this;
    run(value: T): Promise<this>;
}

/** Repeat string count times. */
export declare function strFill(value: string, count: number): string;

/** Split string with limit (last element contains remainder). */
export declare function strSplit(value: number | string, separator: string, limit?: number): string[];

/** Force value to array. */
export declare function toArray<T>(value: T): T extends any[] ? T : [T];

/** String to camelCase. */
export declare function toCamelCase(value: string): string;

/** String to CamelCase. */
export declare function toCamelCaseFirst(value: string): string;

/** Convert to Date object. */
export declare function toDate<T extends Date | number | string>(value?: T): (T & Date) | Date;

/** String to kebab-case. */
export declare function toKebabCase(value: string): string;

/** Parse string/number to float. SSR safe. */
export declare function toNumber(value?: NumberOrString): number;

/** Parse number with max constraint. */
export declare function toNumberByMax(value: string | number, max?: string | number, formatting?: boolean, language?: string): string | number;

export declare function toPercent(maxValue: number, value: number): number;
export declare function toPercentBy100(maxValue: number, value: number): number;

/** Value to string. */
declare function toString_2<T>(value: T): string;
export { toString_2 as toString }

/** Type transformation (detects boolean, number, null, object, function). */
export declare function transformation(value: any, isFunction?: boolean): any;

/** Translation manager. */
export declare class Translate {
    static get(name: string, replacement?: string[] | Record<string, string | number>): Promise<string>;
    static getItem(): TranslateInstance;
    static getSync(name: string, first?: boolean, replacement?: string[] | Record<string, string | number>): string;
    static getList<T extends TranslateCode[]>(names: T): Promise<TranslateList<T>>;
    static getListSync<T extends TranslateCode[]>(names: T, first?: boolean): TranslateList<T>;
    static add(names: string | string[]): Promise<void>;
    static addSync(data: Record<string, string>): void;
    static addNormalOrSync(data: Record<string, string>): Promise<void>;
    static addSyncByLocation(data: Record<string, Record<string, string>>): void;
    static addSyncByFile(data: TranslateDataFile): void;
    static setUrl(url: string): void;
    static setPropsName(name: string): void;
    static setReadApi(value: boolean): void;
    static setConfig(config: TranslateConfig): void;
}

export declare const TRANSLATE_GLOBAL_PREFIX = "global";
export declare const TRANSLATE_TIME_OUT = 160;

export declare type TranslateCode = string | string[];
export declare type TranslateConfig = { url?: string; propsName?: string; readApi?: boolean; };
export declare type TranslateDataFile = Record<string, TranslateDataFileItem>;
export declare type TranslateDataFileItem = () => Promise<TranslateDataFileList>;
export declare type TranslateDataFileList = Record<string, string>;

/** Localized translation file manager. */
export declare class TranslateFile {
    constructor(data?: TranslateDataFile, language?: string | (() => string), location?: string | (() => string));
    isFile(): boolean;
    getLocation(): string;
    getLanguage(): string;
    getList(): Promise<TranslateDataFileList | undefined>;
    add(data: TranslateDataFile): void;
}

/** Translation context instance. */
export declare class TranslateInstance {
    constructor(url?: string, propsName?: string, files?: TranslateFile);
    get(name: string, replacement?: string[] | Record<string, string | number>): Promise<string>;
    getSync(name: string, first?: boolean, replacement?: string[] | Record<string, string | number>): string;
    getList<T extends TranslateCode[]>(names: T): Promise<TranslateList<T>>;
    getListSync<T extends TranslateCode[]>(names: T, first?: boolean): TranslateList<T>;
    add(names: string | string[]): Promise<void>;
    addSync(data: Record<string, string>): void;
    addNormalOrSync(data: Record<string, string>): Promise<void>;
    addSyncByLocation(data: Record<string, Record<string, string>>): void;
    addSyncByFile(data: TranslateDataFile): void;
    setUrl(url: string): this;
    setPropsName(name: string): this;
    setReadApi(value: boolean): this;
}

export declare type TranslateItemOrList<T extends TranslateCode> = T extends string[] ? TranslateList<T> : string;
export declare type TranslateList<T extends TranslateCode[]> = { [K in T[number] as K extends readonly string[] ? K[0] : K]: string; };

/** Binary data to base64. */
export declare function uint8ArrayToBase64(bytes: Uint8Array): string;

export declare type Undefined = undefined | null;

/** Remove array duplicates. */
export declare function uniqueArray<T>(value: T[]): T[];

/** Write text to clipboard. */
export declare function writeClipboardData(text: string): Promise<void>;