next-box 2.5.91 → 2.5.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/app/api/extension-api.d.ts +0 -14
- package/app/api/index.d.ts +0 -5
- package/app/api/static-api.d.ts +0 -8
- package/app/api/storage-api.d.ts +0 -111
- package/app/api/types/base.d.ts +0 -22
- package/app/api/user-api.d.ts +0 -107
- package/app/classes/api.d.ts +0 -19
- package/app/classes/event-emitter.d.ts +0 -9
- package/app/classes/file-engine.d.ts +0 -33
- package/app/classes/index.d.ts +0 -3
- package/app/components/index.d.ts +0 -1
- package/app/components/nb-frame.d.ts +0 -22
- package/app/helpers/browser-navigate.d.ts +0 -2
- package/app/helpers/default-state.d.ts +0 -2
- package/app/helpers/dirname.d.ts +0 -1
- package/app/helpers/file-info.d.ts +0 -2
- package/app/helpers/get-config-data.d.ts +0 -10
- package/app/helpers/get-global.d.ts +0 -3
- package/app/helpers/get-lang.d.ts +0 -2
- package/app/helpers/index.d.ts +0 -17
- package/app/helpers/is-browser.d.ts +0 -1
- package/app/helpers/is-object.d.ts +0 -1
- package/app/helpers/is-string.d.ts +0 -1
- package/app/helpers/notificate-request-error.d.ts +0 -1
- package/app/helpers/parent-url.d.ts +0 -1
- package/app/helpers/path-join.d.ts +0 -1
- package/app/helpers/safe-json.d.ts +0 -1
- package/app/helpers/send-request.d.ts +0 -12
- package/app/helpers/translite.d.ts +0 -1
- package/app/helpers/transport-props.d.ts +0 -2
- package/app/helpers/uuid.d.ts +0 -1
- package/app/index.d.ts +0 -11
- package/app/shim/custom-element.d.ts +0 -0
- package/app/shim/index.d.ts +0 -1
- package/app/transport/empty.d.ts +0 -7
- package/app/transport/index.d.ts +0 -2
- package/app/transport/interface.d.ts +0 -21
- package/app/transport/post-message.d.ts +0 -12
- package/app/transport/transport.d.ts +0 -53
- package/app/transport/websocket.d.ts +0 -14
- package/app/types/base.d.ts +0 -33
- package/app/types/config.d.ts +0 -30
- package/app/types/extension.d.ts +0 -41
- package/app/types/index.d.ts +0 -8
- package/app/types/setting.d.ts +0 -58
- package/app/types/state.d.ts +0 -42
- package/app/types/storage-element.d.ts +0 -66
- package/app/types/transport.d.ts +0 -110
- package/app/types/user.d.ts +0 -32
- package/index.d.ts +0 -9
- package/index.js +0 -1
- package/init.d.ts +0 -3
- package/nb-global.d.ts +0 -9
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Api } from '../classes';
|
|
2
|
-
import { Extension, ExtensionFileMode, ExtensionType } from '../types';
|
|
3
|
-
import { RequestBaseParams, ResponseItem } from './types/base';
|
|
4
|
-
export interface RequestExtensionListParams extends RequestBaseParams {
|
|
5
|
-
file_name_ext?: string;
|
|
6
|
-
search?: string;
|
|
7
|
-
uniq_key?: string;
|
|
8
|
-
type?: ExtensionType[];
|
|
9
|
-
file_mode?: ExtensionFileMode[];
|
|
10
|
-
}
|
|
11
|
-
export declare class ExtensionApi extends Api {
|
|
12
|
-
list(): Promise<any>;
|
|
13
|
-
getByUniqKey(uniqKey: string): Promise<ResponseItem<Extension>>;
|
|
14
|
-
}
|
package/app/api/index.d.ts
DELETED
package/app/api/static-api.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Api } from '../classes/api';
|
|
2
|
-
import { StaticFile } from '../types/base';
|
|
3
|
-
export declare class StaticApi extends Api {
|
|
4
|
-
upload(file: Blob, name: string, filePath?: string): Promise<StaticFile>;
|
|
5
|
-
get(path: string): Promise<Response>;
|
|
6
|
-
delete(path: string): Promise<Response>;
|
|
7
|
-
makeApiPath(...arg: string[]): URL;
|
|
8
|
-
}
|
package/app/api/storage-api.d.ts
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { Api } from '../classes/api';
|
|
2
|
-
import { StorageElement, StorageElementType } from '../types/storage-element';
|
|
3
|
-
import { RequestBaseParams, ResponseItem, ResponseList } from './types/base';
|
|
4
|
-
import { RequestStatus } from '../types';
|
|
5
|
-
export interface StorageRequestListParams extends RequestBaseParams {
|
|
6
|
-
path?: string;
|
|
7
|
-
search?: string;
|
|
8
|
-
is_favorite?: boolean;
|
|
9
|
-
is_divided?: boolean;
|
|
10
|
-
divide_id?: number | null;
|
|
11
|
-
min_size?: number | null;
|
|
12
|
-
max_size?: number | null;
|
|
13
|
-
type?: StorageElementType;
|
|
14
|
-
file_name_ext?: string[];
|
|
15
|
-
with_meta?: boolean;
|
|
16
|
-
meta_search?: string;
|
|
17
|
-
without_content_work_dir?: boolean;
|
|
18
|
-
}
|
|
19
|
-
export interface MakePathOption {
|
|
20
|
-
cache?: boolean;
|
|
21
|
-
imagePreview?: boolean;
|
|
22
|
-
}
|
|
23
|
-
export interface LiveReloadCacheInterface {
|
|
24
|
-
status: RequestStatus;
|
|
25
|
-
requests: {
|
|
26
|
-
path?: string;
|
|
27
|
-
body: any;
|
|
28
|
-
}[];
|
|
29
|
-
}
|
|
30
|
-
export interface StorageCreateConfig {
|
|
31
|
-
is_work_dir?: boolean;
|
|
32
|
-
created_by_extension?: string;
|
|
33
|
-
}
|
|
34
|
-
export interface ReplaceOption {
|
|
35
|
-
extSavedStartStopPropagation?: boolean;
|
|
36
|
-
extSavedEndStopPropagation?: boolean;
|
|
37
|
-
}
|
|
38
|
-
export declare class StorageApi extends Api {
|
|
39
|
-
/**
|
|
40
|
-
* Get list files
|
|
41
|
-
*/
|
|
42
|
-
list(params: StorageRequestListParams): Promise<ResponseList<StorageElement>>;
|
|
43
|
-
/**
|
|
44
|
-
* Get file model
|
|
45
|
-
*/
|
|
46
|
-
info(path: string): Promise<StorageElement>;
|
|
47
|
-
/**
|
|
48
|
-
* Create empty file
|
|
49
|
-
*/
|
|
50
|
-
create(name: string, path: string, type: 'dir' | 'file', config?: StorageCreateConfig): Promise<ResponseItem<StorageElement>>;
|
|
51
|
-
/**
|
|
52
|
-
* Delete file
|
|
53
|
-
*/
|
|
54
|
-
delete(path: string, hard?: boolean): Promise<any>;
|
|
55
|
-
/**
|
|
56
|
-
* Returns the full path to download the file
|
|
57
|
-
*/
|
|
58
|
-
makeDownloadPath(path?: string, options?: MakePathOption): string;
|
|
59
|
-
/**
|
|
60
|
-
* Returns the full path for the preview image
|
|
61
|
-
*/
|
|
62
|
-
makeImagePreview(path?: string, options?: MakePathOption): string;
|
|
63
|
-
/**
|
|
64
|
-
* Submit a file download request
|
|
65
|
-
*/
|
|
66
|
-
download(path?: string): Promise<Response>;
|
|
67
|
-
/**
|
|
68
|
-
* Submit a file change request
|
|
69
|
-
*/
|
|
70
|
-
replace(body: any, path?: string, options?: ReplaceOption): Promise<ResponseItem<StorageElement>>;
|
|
71
|
-
/**
|
|
72
|
-
* Synchronous writing to files
|
|
73
|
-
*/
|
|
74
|
-
liveReplace(body: any, path?: string, finalize?: () => void, options?: ReplaceOption): void;
|
|
75
|
-
/**
|
|
76
|
-
* Upload file
|
|
77
|
-
*/
|
|
78
|
-
upload(path: string, file: File): Promise<{
|
|
79
|
-
row: StorageElement;
|
|
80
|
-
}>;
|
|
81
|
-
/**
|
|
82
|
-
* Upload file by net url
|
|
83
|
-
*/
|
|
84
|
-
uploadNet(path: string, url: string, overwrite?: boolean): Promise<StorageElement>;
|
|
85
|
-
/**
|
|
86
|
-
* Create metadata extension
|
|
87
|
-
*/
|
|
88
|
-
createMeta(name?: string, path?: string, config?: StorageCreateConfig): Promise<{
|
|
89
|
-
row: StorageElement;
|
|
90
|
-
}>;
|
|
91
|
-
/**
|
|
92
|
-
* Reading metadata extension
|
|
93
|
-
*/
|
|
94
|
-
readMeta(path?: string): Promise<any>;
|
|
95
|
-
/**
|
|
96
|
-
* Saving metadata extension
|
|
97
|
-
*/
|
|
98
|
-
saveMeta(body: any, path?: string): Promise<any>;
|
|
99
|
-
/**
|
|
100
|
-
* Relative path (where the editor is called from)
|
|
101
|
-
*/
|
|
102
|
-
relativePath(path?: string, defaultPath?: string): string;
|
|
103
|
-
/**
|
|
104
|
-
* Returns a valid URL to the API (storage or fca)
|
|
105
|
-
*/
|
|
106
|
-
makeApiPath(...arg: string[]): URL;
|
|
107
|
-
/**
|
|
108
|
-
* Returns the name for the extension meta file (taken from extenstion.name.ru)
|
|
109
|
-
*/
|
|
110
|
-
get metaName(): string;
|
|
111
|
-
}
|
package/app/api/types/base.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { PermissionType } from '../../types/base';
|
|
2
|
-
export declare enum OrderDirection {
|
|
3
|
-
DEFAULT = "",
|
|
4
|
-
ASC = "asc",
|
|
5
|
-
DESC = "desc"
|
|
6
|
-
}
|
|
7
|
-
export interface RequestBaseParams {
|
|
8
|
-
offset?: number;
|
|
9
|
-
limit: number;
|
|
10
|
-
order_by?: string;
|
|
11
|
-
order_direction?: OrderDirection;
|
|
12
|
-
}
|
|
13
|
-
export interface ResponseItem<T> {
|
|
14
|
-
row: T;
|
|
15
|
-
}
|
|
16
|
-
export interface ResponseList<T> {
|
|
17
|
-
rows: T[];
|
|
18
|
-
total: number;
|
|
19
|
-
current?: {
|
|
20
|
-
access_mode: PermissionType;
|
|
21
|
-
};
|
|
22
|
-
}
|
package/app/api/user-api.d.ts
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { Api } from '../classes/api';
|
|
2
|
-
import { User } from '../types';
|
|
3
|
-
import { RequestBaseParams, ResponseItem, ResponseList } from './types/base';
|
|
4
|
-
export interface RequestUserListParams extends RequestBaseParams {
|
|
5
|
-
id?: number[];
|
|
6
|
-
first_name?: string;
|
|
7
|
-
middle_name?: string;
|
|
8
|
-
last_name?: string;
|
|
9
|
-
email?: string;
|
|
10
|
-
login?: string;
|
|
11
|
-
search_field?: string;
|
|
12
|
-
with_me?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export type UpdateUserParams = Pick<User, 'first_name' | 'last_name' | 'middle_name' | 'email' | 'home_path' | 'id' | 'role_id'>;
|
|
15
|
-
export type CreateUserParams = Pick<User, 'first_name' | 'last_name' | 'middle_name' | 'email' | 'home_path' | 'password' | 'role_id'>;
|
|
16
|
-
export interface UserToken {
|
|
17
|
-
id: number;
|
|
18
|
-
name: string;
|
|
19
|
-
expire_in: string;
|
|
20
|
-
create_date: string;
|
|
21
|
-
token?: string;
|
|
22
|
-
}
|
|
23
|
-
export interface UserSession {
|
|
24
|
-
create_date: string;
|
|
25
|
-
expire_in: string;
|
|
26
|
-
ip: string;
|
|
27
|
-
user_agent: string;
|
|
28
|
-
id: number;
|
|
29
|
-
}
|
|
30
|
-
export declare class UserApi extends Api {
|
|
31
|
-
/**
|
|
32
|
-
* Logout from the system
|
|
33
|
-
*/
|
|
34
|
-
logout(): Promise<void>;
|
|
35
|
-
/**
|
|
36
|
-
* Get user data by his id
|
|
37
|
-
*/
|
|
38
|
-
get(id: number): Promise<User>;
|
|
39
|
-
/**
|
|
40
|
-
* List users
|
|
41
|
-
*/
|
|
42
|
-
list(params: RequestUserListParams): Promise<ResponseList<User>>;
|
|
43
|
-
/**
|
|
44
|
-
* Return deleted user
|
|
45
|
-
*/
|
|
46
|
-
restore(id: number): Promise<void>;
|
|
47
|
-
/**
|
|
48
|
-
* Delete user
|
|
49
|
-
*/
|
|
50
|
-
delete(id: number, params?: {
|
|
51
|
-
hard: boolean;
|
|
52
|
-
}): Promise<void>;
|
|
53
|
-
/**
|
|
54
|
-
* Update user details
|
|
55
|
-
*/
|
|
56
|
-
update(data: UpdateUserParams): Promise<ResponseItem<User>>;
|
|
57
|
-
/**
|
|
58
|
-
* Create a new user
|
|
59
|
-
*/
|
|
60
|
-
create(data: CreateUserParams): Promise<ResponseItem<User>>;
|
|
61
|
-
/**
|
|
62
|
-
* Create an API token
|
|
63
|
-
*/
|
|
64
|
-
createToken(data: {
|
|
65
|
-
name: string;
|
|
66
|
-
expire_in: string | null;
|
|
67
|
-
}): Promise<UserToken>;
|
|
68
|
-
/**
|
|
69
|
-
* Get list of users
|
|
70
|
-
*/
|
|
71
|
-
listToken(params: RequestBaseParams): Promise<ResponseList<UserToken>>;
|
|
72
|
-
/**
|
|
73
|
-
* Delete token
|
|
74
|
-
*/
|
|
75
|
-
deleteToken(id: number): Promise<void>;
|
|
76
|
-
/**
|
|
77
|
-
* Change password
|
|
78
|
-
*/
|
|
79
|
-
changePassword(data: {
|
|
80
|
-
new_password: string;
|
|
81
|
-
old_password: string;
|
|
82
|
-
}): Promise<{
|
|
83
|
-
success: boolean;
|
|
84
|
-
}>;
|
|
85
|
-
/**
|
|
86
|
-
* Get information about yourself
|
|
87
|
-
*/
|
|
88
|
-
me(): Promise<ResponseItem<User>>;
|
|
89
|
-
/**
|
|
90
|
-
* Upload avatar
|
|
91
|
-
*/
|
|
92
|
-
meUploadAvatar(file: Blob, fileName: string): Promise<{
|
|
93
|
-
file_path: string;
|
|
94
|
-
}>;
|
|
95
|
-
/**
|
|
96
|
-
* Delete avatar
|
|
97
|
-
*/
|
|
98
|
-
meDeleteAvatar(): Promise<void>;
|
|
99
|
-
/**
|
|
100
|
-
* Get a list of active sessions
|
|
101
|
-
*/
|
|
102
|
-
meListSession(params: RequestBaseParams): Promise<ResponseList<UserSession>>;
|
|
103
|
-
/**
|
|
104
|
-
* Delete session by id or all
|
|
105
|
-
*/
|
|
106
|
-
meDeleteSession(id?: number): Promise<void>;
|
|
107
|
-
}
|
package/app/classes/api.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { AppState } from '../types/state';
|
|
2
|
-
export declare class Api {
|
|
3
|
-
state: AppState;
|
|
4
|
-
constructor(state?: AppState);
|
|
5
|
-
rest: {
|
|
6
|
-
get: (path: string, params?: Record<string, any>, headers?: Record<string, string>) => Promise<any>;
|
|
7
|
-
post: (path: string, body?: BodyInit | null, headers?: Record<string, string>) => Promise<any>;
|
|
8
|
-
put: (path: string, body?: BodyInit | null, headers?: Record<string, string>) => Promise<any>;
|
|
9
|
-
delete: (path: string, params?: Record<string, any>, headers?: Record<string, string>) => Promise<any>;
|
|
10
|
-
};
|
|
11
|
-
changeState(state: AppState): void;
|
|
12
|
-
makeSearchParams(params?: Record<string, any>): string;
|
|
13
|
-
makeHeaders(headers?: Record<string, string>): Record<string, string>;
|
|
14
|
-
responseJSON(response: Response): Promise<any | Response>;
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated
|
|
17
|
-
*/
|
|
18
|
-
makeApiPath(...arg: string[]): URL;
|
|
19
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export type EventHandler = (...args: any) => void;
|
|
2
|
-
export declare class EventEmitter {
|
|
3
|
-
_handlers: Map<string, Set<EventHandler>>;
|
|
4
|
-
_globalHandlers: Set<EventHandler>;
|
|
5
|
-
listen(handler: EventHandler): void;
|
|
6
|
-
on(event: string, handler: EventHandler): void;
|
|
7
|
-
off(event: string, handler: EventHandler): void;
|
|
8
|
-
emit(event: string, ...args: any): void;
|
|
9
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { ResponseItem, StorageCreateConfig } from '../api';
|
|
2
|
-
import { AppState, StorageElement } from '../types';
|
|
3
|
-
import { Api } from './api';
|
|
4
|
-
declare const VERSION: unique symbol;
|
|
5
|
-
declare const CONFIG: unique symbol;
|
|
6
|
-
declare const API: unique symbol;
|
|
7
|
-
declare const UPGRADE: unique symbol;
|
|
8
|
-
export type MigrateHandler = (data: any) => any;
|
|
9
|
-
export interface FileEngineConfig {
|
|
10
|
-
name?: string;
|
|
11
|
-
path?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare class FileEngine<T> extends Api {
|
|
14
|
-
private [API]?;
|
|
15
|
-
private [CONFIG]?;
|
|
16
|
-
private [VERSION];
|
|
17
|
-
private [UPGRADE];
|
|
18
|
-
constructor(version: number, config?: FileEngineConfig, state?: AppState);
|
|
19
|
-
get name(): string;
|
|
20
|
-
get path(): string;
|
|
21
|
-
get fullName(): string;
|
|
22
|
-
get version(): number;
|
|
23
|
-
changeState(state: AppState): void;
|
|
24
|
-
migration(version: number, upgrade: MigrateHandler): void;
|
|
25
|
-
info(): Promise<StorageElement>;
|
|
26
|
-
download(): Promise<T>;
|
|
27
|
-
create(body: T, config?: StorageCreateConfig): Promise<ResponseItem<StorageElement>>;
|
|
28
|
-
delete(hard?: boolean): Promise<null>;
|
|
29
|
-
replace(body: T): Promise<ResponseItem<StorageElement>>;
|
|
30
|
-
liveReplace(body: any, finalize?: () => void): void;
|
|
31
|
-
private runMigrate;
|
|
32
|
-
}
|
|
33
|
-
export {};
|
package/app/classes/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './nb-frame';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { EventHandler } from '../classes';
|
|
2
|
-
import { NBTransport, TransportParams } from '../transport';
|
|
3
|
-
import { Extension, StorageRouteData, TransportEvent, TransportPayload, TransportPayloadNavigate, User, ViewState } from '../types';
|
|
4
|
-
export declare const defineNbFrameComponent: () => void;
|
|
5
|
-
export interface NbFrameComponent extends HTMLElement {
|
|
6
|
-
apiPrefix: string;
|
|
7
|
-
origin: string;
|
|
8
|
-
version: number;
|
|
9
|
-
view: ViewState;
|
|
10
|
-
debug: boolean;
|
|
11
|
-
uuid: string;
|
|
12
|
-
run(): NBTransport;
|
|
13
|
-
send(event: TransportEvent, payload?: TransportPayload): void;
|
|
14
|
-
listen(handler: EventHandler): void;
|
|
15
|
-
off(event: TransportEvent, handler: EventHandler): void;
|
|
16
|
-
on(event: TransportEvent, handler: EventHandler): void;
|
|
17
|
-
set extensionModel(model: Pick<Extension, 'id' | 'name' | 'type' | 'settings' | 'file' | 'work_dir' | 'app' | 'devlocal' | 'path'>);
|
|
18
|
-
set transportParams(params: TransportParams);
|
|
19
|
-
set routeData(routeData: StorageRouteData);
|
|
20
|
-
set user(user: User);
|
|
21
|
-
set nvigationState(state: TransportPayloadNavigate);
|
|
22
|
-
}
|
package/app/helpers/dirname.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function dirname(path: string): string;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ExtensionType, Lang } from '../types';
|
|
2
|
-
import { AppConfig } from '../types/config';
|
|
3
|
-
export interface ConfigData {
|
|
4
|
-
type: ExtensionType;
|
|
5
|
-
index: string;
|
|
6
|
-
icon: string;
|
|
7
|
-
pictogram: string;
|
|
8
|
-
name: Lang;
|
|
9
|
-
}
|
|
10
|
-
export declare function getConfigData(config: AppConfig): ConfigData;
|
package/app/helpers/index.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export * from './dirname';
|
|
2
|
-
export * from './file-info';
|
|
3
|
-
export * from './get-lang';
|
|
4
|
-
export * from './parent-url';
|
|
5
|
-
export * from './path-join';
|
|
6
|
-
export * from './send-request';
|
|
7
|
-
export * from './translite';
|
|
8
|
-
export * from './get-global';
|
|
9
|
-
export * from './is-browser';
|
|
10
|
-
export * from './is-object';
|
|
11
|
-
export * from './is-string';
|
|
12
|
-
export * from './notificate-request-error';
|
|
13
|
-
export * from './safe-json';
|
|
14
|
-
export * from './get-config-data';
|
|
15
|
-
export * from './transport-props';
|
|
16
|
-
export * from './browser-navigate';
|
|
17
|
-
export * from './default-state';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isBrowser(): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isObject(obj: any): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isString(value: any): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function notificateRequestError(status: number, message: string, code?: string): void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function parentURL(): URL;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function pathJoin(...args: string[]): any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function safeJson<T>(value: string, defaultValue?: T): any;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @deprecated
|
|
3
|
-
*/
|
|
4
|
-
export declare function sendRequest(input: string | URL, init?: RequestInit): Promise<Response>;
|
|
5
|
-
export declare function sendRequest2(method: 'GET' | 'POST' | 'PUT' | 'DELETE', path: string, options: {
|
|
6
|
-
prefix?: string;
|
|
7
|
-
host?: string;
|
|
8
|
-
body?: BodyInit | null;
|
|
9
|
-
headers?: Record<string, string>;
|
|
10
|
-
params?: Record<string, any>;
|
|
11
|
-
cache?: 'no-cache';
|
|
12
|
-
}): Promise<Response>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function translite(value: string): string;
|
package/app/helpers/uuid.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function uuid(): string;
|
package/app/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from './classes/event-emitter';
|
|
2
|
-
import { AppState } from './types/state';
|
|
3
|
-
export declare class NextBox extends EventEmitter {
|
|
4
|
-
state?: AppState;
|
|
5
|
-
private userEventHandlers;
|
|
6
|
-
init(handler?: (state: AppState) => void): void;
|
|
7
|
-
destroy(): void;
|
|
8
|
-
prepareNavigate(): void;
|
|
9
|
-
private attachUserEvents;
|
|
10
|
-
private detachUserEvents;
|
|
11
|
-
}
|
|
File without changes
|
package/app/shim/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import './custom-element';
|
package/app/transport/empty.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TransportEvent } from '../types';
|
|
2
|
-
import { TransportEngineInterface } from './interface';
|
|
3
|
-
export declare class TransportEmpty implements TransportEngineInterface {
|
|
4
|
-
send(event: TransportEvent, payload?: any): void;
|
|
5
|
-
subscribe(handler: (event: TransportEvent, ppayload: any, uuid?: string) => void): void;
|
|
6
|
-
destroy(): void;
|
|
7
|
-
}
|
package/app/transport/index.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { TransportEvent, TransportPayload } from '../types/transport';
|
|
2
|
-
import { EngineType } from './transport';
|
|
3
|
-
export type TransportSubscribeHandler = (event: TransportEvent, ppayload: TransportPayload, uuid?: string, instanceUid?: string) => void;
|
|
4
|
-
export interface TransportEngineInterface {
|
|
5
|
-
send(event: TransportEvent | string, payload?: TransportPayload, uuid?: string, instanceUid?: string): void;
|
|
6
|
-
subscribe(handler: TransportSubscribeHandler): void;
|
|
7
|
-
destroy(): void;
|
|
8
|
-
}
|
|
9
|
-
export interface TransportParams {
|
|
10
|
-
version?: number;
|
|
11
|
-
uuid?: string;
|
|
12
|
-
engine?: EngineType;
|
|
13
|
-
path?: string;
|
|
14
|
-
parent?: WindowProxy | null;
|
|
15
|
-
host?: string;
|
|
16
|
-
port?: number;
|
|
17
|
-
debug?: boolean;
|
|
18
|
-
}
|
|
19
|
-
export interface TransportParentHandlersInterface {
|
|
20
|
-
updateToken?: () => Promise<any>;
|
|
21
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { TransportEvent } from '../types/transport';
|
|
2
|
-
import { TransportEngineInterface, TransportParams, TransportSubscribeHandler } from './interface';
|
|
3
|
-
export declare class TransportPostMessage implements TransportEngineInterface {
|
|
4
|
-
private handler?;
|
|
5
|
-
private _parems?;
|
|
6
|
-
private get parent();
|
|
7
|
-
constructor(params?: TransportParams);
|
|
8
|
-
private listenHandler;
|
|
9
|
-
send(event: TransportEvent | string, payload?: any, uuid?: string, instanceUid?: string): void;
|
|
10
|
-
subscribe(handler: TransportSubscribeHandler): void;
|
|
11
|
-
destroy(): void;
|
|
12
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { CallNameEvent, TransportCall, TransportEvent, TransportNavigationTarget, TransportPayload, TransportPayloadConfirm, TransportPayloadContextItem, TransportPayloadContextTab, TransportPayloadModalFilesSelect, TransportPayloadNavigate, TransportPayloadSaved, TransportPayloadSpinner, TransportPayloadToast } from '../types/transport';
|
|
2
|
-
import { EventEmitter } from '../classes/event-emitter';
|
|
3
|
-
import { TransportParams, TransportParentHandlersInterface } from './interface';
|
|
4
|
-
export declare enum EngineType {
|
|
5
|
-
WebSocket = "websocket",
|
|
6
|
-
PostMessage = "postmessage",
|
|
7
|
-
Empty = ""
|
|
8
|
-
}
|
|
9
|
-
export declare const TransportParentHandlers: TransportParentHandlersInterface;
|
|
10
|
-
export declare class NBTransport extends EventEmitter {
|
|
11
|
-
private engine;
|
|
12
|
-
private _params?;
|
|
13
|
-
private instanceUid;
|
|
14
|
-
engineType: EngineType;
|
|
15
|
-
constructor(params?: TransportParams);
|
|
16
|
-
call(name: CallNameEvent | any, ...params: any): Promise<TransportCall['params']>;
|
|
17
|
-
send(event: TransportEvent | string, payload?: TransportPayload, uuid?: string): void;
|
|
18
|
-
subscribe(): void;
|
|
19
|
-
destroy(): void;
|
|
20
|
-
/**
|
|
21
|
-
* Sends a transport call response indicating the version save is resolved.
|
|
22
|
-
*
|
|
23
|
-
* This function sends a response event with the provided transport call's ID, name,
|
|
24
|
-
* and a status indicating the call has been resolved.
|
|
25
|
-
*
|
|
26
|
-
* @param {Object} transportCall - The transport call object.
|
|
27
|
-
*/
|
|
28
|
-
forceSaveVersion({ id, name }: TransportCall): void;
|
|
29
|
-
/**
|
|
30
|
-
* Submit a content change message
|
|
31
|
-
* In the case when content is written before exiting the application or when writing large files
|
|
32
|
-
*/
|
|
33
|
-
changeContent(state: boolean): void;
|
|
34
|
-
/**
|
|
35
|
-
* Navigate parent window (only app extension)
|
|
36
|
-
*/
|
|
37
|
-
navigate(path: TransportPayloadNavigate['path'], queryParams?: TransportPayloadNavigate['queryParams'], target?: TransportNavigationTarget): void;
|
|
38
|
-
/**
|
|
39
|
-
* Send an event to close the editor
|
|
40
|
-
*/
|
|
41
|
-
close(): void;
|
|
42
|
-
rejectClose(): void;
|
|
43
|
-
showAccessPanel(): void;
|
|
44
|
-
openModalFilesSelect(state: TransportPayloadModalFilesSelect): void;
|
|
45
|
-
openModalConfirm(state: TransportPayloadConfirm): void;
|
|
46
|
-
toast(state: TransportPayloadToast): void;
|
|
47
|
-
savedStart(state: TransportPayloadSaved): void;
|
|
48
|
-
savedEnd(state: TransportPayloadSaved): void;
|
|
49
|
-
setSpinnerStatus(state: TransportPayloadSpinner): void;
|
|
50
|
-
setContext(state: TransportPayloadContextItem[]): void;
|
|
51
|
-
setTabs(state: TransportPayloadContextTab[]): void;
|
|
52
|
-
}
|
|
53
|
-
export declare const Transport: NBTransport;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { TransportEvent } from '../types/transport';
|
|
2
|
-
import { TransportEngineInterface, TransportSubscribeHandler } from './interface';
|
|
3
|
-
import { TransportParams } from './interface';
|
|
4
|
-
declare const SOCKET: unique symbol;
|
|
5
|
-
export declare class TransportWebsocket implements TransportEngineInterface {
|
|
6
|
-
_params?: TransportParams;
|
|
7
|
-
private [SOCKET]?;
|
|
8
|
-
constructor(params?: TransportParams);
|
|
9
|
-
init(params?: TransportParams): void;
|
|
10
|
-
send(event: TransportEvent | string, payload?: any, uuid?: string, instanceUid?: string): void;
|
|
11
|
-
subscribe(handler: TransportSubscribeHandler): void;
|
|
12
|
-
destroy(): void;
|
|
13
|
-
}
|
|
14
|
-
export {};
|
package/app/types/base.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export type Lang = {
|
|
2
|
-
[key: string]: string;
|
|
3
|
-
};
|
|
4
|
-
export interface FileInfo {
|
|
5
|
-
base: string;
|
|
6
|
-
dir: string;
|
|
7
|
-
ext: string;
|
|
8
|
-
name: string;
|
|
9
|
-
root: string;
|
|
10
|
-
}
|
|
11
|
-
export declare enum ExtensionType {
|
|
12
|
-
App = "app",
|
|
13
|
-
File = "file",
|
|
14
|
-
WorkDir = "work_dir"
|
|
15
|
-
}
|
|
16
|
-
export declare enum ExtensionFileMode {
|
|
17
|
-
Read = "read",
|
|
18
|
-
Write = "write",
|
|
19
|
-
ReadAndWrite = "read_and_write"
|
|
20
|
-
}
|
|
21
|
-
export interface StaticFile {
|
|
22
|
-
file_path: string;
|
|
23
|
-
}
|
|
24
|
-
export declare enum PermissionType {
|
|
25
|
-
CLOSE = "",
|
|
26
|
-
READ = "r",
|
|
27
|
-
WRITE = "rw"
|
|
28
|
-
}
|
|
29
|
-
export declare enum RequestStatus {
|
|
30
|
-
Wait = 0,
|
|
31
|
-
Done = 1,
|
|
32
|
-
Reject = 2
|
|
33
|
-
}
|
package/app/types/config.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ExtensionFileMode, ExtensionType, Lang } from './base';
|
|
2
|
-
export interface AppConfig {
|
|
3
|
-
version: string;
|
|
4
|
-
uniq_key: string;
|
|
5
|
-
icon: string;
|
|
6
|
-
name: Lang;
|
|
7
|
-
description: Lang;
|
|
8
|
-
type: ExtensionType;
|
|
9
|
-
file?: {
|
|
10
|
-
mode: ExtensionFileMode;
|
|
11
|
-
ext: string[];
|
|
12
|
-
index: string;
|
|
13
|
-
};
|
|
14
|
-
app?: {
|
|
15
|
-
menu: {
|
|
16
|
-
index: string;
|
|
17
|
-
icon: string;
|
|
18
|
-
label: {
|
|
19
|
-
[key: string]: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
work_dir?: {
|
|
24
|
-
index: string;
|
|
25
|
-
};
|
|
26
|
-
change_log?: {
|
|
27
|
-
version: string;
|
|
28
|
-
comment: Lang;
|
|
29
|
-
}[];
|
|
30
|
-
}
|
package/app/types/extension.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { EngineType } from '../transport';
|
|
2
|
-
import { ExtensionFileMode, ExtensionType, Lang } from './base';
|
|
3
|
-
import { Setting, SettingValue } from './setting';
|
|
4
|
-
export interface Extension {
|
|
5
|
-
id: number;
|
|
6
|
-
create_date: string;
|
|
7
|
-
update_date: string;
|
|
8
|
-
with_settings?: boolean;
|
|
9
|
-
name: Lang;
|
|
10
|
-
devlocal?: boolean;
|
|
11
|
-
dev_frame_params?: {
|
|
12
|
-
engine: EngineType;
|
|
13
|
-
host?: string;
|
|
14
|
-
port?: number;
|
|
15
|
-
};
|
|
16
|
-
version: string;
|
|
17
|
-
latest_repo_version?: string;
|
|
18
|
-
description: Lang;
|
|
19
|
-
uniq_key: string;
|
|
20
|
-
icon: string;
|
|
21
|
-
type: ExtensionType;
|
|
22
|
-
path: string;
|
|
23
|
-
file?: {
|
|
24
|
-
mode: ExtensionFileMode;
|
|
25
|
-
ext: string[];
|
|
26
|
-
default_ext?: string;
|
|
27
|
-
index: string;
|
|
28
|
-
};
|
|
29
|
-
app?: {
|
|
30
|
-
menu: {
|
|
31
|
-
index: string;
|
|
32
|
-
icon: string;
|
|
33
|
-
label: Lang;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
work_dir?: {
|
|
37
|
-
index: string;
|
|
38
|
-
};
|
|
39
|
-
settings?: SettingValue[];
|
|
40
|
-
settings_template?: Setting[];
|
|
41
|
-
}
|
package/app/types/index.d.ts
DELETED
package/app/types/setting.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { Lang } from './base';
|
|
2
|
-
export type SettingLang = string | Lang | null;
|
|
3
|
-
export declare enum SettingControlType {
|
|
4
|
-
Text = "text",
|
|
5
|
-
String = "string",
|
|
6
|
-
Number = "number",
|
|
7
|
-
CheckBox = "checkbox",
|
|
8
|
-
Select = "select",
|
|
9
|
-
RadioList = "radio_list",
|
|
10
|
-
ConnectionChoose = "connection_choose",
|
|
11
|
-
MultiConnectionChoose = "multi_connection_choose"
|
|
12
|
-
}
|
|
13
|
-
export interface Setting {
|
|
14
|
-
fields: SettingField[];
|
|
15
|
-
title?: SettingLang;
|
|
16
|
-
name?: string;
|
|
17
|
-
context?: string;
|
|
18
|
-
toggle_box?: boolean;
|
|
19
|
-
collapsed_box?: boolean;
|
|
20
|
-
activity_switch?: boolean;
|
|
21
|
-
}
|
|
22
|
-
export interface SettingVariant {
|
|
23
|
-
label?: SettingLang;
|
|
24
|
-
value: any;
|
|
25
|
-
}
|
|
26
|
-
export interface SettingField {
|
|
27
|
-
name: string;
|
|
28
|
-
value: any;
|
|
29
|
-
label?: SettingLang;
|
|
30
|
-
help?: SettingLang;
|
|
31
|
-
placeholder?: SettingLang;
|
|
32
|
-
view?: SettingFieldView;
|
|
33
|
-
disabled?: boolean;
|
|
34
|
-
control: {
|
|
35
|
-
type: SettingControlType;
|
|
36
|
-
filter?: Record<string, any>;
|
|
37
|
-
variants?: SettingVariant[];
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
export type SettingFieldView = SettingViewConnectionChoose | SettingViewSelect | any;
|
|
41
|
-
export interface SettingViewConnectionChoose {
|
|
42
|
-
id: number;
|
|
43
|
-
name: string;
|
|
44
|
-
owner_id: number;
|
|
45
|
-
}
|
|
46
|
-
export interface SettingViewSelect {
|
|
47
|
-
show_clear?: boolean;
|
|
48
|
-
}
|
|
49
|
-
export interface SettingValueField {
|
|
50
|
-
name: string;
|
|
51
|
-
value: any;
|
|
52
|
-
}
|
|
53
|
-
export interface SettingValue {
|
|
54
|
-
name: string;
|
|
55
|
-
context?: string;
|
|
56
|
-
fields: SettingValueField[];
|
|
57
|
-
activity_switch?: boolean;
|
|
58
|
-
}
|
package/app/types/state.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ExtensionType, FileInfo, Lang } from './base';
|
|
2
|
-
import { SettingValue } from './setting';
|
|
3
|
-
import { StorageRoot } from './storage-element';
|
|
4
|
-
import { TransportPayloadNavigate } from './transport';
|
|
5
|
-
import { User } from './user';
|
|
6
|
-
export declare enum ViewState {
|
|
7
|
-
view = "view",
|
|
8
|
-
edit = "edit"
|
|
9
|
-
}
|
|
10
|
-
export interface AppState {
|
|
11
|
-
extenstion: AppStateExtenstion;
|
|
12
|
-
api: AppStateApi;
|
|
13
|
-
user?: User;
|
|
14
|
-
debug: boolean;
|
|
15
|
-
view: ViewState;
|
|
16
|
-
storage: AppStateStorage;
|
|
17
|
-
initialNavigation?: TransportPayloadNavigate;
|
|
18
|
-
setting?: SettingValue[];
|
|
19
|
-
}
|
|
20
|
-
export interface AppStateExtenstion {
|
|
21
|
-
id: number;
|
|
22
|
-
name: Lang;
|
|
23
|
-
type: ExtensionType;
|
|
24
|
-
}
|
|
25
|
-
export interface AppStateApi {
|
|
26
|
-
host: string;
|
|
27
|
-
prefix: string;
|
|
28
|
-
headers: {
|
|
29
|
-
[key: string]: any;
|
|
30
|
-
};
|
|
31
|
-
query: {
|
|
32
|
-
[key: string]: any;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
export interface AppStateStorage {
|
|
36
|
-
root: StorageRoot;
|
|
37
|
-
rootID: number;
|
|
38
|
-
path: string;
|
|
39
|
-
info: FileInfo;
|
|
40
|
-
shareKey?: string;
|
|
41
|
-
zip_entry_path?: string;
|
|
42
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { PermissionType } from './base';
|
|
2
|
-
export declare enum StorageRoot {
|
|
3
|
-
my = "my",
|
|
4
|
-
fca = "fca",
|
|
5
|
-
divide = "divide",
|
|
6
|
-
share = "share",
|
|
7
|
-
favorite = "favorite",
|
|
8
|
-
trash = "trash"
|
|
9
|
-
}
|
|
10
|
-
export interface StorageElement {
|
|
11
|
-
id: string;
|
|
12
|
-
name: string;
|
|
13
|
-
size: number;
|
|
14
|
-
shared: boolean;
|
|
15
|
-
full_path: string;
|
|
16
|
-
path: string;
|
|
17
|
-
type: StorageElementType;
|
|
18
|
-
file_name_ext: string;
|
|
19
|
-
content_type: StorageElementContentType;
|
|
20
|
-
update_date: string;
|
|
21
|
-
create_date: string;
|
|
22
|
-
with_preview: boolean;
|
|
23
|
-
is_favorite: boolean;
|
|
24
|
-
owner_id: number;
|
|
25
|
-
version?: StorageElementVersion;
|
|
26
|
-
divide_id?: number;
|
|
27
|
-
access_mode?: PermissionType;
|
|
28
|
-
to_user_group_id?: number;
|
|
29
|
-
created_by_extension?: string;
|
|
30
|
-
}
|
|
31
|
-
export interface StorageElementVersion {
|
|
32
|
-
id: string;
|
|
33
|
-
name: string | null;
|
|
34
|
-
size: number;
|
|
35
|
-
create_date: string;
|
|
36
|
-
update_date: string;
|
|
37
|
-
}
|
|
38
|
-
export declare enum StorageElementType {
|
|
39
|
-
Dir = "dir",
|
|
40
|
-
File = "file",
|
|
41
|
-
WorkDir = "work_dir"
|
|
42
|
-
}
|
|
43
|
-
export declare enum StorageElementContentType {
|
|
44
|
-
Any = "any",
|
|
45
|
-
Dir = "dir",
|
|
46
|
-
Code = "code",
|
|
47
|
-
Image = "image",
|
|
48
|
-
Audio = "audio",
|
|
49
|
-
Video = "video",
|
|
50
|
-
Text = "text",
|
|
51
|
-
Doc = "doc",
|
|
52
|
-
Xls = "xls",
|
|
53
|
-
Ppt = "ppt"
|
|
54
|
-
}
|
|
55
|
-
export interface StorageRouteData {
|
|
56
|
-
path: string;
|
|
57
|
-
root: StorageRoot;
|
|
58
|
-
rootId: number;
|
|
59
|
-
divideDir?: string;
|
|
60
|
-
share_token?: string;
|
|
61
|
-
share_password?: string;
|
|
62
|
-
share_back?: boolean;
|
|
63
|
-
dash_back?: boolean;
|
|
64
|
-
access_mode?: PermissionType;
|
|
65
|
-
file_version_id?: string;
|
|
66
|
-
}
|
package/app/types/transport.d.ts
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { ReplaceOption } from '../api';
|
|
2
|
-
import { AppState } from './state';
|
|
3
|
-
import { StorageElementType, StorageRoot } from './storage-element';
|
|
4
|
-
export interface TransportData {
|
|
5
|
-
event: TransportEvent;
|
|
6
|
-
payload?: TransportPayload;
|
|
7
|
-
}
|
|
8
|
-
export declare enum TransportEvent {
|
|
9
|
-
Call = "call",
|
|
10
|
-
CallResponse = "call-response",
|
|
11
|
-
ExtInit = "ext-init",
|
|
12
|
-
ExtChangeContent = "ext-change-content",
|
|
13
|
-
ExtOpenModalFilesSelect = "ext-open-modal-files-select",
|
|
14
|
-
ExtShowConfirm = "ext-show-confirm",
|
|
15
|
-
ExtShowAccessPanel = "ext-show-access-panel",
|
|
16
|
-
ExtNavigateTo = "ext-navigate-to",
|
|
17
|
-
ExtRequestError = "ext-request-error",
|
|
18
|
-
ExtToast = "ext-toast",
|
|
19
|
-
ExtSpinner = "ext-spinner",
|
|
20
|
-
ExtContext = "ext-context",
|
|
21
|
-
ExtTabs = "ext-tabs",
|
|
22
|
-
ExtSavedStart = "ext-saved-start",
|
|
23
|
-
ExtSavedEnd = "ext-saved-end",
|
|
24
|
-
ExtSavedError = "ext-saved-error",
|
|
25
|
-
ExtClose = "ext-close",
|
|
26
|
-
ExtRejectClose = "ext-reject-close",
|
|
27
|
-
ExtUserInteraction = "ext-user-interaction",
|
|
28
|
-
AppReload = "ext-reload",
|
|
29
|
-
AppReady = "app-ready",
|
|
30
|
-
AppChangeState = "app-change-state",
|
|
31
|
-
AppSaveAndClose = "app-save-and-close",
|
|
32
|
-
AppFilesSelected = "app-files-selected",
|
|
33
|
-
AppConfirmAccept = "app-confirm-accept",
|
|
34
|
-
AppConfirmReject = "app-confirm-reject",
|
|
35
|
-
AppContextAction = "app-context-action",
|
|
36
|
-
AppTabAction = "app-tab-action",
|
|
37
|
-
AppChangeTheme = "app-change-theme"
|
|
38
|
-
}
|
|
39
|
-
export declare enum CallNameEvent {
|
|
40
|
-
Update = "update",
|
|
41
|
-
ForceSave = "force-save-version"
|
|
42
|
-
}
|
|
43
|
-
export type TransportPayload = AppState | TransportPayloadSelectedFiles | TransportPayloadModalFilesSelect | TransportPayloadConfirm | TransportPayloadNavigate | TransportPayloadToast | TransportPayloadSpinner | TransportPayloadContextItem[] | TransportPayloadContextTab[] | TransportCall | any;
|
|
44
|
-
export declare enum TransportNavigationTarget {
|
|
45
|
-
Parent = "_parent",
|
|
46
|
-
Self = "_self",
|
|
47
|
-
Cache = "_cache"
|
|
48
|
-
}
|
|
49
|
-
export declare enum TransportCallEvent {
|
|
50
|
-
Call = "call",
|
|
51
|
-
Resolve = "resolve",
|
|
52
|
-
Reject = "reject"
|
|
53
|
-
}
|
|
54
|
-
export interface TransportCall {
|
|
55
|
-
id: string;
|
|
56
|
-
name: CallNameEvent | any;
|
|
57
|
-
params: any[];
|
|
58
|
-
event: TransportCallEvent;
|
|
59
|
-
}
|
|
60
|
-
export interface TransportPayloadNavigate {
|
|
61
|
-
path: string;
|
|
62
|
-
queryParams?: Record<string, string | boolean | number | null>;
|
|
63
|
-
target?: TransportNavigationTarget;
|
|
64
|
-
}
|
|
65
|
-
export interface TransportPayloadConfirm {
|
|
66
|
-
header: string;
|
|
67
|
-
message: string;
|
|
68
|
-
acceptButtonLabel?: string;
|
|
69
|
-
rejectButtonLabel?: string;
|
|
70
|
-
}
|
|
71
|
-
export interface TransportPayloadModalFilesSelect {
|
|
72
|
-
multy?: boolean;
|
|
73
|
-
title?: string;
|
|
74
|
-
path?: string;
|
|
75
|
-
ext?: string[];
|
|
76
|
-
type?: StorageElementType;
|
|
77
|
-
}
|
|
78
|
-
export interface TransportPayloadSelectedFiles {
|
|
79
|
-
root: StorageRoot;
|
|
80
|
-
rootId?: number;
|
|
81
|
-
paths: string[];
|
|
82
|
-
}
|
|
83
|
-
export interface TransportPayloadToast {
|
|
84
|
-
severity: 'success' | 'info' | 'warn' | 'error';
|
|
85
|
-
title: string;
|
|
86
|
-
message?: string;
|
|
87
|
-
sticky?: boolean;
|
|
88
|
-
}
|
|
89
|
-
export interface TransportPayloadSpinner {
|
|
90
|
-
state: boolean;
|
|
91
|
-
size?: number;
|
|
92
|
-
color?: string;
|
|
93
|
-
}
|
|
94
|
-
export interface TransportPayloadContextItem {
|
|
95
|
-
icon?: string;
|
|
96
|
-
iconPath?: string;
|
|
97
|
-
label: string;
|
|
98
|
-
action: string | number;
|
|
99
|
-
}
|
|
100
|
-
export interface TransportPayloadContextTab {
|
|
101
|
-
label: string;
|
|
102
|
-
active?: boolean;
|
|
103
|
-
disabled?: boolean;
|
|
104
|
-
action: string | number;
|
|
105
|
-
}
|
|
106
|
-
export interface TransportPayloadSaved {
|
|
107
|
-
path: string;
|
|
108
|
-
status?: number;
|
|
109
|
-
options?: ReplaceOption;
|
|
110
|
-
}
|
package/app/types/user.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export declare enum UserStatus {
|
|
2
|
-
Registering = "registering",
|
|
3
|
-
Activated = "activated",
|
|
4
|
-
Blocked = "blocked",
|
|
5
|
-
BlockedByLicense = "blocked_by_license"
|
|
6
|
-
}
|
|
7
|
-
export declare enum UserType {
|
|
8
|
-
User = "user",
|
|
9
|
-
Guest = "guest"
|
|
10
|
-
}
|
|
11
|
-
export declare enum UserAuthType {
|
|
12
|
-
Native = "native",
|
|
13
|
-
Ldap = "ldap"
|
|
14
|
-
}
|
|
15
|
-
export interface User {
|
|
16
|
-
id: number;
|
|
17
|
-
create_date: string;
|
|
18
|
-
update_date: string;
|
|
19
|
-
last_login_date: string;
|
|
20
|
-
login: string;
|
|
21
|
-
password: string;
|
|
22
|
-
first_name: string;
|
|
23
|
-
middle_name: string;
|
|
24
|
-
last_name: string;
|
|
25
|
-
email: string;
|
|
26
|
-
auth_type: UserAuthType;
|
|
27
|
-
avatar_path: string;
|
|
28
|
-
home_path: string;
|
|
29
|
-
status: UserStatus;
|
|
30
|
-
type: UserType;
|
|
31
|
-
role_id: number | null;
|
|
32
|
-
}
|
package/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import './app/shim';
|
|
2
|
-
import './nb-global';
|
|
3
|
-
export * from './app';
|
|
4
|
-
export * from './app/types';
|
|
5
|
-
export * from './app/transport';
|
|
6
|
-
export * from './app/helpers';
|
|
7
|
-
export * from './app/classes';
|
|
8
|
-
export * from './app/api';
|
|
9
|
-
export * from './app/components';
|
package/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["next-box"]=e():t["next-box"]=e()}(globalThis,()=>(()=>{"use strict";var t={146:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},147:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionApi=void 0;var i=n(915),a="/static/extensions",s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.list=function(){return this.rest.get(a)},e.prototype.getByUniqKey=function(t){return this.rest.get("".concat(a,"/").concat(t))},e}(i.Api);e.ExtensionApi=s},475:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.fileInfo=void 0;var r=n(7975).sep,o=n(748);e.fileInfo=function(t){var e={root:"",dir:"",base:"",ext:"",name:""};if(0===(t=(0,o.pathJoin)(r,t)).length)return e;var n,i=t.charCodeAt(0),a=47===i;a?(e.root=r,n=1):n=0;for(var s=-1,c=0,u=-1,p=!0,l=t.length-1,f=0;l>=n;--l)if(47!==(i=t.charCodeAt(l)))-1===u&&(p=!1,u=l+1),46===i?-1===s?s=l:1!==f&&(f=1):-1!==s&&(f=-1);else if(!p){c=l+1;break}return-1===s||-1===u||0===f||1===f&&s===u-1&&s===c+1?-1!==u&&(e.base=e.name=0===c&&a?t.slice(1,u):t.slice(c,u)):(0===c&&a?(e.name=t.slice(1,s),e.base=t.slice(1,u)):(e.name=t.slice(c,s),e.base=t.slice(c,u)),e.ext=t.slice(s,u)),c>0?e.dir=t.slice(0,c-1):a&&(e.dir=r),e}},735:(t,e)=>{var n,r,o;Object.defineProperty(e,"__esModule",{value:!0}),e.UserAuthType=e.UserType=e.UserStatus=void 0,(o=e.UserStatus||(e.UserStatus={})).Registering="registering",o.Activated="activated",o.Blocked="blocked",o.BlockedByLicense="blocked_by_license",(r=e.UserType||(e.UserType={})).User="user",r.Guest="guest",(n=e.UserAuthType||(e.UserAuthType={})).Native="native",n.Ldap="ldap"},748:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.pathJoin=void 0;var r=n(7975).sep;e.pathJoin=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=[],o=0,i=t.length;o<i;o++)n=n.concat(t[o].split(r));var a=[];for(o=0,i=n.length;o<i;o++){var s=n[o];s&&"."!==s&&(".."===s?a.pop():a.push(s))}return""===n[0]&&a.unshift(""),a.join(r)||(a.length?r:".")}},915:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(7179),e),o(n(1152),e),o(n(6860),e)},1152:function(t,e,n){var r,o,i,a=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.FileEngine=void 0;var s=n(8843),c=n(6738),u=n(6371),p=n(7179),l=Symbol("VERSION"),f=Symbol("CONFIG"),d=Symbol("API"),h=Symbol("UPGRADE"),v=function(t){function e(e,n,r){void 0===r&&(r=(0,u.defaultState)());var a=t.call(this,r)||this;return a[o]=0,a[i]=new Map,a[l]=e,a[f]=n,a[d]=new s.StorageApi,a[d].changeState(r),a}return a(e,t),Object.defineProperty(e.prototype,"name",{get:function(){var t;return(null===(t=this[f])||void 0===t?void 0:t.name)||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){var t;return(null===(t=this[f])||void 0===t?void 0:t.path)||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fullName",{get:function(){return(0,c.pathJoin)(this.path,this.name)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this[l]},enumerable:!1,configurable:!0}),e.prototype.changeState=function(e){var n;t.prototype.changeState.call(this,e),null===(n=this[d])||void 0===n||n.changeState(e)},e.prototype.migration=function(t,e){if(this[h].has(t))throw"Upgrader migration version ".concat(t," exist");this[h].set(t,e)},e.prototype.info=function(){return this[d].info(this.fullName)},e.prototype.download=function(){var t=this;return this[d].download().then(function(t){return parseInt(t.headers.get("content-length")||"")>0?t.json():""}).then(function(e){var n=null,r=-1;return(0,c.isObject)(e)&&(n=e.body||e||null,r=e.version||-1),t.runMigrate(r,n)})},e.prototype.create=function(t,e){var n=this;return this[d].create(this.name,this.path,"file",e).then(function(){return n.replace(t)})},e.prototype.delete=function(t){return this[d].delete(this.fullName,t)},e.prototype.replace=function(t){return this[d].replace({version:this.version,body:t})},e.prototype.liveReplace=function(t,e){return this[d].liveReplace(JSON.stringify({version:this.version,body:t}),this.path,e)},e.prototype.runMigrate=function(t,e){var n=this,r=Array.from(this[h].keys()).sort(),o=r[r.length-1]||0;return new Promise(function(i,a){var s=e;t<o&&r.forEach(function(e){if(e>t){var r=n[h].get(e);r&&(s=r(s))}}),i(s)})},e}(p.Api);e.FileEngine=v,o=l,i=h},1572:(t,e)=>{var n;Object.defineProperty(e,"__esModule",{value:!0}),e.OrderDirection=void 0,(n=e.OrderDirection||(e.OrderDirection={})).DEFAULT="",n.ASC="asc",n.DESC="desc"},1910:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dirname=void 0;var r=n(7975).sep,o=n(748);e.dirname=function(t){if(0===(t=(0,o.pathJoin)(r,t)).length)return".";for(var e=t.charCodeAt(0),n=47===e,i=-1,a=!0,s=t.length-1;s>=1;--s)if(47===(e=t.charCodeAt(s))){if(!a){i=s;break}}else a=!1;return-1===i?n?r:".":n&&1===i?r+r:t.slice(0,i)}},2070:(t,e)=>{var n,r,o;Object.defineProperty(e,"__esModule",{value:!0}),e.StorageElementContentType=e.StorageElementType=e.StorageRoot=void 0,(o=e.StorageRoot||(e.StorageRoot={})).my="my",o.fca="fca",o.divide="divide",o.share="share",o.favorite="favorite",o.trash="trash",(r=e.StorageElementType||(e.StorageElementType={})).Dir="dir",r.File="file",r.WorkDir="work_dir",(n=e.StorageElementContentType||(e.StorageElementContentType={})).Any="any",n.Dir="dir",n.Code="code",n.Image="image",n.Audio="audio",n.Video="video",n.Text="text",n.Doc="doc",n.Xls="xls",n.Ppt="ppt"},2137:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.defineNbFrameComponent=void 0;var a=n(915),s=n(6738),c=n(6555),u=n(6854),p=n(4582),l=Symbol("ROOT"),f=Symbol("FRAME"),d=Symbol("FRAME_CONFIG"),h=Symbol("TRANSPORT"),v=Symbol("EVENT_EMITTER");e.defineNbFrameComponent=function(){return customElements.define("nb-frame",y)};var y=function(t){function e(){var e=t.call(this)||this;return e.apiPrefix="/api/v1",e.origin=window.location.origin,e.version=1,e.view=p.ViewState.view,e.debug=!1,e.uuid=(0,c.uuid)(),e[n]=new a.EventEmitter,e[r]={transportParams:{version:1,uuid:e.uuid}},e}var n,r;return o(e,t),e.prototype.connectedCallback=function(){this[l]=this.attachShadow({mode:"open"})},e.prototype.disconnectedCallback=function(){var t;null===(t=this[h])||void 0===t||t.destroy()},e.prototype.send=function(t,e){var n;null===(n=this[h])||void 0===n||n.send(t,e)},e.prototype.listen=function(t){this[v].listen(t)},e.prototype.off=function(t,e){this[v].off(t,e)},e.prototype.on=function(t,e){this[v].on(t,e)},Object.defineProperty(e.prototype,"extensionModel",{set:function(t){var e=t.type,n=t.file,r=t.work_dir,o=t.app,i=t.devlocal,a=t.path,s="";e===p.ExtensionType.File&&(s=n.index),e===p.ExtensionType.WorkDir&&(s=r.index),e===p.ExtensionType.App&&(s=o.menu.index),this[d].ext=t,this[d].extSrc=i?s:"".concat(this.apiPrefix,"/extensions/static/").concat(a,"/").concat(s)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transportParams",{get:function(){return i(i({},(0,s.transportProps)()),this[d].transportParams)},set:function(t){this[d].transportParams=i(i({},this[d].transportParams),t),this.uuid=this[d].transportParams.uuid||this.uuid},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"routeData",{set:function(t){this[d].routeData=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"user",{set:function(t){this[d].user=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nvigationState",{set:function(t){this[d].navigationState=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"framePath",{get:function(){var t=new URL(this[d].extSrc||"",location.origin);return this.transportParams.host&&(t.hostname=this.transportParams.host),this.transportParams.port&&(t.port=this.transportParams.port.toString()),t.toString()},enumerable:!1,configurable:!0}),e.prototype.run=function(){var t,e,n=this,r=document.createElement("iframe");r.setAttribute("allowfullscreen",""),r.name=JSON.stringify(this.transportParams),r.src=this.framePath;var o=this.resetTransport();return o.listen(function(t,e,r){t===p.TransportEvent.ExtInit&&n.send(p.TransportEvent.AppReady,n.state)}),this[f]=r,this[l]&&(this[l].innerHTML=""),null===(t=this[l])||void 0===t||t.appendChild(this.frameStyle),null===(e=this[l])||void 0===e||e.appendChild(this[f]),o},Object.defineProperty(e.prototype,"state",{get:function(){var t=this[d],e=t.ext,n=t.routeData,r=t.user,o=t.navigationState,i=(0,s.fileInfo)((null==n?void 0:n.path)||"");(null==e?void 0:e.type)===p.ExtensionType.WorkDir&&(i.dir=(0,s.pathJoin)(i.dir,i.base),i.base="",i.name="");var a={},c={};return(null==n?void 0:n.root)===p.StorageRoot.divide&&(a.divide_id=Number(n.rootId),i.dir=(0,s.pathJoin)("/",n.path||""),n.divideDir||(i.dir="/")),(null==n?void 0:n.root)===p.StorageRoot.fca&&(a.disk_id=Number(n.rootId)),(null==n?void 0:n.root)===p.StorageRoot.share&&(a.share_token=n.share_token,c.Authorization="Sharing ".concat(n.share_token),n.share_password&&(a.share_pass=n.share_password),c.SharePass=n.share_password),{debug:!!this.debug,view:this.view,extenstion:{id:(null==e?void 0:e.id)||0,name:(null==e?void 0:e.name)||{ru:""},type:(null==e?void 0:e.type)||p.ExtensionType.File},api:{host:this.origin,prefix:this.apiPrefix,headers:c,query:a},user:r,storage:{info:i,root:(null==n?void 0:n.root)||p.StorageRoot.my,rootID:(null==n?void 0:n.rootId)||0,path:(null==n?void 0:n.path)||""},initialNavigation:o,setting:null==e?void 0:e.settings}},enumerable:!1,configurable:!0}),e.prototype.resetTransport=function(){var t;null===(t=this[h])||void 0===t||t.destroy();var e=new u.NBTransport(this.transportParams);return this[h]=e,this[h].subscribe(),this[h]},Object.defineProperty(e.prototype,"frameStyle",{get:function(){var t=document.createElement("style");return t.textContent="\n iframe {\n display: block;\n width: inherit;\n height: inherit;\n border: none;\n background: none;\n }\n ",t},enumerable:!1,configurable:!0}),n=v,r=d,e.observedAttributes=["apiPrefix","origin","version","view","debug","uuid","navigationState","user"],e}(HTMLElement)},2392:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.StaticApi=void 0;var a=n(7179),s=n(6418),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.upload=function(t,e,n){void 0===n&&(n="");var r=new FormData;return r.set("file",t,e),(0,s.sendRequest)(this.makeApiPath(n),{method:"POST",body:r}).then(function(t){return t.json()})},e.prototype.get=function(t){return(0,s.sendRequest)(this.makeApiPath(t),{method:"GET"})},e.prototype.delete=function(t){return(0,s.sendRequest)(this.makeApiPath(t),{method:"DELETE"}).catch(function(t){return t})},e.prototype.makeApiPath=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.prototype.makeApiPath.apply(this,i(["static/files"],e,!1))},e}(a.Api);e.StaticApi=c},2636:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},2951:(t,e)=>{var n,r,o,i;Object.defineProperty(e,"__esModule",{value:!0}),e.TransportCallEvent=e.TransportNavigationTarget=e.CallNameEvent=e.TransportEvent=void 0,(i=e.TransportEvent||(e.TransportEvent={})).Call="call",i.CallResponse="call-response",i.ExtInit="ext-init",i.ExtChangeContent="ext-change-content",i.ExtOpenModalFilesSelect="ext-open-modal-files-select",i.ExtShowConfirm="ext-show-confirm",i.ExtShowAccessPanel="ext-show-access-panel",i.ExtNavigateTo="ext-navigate-to",i.ExtRequestError="ext-request-error",i.ExtToast="ext-toast",i.ExtSpinner="ext-spinner",i.ExtContext="ext-context",i.ExtTabs="ext-tabs",i.ExtSavedStart="ext-saved-start",i.ExtSavedEnd="ext-saved-end",i.ExtSavedError="ext-saved-error",i.ExtClose="ext-close",i.ExtRejectClose="ext-reject-close",i.ExtUserInteraction="ext-user-interaction",i.AppReload="ext-reload",i.AppReady="app-ready",i.AppChangeState="app-change-state",i.AppSaveAndClose="app-save-and-close",i.AppFilesSelected="app-files-selected",i.AppConfirmAccept="app-confirm-accept",i.AppConfirmReject="app-confirm-reject",i.AppContextAction="app-context-action",i.AppTabAction="app-tab-action",i.AppChangeTheme="app-change-theme",(o=e.CallNameEvent||(e.CallNameEvent={})).Update="update",o.ForceSave="force-save-version",(r=e.TransportNavigationTarget||(e.TransportNavigationTarget={})).Parent="_parent",r.Self="_self",r.Cache="_cache",(n=e.TransportCallEvent||(e.TransportCallEvent={})).Call="call",n.Resolve="resolve",n.Reject="reject"},3111:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Transport=e.NBTransport=e.TransportParentHandlers=e.EngineType=void 0;var a,s=n(2951),c=n(6860),u=n(3440),p=n(7232),l=n(7333),f=n(9995),d=n(6064),h=n(6738),v=n(6555);!function(t){t.WebSocket="websocket",t.PostMessage="postmessage",t.Empty=""}(a=e.EngineType||(e.EngineType={}));var y=(0,d.transportProps)(),g=(0,p.getGlobal)();e.TransportParentHandlers={},g._nb_handlers=e.TransportParentHandlers;var b=function(t){function n(e){var n=t.call(this)||this;return n.instanceUid=(0,v.uuid)(),n.engineType=a.Empty,n._params=i(i({},y),e),n.engineType=n._params.engine||a.Empty,n.engine=new f.TransportEmpty,n.engineType===a.PostMessage&&(n.engine=new u.TransportPostMessage(n._params)),n.engineType===a.WebSocket&&(n.engine=new l.TransportWebsocket(n._params)),n}return o(n,t),n.prototype.call=function(t){for(var e,n=this,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];return((null===(e=this._params)||void 0===e?void 0:e.version)||0)<2?Promise.resolve([]):new Promise(function(e,o){var i=(0,v.uuid)(),a={id:i,name:t,params:r,event:s.TransportCallEvent.Call},c=function(r){r.id===i&&r.name===t&&(n.off(s.TransportEvent.CallResponse,c),r.event===s.TransportCallEvent.Reject?o(r.params):e(r.params))};n.send(s.TransportEvent.Call,a),n.on(s.TransportEvent.CallResponse,c)})},n.prototype.send=function(t,e,n){var r;(null===(r=this._params)||void 0===r?void 0:r.debug)&&console.log("transport.send",this._params,t,e,n),this.engine.send(t,e,n,this.instanceUid)},n.prototype.subscribe=function(){var t=this;this.engine.subscribe(function(e,n,r,o){var i,a,c;!e||o===t.instanceUid||((null===(i=t._params)||void 0===i?void 0:i.version)||0)>0&&r!==(null===(a=t._params)||void 0===a?void 0:a.uuid)||((null===(c=t._params)||void 0===c?void 0:c.debug)&&console.log("transport.message",t._params,r,e,n),e===s.TransportEvent.Call&&n.name===s.CallNameEvent.ForceSave&&t.forceSaveVersion(n),t.emit(e,n,r))})},n.prototype.destroy=function(){this.engine.destroy()},n.prototype.forceSaveVersion=function(t){var e=t.id,n=t.name;this.send(s.TransportEvent.CallResponse,{id:e,name:n,event:s.TransportCallEvent.Resolve})},n.prototype.changeContent=function(t){e.Transport.send(s.TransportEvent.ExtChangeContent,t)},n.prototype.navigate=function(t,n,r){void 0===r&&(r=s.TransportNavigationTarget.Cache);var o={path:t,queryParams:n,target:r};e.Transport.send(s.TransportEvent.ExtNavigateTo,o),r===s.TransportNavigationTarget.Self&&(0,h.browserNavigate)(o)},n.prototype.close=function(){e.Transport.send(s.TransportEvent.ExtClose)},n.prototype.rejectClose=function(){e.Transport.send(s.TransportEvent.ExtRejectClose)},n.prototype.showAccessPanel=function(){e.Transport.send(s.TransportEvent.ExtShowAccessPanel)},n.prototype.openModalFilesSelect=function(t){e.Transport.send(s.TransportEvent.ExtOpenModalFilesSelect,t)},n.prototype.openModalConfirm=function(t){e.Transport.send(s.TransportEvent.ExtShowConfirm,t)},n.prototype.toast=function(t){e.Transport.send(s.TransportEvent.ExtToast,t)},n.prototype.savedStart=function(t){e.Transport.send(s.TransportEvent.ExtSavedStart,t)},n.prototype.savedEnd=function(t){e.Transport.send(s.TransportEvent.ExtSavedEnd,t)},n.prototype.setSpinnerStatus=function(t){e.Transport.send(s.TransportEvent.ExtSpinner,t)},n.prototype.setContext=function(t){e.Transport.send(s.TransportEvent.ExtContext,t)},n.prototype.setTabs=function(t){e.Transport.send(s.TransportEvent.ExtTabs,t)},n}(c.EventEmitter);e.NBTransport=b,g._nb_transport instanceof b||(g._nb_transport=new b({}),g._nb_transport.subscribe()),e.Transport=g._nb_transport},3334:(t,e)=>{var n;Object.defineProperty(e,"__esModule",{value:!0}),e.SettingControlType=void 0,(n=e.SettingControlType||(e.SettingControlType={})).Text="text",n.String="string",n.Number="number",n.CheckBox="checkbox",n.Select="select",n.RadioList="radio_list",n.ConnectionChoose="connection_choose",n.MultiConnectionChoose="multi_connection_choose"},3440:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TransportPostMessage=void 0;var r=n(6738),o=function(){function t(t){var e=this;this.listenHandler=function(t){var n=t.data.event,o=t.data.uuid,i=t.data.instanceUid,a=(0,r.safeJson)(t.data.payload,t.data.payload);e.handler&&e.handler(n,a,o,i)},this._parems=t}return Object.defineProperty(t.prototype,"parent",{get:function(){var t,e;return(null===(t=this._parems)||void 0===t?void 0:t.parent)?null===(e=this._parems)||void 0===e?void 0:e.parent:parent||null},enumerable:!1,configurable:!0}),t.prototype.send=function(t,e,n,r){var o,i;null===(o=this.parent)||void 0===o||o.postMessage({event:t,uuid:n||(null===(i=this._parems)||void 0===i?void 0:i.uuid),instanceUid:r,payload:function(){try{return JSON.stringify(e)}catch(t){return e}}()},document.location.origin)},t.prototype.subscribe=function(t){var e;this.handler=t,null===(e=this.parent)||void 0===e||e.addEventListener("message",this.listenHandler)},t.prototype.destroy=function(){var t;null===(t=this.parent)||void 0===t||t.removeEventListener("message",this.listenHandler)},t}();e.TransportPostMessage=o},3470:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getConfigData=void 0;var r=n(4582);e.getConfigData=function(t){var e,n,o,i,a={name:t.name,type:t.type,icon:t.icon,pictogram:"",index:""};switch(t.type){case r.ExtensionType.File:a.index=(null===(e=t.file)||void 0===e?void 0:e.index)||"";break;case r.ExtensionType.WorkDir:a.index=(null===(n=t.work_dir)||void 0===n?void 0:n.index)||"";break;case r.ExtensionType.App:a.index=(null===(o=t.app)||void 0===o?void 0:o.menu.index)||"",a.pictogram=(null===(i=t.app)||void 0===i?void 0:i.menu.icon)||""}return a}},3807:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},4080:()=>{!function(){if(void 0!==window.Reflect&&void 0!==window.customElements&&!window.customElements.polyfillWrapFlushCallback){var t=HTMLElement;window.HTMLElement=function(){return Reflect.construct(t,[],this.constructor)},HTMLElement.prototype=t.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,t)}}()},4223:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},i.apply(this,arguments)},a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}c((r=r.apply(t,e||[])).next())})},s=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},c=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.StorageApi=void 0;var u=n(748),p=n(7179),l=n(9035),f=n(6418),d=n(7860),h=n(4582),v=n(3111),y=n(6738),g=new Map,b=function(t,e,n){return function(r){return a(void 0,void 0,void 0,function(){var o,i;return s(this,function(a){switch(a.label){case 0:if(r instanceof Response&&r.ok)return v.Transport.send(t,{path:e,status:r.status,options:n}),[2];a.label=1;case 1:return a.trys.push([1,5,,6]),r instanceof Response?[4,r.json()]:[3,3];case 2:return i=a.sent(),[3,4];case 3:i=r,a.label=4;case 4:return o=i,v.Transport.send(t,{path:e,status:r.status,code:null==o?void 0:o.code,message:null==o?void 0:o.message,options:n}),[3,6];case 5:return a.sent(),v.Transport.send(t,{path:e,status:r.status,options:n}),[3,6];case 6:return[2]}})})}},_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.list=function(t){return t.path&&(t.path=this.relativePath(t.path)),this.rest.get("/storage",t)},e.prototype.info=function(t){return this.rest.get("/storage/element",{path:t})},e.prototype.create=function(t,e,n,r){var o=i(i({is_work_dir:this.state.extenstion.type===h.ExtensionType.WorkDir},r),{name:t,path:this.relativePath(e),type:n,divide_id:this.state.api.query.divide_id||null});return(0,f.sendRequest)(this.makeApiPath("/element"),{method:"POST",headers:this.makeHeaders({"Content-Type":"application/json"}),body:JSON.stringify(o)}).then(this.responseJSON)},e.prototype.delete=function(t,e){return(0,f.sendRequest)(this.makeApiPath("/element")+this.makeSearchParams({path:t,hard:e}),{method:"DELETE",headers:this.makeHeaders()})},e.prototype.makeDownloadPath=function(t,e){var n=i({},e),r={path:t,with_preview:!1};return n.cache||(r.t=Date.now()),n.imagePreview&&(r.with_preview=!0),this.makeApiPath("/files")+this.makeSearchParams(r)},e.prototype.makeImagePreview=function(t,e){return this.makeDownloadPath(t,i(i({},e),{imagePreview:!0}))},e.prototype.download=function(t){var e=this;return(0,f.sendRequest2)("GET",this.makeApiPath("/files")+this.makeSearchParams({path:this.relativePath(t,this.state.storage.path),t:Date.now()}),{headers:this.makeHeaders(),cache:"no-cache"}).then(function(t){return a(e,void 0,void 0,function(){return s(this,function(e){switch(e.label){case 0:if(t.ok||403!==t.status)return[3,5];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,t.json()];case 2:case 3:return e.sent(),[3,4];case 4:return[2,Promise.reject(t)];case 5:return[2,t]}})})}).catch(function(t){throw t.status>=400&&(0,y.notificateRequestError)(t.status,t.message,t.code),t})},e.prototype.replace=function(t,e,n){var r=this,o=e||this.state.storage.path;return v.Transport.send(h.TransportEvent.ExtSavedStart,{path:o,options:n}),(0,f.sendRequest2)("PUT",this.makeApiPath("/files")+this.makeSearchParams({path:this.relativePath(e,this.state.storage.path)}),{cache:"no-cache",body:t,headers:this.makeHeaders()}).then(function(t){return b(h.TransportEvent.ExtSavedEnd,o,n)(t),r.responseJSON(t)}).catch(function(t){throw b(h.TransportEvent.ExtSavedError,o,n)(t),t})},e.prototype.liveReplace=function(t,e,n,r){var o=this,i=[this.state.storage.root,this.state.storage.rootID,this.relativePath(e,this.state.storage.path)].join("-"),a=g.get(i);a||(a={status:h.RequestStatus.Done,requests:[]},g.set(i,a)),a.requests.push({path:e,body:t});var s=function(){if(a&&a.status!==h.RequestStatus.Wait){var t=a.requests.pop();a.requests=[],t?(a.status=h.RequestStatus.Wait,o.replace(t.body,t.path,r).then(function(t){return a.status=h.RequestStatus.Done,s(),t}).catch(function(t){return a.status=h.RequestStatus.Reject,s(),t})):n&&n()}};s()},e.prototype.upload=function(t,e){var n=new FormData;return n.set("path",this.relativePath(t)),this.state.api.query.divide_id&&n.set("divide_id",this.state.api.query.divide_id),n.set("file",e),v.Transport.send(h.TransportEvent.ExtSavedStart,t),(0,f.sendRequest)(this.makeApiPath("/files"),{method:"POST",body:n,headers:this.makeHeaders()}).then(function(e){return b(h.TransportEvent.ExtSavedEnd,t)(e),e}).catch(function(e){throw b(h.TransportEvent.ExtSavedError,t)(e),e}).then(this.responseJSON,this.responseJSON)},e.prototype.uploadNet=function(t,e,n){return void 0===n&&(n=!1),v.Transport.send(h.TransportEvent.ExtSavedStart,t),(0,f.sendRequest)(this.makeApiPath("/files/net"),{method:"POST",headers:this.makeHeaders({"Content-Type":"application/json"}),body:JSON.stringify({url:e,overwrite:n,path:this.relativePath(t)})}).then(function(e){return b(h.TransportEvent.ExtSavedEnd,t)(e),e}).catch(function(e){throw b(h.TransportEvent.ExtSavedError,t)(e),e}).then(this.responseJSON,this.responseJSON)},e.prototype.createMeta=function(t,e,n){return this.create(t||this.metaName,e||"","file",n)},e.prototype.readMeta=function(t){return this.download(t||this.metaName)},e.prototype.saveMeta=function(t,e){return this.replace(t,e||this.metaName)},e.prototype.relativePath=function(t,e){return!t&&e?e||"":(0,u.pathJoin)(this.state.storage.info.dir||"",t||"")},e.prototype.makeApiPath=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r="storage";return"fca"===this.state.storage.root&&(r="disk/".concat(this.state.storage.rootID)),t.prototype.makeApiPath.apply(this,c([r],e,!1))},Object.defineProperty(e.prototype,"metaName",{get:function(){return"."+(0,d.translite)((0,l.getLang)(this.state.extenstion.name))},enumerable:!1,configurable:!0}),e}(p.Api);e.StorageApi=_},4339:(t,e)=>{var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ViewState=void 0,(n=e.ViewState||(e.ViewState={})).view="view",n.edit="edit"},4444:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.browserNavigate=void 0;var r=n(7232),o=n(8161);e.browserNavigate=function(t){if((0,o.isBrowser)()){var e=(0,r.getGlobal)(),n=t.path,i=t.queryParams,a=new URL(n||"",window.origin),s=i||{};Object.keys(s).forEach(function(t){var e=s[t];e&&a.searchParams.append(t,e.toString())}),e.history.pushState({},"",a.toString())}}},4582:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(4981),e),o(n(4339),e),o(n(2070),e),o(n(2951),e),o(n(146),e),o(n(735),e),o(n(3334),e),o(n(3807),e)},4981:(t,e)=>{var n,r,o,i;Object.defineProperty(e,"__esModule",{value:!0}),e.RequestStatus=e.PermissionType=e.ExtensionFileMode=e.ExtensionType=void 0,(i=e.ExtensionType||(e.ExtensionType={})).App="app",i.File="file",i.WorkDir="work_dir",(o=e.ExtensionFileMode||(e.ExtensionFileMode={})).Read="read",o.Write="write",o.ReadAndWrite="read_and_write",(r=e.PermissionType||(e.PermissionType={})).CLOSE="",r.READ="r",r.WRITE="rw",(n=e.RequestStatus||(e.RequestStatus={}))[n.Wait=0]="Wait",n[n.Done=1]="Done",n[n.Reject=2]="Reject"},5673:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(2137),e)},5800:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isString=void 0,e.isString=function(t){return"[object String]"===Object.prototype.toString.call(t)}},6032:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),n(4080)},6064:function(t,e,n){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.transportProps=void 0;var o=(0,n(7232).getGlobal)();e.transportProps=function(){return r(r({},o._nb_global_props),i())};var i=function(){try{return JSON.parse(window.name||"")}catch(t){return{}}}},6157:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.UserApi=void 0;var i=n(7179),a="/users",s="/users/me",c="".concat(s,"/avatars"),u="".concat(s,"/sessions"),p="".concat(s,"/tokens"),l="".concat(a,"/change-password"),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.logout=function(){return this.rest.get("/logout")},e.prototype.get=function(t){return this.rest.get("".concat(a,"/").concat(t))},e.prototype.list=function(t){return this.rest.get(a,t)},e.prototype.restore=function(t){return this.rest.post("".concat(a,"/").concat(t,"/restore"))},e.prototype.delete=function(t,e){return this.rest.delete("".concat(a,"/").concat(t),e)},e.prototype.update=function(t){return this.rest.put(a+"/".concat(t.id),JSON.stringify(t))},e.prototype.create=function(t){return this.rest.post(a,JSON.stringify(t))},e.prototype.createToken=function(t){return this.rest.post(p,JSON.stringify(t))},e.prototype.listToken=function(t){return this.rest.get(p,t)},e.prototype.deleteToken=function(t){return this.rest.delete("".concat(p,"/").concat(t))},e.prototype.changePassword=function(t){return this.rest.post(l,JSON.stringify(t))},e.prototype.me=function(){return this.rest.get(s)},e.prototype.meUploadAvatar=function(t,e){var n=new FormData;return n.append("file",t,e),this.rest.post(c,n)},e.prototype.meDeleteAvatar=function(){return this.rest.delete(c)},e.prototype.meListSession=function(t){return this.rest.get(u,t)},e.prototype.meDeleteSession=function(t){var e=u;return t&&(e+="/".concat(t)),this.rest.delete(e)},e}(i.Api);e.UserApi=f},6260:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.safeJson=void 0,e.safeJson=function(t,e){try{return JSON.parse(t)}catch(t){return e}}},6341:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.notificateRequestError=void 0;var r=n(6854),o=n(4582);e.notificateRequestError=function(t,e,n){r.Transport.send(o.TransportEvent.ExtRequestError,{status:t,message:e,code:n})}},6371:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.defaultState=void 0;var r=n(4582);e.defaultState=function(){return{extenstion:{id:0,name:{},type:r.ExtensionType.File},api:{host:window.location.origin,prefix:"/api/v1",headers:{},query:{}},debug:!0,view:r.ViewState.view,storage:{root:r.StorageRoot.my,rootID:0,path:"",info:{base:"",dir:"",ext:"",name:"",root:""}}}}},6418:function(t,e,n){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}c((r=r.apply(t,e||[])).next())})},i=this&&this.__generator||function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.sendRequest2=e.sendRequest=void 0;var a=n(6854),s=n(4582),c=n(6341),u=n(748),p=null,l=function(){return p||(p=a.Transport.call(s.CallNameEvent.Update).catch(function(t){throw p=null,t}).then(function(t){return p=null,t})),p};e.sendRequest=function(t,e){var n=this;return l().then(function(){return fetch(t,e)}).then(function(t){return o(n,void 0,void 0,function(){var e,n;return i(this,function(r){switch(r.label){case 0:return t.status>=400?((0,c.notificateRequestError)(t.status,""),403!==t.status?[3,2]:[4,t.json()]):[3,2];case 1:if("resource locked"===(e=r.sent()).code)throw(n=new Error("Forbidden")).status=t.status,n.code=e.code,n.message=e.error.lock_owner_id,n;r.label=2;case 2:return[2,t]}})})}).catch(function(t){throw t.status>=400&&(0,c.notificateRequestError)(t.status,t.message,t.code),t})},e.sendRequest2=function(t,e,n){var o=r({},n.headers);n.params&&(e+="?"+f(n.params)),n.prefix&&(e=(0,u.pathJoin)(n.prefix,e));var i={method:t,cache:n.cache,headers:o,body:n.body};return l().then(function(){return fetch(new URL(e,n.host),i)}).catch(function(t){throw d(t.status,t.message,t.code),t})};var f=function(t){var e=new URLSearchParams;return Object.keys(t).forEach(function(n){Array.isArray(t[n])?t[n].forEach(function(t){e.append(n,t)}):e.append(n,t[n])}),e},d=function(t,e,n){t>=400&&(0,c.notificateRequestError)(t,e,n)}},6555:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.uuid=void 0,e.uuid=function(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,function(t){return(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)})}},6662:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isObject=void 0,e.isObject=function(t){return null!=t&&"Object"===t.constructor.name}},6738:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(1910),e),o(n(475),e),o(n(9035),e),o(n(7096),e),o(n(748),e),o(n(6418),e),o(n(7860),e),o(n(7232),e),o(n(8161),e),o(n(6662),e),o(n(5800),e),o(n(6341),e),o(n(6260),e),o(n(3470),e),o(n(6064),e),o(n(4444),e),o(n(6371),e)},6854:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(8325),e),o(n(3111),e)},6860:function(t,e){var n=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.EventEmitter=void 0;var r=function(){function t(){this._handlers=new Map,this._globalHandlers=new Set}return t.prototype.listen=function(t){this._globalHandlers.add(t)},t.prototype.on=function(t,e){var n;this._handlers.has(t)||this._handlers.set(t,new Set),null===(n=this._handlers.get(t))||void 0===n||n.add(e)},t.prototype.off=function(t,e){var n;null===(n=this._handlers.get(t))||void 0===n||n.delete(e)},t.prototype.emit=function(t){for(var e,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];null===(e=this._handlers.get(t))||void 0===e||e.forEach(function(t){t&&t.apply(void 0,r)}),this._globalHandlers.forEach(function(e){e.apply(void 0,n([t],r,!1))})},t}();e.EventEmitter=r},7096:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parentURL=void 0,e.parentURL=function(){return new URL(window.location!=window.parent.location?document.referrer:document.location.href)}},7179:function(t,e,n){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.Api=void 0;var i=n(6738),a=n(6371),s=function(){function t(t){void 0===t&&(t=(0,a.defaultState)());var e=this;this.rest={get:function(t,n,o){return(0,i.sendRequest2)("GET",t,{prefix:e.state.api.prefix,host:e.state.api.host,headers:e.makeHeaders(o),params:r(r({},e.state.api.query),n),cache:"no-cache"}).then(e.responseJSON)},post:function(t,n,o){return(0,i.sendRequest2)("POST",t,{prefix:e.state.api.prefix,host:e.state.api.host,headers:e.makeHeaders(o),params:r({},e.state.api.query),body:n}).then(e.responseJSON)},put:function(t,n,o){return(0,i.sendRequest2)("PUT",t,{prefix:e.state.api.prefix,host:e.state.api.host,headers:e.makeHeaders(o),params:r({},e.state.api.query),cache:"no-cache",body:n}).then(e.responseJSON)},delete:function(t,n,o){return(0,i.sendRequest2)("PUT",t,{prefix:e.state.api.prefix,host:e.state.api.host,headers:e.makeHeaders(o),params:r(r({},e.state.api.query),n)}).then(e.responseJSON)}},this.changeState(t)}return t.prototype.changeState=function(t){this.state=t},t.prototype.makeSearchParams=function(t){if(!t)return"";for(var e=[],n=function(t,n){if(null!==n){var r=encodeURIComponent(t),o=String(n);(function(t){try{return encodeURIComponent(decodeURIComponent(t))===t}catch(t){return!1}})(o)||(o=encodeURIComponent(o)),e.push("".concat(r,"=").concat(o))}},r=function(t,e){Array.isArray(e)?e.forEach(function(e){return n(t,e)}):n(t,e)},o=0,i=Object.entries(t);o<i.length;o++){var a=i[o];r(a[0],a[1])}return e.length?"?".concat(e.join("&")):""},t.prototype.makeHeaders=function(t){return r(r({},t),this.state.api.headers)},t.prototype.responseJSON=function(t){return(t.headers.get("content-type")||"").includes("/json")?t.status>=200&&t.status<400?t.json():Promise.reject(t):(console.warn("Parse json error"),Promise.reject(t))},t.prototype.makeApiPath=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new URL(decodeURI(i.pathJoin.apply(void 0,o([this.state.api.prefix],t,!1))),this.state.api.host)},t}();e.Api=s},7232:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getGlobal=void 0;var r=n(8161);e.getGlobal=function(){return(0,r.isBrowser)()?window:n.g}},7333:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TransportWebsocket=void 0;var n=Symbol("socket"),r=function(){function t(t){this._params=t,this[n]||this.init(t)}return t.prototype.init=function(t){var e=(null==t?void 0:t.host)||"localhost",r=(null==t?void 0:t.port)||8999,o=(null==t?void 0:t.path)||"";this[n]=new WebSocket("ws://".concat(e,":").concat(r).concat(o)),this[n].onopen=function(){},this[n].onclose=function(t){t.wasClean?console.log("Соединение закрыто"):console.log("Обрыв соединения"),console.log("Код: "+t.code+" причина: "+t.reason)},this[n].onerror=function(t){console.log("Ошибка подключения ws: "+t.message)}},t.prototype.send=function(t,e,r,o){var i,a=this;this[n]&&(this[n].readyState?this[n].send(JSON.stringify({event:t,payload:e,uuid:r||(null===(i=this._params)||void 0===i?void 0:i.uuid),instanceUid:o})):setTimeout(function(){a.send(t,e,r)},100))},t.prototype.subscribe=function(t){this[n]&&(this[n].onmessage=function(e){try{var n=JSON.parse(e.data),r=n.event,o=n.payload,i=n.uuid,a=n.instanceUid;t(r,o,i,a)}catch(t){}})},t.prototype.destroy=function(){this[n]&&(this[n].close(),this[n]=void 0)},t}();e.TransportWebsocket=r},7860:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.translite=void 0;var n={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"e",ж:"zh",з:"z",и:"i",й:"i",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"cz",ш:"sh",щ:"scz",ы:"y",ь:"",э:"e",ю:"u",я:"ja"," ":"-"};e.translite=function(t){return(t=(t=(t=(t=(t=t.toLocaleLowerCase()).trim()).replace(/ -/gi,"-")).replace(/- /gi,"-")).replace(/\s{2,}/gi," ")).split("").map(function(t){return/[a-z0-9]/i.test(t)?t:n[t]||""}).join("")}},7916:function(t,e,n){var r,o=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.NextBox=void 0;var i=n(6860),a=n(6738),s=n(6371),c=n(3111),u=n(2951),p=["click","scroll","keydown","mousemove"],l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.userEventHandlers={},e}return o(e,t),e.prototype.init=function(t){var e=this,n=function(t){return e.state=t};if(!c.Transport.engineType){var r=(0,s.defaultState)();n(r),t&&t(r)}c.Transport.on(u.TransportEvent.AppReady,function(e){n(e),t&&t(e)}),c.Transport.on(u.TransportEvent.AppReload,function(){window.location.reload()}),c.Transport.on(u.TransportEvent.AppChangeState,n),c.Transport.send(u.TransportEvent.ExtInit),this.attachUserEvents()},e.prototype.destroy=function(){this.detachUserEvents()},e.prototype.prepareNavigate=function(){var t,e=null===(t=this.state)||void 0===t?void 0:t.initialNavigation;(null==e?void 0:e.target)&&[u.TransportNavigationTarget.Cache,u.TransportNavigationTarget.Self].includes(e.target)&&(0,a.browserNavigate)(e)},e.prototype.attachUserEvents=function(){for(var t=0,e=function(e){var r=function(){return function(e){var n=Date.now();n-t<300||(t=n,c.Transport.send(u.TransportEvent.ExtUserInteraction,{type:e,timestamp:n}))}(e)};n.userEventHandlers[e]=r,window.addEventListener(e,r,!0)},n=this,r=0,o=p;r<o.length;r++)e(o[r])},e.prototype.detachUserEvents=function(){for(var t=0,e=p;t<e.length;t++){var n=e[t],r=this.userEventHandlers[n];r&&(window.removeEventListener(n,r,!0),delete this.userEventHandlers[n])}},e}(i.EventEmitter);e.NextBox=l},7975:t=>{function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function n(t,e){for(var n,r="",o=0,i=-1,a=0,s=0;s<=t.length;++s){if(s<t.length)n=t.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(i===s-1||1===a);else if(i!==s-1&&2===a){if(r.length<2||2!==o||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",o=0):o=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),i=s,a=0;continue}}else if(2===r.length||1===r.length){r="",o=0,i=s,a=0;continue}e&&(r.length>0?r+="/..":r="..",o=2)}else r.length>0?r+="/"+t.slice(i+1,s):r=t.slice(i+1,s),o=s-i-1;i=s,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var r={resolve:function(){for(var t,r="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a;i>=0?a=arguments[i]:(void 0===t&&(t=process.cwd()),a=t),e(a),0!==a.length&&(r=a+"/"+r,o=47===a.charCodeAt(0))}return r=n(r,!o),o?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(t){if(e(t),0===t.length)return".";var r=47===t.charCodeAt(0),o=47===t.charCodeAt(t.length-1);return 0!==(t=n(t,!r)).length||r||(t="."),t.length>0&&o&&(t+="/"),r?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,n=0;n<arguments.length;++n){var o=arguments[n];e(o),o.length>0&&(void 0===t?t=o:t+="/"+o)}return void 0===t?".":r.normalize(t)},relative:function(t,n){if(e(t),e(n),t===n)return"";if((t=r.resolve(t))===(n=r.resolve(n)))return"";for(var o=1;o<t.length&&47===t.charCodeAt(o);++o);for(var i=t.length,a=i-o,s=1;s<n.length&&47===n.charCodeAt(s);++s);for(var c=n.length-s,u=a<c?a:c,p=-1,l=0;l<=u;++l){if(l===u){if(c>u){if(47===n.charCodeAt(s+l))return n.slice(s+l+1);if(0===l)return n.slice(s+l)}else a>u&&(47===t.charCodeAt(o+l)?p=l:0===l&&(p=0));break}var f=t.charCodeAt(o+l);if(f!==n.charCodeAt(s+l))break;47===f&&(p=l)}var d="";for(l=o+p+1;l<=i;++l)l!==i&&47!==t.charCodeAt(l)||(0===d.length?d+="..":d+="/..");return d.length>0?d+n.slice(s+p):(s+=p,47===n.charCodeAt(s)&&++s,n.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return".";for(var n=t.charCodeAt(0),r=47===n,o=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(n=t.charCodeAt(a))){if(!i){o=a;break}}else i=!1;return-1===o?r?"/":".":r&&1===o?"//":t.slice(0,o)},basename:function(t,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');e(t);var r,o=0,i=-1,a=!0;if(void 0!==n&&n.length>0&&n.length<=t.length){if(n.length===t.length&&n===t)return"";var s=n.length-1,c=-1;for(r=t.length-1;r>=0;--r){var u=t.charCodeAt(r);if(47===u){if(!a){o=r+1;break}}else-1===c&&(a=!1,c=r+1),s>=0&&(u===n.charCodeAt(s)?-1===--s&&(i=r):(s=-1,i=c))}return o===i?i=c:-1===i&&(i=t.length),t.slice(o,i)}for(r=t.length-1;r>=0;--r)if(47===t.charCodeAt(r)){if(!a){o=r+1;break}}else-1===i&&(a=!1,i=r+1);return-1===i?"":t.slice(o,i)},extname:function(t){e(t);for(var n=-1,r=0,o=-1,i=!0,a=0,s=t.length-1;s>=0;--s){var c=t.charCodeAt(s);if(47!==c)-1===o&&(i=!1,o=s+1),46===c?-1===n?n=s:1!==a&&(a=1):-1!==n&&(a=-1);else if(!i){r=s+1;break}}return-1===n||-1===o||0===a||1===a&&n===o-1&&n===r+1?"":t.slice(n,o)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+r:n+"/"+r:r}(0,t)},parse:function(t){e(t);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return n;var r,o=t.charCodeAt(0),i=47===o;i?(n.root="/",r=1):r=0;for(var a=-1,s=0,c=-1,u=!0,p=t.length-1,l=0;p>=r;--p)if(47!==(o=t.charCodeAt(p)))-1===c&&(u=!1,c=p+1),46===o?-1===a?a=p:1!==l&&(l=1):-1!==a&&(l=-1);else if(!u){s=p+1;break}return-1===a||-1===c||0===l||1===l&&a===c-1&&a===s+1?-1!==c&&(n.base=n.name=0===s&&i?t.slice(1,c):t.slice(s,c)):(0===s&&i?(n.name=t.slice(1,a),n.base=t.slice(1,c)):(n.name=t.slice(s,a),n.base=t.slice(s,c)),n.ext=t.slice(a,c)),s>0?n.dir=t.slice(0,s-1):i&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,t.exports=r},8156:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),n(6032),n(2636),o(n(7916),e),o(n(4582),e),o(n(6854),e),o(n(6738),e),o(n(915),e),o(n(8843),e),o(n(5673),e)},8161:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowser=void 0,e.isBrowser=function(){return"undefined"!=typeof window}},8325:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},8843:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),o=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),o(n(1572),e),o(n(2392),e),o(n(4223),e),o(n(6157),e),o(n(147),e)},9035:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getLang=void 0,e.getLang=function(t,e){if(void 0===e&&(e="ru"),t[e])return t[e];var n=Object.keys(t).pop();return n&&t[n]?t[n]:""}},9995:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TransportEmpty=void 0;var n=function(){function t(){}return t.prototype.send=function(t,e){},t.prototype.subscribe=function(t){},t.prototype.destroy=function(){},t}();e.TransportEmpty=n}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}return n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n(8156)})());
|
package/init.d.ts
DELETED
package/nb-global.d.ts
DELETED