@oiyo/framework 0.4.0-beta.1 → 0.4.0-beta.3
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/dist/{chunk-CPOuyFJX.cjs → chunk-BGy3oB1q.cjs} +1 -1
- package/dist/{chunk-CzvwBCEU.mjs → chunk-BIMTDWTb.mjs} +1 -1
- package/dist/{index-DzsQka7j.d.cts → index-B4NECdKj.d.cts} +70 -70
- package/dist/{index-DzsQka7j.d.mts → index-B4NECdKj.d.mts} +70 -70
- package/dist/index.cjs +6 -6
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +4 -4
- package/dist/oiyo-BOeGyXdP.mjs +7 -0
- package/dist/oiyo-BOfXIUcB.cjs +7 -0
- package/dist/oiyo.cjs +5 -5
- package/dist/oiyo.d.cts +3 -3
- package/dist/oiyo.d.mts +3 -3
- package/dist/oiyo.mjs +3 -3
- package/dist/uni.cjs +2 -2
- package/dist/uni.d.cts +1 -1
- package/dist/uni.d.mts +1 -1
- package/dist/uni.mjs +2 -2
- package/dist/vue.cjs +2 -2
- package/dist/vue.d.cts +1 -1
- package/dist/vue.d.mts +1 -1
- package/dist/vue.mjs +2 -2
- package/package.json +1 -1
- package/dist/oiyo-CdQ_-aZW.mjs +0 -7
- package/dist/oiyo-DZ6BFYIw.cjs +0 -7
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.3
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
|
-
//#region src/oiyo/
|
|
8
|
-
|
|
7
|
+
//#region src/oiyo/http/abort.d.ts
|
|
8
|
+
interface HttpAborter {
|
|
9
|
+
readonly signal: HttpAbortSignal;
|
|
10
|
+
abort: (reason?: any) => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 创建一个中断信标。
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const aborter = createHttpAborter()
|
|
17
|
+
* http.request('/pet/1', { signal: aborter.signal })
|
|
18
|
+
* aborter.abort()
|
|
19
|
+
*/
|
|
20
|
+
declare function createHttpAborter(): HttpAborter;
|
|
21
|
+
type AbortListener = (this: HttpAbortSignal, event: {
|
|
9
22
|
type: 'abort';
|
|
10
23
|
}) => void;
|
|
11
|
-
declare class
|
|
24
|
+
declare class AbortEmitter {
|
|
12
25
|
private listeners;
|
|
13
26
|
addEventListener(type: 'abort', listener: AbortListener): void;
|
|
14
27
|
removeEventListener(type: 'abort', listener: AbortListener): void;
|
|
@@ -16,7 +29,7 @@ declare class Emitter {
|
|
|
16
29
|
type: 'abort';
|
|
17
30
|
}): void;
|
|
18
31
|
}
|
|
19
|
-
declare class
|
|
32
|
+
declare class HttpAbortSignal extends AbortEmitter {
|
|
20
33
|
aborted: boolean;
|
|
21
34
|
reason: any;
|
|
22
35
|
onabort: AbortListener | null;
|
|
@@ -29,25 +42,12 @@ declare class BeaconSignal extends Emitter {
|
|
|
29
42
|
*/
|
|
30
43
|
throwIfAborted(): void;
|
|
31
44
|
}
|
|
32
|
-
interface Beacon {
|
|
33
|
-
readonly signal: BeaconSignal;
|
|
34
|
-
abort: (reason?: any) => void;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* 创建一个中断信标。
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* const beacon = createBeacon()
|
|
41
|
-
* vessel.request('/pet/1', { signal: beacon.signal })
|
|
42
|
-
* beacon.abort()
|
|
43
|
-
*/
|
|
44
|
-
declare function createBeacon(): Beacon;
|
|
45
45
|
//#endregion
|
|
46
|
-
//#region src/oiyo/
|
|
46
|
+
//#region src/oiyo/http/types/utils.d.ts
|
|
47
47
|
type Prettify<T> = { [K in keyof T]: T[K] } & {};
|
|
48
48
|
type MaybePromise<T> = T | Promise<T>;
|
|
49
49
|
//#endregion
|
|
50
|
-
//#region src/oiyo/
|
|
50
|
+
//#region src/oiyo/http/types/body.d.ts
|
|
51
51
|
interface ResponseBodyTypeMap {
|
|
52
52
|
text: string;
|
|
53
53
|
arrayBuffer: ArrayBuffer;
|
|
@@ -55,7 +55,7 @@ interface ResponseBodyTypeMap {
|
|
|
55
55
|
type ResponseBodyType = Prettify<keyof ResponseBodyTypeMap | 'json'>;
|
|
56
56
|
type MappedResponseBodyType<TRBType extends ResponseBodyType, TRBJsonType = any> = TRBType extends keyof ResponseBodyTypeMap ? ResponseBodyTypeMap[TRBType] : TRBJsonType;
|
|
57
57
|
//#endregion
|
|
58
|
-
//#region src/oiyo/
|
|
58
|
+
//#region src/oiyo/http/types/uni.d.ts
|
|
59
59
|
type UniAppRequestOptions = Omit<UniNamespace.RequestOptions, 'url' | 'data' | 'header' | 'method' | 'timeout' | 'responseType' | 'success' | 'fail' | 'complete'>;
|
|
60
60
|
type UniAppRequestResponse<TRBody = any> = Prettify<Omit<UniNamespace.RequestSuccessCallbackResult, 'data'> & {
|
|
61
61
|
data: TRBody;
|
|
@@ -77,7 +77,7 @@ type UniAppDownloadResponse<TRBody = any> = Prettify<Omit<UniNamespace.DownloadS
|
|
|
77
77
|
data: TRBody;
|
|
78
78
|
}>;
|
|
79
79
|
//#endregion
|
|
80
|
-
//#region src/oiyo/
|
|
80
|
+
//#region src/oiyo/http/types/options.d.ts
|
|
81
81
|
/**
|
|
82
82
|
* 响应头监听回调入参。
|
|
83
83
|
*/
|
|
@@ -87,7 +87,7 @@ interface HeadersReceived {
|
|
|
87
87
|
/**
|
|
88
88
|
* 所有请求共享的基础选项。
|
|
89
89
|
*/
|
|
90
|
-
interface
|
|
90
|
+
interface HttpBaseOptions<TRBType extends ResponseBodyType = ResponseBodyType> {
|
|
91
91
|
baseURL?: string;
|
|
92
92
|
method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'TRACE' | 'CONNECT';
|
|
93
93
|
headers?: Record<string, string>;
|
|
@@ -110,19 +110,19 @@ interface VesselBaseOptions<TRBType extends ResponseBodyType = ResponseBodyType>
|
|
|
110
110
|
retryStatusCodes?: number[];
|
|
111
111
|
ignoreResponseError?: boolean;
|
|
112
112
|
/**
|
|
113
|
-
* 中断信号,由 `
|
|
113
|
+
* 中断信号,由 `createHttpAborter()` 创建。
|
|
114
114
|
* 信号触发后请求会被中断;已中断的信号会让请求立即中断。
|
|
115
115
|
*/
|
|
116
|
-
signal?:
|
|
116
|
+
signal?: HttpAbortSignal;
|
|
117
117
|
/**
|
|
118
118
|
* 监听响应头(对应 task.onHeadersReceived)。
|
|
119
119
|
*/
|
|
120
120
|
onHeadersReceived?: (result: HeadersReceived) => void;
|
|
121
121
|
}
|
|
122
|
-
interface
|
|
122
|
+
interface HttpRequestOptions<TRBType extends ResponseBodyType = ResponseBodyType> extends HttpBaseOptions<TRBType>, UniAppRequestOptions {
|
|
123
123
|
method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'TRACE' | 'CONNECT';
|
|
124
124
|
}
|
|
125
|
-
interface
|
|
125
|
+
interface HttpUploadOptions<TRBType extends ResponseBodyType = ResponseBodyType> extends HttpBaseOptions<TRBType>, UniAppUploadOptions {
|
|
126
126
|
/**
|
|
127
127
|
* 文件对应的 key
|
|
128
128
|
* @default - 'file'
|
|
@@ -138,7 +138,7 @@ interface VesselUploadOptions<TRBType extends ResponseBodyType = ResponseBodyTyp
|
|
|
138
138
|
*/
|
|
139
139
|
onProgress?: (result: UniAppOnUploadProgress) => void;
|
|
140
140
|
}
|
|
141
|
-
interface
|
|
141
|
+
interface HttpDownloadOptions<TRBType extends UniAppDownloadBodyType = 'json'> extends HttpBaseOptions<TRBType>, UniAppDownloadOptions {
|
|
142
142
|
/**
|
|
143
143
|
* 下载请求方法
|
|
144
144
|
* @default - 'GET'
|
|
@@ -149,86 +149,86 @@ interface VesselDownloadOptions<TRBType extends UniAppDownloadBodyType = 'json'>
|
|
|
149
149
|
*/
|
|
150
150
|
onProgress?: (result: UniAppDownloadProgress) => void;
|
|
151
151
|
}
|
|
152
|
-
type
|
|
153
|
-
type
|
|
152
|
+
type HttpURL = string;
|
|
153
|
+
type HttpOptions = HttpRequestOptions | HttpUploadOptions | HttpDownloadOptions;
|
|
154
154
|
//#endregion
|
|
155
|
-
//#region src/oiyo/
|
|
156
|
-
type
|
|
157
|
-
type
|
|
158
|
-
type
|
|
159
|
-
type
|
|
160
|
-
type
|
|
161
|
-
type
|
|
162
|
-
type
|
|
155
|
+
//#region src/oiyo/http/types/response.d.ts
|
|
156
|
+
type HttpRequestResponse<TRBody = any, TRBType extends ResponseBodyType = ResponseBodyType> = MappedResponseBodyType<TRBType, TRBody>;
|
|
157
|
+
type HttpUploadResponse<TRBody = any, TRBType extends ResponseBodyType = ResponseBodyType> = MappedResponseBodyType<TRBType, TRBody>;
|
|
158
|
+
type HttpDownloadResponse<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = 'json'> = MappedResponseBodyType<TRBType, TRBody>;
|
|
159
|
+
type HttpRequestRawResponse<TRBody = any, TRBType extends ResponseBodyType = ResponseBodyType> = UniAppRequestResponse<MappedResponseBodyType<TRBType, TRBody>>;
|
|
160
|
+
type HttpUploadRawResponse<TRBody = any, TRBType extends ResponseBodyType = ResponseBodyType> = UniAppUploadResponse<MappedResponseBodyType<TRBType, TRBody>>;
|
|
161
|
+
type HttpDownloadRawResponse<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = 'json'> = UniAppDownloadResponse<MappedResponseBodyType<TRBType, TRBody>>;
|
|
162
|
+
type HttpRawResponse<T = any> = HttpRequestRawResponse<T> | HttpUploadRawResponse<T> | HttpDownloadRawResponse;
|
|
163
163
|
//#endregion
|
|
164
|
-
//#region src/oiyo/
|
|
165
|
-
interface
|
|
166
|
-
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource:
|
|
164
|
+
//#region src/oiyo/http/types/core.d.ts
|
|
165
|
+
interface HttpRequestMethod {
|
|
166
|
+
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource: HttpURL, options: HttpRequestOptions<TRBType> & {
|
|
167
167
|
raw: true;
|
|
168
|
-
}): Promise<
|
|
169
|
-
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource:
|
|
168
|
+
}): Promise<HttpRequestRawResponse<TRBody, TRBType>>;
|
|
169
|
+
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource: HttpURL, options?: HttpRequestOptions<TRBType>): Promise<HttpRequestResponse<TRBody, TRBType>>;
|
|
170
170
|
}
|
|
171
|
-
interface
|
|
172
|
-
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource:
|
|
171
|
+
interface HttpUploadMethod {
|
|
172
|
+
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource: HttpURL, options: HttpUploadOptions<TRBType> & {
|
|
173
173
|
raw: true;
|
|
174
|
-
}): Promise<
|
|
175
|
-
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource:
|
|
174
|
+
}): Promise<HttpUploadRawResponse<TRBody, TRBType>>;
|
|
175
|
+
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource: HttpURL, options?: HttpUploadOptions<TRBType>): Promise<HttpUploadResponse<TRBody, TRBType>>;
|
|
176
176
|
}
|
|
177
|
-
interface
|
|
178
|
-
<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = UniAppDownloadBodyType>(resource:
|
|
177
|
+
interface HttpDownloadMethod {
|
|
178
|
+
<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = UniAppDownloadBodyType>(resource: HttpURL, options: HttpDownloadOptions<TRBType> & {
|
|
179
179
|
raw: true;
|
|
180
|
-
}): Promise<
|
|
181
|
-
<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = UniAppDownloadBodyType>(resource:
|
|
180
|
+
}): Promise<HttpDownloadRawResponse<TRBody, TRBType>>;
|
|
181
|
+
<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = UniAppDownloadBodyType>(resource: HttpURL, options?: HttpDownloadOptions<TRBType>): Promise<HttpDownloadResponse<TRBody, TRBType>>;
|
|
182
182
|
}
|
|
183
|
-
interface
|
|
183
|
+
interface HttpHooks<TContextOptions, TResponse> {
|
|
184
184
|
onRequest?: (context: {
|
|
185
|
-
resource:
|
|
185
|
+
resource: HttpURL;
|
|
186
186
|
options: TContextOptions;
|
|
187
187
|
}) => MaybePromise<void>;
|
|
188
188
|
onRequestError?: (context: {
|
|
189
|
-
resource:
|
|
189
|
+
resource: HttpURL;
|
|
190
190
|
options: TContextOptions;
|
|
191
191
|
error: Error;
|
|
192
192
|
}) => MaybePromise<void>;
|
|
193
193
|
onResponse?: (context: {
|
|
194
|
-
resource:
|
|
194
|
+
resource: HttpURL;
|
|
195
195
|
options: TContextOptions;
|
|
196
196
|
response: TResponse;
|
|
197
197
|
}) => MaybePromise<void>;
|
|
198
198
|
onResponseError?: (context: {
|
|
199
|
-
resource:
|
|
199
|
+
resource: HttpURL;
|
|
200
200
|
options: TContextOptions;
|
|
201
201
|
response: TResponse;
|
|
202
202
|
}) => MaybePromise<void>;
|
|
203
203
|
}
|
|
204
|
-
interface
|
|
205
|
-
interface
|
|
206
|
-
resource?:
|
|
207
|
-
options?:
|
|
208
|
-
response?:
|
|
204
|
+
interface HttpConfig extends HttpBaseOptions<ResponseBodyType>, HttpHooks<HttpConfig, HttpRawResponse> {}
|
|
205
|
+
interface HttpError<T = any> extends Error {
|
|
206
|
+
resource?: HttpURL;
|
|
207
|
+
options?: HttpOptions;
|
|
208
|
+
response?: HttpRawResponse<T>;
|
|
209
209
|
data: T;
|
|
210
210
|
}
|
|
211
211
|
//#endregion
|
|
212
|
-
//#region src/oiyo/
|
|
213
|
-
interface
|
|
212
|
+
//#region src/oiyo/http/core.d.ts
|
|
213
|
+
interface Http {
|
|
214
214
|
/**
|
|
215
215
|
* 普通请求
|
|
216
216
|
*/
|
|
217
|
-
request:
|
|
217
|
+
request: HttpRequestMethod;
|
|
218
218
|
/**
|
|
219
219
|
* 文件上传
|
|
220
220
|
*/
|
|
221
|
-
upload:
|
|
221
|
+
upload: HttpUploadMethod;
|
|
222
222
|
/**
|
|
223
223
|
* 文件下载
|
|
224
224
|
*/
|
|
225
|
-
download:
|
|
225
|
+
download: HttpDownloadMethod;
|
|
226
226
|
/**
|
|
227
227
|
* 基于当前配置派生一个新实例。
|
|
228
228
|
*/
|
|
229
|
-
create: (config:
|
|
229
|
+
create: (config: HttpConfig) => Http;
|
|
230
230
|
}
|
|
231
|
-
declare function
|
|
232
|
-
declare const
|
|
231
|
+
declare function createHttp(globalConfig?: HttpConfig): Http;
|
|
232
|
+
declare const http: Http;
|
|
233
233
|
//#endregion
|
|
234
|
-
export {
|
|
234
|
+
export { HttpDownloadResponse as a, HttpDownloadOptions as c, ResponseBodyType as d, createHttpAborter as f, HttpError as i, HttpRequestOptions as l, http as n, HttpRequestResponse as o, HttpConfig as r, HttpUploadResponse as s, createHttp as t, HttpUploadOptions as u };
|
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.3
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
|
-
//#region src/oiyo/
|
|
8
|
-
|
|
7
|
+
//#region src/oiyo/http/abort.d.ts
|
|
8
|
+
interface HttpAborter {
|
|
9
|
+
readonly signal: HttpAbortSignal;
|
|
10
|
+
abort: (reason?: any) => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 创建一个中断信标。
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const aborter = createHttpAborter()
|
|
17
|
+
* http.request('/pet/1', { signal: aborter.signal })
|
|
18
|
+
* aborter.abort()
|
|
19
|
+
*/
|
|
20
|
+
declare function createHttpAborter(): HttpAborter;
|
|
21
|
+
type AbortListener = (this: HttpAbortSignal, event: {
|
|
9
22
|
type: 'abort';
|
|
10
23
|
}) => void;
|
|
11
|
-
declare class
|
|
24
|
+
declare class AbortEmitter {
|
|
12
25
|
private listeners;
|
|
13
26
|
addEventListener(type: 'abort', listener: AbortListener): void;
|
|
14
27
|
removeEventListener(type: 'abort', listener: AbortListener): void;
|
|
@@ -16,7 +29,7 @@ declare class Emitter {
|
|
|
16
29
|
type: 'abort';
|
|
17
30
|
}): void;
|
|
18
31
|
}
|
|
19
|
-
declare class
|
|
32
|
+
declare class HttpAbortSignal extends AbortEmitter {
|
|
20
33
|
aborted: boolean;
|
|
21
34
|
reason: any;
|
|
22
35
|
onabort: AbortListener | null;
|
|
@@ -29,25 +42,12 @@ declare class BeaconSignal extends Emitter {
|
|
|
29
42
|
*/
|
|
30
43
|
throwIfAborted(): void;
|
|
31
44
|
}
|
|
32
|
-
interface Beacon {
|
|
33
|
-
readonly signal: BeaconSignal;
|
|
34
|
-
abort: (reason?: any) => void;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* 创建一个中断信标。
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* const beacon = createBeacon()
|
|
41
|
-
* vessel.request('/pet/1', { signal: beacon.signal })
|
|
42
|
-
* beacon.abort()
|
|
43
|
-
*/
|
|
44
|
-
declare function createBeacon(): Beacon;
|
|
45
45
|
//#endregion
|
|
46
|
-
//#region src/oiyo/
|
|
46
|
+
//#region src/oiyo/http/types/utils.d.ts
|
|
47
47
|
type Prettify<T> = { [K in keyof T]: T[K] } & {};
|
|
48
48
|
type MaybePromise<T> = T | Promise<T>;
|
|
49
49
|
//#endregion
|
|
50
|
-
//#region src/oiyo/
|
|
50
|
+
//#region src/oiyo/http/types/body.d.ts
|
|
51
51
|
interface ResponseBodyTypeMap {
|
|
52
52
|
text: string;
|
|
53
53
|
arrayBuffer: ArrayBuffer;
|
|
@@ -55,7 +55,7 @@ interface ResponseBodyTypeMap {
|
|
|
55
55
|
type ResponseBodyType = Prettify<keyof ResponseBodyTypeMap | 'json'>;
|
|
56
56
|
type MappedResponseBodyType<TRBType extends ResponseBodyType, TRBJsonType = any> = TRBType extends keyof ResponseBodyTypeMap ? ResponseBodyTypeMap[TRBType] : TRBJsonType;
|
|
57
57
|
//#endregion
|
|
58
|
-
//#region src/oiyo/
|
|
58
|
+
//#region src/oiyo/http/types/uni.d.ts
|
|
59
59
|
type UniAppRequestOptions = Omit<UniNamespace.RequestOptions, 'url' | 'data' | 'header' | 'method' | 'timeout' | 'responseType' | 'success' | 'fail' | 'complete'>;
|
|
60
60
|
type UniAppRequestResponse<TRBody = any> = Prettify<Omit<UniNamespace.RequestSuccessCallbackResult, 'data'> & {
|
|
61
61
|
data: TRBody;
|
|
@@ -77,7 +77,7 @@ type UniAppDownloadResponse<TRBody = any> = Prettify<Omit<UniNamespace.DownloadS
|
|
|
77
77
|
data: TRBody;
|
|
78
78
|
}>;
|
|
79
79
|
//#endregion
|
|
80
|
-
//#region src/oiyo/
|
|
80
|
+
//#region src/oiyo/http/types/options.d.ts
|
|
81
81
|
/**
|
|
82
82
|
* 响应头监听回调入参。
|
|
83
83
|
*/
|
|
@@ -87,7 +87,7 @@ interface HeadersReceived {
|
|
|
87
87
|
/**
|
|
88
88
|
* 所有请求共享的基础选项。
|
|
89
89
|
*/
|
|
90
|
-
interface
|
|
90
|
+
interface HttpBaseOptions<TRBType extends ResponseBodyType = ResponseBodyType> {
|
|
91
91
|
baseURL?: string;
|
|
92
92
|
method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'TRACE' | 'CONNECT';
|
|
93
93
|
headers?: Record<string, string>;
|
|
@@ -110,19 +110,19 @@ interface VesselBaseOptions<TRBType extends ResponseBodyType = ResponseBodyType>
|
|
|
110
110
|
retryStatusCodes?: number[];
|
|
111
111
|
ignoreResponseError?: boolean;
|
|
112
112
|
/**
|
|
113
|
-
* 中断信号,由 `
|
|
113
|
+
* 中断信号,由 `createHttpAborter()` 创建。
|
|
114
114
|
* 信号触发后请求会被中断;已中断的信号会让请求立即中断。
|
|
115
115
|
*/
|
|
116
|
-
signal?:
|
|
116
|
+
signal?: HttpAbortSignal;
|
|
117
117
|
/**
|
|
118
118
|
* 监听响应头(对应 task.onHeadersReceived)。
|
|
119
119
|
*/
|
|
120
120
|
onHeadersReceived?: (result: HeadersReceived) => void;
|
|
121
121
|
}
|
|
122
|
-
interface
|
|
122
|
+
interface HttpRequestOptions<TRBType extends ResponseBodyType = ResponseBodyType> extends HttpBaseOptions<TRBType>, UniAppRequestOptions {
|
|
123
123
|
method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'TRACE' | 'CONNECT';
|
|
124
124
|
}
|
|
125
|
-
interface
|
|
125
|
+
interface HttpUploadOptions<TRBType extends ResponseBodyType = ResponseBodyType> extends HttpBaseOptions<TRBType>, UniAppUploadOptions {
|
|
126
126
|
/**
|
|
127
127
|
* 文件对应的 key
|
|
128
128
|
* @default - 'file'
|
|
@@ -138,7 +138,7 @@ interface VesselUploadOptions<TRBType extends ResponseBodyType = ResponseBodyTyp
|
|
|
138
138
|
*/
|
|
139
139
|
onProgress?: (result: UniAppOnUploadProgress) => void;
|
|
140
140
|
}
|
|
141
|
-
interface
|
|
141
|
+
interface HttpDownloadOptions<TRBType extends UniAppDownloadBodyType = 'json'> extends HttpBaseOptions<TRBType>, UniAppDownloadOptions {
|
|
142
142
|
/**
|
|
143
143
|
* 下载请求方法
|
|
144
144
|
* @default - 'GET'
|
|
@@ -149,86 +149,86 @@ interface VesselDownloadOptions<TRBType extends UniAppDownloadBodyType = 'json'>
|
|
|
149
149
|
*/
|
|
150
150
|
onProgress?: (result: UniAppDownloadProgress) => void;
|
|
151
151
|
}
|
|
152
|
-
type
|
|
153
|
-
type
|
|
152
|
+
type HttpURL = string;
|
|
153
|
+
type HttpOptions = HttpRequestOptions | HttpUploadOptions | HttpDownloadOptions;
|
|
154
154
|
//#endregion
|
|
155
|
-
//#region src/oiyo/
|
|
156
|
-
type
|
|
157
|
-
type
|
|
158
|
-
type
|
|
159
|
-
type
|
|
160
|
-
type
|
|
161
|
-
type
|
|
162
|
-
type
|
|
155
|
+
//#region src/oiyo/http/types/response.d.ts
|
|
156
|
+
type HttpRequestResponse<TRBody = any, TRBType extends ResponseBodyType = ResponseBodyType> = MappedResponseBodyType<TRBType, TRBody>;
|
|
157
|
+
type HttpUploadResponse<TRBody = any, TRBType extends ResponseBodyType = ResponseBodyType> = MappedResponseBodyType<TRBType, TRBody>;
|
|
158
|
+
type HttpDownloadResponse<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = 'json'> = MappedResponseBodyType<TRBType, TRBody>;
|
|
159
|
+
type HttpRequestRawResponse<TRBody = any, TRBType extends ResponseBodyType = ResponseBodyType> = UniAppRequestResponse<MappedResponseBodyType<TRBType, TRBody>>;
|
|
160
|
+
type HttpUploadRawResponse<TRBody = any, TRBType extends ResponseBodyType = ResponseBodyType> = UniAppUploadResponse<MappedResponseBodyType<TRBType, TRBody>>;
|
|
161
|
+
type HttpDownloadRawResponse<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = 'json'> = UniAppDownloadResponse<MappedResponseBodyType<TRBType, TRBody>>;
|
|
162
|
+
type HttpRawResponse<T = any> = HttpRequestRawResponse<T> | HttpUploadRawResponse<T> | HttpDownloadRawResponse;
|
|
163
163
|
//#endregion
|
|
164
|
-
//#region src/oiyo/
|
|
165
|
-
interface
|
|
166
|
-
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource:
|
|
164
|
+
//#region src/oiyo/http/types/core.d.ts
|
|
165
|
+
interface HttpRequestMethod {
|
|
166
|
+
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource: HttpURL, options: HttpRequestOptions<TRBType> & {
|
|
167
167
|
raw: true;
|
|
168
|
-
}): Promise<
|
|
169
|
-
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource:
|
|
168
|
+
}): Promise<HttpRequestRawResponse<TRBody, TRBType>>;
|
|
169
|
+
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource: HttpURL, options?: HttpRequestOptions<TRBType>): Promise<HttpRequestResponse<TRBody, TRBType>>;
|
|
170
170
|
}
|
|
171
|
-
interface
|
|
172
|
-
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource:
|
|
171
|
+
interface HttpUploadMethod {
|
|
172
|
+
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource: HttpURL, options: HttpUploadOptions<TRBType> & {
|
|
173
173
|
raw: true;
|
|
174
|
-
}): Promise<
|
|
175
|
-
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource:
|
|
174
|
+
}): Promise<HttpUploadRawResponse<TRBody, TRBType>>;
|
|
175
|
+
<TRBody = any, TRBType extends ResponseBodyType = 'json'>(resource: HttpURL, options?: HttpUploadOptions<TRBType>): Promise<HttpUploadResponse<TRBody, TRBType>>;
|
|
176
176
|
}
|
|
177
|
-
interface
|
|
178
|
-
<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = UniAppDownloadBodyType>(resource:
|
|
177
|
+
interface HttpDownloadMethod {
|
|
178
|
+
<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = UniAppDownloadBodyType>(resource: HttpURL, options: HttpDownloadOptions<TRBType> & {
|
|
179
179
|
raw: true;
|
|
180
|
-
}): Promise<
|
|
181
|
-
<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = UniAppDownloadBodyType>(resource:
|
|
180
|
+
}): Promise<HttpDownloadRawResponse<TRBody, TRBType>>;
|
|
181
|
+
<TRBody extends UniAppDownloadBody = UniAppDownloadBody, TRBType extends UniAppDownloadBodyType = UniAppDownloadBodyType>(resource: HttpURL, options?: HttpDownloadOptions<TRBType>): Promise<HttpDownloadResponse<TRBody, TRBType>>;
|
|
182
182
|
}
|
|
183
|
-
interface
|
|
183
|
+
interface HttpHooks<TContextOptions, TResponse> {
|
|
184
184
|
onRequest?: (context: {
|
|
185
|
-
resource:
|
|
185
|
+
resource: HttpURL;
|
|
186
186
|
options: TContextOptions;
|
|
187
187
|
}) => MaybePromise<void>;
|
|
188
188
|
onRequestError?: (context: {
|
|
189
|
-
resource:
|
|
189
|
+
resource: HttpURL;
|
|
190
190
|
options: TContextOptions;
|
|
191
191
|
error: Error;
|
|
192
192
|
}) => MaybePromise<void>;
|
|
193
193
|
onResponse?: (context: {
|
|
194
|
-
resource:
|
|
194
|
+
resource: HttpURL;
|
|
195
195
|
options: TContextOptions;
|
|
196
196
|
response: TResponse;
|
|
197
197
|
}) => MaybePromise<void>;
|
|
198
198
|
onResponseError?: (context: {
|
|
199
|
-
resource:
|
|
199
|
+
resource: HttpURL;
|
|
200
200
|
options: TContextOptions;
|
|
201
201
|
response: TResponse;
|
|
202
202
|
}) => MaybePromise<void>;
|
|
203
203
|
}
|
|
204
|
-
interface
|
|
205
|
-
interface
|
|
206
|
-
resource?:
|
|
207
|
-
options?:
|
|
208
|
-
response?:
|
|
204
|
+
interface HttpConfig extends HttpBaseOptions<ResponseBodyType>, HttpHooks<HttpConfig, HttpRawResponse> {}
|
|
205
|
+
interface HttpError<T = any> extends Error {
|
|
206
|
+
resource?: HttpURL;
|
|
207
|
+
options?: HttpOptions;
|
|
208
|
+
response?: HttpRawResponse<T>;
|
|
209
209
|
data: T;
|
|
210
210
|
}
|
|
211
211
|
//#endregion
|
|
212
|
-
//#region src/oiyo/
|
|
213
|
-
interface
|
|
212
|
+
//#region src/oiyo/http/core.d.ts
|
|
213
|
+
interface Http {
|
|
214
214
|
/**
|
|
215
215
|
* 普通请求
|
|
216
216
|
*/
|
|
217
|
-
request:
|
|
217
|
+
request: HttpRequestMethod;
|
|
218
218
|
/**
|
|
219
219
|
* 文件上传
|
|
220
220
|
*/
|
|
221
|
-
upload:
|
|
221
|
+
upload: HttpUploadMethod;
|
|
222
222
|
/**
|
|
223
223
|
* 文件下载
|
|
224
224
|
*/
|
|
225
|
-
download:
|
|
225
|
+
download: HttpDownloadMethod;
|
|
226
226
|
/**
|
|
227
227
|
* 基于当前配置派生一个新实例。
|
|
228
228
|
*/
|
|
229
|
-
create: (config:
|
|
229
|
+
create: (config: HttpConfig) => Http;
|
|
230
230
|
}
|
|
231
|
-
declare function
|
|
232
|
-
declare const
|
|
231
|
+
declare function createHttp(globalConfig?: HttpConfig): Http;
|
|
232
|
+
declare const http: Http;
|
|
233
233
|
//#endregion
|
|
234
|
-
export {
|
|
234
|
+
export { HttpDownloadResponse as a, HttpDownloadOptions as c, ResponseBodyType as d, createHttpAborter as f, HttpError as i, HttpRequestOptions as l, http as n, HttpRequestResponse as o, HttpConfig as r, HttpUploadResponse as s, createHttp as t, HttpUploadOptions as u };
|
package/dist/index.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.3
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
8
|
-
require("./chunk-
|
|
9
|
-
const require_oiyo = require("./oiyo-
|
|
8
|
+
require("./chunk-BGy3oB1q.cjs");
|
|
9
|
+
const require_oiyo = require("./oiyo-BOfXIUcB.cjs");
|
|
10
10
|
require("./uni.cjs");
|
|
11
11
|
require("./vue.cjs");
|
|
12
12
|
//#endregion
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
13
|
+
exports.createHttp = require_oiyo.createHttp;
|
|
14
|
+
exports.createHttpAborter = require_oiyo.createHttpAborter;
|
|
15
|
+
exports.http = require_oiyo.http;
|
|
16
16
|
var _dcloudio_uni_app = require("@dcloudio/uni-app");
|
|
17
17
|
Object.keys(_dcloudio_uni_app).forEach(function(k) {
|
|
18
18
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.3
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
|
-
import { a as
|
|
7
|
+
import { a as HttpDownloadResponse, c as HttpDownloadOptions, d as ResponseBodyType, f as createHttpAborter, i as HttpError, l as HttpRequestOptions, n as http, o as HttpRequestResponse, r as HttpConfig, s as HttpUploadResponse, t as createHttp, u as HttpUploadOptions } from "./index-B4NECdKj.cjs";
|
|
8
8
|
export * from "@dcloudio/uni-app";
|
|
9
9
|
export * from "vue";
|
|
10
10
|
|
|
11
11
|
//#region src/index.d.ts
|
|
12
12
|
declare namespace index_d_exports {
|
|
13
|
-
export {
|
|
13
|
+
export { HttpConfig, HttpDownloadOptions, HttpDownloadResponse, HttpError, HttpRequestOptions, HttpRequestResponse, HttpUploadOptions, HttpUploadResponse, ResponseBodyType, createHttp, createHttpAborter, http };
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
16
|
-
export { type
|
|
16
|
+
export { type HttpConfig, type HttpDownloadOptions, type HttpDownloadResponse, type HttpError, type HttpRequestOptions, type HttpRequestResponse, type HttpUploadOptions, type HttpUploadResponse, type ResponseBodyType, createHttp, createHttpAborter, http };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.3
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
|
-
import { a as
|
|
7
|
+
import { a as HttpDownloadResponse, c as HttpDownloadOptions, d as ResponseBodyType, f as createHttpAborter, i as HttpError, l as HttpRequestOptions, n as http, o as HttpRequestResponse, r as HttpConfig, s as HttpUploadResponse, t as createHttp, u as HttpUploadOptions } from "./index-B4NECdKj.mjs";
|
|
8
8
|
export * from "@dcloudio/uni-app";
|
|
9
9
|
export * from "vue";
|
|
10
10
|
|
|
11
11
|
//#region src/index.d.ts
|
|
12
12
|
declare namespace index_d_exports {
|
|
13
|
-
export {
|
|
13
|
+
export { HttpConfig, HttpDownloadOptions, HttpDownloadResponse, HttpError, HttpRequestOptions, HttpRequestResponse, HttpUploadOptions, HttpUploadResponse, ResponseBodyType, createHttp, createHttpAborter, http };
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
16
|
-
export { type
|
|
16
|
+
export { type HttpConfig, type HttpDownloadOptions, type HttpDownloadResponse, type HttpError, type HttpRequestOptions, type HttpRequestResponse, type HttpUploadOptions, type HttpUploadResponse, type ResponseBodyType, createHttp, createHttpAborter, http };
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.3
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import { n as
|
|
7
|
+
import "./chunk-BIMTDWTb.mjs";
|
|
8
|
+
import { n as http, r as createHttpAborter, t as createHttp } from "./oiyo-BOeGyXdP.mjs";
|
|
9
9
|
import "./uni.mjs";
|
|
10
10
|
import "./vue.mjs";
|
|
11
11
|
export * from "@dcloudio/uni-app";
|
|
12
12
|
export * from "vue";
|
|
13
13
|
//#endregion
|
|
14
|
-
export {
|
|
14
|
+
export { createHttp, createHttpAborter, http };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.3
|
|
3
|
+
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
|
+
* Commercial software. See LICENSE for terms.
|
|
5
|
+
* Official site: https://oiyo.js.org
|
|
6
|
+
*/
|
|
7
|
+
const _0x7f66db=_0xbd60;(function(_0x5329f5,_0x2e49f1){const _0x3d95dd=_0xbd60,_0x5c89f7=_0x5329f5();while(!![]){try{const _0x2d6984=-parseInt(_0x3d95dd(0x1a2))/0x1+-parseInt(_0x3d95dd(0x192))/0x2+parseInt(_0x3d95dd(0x1ac))/0x3+-parseInt(_0x3d95dd(0x196))/0x4+-parseInt(_0x3d95dd(0x17e))/0x5*(-parseInt(_0x3d95dd(0x1ad))/0x6)+parseInt(_0x3d95dd(0x1b5))/0x7*(-parseInt(_0x3d95dd(0x19d))/0x8)+parseInt(_0x3d95dd(0x184))/0x9;if(_0x2d6984===_0x2e49f1)break;else _0x5c89f7['push'](_0x5c89f7['shift']());}catch(_0x1dc112){_0x5c89f7['push'](_0x5c89f7['shift']());}}}(_0x5285,0xe55e8));function createHttpAborter(){const _0x44e027=new HttpAbortSignal();return{'signal':_0x44e027,'abort':_0x2f3f62=>_0x44e027['_abort'](_0x2f3f62)};}const ABORT_ERROR_NAME='AbortError';var AbortEmitter=class{[_0x7f66db(0x186)]=[];[_0x7f66db(0x180)](_0x2cabe1,_0x11dc68){const _0x52debf=_0x7f66db;if(_0x2cabe1!==_0x52debf(0x165))return;this['listeners'][_0x52debf(0x1a7)](_0x11dc68);}[_0x7f66db(0x1b1)](_0x52c5cf,_0xd11530){const _0x1cd231=_0x7f66db;if(_0x52c5cf!==_0x1cd231(0x165))return;const _0x2890fa=this[_0x1cd231(0x186)]['indexOf'](_0xd11530);if(_0x2890fa!==-0x1)this[_0x1cd231(0x186)][_0x1cd231(0x18a)](_0x2890fa,0x1);}['emit'](_0x5e69ac){const _0x5b89ad=_0x7f66db;for(const _0x54cbbd of this[_0x5b89ad(0x186)][_0x5b89ad(0x16b)]())_0x54cbbd[_0x5b89ad(0x161)](this,_0x5e69ac);}},HttpAbortSignal=class extends AbortEmitter{[_0x7f66db(0x17d)]=![];[_0x7f66db(0x1b2)]=void 0x0;['onabort']=null;['_abort'](_0x480e56){const _0x4907f5=_0x7f66db;if(this['aborted'])return;this[_0x4907f5(0x17d)]=!![],this[_0x4907f5(0x1b2)]=_0x480e56===void 0x0?createAbortError():_0x480e56;const _0xe545b3={};_0xe545b3['type']='abort';const _0x240b87=_0xe545b3;if(typeof this['onabort']===_0x4907f5(0x19c))this[_0x4907f5(0x1b6)](_0x240b87);this['emit'](_0x240b87);}['throwIfAborted'](){if(this['aborted'])throw this['reason'];}};function _0x5285(){const _0x209e57=['GET','657160qdONeS','onabort','fail','body','call','has','tempFilePath','text','abort','resolve','entries','catch','create','assign','slice','query','enableCache','onFail','enableHttpDNS','baseURL','parseResponse','options','DELETE','file','upload','url','uploadFile','HttpError','json','The\x20operation\x20was\x20aborted','errMsg','headers','aborted','7627825ZhMlWe','enableQuic','addEventListener','timeout','request','response','34158357xiokoG','name','listeners','filePath','stringify','<no\x20response\x20body>','splice','method','statusCode','fileType','sslVerify','onResponseError','onProgressUpdate','raw','2085444mMreSe','download','data','ignoreResponseError','3053560iciMNU','onSuccess','dataType','number','success','responseType','function','152gbpMgy','enableChunked','onResponse','retryDelay','POST','1605742uALFOI','httpDNSServiceId','header','flatMap','onHeadersReceived','push','signal','formData','then','map','2442396alwqWg','6MyXsDm','arrayBuffer','test','files','removeEventListener','reason','complete'];_0x5285=function(){return _0x209e57;};return _0x5285();}function createAbortError(_0x2aba9c=_0x7f66db(0x17a)){const _0x2765a3=new Error(_0x2aba9c);return _0x2765a3['name']=ABORT_ERROR_NAME,_0x2765a3;}function isAbortError(_0x3dc750){return _0x3dc750 instanceof Error&&_0x3dc750['name']===ABORT_ERROR_NAME;}function onAbort(_0x3550d1,_0xbcf30f){const _0x2f9a53=_0x7f66db;if(!_0x3550d1)return()=>{};if(_0x3550d1['aborted'])return _0xbcf30f(),()=>{};return _0x3550d1['addEventListener'](_0x2f9a53(0x165),_0xbcf30f),()=>_0x3550d1[_0x2f9a53(0x1b1)]('abort',_0xbcf30f);}const HOOK_NAMES=['onRequest','onRequestError',_0x7f66db(0x19f),_0x7f66db(0x18f)];function mergeOptions(..._0x599e4f){const _0x200528=_0x7f66db,_0x28a101={},_0x239b26={};for(const _0xa90c35 of _0x599e4f){if(!_0xa90c35)continue;for(const _0x16aa49 of HOOK_NAMES)collectHook(_0x239b26,_0x16aa49,_0xa90c35);const _0xbba6d1=_0x28a101['headers'],_0x3bbb47=_0x28a101[_0x200528(0x16c)];Object[_0x200528(0x16a)](_0x28a101,_0xa90c35);const _0x1401b5={..._0xbba6d1,..._0xa90c35['headers']};_0x28a101['headers']=_0x1401b5;const _0x45cd5f={..._0x3bbb47,..._0xa90c35['query']};_0x28a101['query']=_0x45cd5f;}for(const [_0x443a84,_0x1585c4]of Object[_0x200528(0x167)](_0x239b26))Object[_0x200528(0x16a)](_0x28a101,{[_0x443a84]:async _0x426c44=>{for(const _0x50630a of _0x1585c4)await _0x50630a(_0x426c44);}});return _0x28a101;}function collectHook(_0x4054bd,_0x5fc684,_0x520f7c){const _0x1ef9cd=_0x7f66db,_0x29e474=_0x520f7c[_0x5fc684];if(typeof _0x29e474!==_0x1ef9cd(0x19c))return;_0x4054bd[_0x5fc684]??=[],_0x4054bd[_0x5fc684]['push'](_0x29e474);}function dispatch(_0x46d616,_0x350c2d,_0x41586a,_0x57b52a){const _0x3cd526=_0x7f66db;let _0x58fc23;if(_0x46d616===_0x3cd526(0x175))_0x58fc23=dispatchUpload(_0x350c2d,_0x41586a,_0x57b52a);else{if(_0x46d616===_0x3cd526(0x193))_0x58fc23=dispatchDownload(_0x350c2d,_0x41586a,_0x57b52a);else _0x58fc23=dispatchRequest(_0x350c2d,_0x41586a,_0x57b52a);}bindTask(_0x58fc23,_0x41586a);}function bindTask(_0xf903c2,_0x2e7095){const _0x4d051e=_0x7f66db;onAbort(_0x2e7095[_0x4d051e(0x1a8)],()=>_0xf903c2[_0x4d051e(0x165)]());if(typeof _0x2e7095[_0x4d051e(0x1a6)]===_0x4d051e(0x19c))_0xf903c2[_0x4d051e(0x1a6)](_0x2e7095[_0x4d051e(0x1a6)]);const _0x9c58a6=_0x2e7095['onProgress'];if(typeof _0x9c58a6===_0x4d051e(0x19c)&&_0x4d051e(0x190)in _0xf903c2)_0xf903c2['onProgressUpdate'](_0x9c58a6);}function dispatchRequest(_0x388141,_0x215477,_0x3ffa61){const _0x4e1c5b=_0x7f66db,_0x44f40e={'url':_0x388141,'method':_0x215477[_0x4e1c5b(0x18b)],'header':_0x215477[_0x4e1c5b(0x17c)],'data':_0x215477['body']??{},'timeout':_0x215477['timeout'],'dataType':_0x215477[_0x4e1c5b(0x198)]||'json','responseType':mappedResponseBodyType(_0x215477['responseType']),'sslVerify':_0x215477[_0x4e1c5b(0x18e)],'withCredentials':_0x215477['withCredentials'],'firstIpv4':_0x215477['firstIpv4'],'enableHttp2':_0x215477['enableHttp2'],'enableQuic':_0x215477[_0x4e1c5b(0x17f)],'enableCache':_0x215477[_0x4e1c5b(0x16d)],'enableHttpDNS':_0x215477[_0x4e1c5b(0x16f)],'httpDNSServiceId':_0x215477[_0x4e1c5b(0x1a3)],'enableChunked':_0x215477[_0x4e1c5b(0x19e)],'forceCellularNetwork':_0x215477['forceCellularNetwork'],'success':_0x3ffa61['onSuccess'],'fail':_0x3ffa61[_0x4e1c5b(0x16e)],'complete':()=>{}};return uni['request'](_0x44f40e);}function dispatchUpload(_0x1d6944,_0x4b9116,_0x2bf192){const _0x48cc7a=_0x7f66db,_0x192b94={};_0x192b94[_0x48cc7a(0x176)]=_0x1d6944,_0x192b94['fileType']=_0x4b9116[_0x48cc7a(0x18d)],_0x192b94['file']=_0x4b9116['file'],_0x192b94[_0x48cc7a(0x187)]=_0x4b9116[_0x48cc7a(0x187)],_0x192b94[_0x48cc7a(0x185)]=_0x4b9116['name']??_0x48cc7a(0x174),_0x192b94[_0x48cc7a(0x1b0)]=_0x4b9116['files'],_0x192b94[_0x48cc7a(0x1a4)]=_0x4b9116['headers'],_0x192b94[_0x48cc7a(0x1a9)]=_0x4b9116[_0x48cc7a(0x160)]??{},_0x192b94['timeout']=_0x4b9116[_0x48cc7a(0x181)],_0x192b94[_0x48cc7a(0x19a)]=_0x2bf192['onSuccess'],_0x192b94[_0x48cc7a(0x1b7)]=_0x2bf192[_0x48cc7a(0x16e)],_0x192b94[_0x48cc7a(0x1b3)]=()=>{};const _0x538c8a=_0x192b94;return uni[_0x48cc7a(0x177)](_0x538c8a);}function dispatchDownload(_0x36ca09,_0x132551,_0x20d202){const _0x5bfd65={'url':_0x36ca09,'header':_0x132551['headers'],'timeout':_0x132551['timeout'],'success':_0x1c2c65=>{const _0x2febf4=_0xbd60,_0x1b88cd={..._0x1c2c65};_0x1b88cd[_0x2febf4(0x194)]={},_0x1b88cd[_0x2febf4(0x194)]['tempFilePath']=_0x1c2c65[_0x2febf4(0x163)],_0x20d202[_0x2febf4(0x197)](_0x1b88cd);},'fail':_0x20d202['onFail'],'complete':()=>{}};return uni['downloadFile'](_0x5bfd65);}function mappedResponseBodyType(_0x28a251){const _0x50da86=_0x7f66db;if(!_0x28a251||_0x28a251===_0x50da86(0x179))return'text';if(_0x28a251===_0x50da86(0x1ae))return'arraybuffer';return _0x50da86(0x164);}function _0xbd60(_0x5acaf0,_0x406d7e){_0x5acaf0=_0x5acaf0-0x160;const _0x5285a2=_0x5285();let _0xbd60a0=_0x5285a2[_0x5acaf0];return _0xbd60a0;}var HttpError=class extends Error{constructor(_0x408d09){const _0x302b70=_0x7f66db;super(_0x408d09),this['name']=_0x302b70(0x178);}};function createResponseError(_0x36462b,_0x470398,_0x49cfe6){const _0x5574d9=_0x7f66db,_0x2e236a=_0x36462b,_0x5a935f='['+(_0x470398?.['method']||_0x5574d9(0x1b4))+']\x20'+_0x2e236a,_0x53e8b8=_0x49cfe6?_0x49cfe6[_0x5574d9(0x18c)]+'\x20'+(_0x49cfe6[_0x5574d9(0x17b)]||''):'<no\x20response>',_0x180ea=_0x49cfe6?JSON[_0x5574d9(0x188)](_0x49cfe6['data']):_0x5574d9(0x189),_0x33b266=new HttpError(_0x5a935f+':\x20'+_0x53e8b8+(_0x49cfe6['data']?'\x20'+_0x180ea:''));for(const _0xf2c3ce of[_0x5574d9(0x182),_0x5574d9(0x172),'response','data'])Object['defineProperty'](_0x33b266,_0xf2c3ce,{'get'(){const _0x372432=_0x5574d9,_0x2a7f1c={};return _0x2a7f1c['request']=_0x36462b,_0x2a7f1c['options']=_0x470398,_0x2a7f1c[_0x372432(0x183)]=_0x49cfe6,_0x2a7f1c['data']=_0x49cfe6[_0x372432(0x194)],_0x2a7f1c[_0xf2c3ce];}});return _0x33b266;}function normalizeError(_0x45d1a3){if(_0x45d1a3 instanceof Error)return _0x45d1a3;return Object['assign'](new Error(_0x45d1a3?.['errMsg']||_0x45d1a3?.['message']||'HTTP\x20request\x20failed'),{'cause':_0x45d1a3});}async function callRequestHooks(_0x110750,_0x456e15){await _0x456e15['onRequest']?.({'options':_0x456e15,'resource':_0x110750});}async function callRequestErrorHooks(_0x6269d8,_0x27bc6f,_0x3660e7){await _0x27bc6f['onRequestError']?.({'options':_0x27bc6f,'resource':_0x6269d8,'error':_0x3660e7});}async function callResponseHooks(_0x4bc4d4,_0x3f0330,_0x1d86af){const _0x16b730=_0x7f66db;await _0x3f0330[_0x16b730(0x19f)]?.({'options':_0x3f0330,'resource':_0x4bc4d4,'response':_0x1d86af});}async function callResponseErrorHooks(_0x313f4a,_0x54edda,_0x1a479e){const _0x3101c3=_0x7f66db;await _0x54edda[_0x3101c3(0x18f)]?.({'options':_0x54edda,'resource':_0x313f4a,'response':_0x1a479e});}async function refineResponse(_0x1a5c9b,_0x3e2509){const _0x38e023=_0x7f66db;if(_0x3e2509[_0x38e023(0x19b)]==='json'||!_0x3e2509['responseType'])return{..._0x1a5c9b,'data':await parseJSONResponse(_0x1a5c9b['data'],_0x3e2509)};return _0x1a5c9b;}function parseJSONResponse(_0x2d279e,_0x3a2879){const _0x208319=_0x7f66db;if(typeof _0x2d279e!=='string')return _0x2d279e;if(_0x3a2879[_0x208319(0x171)])return _0x3a2879[_0x208319(0x171)](_0x2d279e);return _0x2d279e?JSON['parse'](_0x2d279e):null;}function isResponseError(_0x4f8261){const _0x42721f=_0x7f66db,_0x229350='statusCode'in _0x4f8261?_0x4f8261['statusCode']:void 0x0;return typeof _0x229350===_0x42721f(0x199)&&(_0x229350<0xc8||_0x229350>=0x12c);}const DEFAULT_RETRY_STATUS_CODES=[0x198,0x199,0x1a9,0x1ad,0x1f4,0x1f6,0x1f7,0x1f8],PAYLOAD_METHODS=new Set([_0x7f66db(0x1a1),'PUT',_0x7f66db(0x173),'PATCH']);async function withRetry(_0x364372,_0x2554e2){const _0xd3cf43=_0x7f66db,_0x2c9105=resolveRetryCount(_0x364372);for(let _0x191809=0x0;;_0x191809++)try{return await _0x2554e2();}catch(_0x511f2e){if(_0x191809>=_0x2c9105||!shouldRetry(_0x511f2e,_0x364372))throw _0x511f2e;await sleep(_0x364372[_0xd3cf43(0x1a0)]??0x0,_0x364372['signal']);}}function resolveRetryCount(_0x5592fe){const _0x265279=_0x7f66db,{retry:_0x3fed04}=_0x5592fe;if(_0x3fed04===![])return 0x0;if(typeof _0x3fed04==='number')return _0x3fed04>0x0?_0x3fed04:0x0;return isPayloadMethod(_0x5592fe[_0x265279(0x18b)])?0x0:0x1;}function shouldRetry(_0x1efb62,_0x4c4c7a){const _0x2e2334=_0x7f66db;if(_0x4c4c7a[_0x2e2334(0x1a8)]?.['aborted']||isAbortError(_0x1efb62))return![];const _0x1e46b6=_0x1efb62?.[_0x2e2334(0x183)]?.['statusCode'];if(typeof _0x1e46b6!=='number')return!![];return(_0x4c4c7a['retryStatusCodes']??DEFAULT_RETRY_STATUS_CODES)['includes'](_0x1e46b6);}function isPayloadMethod(_0x50bfc2){const _0x132a4a=_0x7f66db;return!!_0x50bfc2&&PAYLOAD_METHODS[_0x132a4a(0x162)](_0x50bfc2['toUpperCase']());}function sleep(_0x54602f,_0x6c2f99){return new Promise((_0xa7da23,_0x761457)=>{if(_0x6c2f99?.['aborted']){_0x761457(_0x6c2f99['reason']);return;}if(!(_0x54602f>0x0)){_0xa7da23();return;}let _0x219729=()=>{};const _0x104842=setTimeout(()=>{_0x219729(),_0xa7da23();},_0x54602f);_0x219729=onAbort(_0x6c2f99,()=>{clearTimeout(_0x104842),_0x761457(_0x6c2f99['reason']);});});}function buildURL(_0x3e43ae,_0x16d5c4){const _0x5aeb9a=_0x7f66db,_0x2f7128=joinURL(_0x16d5c4[_0x5aeb9a(0x170)],_0x3e43ae),_0x52c30d=_0x16d5c4['query']??{},_0xf4c521=Object['keys'](_0x52c30d)['filter'](_0xa38c9c=>_0x52c30d[_0xa38c9c]!==void 0x0)[_0x5aeb9a(0x1a5)](_0x4c47e0=>{const _0x1ac10c=_0x5aeb9a,_0x4da312=_0x52c30d[_0x4c47e0];return(Array['isArray'](_0x4da312)?_0x4da312:[_0x4da312])[_0x1ac10c(0x1ab)](_0x8ecbb3=>encodeURIComponent(_0x4c47e0)+'='+encodeURIComponent(String(_0x8ecbb3)));})['join']('&');if(!_0xf4c521)return _0x2f7128;return''+_0x2f7128+(_0x2f7128['includes']('?')?'&':'?')+_0xf4c521;}function joinURL(_0x1cecf2,_0x931937){if(!_0x1cecf2||isAbsoluteURL(_0x931937))return _0x931937;return _0x1cecf2['replace'](/\/+$/,'')+'/'+_0x931937['replace'](/^\/+/,'');}function isAbsoluteURL(_0x37b105){const _0x1d735d=_0x7f66db;return/^[a-z][a-z\d+\-.]*:\/\//i[_0x1d735d(0x1af)](_0x37b105)||_0x37b105['startsWith']('//');}function dispatchHttp(_0x2bf126,_0x4297ba,_0x1ca056){const _0x53f25b=buildURL(_0x4297ba,_0x1ca056);return withRetry(_0x1ca056,()=>attemptRequest(_0x2bf126,_0x4297ba,_0x53f25b,_0x1ca056));}function attemptRequest(_0x45941f,_0x27c0df,_0x516ecf,_0x386a6a){const _0x5c0edc=_0x7f66db,_0x3b6656=!!_0x386a6a[_0x5c0edc(0x191)];return new Promise((_0x2c00d7,_0x1e5850)=>{const _0x3871e4=_0x5c0edc;let _0x521053=![];const _0x3b91c8=_0x1e12c7=>{if(_0x521053)return;_0x521053=!![],_0x1e12c7();},_0x1a912c=onAbort(_0x386a6a[_0x3871e4(0x1a8)],()=>{_0x3b91c8(()=>_0x1e5850(_0x386a6a['signal']['reason']));}),_0x29e1f9=_0x5342e0=>{_0x1a912c(),_0x3b91c8(_0x5342e0);};callRequestHooks(_0x27c0df,_0x386a6a)[_0x3871e4(0x1aa)](()=>{if(_0x521053)return;dispatch(_0x45941f,_0x516ecf,_0x386a6a,{'onSuccess':_0x39d652=>{const _0x5b586a=_0xbd60;Promise[_0x5b586a(0x166)]()[_0x5b586a(0x1aa)](()=>refineResponse(_0x39d652,_0x386a6a))[_0x5b586a(0x1aa)](async _0x27f138=>{const _0x6aec80=_0x5b586a;if(isResponseError(_0x39d652)){await callResponseErrorHooks(_0x27c0df,_0x386a6a,_0x27f138);if(!_0x386a6a[_0x6aec80(0x195)])throw createResponseError(_0x27c0df,_0x386a6a,_0x27f138);}else await callResponseHooks(_0x27c0df,_0x386a6a,_0x27f138);_0x29e1f9(()=>_0x2c00d7(_0x3b6656?_0x27f138:_0x27f138['data']));})['catch'](_0x3a216a=>_0x29e1f9(()=>_0x1e5850(_0x3a216a)));},'onFail':_0x4eb09b=>{const _0x3a5398=_0xbd60;Promise[_0x3a5398(0x166)]()['then'](async()=>{const _0x326fd2=normalizeError(_0x4eb09b);if(!isAbortError(_0x326fd2))await callRequestErrorHooks(_0x27c0df,_0x386a6a,_0x326fd2);throw _0x326fd2;})[_0x3a5398(0x168)](_0x4037e0=>_0x29e1f9(()=>_0x1e5850(_0x4037e0)));}});})[_0x3871e4(0x168)](async _0xb46300=>{const _0x33c69e=normalizeError(_0xb46300);await callRequestErrorHooks(_0x27c0df,_0x386a6a,_0x33c69e),_0x29e1f9(()=>_0x1e5850(_0x33c69e));});});}const _0x424161={};_0x424161['method']='GET',_0x424161['responseType']='json';const defaultConfig=_0x424161;function createHttp(_0x19868={}){const _0x33ec67=_0x7f66db,_0x26f4fe=(_0x57f853,_0x3ab5d1)=>{const _0x4c7ae7=_0xbd60;return dispatchHttp(_0x4c7ae7(0x182),_0x57f853,mergeOptions(defaultConfig,_0x19868,_0x3ab5d1));},_0xc433c5=(_0x2797e3,_0x11ea28)=>{const _0x4e1036={};return _0x4e1036['method']='POST',dispatchHttp('upload',_0x2797e3,mergeOptions(defaultConfig,_0x19868,_0x11ea28,_0x4e1036));},_0x3b8ec0=(_0x3ca3d3,_0x14aac5)=>{const _0x177efb=_0xbd60,_0x43f2cf={};return _0x43f2cf[_0x177efb(0x18b)]=_0x177efb(0x1b4),dispatchHttp(_0x177efb(0x193),_0x3ca3d3,mergeOptions(defaultConfig,_0x19868,_0x14aac5,_0x43f2cf));},_0x5399c4=_0x2908e0=>createHttp(mergeOptions(_0x19868,_0x2908e0)),_0x239775={};return _0x239775[_0x33ec67(0x182)]=_0x26f4fe,_0x239775['upload']=_0xc433c5,_0x239775['download']=_0x3b8ec0,_0x239775[_0x33ec67(0x169)]=_0x5399c4,_0x239775;}const http=createHttp();export{http as n,createHttpAborter as r,createHttp as t};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.3
|
|
3
|
+
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
|
+
* Commercial software. See LICENSE for terms.
|
|
5
|
+
* Official site: https://oiyo.js.org
|
|
6
|
+
*/
|
|
7
|
+
const _0x27439e=_0x5c48;(function(_0x46122b,_0x12be92){const _0x90f373=_0x5c48,_0x2cd1e9=_0x46122b();while(!![]){try{const _0xf3be82=-parseInt(_0x90f373(0x1b1))/0x1*(-parseInt(_0x90f373(0x1f5))/0x2)+parseInt(_0x90f373(0x1fb))/0x3*(parseInt(_0x90f373(0x1d8))/0x4)+-parseInt(_0x90f373(0x1f0))/0x5*(parseInt(_0x90f373(0x1db))/0x6)+parseInt(_0x90f373(0x1d6))/0x7+parseInt(_0x90f373(0x1f6))/0x8*(-parseInt(_0x90f373(0x1b6))/0x9)+parseInt(_0x90f373(0x1cd))/0xa*(parseInt(_0x90f373(0x1e7))/0xb)+-parseInt(_0x90f373(0x1e1))/0xc;if(_0xf3be82===_0x12be92)break;else _0x2cd1e9['push'](_0x2cd1e9['shift']());}catch(_0x1444ae){_0x2cd1e9['push'](_0x2cd1e9['shift']());}}}(_0x591a,0x26f8d));function createHttpAborter(){const _0xef7a19=_0x5c48,_0x91841d=new HttpAbortSignal();return{'signal':_0x91841d,'abort':_0x425c57=>_0x91841d[_0xef7a19(0x1b8)](_0x425c57)};}const ABORT_ERROR_NAME=_0x27439e(0x1c4);var AbortEmitter=class{[_0x27439e(0x1c5)]=[];[_0x27439e(0x1b5)](_0x150af6,_0x6de233){const _0x100d4b=_0x27439e;if(_0x150af6!==_0x100d4b(0x1eb))return;this[_0x100d4b(0x1c5)]['push'](_0x6de233);}['removeEventListener'](_0x5e85d4,_0x929758){const _0x1909b7=_0x27439e;if(_0x5e85d4!=='abort')return;const _0x1e9507=this['listeners'][_0x1909b7(0x1d9)](_0x929758);if(_0x1e9507!==-0x1)this[_0x1909b7(0x1c5)][_0x1909b7(0x1b3)](_0x1e9507,0x1);}['emit'](_0x3c1115){const _0x235c9f=_0x27439e;for(const _0x21231b of this['listeners']['slice']())_0x21231b[_0x235c9f(0x1b4)](this,_0x3c1115);}},HttpAbortSignal=class extends AbortEmitter{[_0x27439e(0x1be)]=![];[_0x27439e(0x1f4)]=void 0x0;['onabort']=null;[_0x27439e(0x1b8)](_0x1e85b1){const _0x171574=_0x27439e;if(this[_0x171574(0x1be)])return;this['aborted']=!![],this['reason']=_0x1e85b1===void 0x0?createAbortError():_0x1e85b1;const _0x1b8d17={};_0x1b8d17[_0x171574(0x1ed)]='abort';const _0x218691=_0x1b8d17;if(typeof this[_0x171574(0x1e4)]==='function')this[_0x171574(0x1e4)](_0x218691);this['emit'](_0x218691);}['throwIfAborted'](){if(this['aborted'])throw this['reason'];}};function createAbortError(_0x2e78a3=_0x27439e(0x1ff)){const _0x4d66a1=new Error(_0x2e78a3);return _0x4d66a1['name']=ABORT_ERROR_NAME,_0x4d66a1;}function isAbortError(_0x34acf2){const _0x47cab1=_0x27439e;return _0x34acf2 instanceof Error&&_0x34acf2[_0x47cab1(0x1cb)]===ABORT_ERROR_NAME;}function onAbort(_0x1f6497,_0x460e95){const _0x3bb818=_0x27439e;if(!_0x1f6497)return()=>{};if(_0x1f6497[_0x3bb818(0x1be)])return _0x460e95(),()=>{};return _0x1f6497[_0x3bb818(0x1b5)]('abort',_0x460e95),()=>_0x1f6497[_0x3bb818(0x1e8)](_0x3bb818(0x1eb),_0x460e95);}const HOOK_NAMES=['onRequest','onRequestError',_0x27439e(0x1cf),'onResponseError'];function mergeOptions(..._0x135b25){const _0x23e9f7=_0x27439e,_0x37a340={},_0x1cd0c7={};for(const _0x22e340 of _0x135b25){if(!_0x22e340)continue;for(const _0x5b1dd5 of HOOK_NAMES)collectHook(_0x1cd0c7,_0x5b1dd5,_0x22e340);const _0x479b0c=_0x37a340[_0x23e9f7(0x1c0)],_0x957607=_0x37a340['query'];Object['assign'](_0x37a340,_0x22e340);const _0x2e6bc4={..._0x479b0c,..._0x22e340['headers']};_0x37a340['headers']=_0x2e6bc4;const _0x2e66ba={..._0x957607,..._0x22e340[_0x23e9f7(0x1cc)]};_0x37a340['query']=_0x2e66ba;}for(const [_0x3cdbb7,_0x9d11de]of Object[_0x23e9f7(0x1c1)](_0x1cd0c7))Object['assign'](_0x37a340,{[_0x3cdbb7]:async _0x340900=>{for(const _0x17e08a of _0x9d11de)await _0x17e08a(_0x340900);}});return _0x37a340;}function collectHook(_0x108f14,_0x41e4d7,_0x4c3057){const _0x3bb108=_0x27439e,_0x3a78ef=_0x4c3057[_0x41e4d7];if(typeof _0x3a78ef!==_0x3bb108(0x1d7))return;_0x108f14[_0x41e4d7]??=[],_0x108f14[_0x41e4d7]['push'](_0x3a78ef);}function dispatch(_0x1cfbb1,_0x11daa9,_0x3a162a,_0x35f7eb){let _0x2df81b;if(_0x1cfbb1==='upload')_0x2df81b=dispatchUpload(_0x11daa9,_0x3a162a,_0x35f7eb);else{if(_0x1cfbb1==='download')_0x2df81b=dispatchDownload(_0x11daa9,_0x3a162a,_0x35f7eb);else _0x2df81b=dispatchRequest(_0x11daa9,_0x3a162a,_0x35f7eb);}bindTask(_0x2df81b,_0x3a162a);}function bindTask(_0x3b2f15,_0x47d22f){const _0x59d3c1=_0x27439e;onAbort(_0x47d22f[_0x59d3c1(0x1ba)],()=>_0x3b2f15['abort']());if(typeof _0x47d22f[_0x59d3c1(0x1f1)]==='function')_0x3b2f15['onHeadersReceived'](_0x47d22f[_0x59d3c1(0x1f1)]);const _0x4f56f3=_0x47d22f[_0x59d3c1(0x1ee)];if(typeof _0x4f56f3===_0x59d3c1(0x1d7)&&_0x59d3c1(0x1d4)in _0x3b2f15)_0x3b2f15['onProgressUpdate'](_0x4f56f3);}function dispatchRequest(_0x2d8afa,_0x2f2e8c,_0x500306){const _0x5525ef=_0x27439e,_0x3db3ae={'url':_0x2d8afa,'method':_0x2f2e8c[_0x5525ef(0x1da)],'header':_0x2f2e8c['headers'],'data':_0x2f2e8c['body']??{},'timeout':_0x2f2e8c['timeout'],'dataType':_0x2f2e8c['dataType']||_0x5525ef(0x200),'responseType':mappedResponseBodyType(_0x2f2e8c['responseType']),'sslVerify':_0x2f2e8c[_0x5525ef(0x1bd)],'withCredentials':_0x2f2e8c[_0x5525ef(0x1e5)],'firstIpv4':_0x2f2e8c[_0x5525ef(0x1ce)],'enableHttp2':_0x2f2e8c['enableHttp2'],'enableQuic':_0x2f2e8c[_0x5525ef(0x1dd)],'enableCache':_0x2f2e8c[_0x5525ef(0x1c9)],'enableHttpDNS':_0x2f2e8c[_0x5525ef(0x1fc)],'httpDNSServiceId':_0x2f2e8c['httpDNSServiceId'],'enableChunked':_0x2f2e8c['enableChunked'],'forceCellularNetwork':_0x2f2e8c['forceCellularNetwork'],'success':_0x500306['onSuccess'],'fail':_0x500306['onFail'],'complete':()=>{}};return uni['request'](_0x3db3ae);}function dispatchUpload(_0xcf9cbe,_0x39c2ed,_0x38de42){const _0x5c64a2=_0x27439e,_0x1ba71a={};_0x1ba71a['url']=_0xcf9cbe,_0x1ba71a[_0x5c64a2(0x1c6)]=_0x39c2ed['fileType'],_0x1ba71a['file']=_0x39c2ed['file'],_0x1ba71a[_0x5c64a2(0x1d3)]=_0x39c2ed[_0x5c64a2(0x1d3)],_0x1ba71a['name']=_0x39c2ed[_0x5c64a2(0x1cb)]??'file',_0x1ba71a[_0x5c64a2(0x1b2)]=_0x39c2ed['files'],_0x1ba71a['header']=_0x39c2ed[_0x5c64a2(0x1c0)],_0x1ba71a['formData']=_0x39c2ed['body']??{},_0x1ba71a['timeout']=_0x39c2ed['timeout'],_0x1ba71a['success']=_0x38de42['onSuccess'],_0x1ba71a['fail']=_0x38de42['onFail'],_0x1ba71a['complete']=()=>{};const _0x26cc23=_0x1ba71a;return uni[_0x5c64a2(0x1e6)](_0x26cc23);}function dispatchDownload(_0xe49056,_0x52f55b,_0x5c819f){const _0x39a2db=_0x27439e,_0x315535={'url':_0xe49056,'header':_0x52f55b[_0x39a2db(0x1c0)],'timeout':_0x52f55b[_0x39a2db(0x1f3)],'success':_0x11f595=>{const _0x2a9e2d=_0x39a2db,_0x1abd68={..._0x11f595};_0x1abd68[_0x2a9e2d(0x1c7)]={},_0x1abd68[_0x2a9e2d(0x1c7)]['tempFilePath']=_0x11f595['tempFilePath'],_0x5c819f[_0x2a9e2d(0x1ae)](_0x1abd68);},'fail':_0x5c819f['onFail'],'complete':()=>{}};return uni['downloadFile'](_0x315535);}function mappedResponseBodyType(_0x2f74d8){const _0xc57996=_0x27439e;if(!_0x2f74d8||_0x2f74d8===_0xc57996(0x200))return'text';if(_0x2f74d8===_0xc57996(0x1dc))return'arraybuffer';return _0xc57996(0x1bb);}var HttpError=class extends Error{constructor(_0x832f28){const _0x357e21=_0x27439e;super(_0x832f28),this[_0x357e21(0x1cb)]=_0x357e21(0x1b7);}};function createResponseError(_0xa016b0,_0x54d1ff,_0x2ff9ca){const _0x47a1d7=_0x27439e,_0x413150=_0xa016b0,_0x1462fe='['+(_0x54d1ff?.['method']||'GET')+']\x20'+_0x413150,_0x7f892e=_0x2ff9ca?_0x2ff9ca['statusCode']+'\x20'+(_0x2ff9ca[_0x47a1d7(0x1d5)]||''):'<no\x20response>',_0x4245ff=_0x2ff9ca?JSON['stringify'](_0x2ff9ca[_0x47a1d7(0x1c7)]):'<no\x20response\x20body>',_0x2cb7c2=new HttpError(_0x1462fe+':\x20'+_0x7f892e+(_0x2ff9ca['data']?'\x20'+_0x4245ff:''));for(const _0x35c2ce of['request',_0x47a1d7(0x1e0),'response','data'])Object[_0x47a1d7(0x1e2)](_0x2cb7c2,_0x35c2ce,{'get'(){const _0x33144d=_0x47a1d7,_0x20ba7e={};return _0x20ba7e['request']=_0xa016b0,_0x20ba7e[_0x33144d(0x1e0)]=_0x54d1ff,_0x20ba7e['response']=_0x2ff9ca,_0x20ba7e[_0x33144d(0x1c7)]=_0x2ff9ca[_0x33144d(0x1c7)],_0x20ba7e[_0x35c2ce];}});return _0x2cb7c2;}function normalizeError(_0x27010d){const _0xea4657=_0x27439e;if(_0x27010d instanceof Error)return _0x27010d;return Object[_0xea4657(0x1df)](new Error(_0x27010d?.[_0xea4657(0x1d5)]||_0x27010d?.[_0xea4657(0x1fa)]||'HTTP\x20request\x20failed'),{'cause':_0x27010d});}async function callRequestHooks(_0x50ef0e,_0x51288d){await _0x51288d['onRequest']?.({'options':_0x51288d,'resource':_0x50ef0e});}async function callRequestErrorHooks(_0x2008b2,_0x47cb44,_0x1e6721){const _0x1aaac2=_0x27439e;await _0x47cb44[_0x1aaac2(0x1ec)]?.({'options':_0x47cb44,'resource':_0x2008b2,'error':_0x1e6721});}async function callResponseHooks(_0x5b4fa2,_0x501571,_0x4c681c){await _0x501571['onResponse']?.({'options':_0x501571,'resource':_0x5b4fa2,'response':_0x4c681c});}function _0x5c48(_0x5533ad,_0x5892c1){_0x5533ad=_0x5533ad-0x1ae;const _0x591ae9=_0x591a();let _0x5c48db=_0x591ae9[_0x5533ad];return _0x5c48db;}async function callResponseErrorHooks(_0x3a1445,_0x41fc11,_0x23c5be){const _0x5afa11=_0x27439e;await _0x41fc11[_0x5afa11(0x1af)]?.({'options':_0x41fc11,'resource':_0x3a1445,'response':_0x23c5be});}async function refineResponse(_0x3ef305,_0x56b8d5){const _0x4b4206=_0x27439e;if(_0x56b8d5['responseType']===_0x4b4206(0x200)||!_0x56b8d5[_0x4b4206(0x201)])return{..._0x3ef305,'data':await parseJSONResponse(_0x3ef305['data'],_0x56b8d5)};return _0x3ef305;}function _0x591a(){const _0x5c22f9=['abort','onRequestError','type','onProgress','retryDelay','159025lUBvaE','onHeadersReceived','download','timeout','reason','22BTOjkd','104janMIP','flatMap','parse','catch','message','6pXqzgc','enableHttpDNS','POST','upload','The\x20operation\x20was\x20aborted','json','responseType','keys','onSuccess','onResponseError','string','3933ZmfLtk','files','splice','call','addEventListener','38259JjYDDO','HttpError','_abort','createHttpAborter','signal','text','includes','sslVerify','aborted','ignoreResponseError','headers','entries','then','get','AbortError','listeners','fileType','data','createHttp','enableCache','parseResponse','name','query','964190bFZpZg','firstIpv4','onResponse','http','statusCode','number','filePath','onProgressUpdate','errMsg','1391334RmHQRR','function','193588rVBIOv','indexOf','method','30pAUEdZ','arrayBuffer','enableQuic','enumerable','assign','options','3049908mEiomr','defineProperty','startsWith','onabort','withCredentials','uploadFile','33CNJhIP','removeEventListener','resolve','request'];_0x591a=function(){return _0x5c22f9;};return _0x591a();}function parseJSONResponse(_0x29a19c,_0x52875f){const _0x5ce6db=_0x27439e;if(typeof _0x29a19c!==_0x5ce6db(0x1b0))return _0x29a19c;if(_0x52875f[_0x5ce6db(0x1ca)])return _0x52875f['parseResponse'](_0x29a19c);return _0x29a19c?JSON[_0x5ce6db(0x1f8)](_0x29a19c):null;}function isResponseError(_0x3a5dc3){const _0x58099b=_0x27439e,_0x4b8171=_0x58099b(0x1d1)in _0x3a5dc3?_0x3a5dc3[_0x58099b(0x1d1)]:void 0x0;return typeof _0x4b8171==='number'&&(_0x4b8171<0xc8||_0x4b8171>=0x12c);}const DEFAULT_RETRY_STATUS_CODES=[0x198,0x199,0x1a9,0x1ad,0x1f4,0x1f6,0x1f7,0x1f8],PAYLOAD_METHODS=new Set([_0x27439e(0x1fd),'PUT','DELETE','PATCH']);async function withRetry(_0x30d3b1,_0x32cc3c){const _0x59be42=_0x27439e,_0x26008d=resolveRetryCount(_0x30d3b1);for(let _0x2d557e=0x0;;_0x2d557e++)try{return await _0x32cc3c();}catch(_0x27a266){if(_0x2d557e>=_0x26008d||!shouldRetry(_0x27a266,_0x30d3b1))throw _0x27a266;await sleep(_0x30d3b1[_0x59be42(0x1ef)]??0x0,_0x30d3b1[_0x59be42(0x1ba)]);}}function resolveRetryCount(_0xc41c1){const _0x242cc5=_0x27439e,{retry:_0x18a88f}=_0xc41c1;if(_0x18a88f===![])return 0x0;if(typeof _0x18a88f===_0x242cc5(0x1d2))return _0x18a88f>0x0?_0x18a88f:0x0;return isPayloadMethod(_0xc41c1[_0x242cc5(0x1da)])?0x0:0x1;}function shouldRetry(_0x32d0b0,_0x52a539){const _0x505766=_0x27439e;if(_0x52a539['signal']?.[_0x505766(0x1be)]||isAbortError(_0x32d0b0))return![];const _0x45983f=_0x32d0b0?.['response']?.[_0x505766(0x1d1)];if(typeof _0x45983f!=='number')return!![];return(_0x52a539['retryStatusCodes']??DEFAULT_RETRY_STATUS_CODES)['includes'](_0x45983f);}function isPayloadMethod(_0x325ff6){return!!_0x325ff6&&PAYLOAD_METHODS['has'](_0x325ff6['toUpperCase']());}function sleep(_0x2aa080,_0x3d7eb8){return new Promise((_0x2b1946,_0x3c1f62)=>{const _0x389bce=_0x5c48;if(_0x3d7eb8?.[_0x389bce(0x1be)]){_0x3c1f62(_0x3d7eb8['reason']);return;}if(!(_0x2aa080>0x0)){_0x2b1946();return;}let _0x474e95=()=>{};const _0x57ab08=setTimeout(()=>{_0x474e95(),_0x2b1946();},_0x2aa080);_0x474e95=onAbort(_0x3d7eb8,()=>{clearTimeout(_0x57ab08),_0x3c1f62(_0x3d7eb8['reason']);});});}function buildURL(_0x36e38a,_0x322a94){const _0x3ddabd=_0x27439e,_0x2b3723=joinURL(_0x322a94['baseURL'],_0x36e38a),_0x5e7968=_0x322a94['query']??{},_0x45e74d=Object[_0x3ddabd(0x202)](_0x5e7968)['filter'](_0x4c3d45=>_0x5e7968[_0x4c3d45]!==void 0x0)[_0x3ddabd(0x1f7)](_0x4d9cb3=>{const _0x157c85=_0x5e7968[_0x4d9cb3];return(Array['isArray'](_0x157c85)?_0x157c85:[_0x157c85])['map'](_0x1edb1e=>encodeURIComponent(_0x4d9cb3)+'='+encodeURIComponent(String(_0x1edb1e)));})['join']('&');if(!_0x45e74d)return _0x2b3723;return''+_0x2b3723+(_0x2b3723[_0x3ddabd(0x1bc)]('?')?'&':'?')+_0x45e74d;}function joinURL(_0x1f832e,_0xb3d2a7){if(!_0x1f832e||isAbsoluteURL(_0xb3d2a7))return _0xb3d2a7;return _0x1f832e['replace'](/\/+$/,'')+'/'+_0xb3d2a7['replace'](/^\/+/,'');}function isAbsoluteURL(_0x16b87e){const _0x2456c6=_0x27439e;return/^[a-z][a-z\d+\-.]*:\/\//i['test'](_0x16b87e)||_0x16b87e[_0x2456c6(0x1e3)]('//');}function dispatchHttp(_0x763689,_0x5af7fb,_0x53802e){const _0x2f5dd5=buildURL(_0x5af7fb,_0x53802e);return withRetry(_0x53802e,()=>attemptRequest(_0x763689,_0x5af7fb,_0x2f5dd5,_0x53802e));}function attemptRequest(_0x55faf4,_0x5e3e1d,_0x507d5e,_0x42994c){const _0x19d71f=!!_0x42994c['raw'];return new Promise((_0x524c6b,_0x20c696)=>{const _0x338e8d=_0x5c48;let _0x417b9a=![];const _0x529ab1=_0x536f8c=>{if(_0x417b9a)return;_0x417b9a=!![],_0x536f8c();},_0x337fcc=onAbort(_0x42994c[_0x338e8d(0x1ba)],()=>{_0x529ab1(()=>_0x20c696(_0x42994c['signal']['reason']));}),_0x2cac19=_0xd1ded6=>{_0x337fcc(),_0x529ab1(_0xd1ded6);};callRequestHooks(_0x5e3e1d,_0x42994c)['then'](()=>{if(_0x417b9a)return;dispatch(_0x55faf4,_0x507d5e,_0x42994c,{'onSuccess':_0x5e3c98=>{const _0x426bb3=_0x5c48;Promise[_0x426bb3(0x1e9)]()[_0x426bb3(0x1c2)](()=>refineResponse(_0x5e3c98,_0x42994c))['then'](async _0x43ae8d=>{const _0x180096=_0x426bb3;if(isResponseError(_0x5e3c98)){await callResponseErrorHooks(_0x5e3e1d,_0x42994c,_0x43ae8d);if(!_0x42994c[_0x180096(0x1bf)])throw createResponseError(_0x5e3e1d,_0x42994c,_0x43ae8d);}else await callResponseHooks(_0x5e3e1d,_0x42994c,_0x43ae8d);_0x2cac19(()=>_0x524c6b(_0x19d71f?_0x43ae8d:_0x43ae8d['data']));})[_0x426bb3(0x1f9)](_0x2d6043=>_0x2cac19(()=>_0x20c696(_0x2d6043)));},'onFail':_0xd0969=>{const _0x4996b8=_0x5c48;Promise['resolve']()[_0x4996b8(0x1c2)](async()=>{const _0x476d71=normalizeError(_0xd0969);if(!isAbortError(_0x476d71))await callRequestErrorHooks(_0x5e3e1d,_0x42994c,_0x476d71);throw _0x476d71;})[_0x4996b8(0x1f9)](_0x1407a6=>_0x2cac19(()=>_0x20c696(_0x1407a6)));}});})['catch'](async _0x38727f=>{const _0x1d5ea5=normalizeError(_0x38727f);await callRequestErrorHooks(_0x5e3e1d,_0x42994c,_0x1d5ea5),_0x2cac19(()=>_0x20c696(_0x1d5ea5));});});}const _0x33cb46={};_0x33cb46['method']='GET',_0x33cb46[_0x27439e(0x201)]=_0x27439e(0x200);const defaultConfig=_0x33cb46;function createHttp(_0x251a0f={}){const _0x1233f7=_0x27439e,_0x4dcd2c=(_0x4a40ac,_0x16d2b8)=>{const _0xa74036=_0x5c48;return dispatchHttp(_0xa74036(0x1ea),_0x4a40ac,mergeOptions(defaultConfig,_0x251a0f,_0x16d2b8));},_0x15d24c=(_0x58e398,_0x561b91)=>{const _0xc9a705=_0x5c48,_0xa0da09={};return _0xa0da09[_0xc9a705(0x1da)]=_0xc9a705(0x1fd),dispatchHttp('upload',_0x58e398,mergeOptions(defaultConfig,_0x251a0f,_0x561b91,_0xa0da09));},_0x3fa44e=(_0x313930,_0x48e36c)=>{const _0x1e2d6f=_0x5c48,_0x46d899={};return _0x46d899[_0x1e2d6f(0x1da)]='GET',dispatchHttp(_0x1e2d6f(0x1f2),_0x313930,mergeOptions(defaultConfig,_0x251a0f,_0x48e36c,_0x46d899));},_0xc0b832=_0x57c430=>createHttp(mergeOptions(_0x251a0f,_0x57c430)),_0x2224ae={};return _0x2224ae[_0x1233f7(0x1ea)]=_0x4dcd2c,_0x2224ae[_0x1233f7(0x1fe)]=_0x15d24c,_0x2224ae[_0x1233f7(0x1f2)]=_0x3fa44e,_0x2224ae['create']=_0xc0b832,_0x2224ae;}const http=createHttp(),_0x50cca6={};_0x50cca6['enumerable']=!![],_0x50cca6[_0x27439e(0x1c3)]=function(){return createHttp;},Object[_0x27439e(0x1e2)](exports,_0x27439e(0x1c8),_0x50cca6);const _0x236b91={};_0x236b91['enumerable']=!![],_0x236b91[_0x27439e(0x1c3)]=function(){return createHttpAborter;},Object['defineProperty'](exports,_0x27439e(0x1b9),_0x236b91);const _0x5d6668={};_0x5d6668[_0x27439e(0x1de)]=!![],_0x5d6668['get']=function(){return http;},Object[_0x27439e(0x1e2)](exports,_0x27439e(0x1d0),_0x5d6668);
|
package/dist/oiyo.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.3
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
8
|
-
const require_oiyo = require("./oiyo-
|
|
9
|
-
exports.
|
|
10
|
-
exports.
|
|
11
|
-
exports.
|
|
8
|
+
const require_oiyo = require("./oiyo-BOfXIUcB.cjs");
|
|
9
|
+
exports.createHttp = require_oiyo.createHttp;
|
|
10
|
+
exports.createHttpAborter = require_oiyo.createHttpAborter;
|
|
11
|
+
exports.http = require_oiyo.http;
|
package/dist/oiyo.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.3
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
|
-
import { a as
|
|
8
|
-
export { type
|
|
7
|
+
import { a as HttpDownloadResponse, c as HttpDownloadOptions, d as ResponseBodyType, f as createHttpAborter, i as HttpError, l as HttpRequestOptions, n as http, o as HttpRequestResponse, r as HttpConfig, s as HttpUploadResponse, t as createHttp, u as HttpUploadOptions } from "./index-B4NECdKj.cjs";
|
|
8
|
+
export { type HttpConfig, type HttpDownloadOptions, type HttpDownloadResponse, type HttpError, type HttpRequestOptions, type HttpRequestResponse, type HttpUploadOptions, type HttpUploadResponse, type ResponseBodyType, createHttp, createHttpAborter, http };
|
package/dist/oiyo.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.3
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
|
-
import { a as
|
|
8
|
-
export { type
|
|
7
|
+
import { a as HttpDownloadResponse, c as HttpDownloadOptions, d as ResponseBodyType, f as createHttpAborter, i as HttpError, l as HttpRequestOptions, n as http, o as HttpRequestResponse, r as HttpConfig, s as HttpUploadResponse, t as createHttp, u as HttpUploadOptions } from "./index-B4NECdKj.mjs";
|
|
8
|
+
export { type HttpConfig, type HttpDownloadOptions, type HttpDownloadResponse, type HttpError, type HttpRequestOptions, type HttpRequestResponse, type HttpUploadOptions, type HttpUploadResponse, type ResponseBodyType, createHttp, createHttpAborter, http };
|
package/dist/oiyo.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.3
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
|
-
import { n as
|
|
8
|
-
export {
|
|
7
|
+
import { n as http, r as createHttpAborter, t as createHttp } from "./oiyo-BOeGyXdP.mjs";
|
|
8
|
+
export { createHttp, createHttpAborter, http };
|
package/dist/uni.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.3
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
8
|
-
require("./chunk-
|
|
8
|
+
require("./chunk-BGy3oB1q.cjs");
|
|
9
9
|
var _dcloudio_uni_app = require("@dcloudio/uni-app");
|
|
10
10
|
Object.keys(_dcloudio_uni_app).forEach(function(k) {
|
|
11
11
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
package/dist/uni.d.cts
CHANGED
package/dist/uni.d.mts
CHANGED
package/dist/uni.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.3
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-BIMTDWTb.mjs";
|
|
8
8
|
export * from "@dcloudio/uni-app";
|
|
9
9
|
export {};
|
package/dist/vue.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.3
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
8
|
-
require("./chunk-
|
|
8
|
+
require("./chunk-BGy3oB1q.cjs");
|
|
9
9
|
var vue = require("vue");
|
|
10
10
|
Object.keys(vue).forEach(function(k) {
|
|
11
11
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
package/dist/vue.d.cts
CHANGED
package/dist/vue.d.mts
CHANGED
package/dist/vue.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.
|
|
2
|
+
* @oiyo/framework v0.4.0-beta.3
|
|
3
3
|
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
4
|
* Commercial software. See LICENSE for terms.
|
|
5
5
|
* Official site: https://oiyo.js.org
|
|
6
6
|
*/
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-BIMTDWTb.mjs";
|
|
8
8
|
export * from "vue";
|
|
9
9
|
export {};
|
package/package.json
CHANGED
package/dist/oiyo-CdQ_-aZW.mjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.1
|
|
3
|
-
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
|
-
* Commercial software. See LICENSE for terms.
|
|
5
|
-
* Official site: https://oiyo.js.org
|
|
6
|
-
*/
|
|
7
|
-
const _0x57f845=_0x5260;(function(_0x2a3388,_0x325ffc){const _0x4a6af5=_0x5260,_0x53bf85=_0x2a3388();while(!![]){try{const _0xd65509=parseInt(_0x4a6af5(0x90))/0x1+-parseInt(_0x4a6af5(0xc9))/0x2*(parseInt(_0x4a6af5(0xbc))/0x3)+-parseInt(_0x4a6af5(0xb2))/0x4+-parseInt(_0x4a6af5(0xa3))/0x5+parseInt(_0x4a6af5(0xae))/0x6+parseInt(_0x4a6af5(0xa0))/0x7+-parseInt(_0x4a6af5(0xac))/0x8*(-parseInt(_0x4a6af5(0xdc))/0x9);if(_0xd65509===_0x325ffc)break;else _0x53bf85['push'](_0x53bf85['shift']());}catch(_0x4afcf9){_0x53bf85['push'](_0x53bf85['shift']());}}}(_0x3699,0xcea87));const ABORT_ERROR_NAME='AbortError';var Emitter=class{['listeners']=[];[_0x57f845(0xad)](_0x736ceb,_0x1c3e63){const _0x1ecf64=_0x57f845;if(_0x736ceb!=='abort')return;this['listeners'][_0x1ecf64(0xa5)](_0x1c3e63);}[_0x57f845(0xa4)](_0x5a6417,_0xb326e3){if(_0x5a6417!=='abort')return;const _0x49aaa8=this['listeners']['indexOf'](_0xb326e3);if(_0x49aaa8!==-0x1)this['listeners']['splice'](_0x49aaa8,0x1);}[_0x57f845(0xcd)](_0x4cfcdf){for(const _0xbe05c2 of this['listeners']['slice']())_0xbe05c2['call'](this,_0x4cfcdf);}},BeaconSignal=class extends Emitter{[_0x57f845(0xda)]=![];['reason']=void 0x0;['onabort']=null;['_abort'](_0x1cafd8){const _0x3d0c8d=_0x57f845;if(this['aborted'])return;this['aborted']=!![],this['reason']=_0x1cafd8===void 0x0?createAbortError():_0x1cafd8;const _0x2b9746={};_0x2b9746[_0x3d0c8d(0xab)]='abort';const _0x13d650=_0x2b9746;if(typeof this['onabort']==='function')this['onabort'](_0x13d650);this['emit'](_0x13d650);}[_0x57f845(0xbd)](){const _0x594cd5=_0x57f845;if(this[_0x594cd5(0xda)])throw this[_0x594cd5(0x9e)];}};function createBeacon(){const _0x3d7815=new BeaconSignal();return{'signal':_0x3d7815,'abort':_0x4e98c8=>_0x3d7815['_abort'](_0x4e98c8)};}function createAbortError(_0x7f6ec7=_0x57f845(0xb9)){const _0x2fc0e5=_0x57f845,_0x34e255=new Error(_0x7f6ec7);return _0x34e255[_0x2fc0e5(0xb7)]=ABORT_ERROR_NAME,_0x34e255;}function isAbortError(_0x1f9b95){const _0x1133b6=_0x57f845;return _0x1f9b95 instanceof Error&&_0x1f9b95[_0x1133b6(0xb7)]===ABORT_ERROR_NAME;}function onAbort(_0x76fe90,_0x44cfea){const _0x5b8300=_0x57f845;if(!_0x76fe90)return()=>{};if(_0x76fe90[_0x5b8300(0xda)])return _0x44cfea(),()=>{};return _0x76fe90[_0x5b8300(0xad)]('abort',_0x44cfea),()=>_0x76fe90['removeEventListener'](_0x5b8300(0xaf),_0x44cfea);}const HOOK_NAMES=['onRequest',_0x57f845(0xb4),_0x57f845(0x9c),'onResponseError'];function mergeOptions(..._0xc38814){const _0x422c7e=_0x57f845,_0x3adb33={},_0x56d77f={};for(const _0x53e32f of _0xc38814){if(!_0x53e32f)continue;for(const _0x4d3527 of HOOK_NAMES)collectHook(_0x56d77f,_0x4d3527,_0x53e32f);const _0x346a3b=_0x3adb33[_0x422c7e(0xc3)],_0x35f77c=_0x3adb33[_0x422c7e(0xd7)];Object['assign'](_0x3adb33,_0x53e32f);const _0x5b0eba={..._0x346a3b,..._0x53e32f[_0x422c7e(0xc3)]};_0x3adb33['headers']=_0x5b0eba;const _0x2e65c4={..._0x35f77c,..._0x53e32f[_0x422c7e(0xd7)]};_0x3adb33[_0x422c7e(0xd7)]=_0x2e65c4;}for(const [_0x5ed489,_0x110816]of Object['entries'](_0x56d77f))Object['assign'](_0x3adb33,{[_0x5ed489]:async _0xb25a52=>{for(const _0x20f0c6 of _0x110816)await _0x20f0c6(_0xb25a52);}});return _0x3adb33;}function collectHook(_0x4c329e,_0x96d2e,_0x12ce7c){const _0x4eff3d=_0x57f845,_0x1168c4=_0x12ce7c[_0x96d2e];if(typeof _0x1168c4!==_0x4eff3d(0xd6))return;_0x4c329e[_0x96d2e]??=[],_0x4c329e[_0x96d2e]['push'](_0x1168c4);}function dispatch(_0x36f2c5,_0x5e1f49,_0x956fed,_0x13979e){const _0x5ae130=_0x57f845;let _0x3f48f8;if(_0x36f2c5==='upload')_0x3f48f8=dispatchUpload(_0x5e1f49,_0x956fed,_0x13979e);else{if(_0x36f2c5===_0x5ae130(0xb0))_0x3f48f8=dispatchDownload(_0x5e1f49,_0x956fed,_0x13979e);else _0x3f48f8=dispatchRequest(_0x5e1f49,_0x956fed,_0x13979e);}bindTask(_0x3f48f8,_0x956fed);}function bindTask(_0x3a47b4,_0x58ed48){const _0x4be057=_0x57f845;onAbort(_0x58ed48[_0x4be057(0xa2)],()=>_0x3a47b4['abort']());if(typeof _0x58ed48[_0x4be057(0x9a)]==='function')_0x3a47b4[_0x4be057(0x9a)](_0x58ed48[_0x4be057(0x9a)]);const _0x2104fe=_0x58ed48[_0x4be057(0x95)];if(typeof _0x2104fe==='function'&&_0x4be057(0x98)in _0x3a47b4)_0x3a47b4['onProgressUpdate'](_0x2104fe);}function dispatchRequest(_0x2bbcce,_0x378ceb,_0x1c8acc){const _0x217376=_0x57f845,_0xfcccb5={'url':_0x2bbcce,'method':_0x378ceb[_0x217376(0xc8)],'header':_0x378ceb[_0x217376(0xc3)],'data':_0x378ceb[_0x217376(0xc4)]??{},'timeout':_0x378ceb[_0x217376(0xbb)],'dataType':_0x378ceb['dataType']||'json','responseType':mappedResponseBodyType(_0x378ceb['responseType']),'sslVerify':_0x378ceb['sslVerify'],'withCredentials':_0x378ceb['withCredentials'],'firstIpv4':_0x378ceb['firstIpv4'],'enableHttp2':_0x378ceb['enableHttp2'],'enableQuic':_0x378ceb[_0x217376(0xcc)],'enableCache':_0x378ceb['enableCache'],'enableHttpDNS':_0x378ceb['enableHttpDNS'],'httpDNSServiceId':_0x378ceb['httpDNSServiceId'],'enableChunked':_0x378ceb[_0x217376(0x9d)],'forceCellularNetwork':_0x378ceb['forceCellularNetwork'],'success':_0x1c8acc['onSuccess'],'fail':_0x1c8acc['onFail'],'complete':()=>{}};return uni['request'](_0xfcccb5);}function dispatchUpload(_0x579fcf,_0x47a031,_0x4a4337){const _0xecb92d=_0x57f845,_0x5abb5b={};_0x5abb5b['url']=_0x579fcf,_0x5abb5b['fileType']=_0x47a031['fileType'],_0x5abb5b['file']=_0x47a031['file'],_0x5abb5b[_0xecb92d(0xd9)]=_0x47a031[_0xecb92d(0xd9)],_0x5abb5b[_0xecb92d(0xb7)]=_0x47a031[_0xecb92d(0xb7)]??_0xecb92d(0xb3),_0x5abb5b['files']=_0x47a031['files'],_0x5abb5b['header']=_0x47a031[_0xecb92d(0xc3)],_0x5abb5b['formData']=_0x47a031[_0xecb92d(0xc4)]??{},_0x5abb5b['timeout']=_0x47a031[_0xecb92d(0xbb)],_0x5abb5b[_0xecb92d(0xcf)]=_0x4a4337['onSuccess'],_0x5abb5b['fail']=_0x4a4337[_0xecb92d(0x94)],_0x5abb5b[_0xecb92d(0xce)]=()=>{};const _0x25181a=_0x5abb5b;return uni['uploadFile'](_0x25181a);}function dispatchDownload(_0x3abaf7,_0x57d822,_0x324e58){const _0x42a237=_0x57f845,_0x23a049={'url':_0x3abaf7,'header':_0x57d822[_0x42a237(0xc3)],'timeout':_0x57d822['timeout'],'success':_0x882ab9=>{const _0x44cb6a=_0x42a237,_0x5421af={..._0x882ab9};_0x5421af['data']={},_0x5421af['data']['tempFilePath']=_0x882ab9[_0x44cb6a(0x93)],_0x324e58['onSuccess'](_0x5421af);},'fail':_0x324e58[_0x42a237(0x94)],'complete':()=>{}};return uni[_0x42a237(0xaa)](_0x23a049);}function mappedResponseBodyType(_0x44ec6f){const _0x4b2a41=_0x57f845;if(!_0x44ec6f||_0x44ec6f===_0x4b2a41(0xdb))return _0x4b2a41(0xd8);if(_0x44ec6f==='arrayBuffer')return _0x4b2a41(0xd4);return'text';}function _0x5260(_0x21db5d,_0x3c17d4){_0x21db5d=_0x21db5d-0x90;const _0x369954=_0x3699();let _0x526031=_0x369954[_0x21db5d];return _0x526031;}var VesselError=class extends Error{constructor(_0x11d992){const _0x7a97e1=_0x57f845;super(_0x11d992),this['name']=_0x7a97e1(0xb5);}};function createResponseError(_0x120b8d,_0x5c81da,_0x4acd19){const _0x38564a=_0x57f845,_0x14af2e=_0x120b8d,_0x29a07a='['+(_0x5c81da?.[_0x38564a(0xc8)]||'GET')+']\x20'+_0x14af2e,_0x2cc11a=_0x4acd19?_0x4acd19[_0x38564a(0xc5)]+'\x20'+(_0x4acd19[_0x38564a(0xd5)]||''):_0x38564a(0xc1),_0x4801d4=_0x4acd19?JSON['stringify'](_0x4acd19[_0x38564a(0xd0)]):_0x38564a(0xd1),_0x3dc53d=new VesselError(_0x29a07a+':\x20'+_0x2cc11a+(_0x4acd19['data']?'\x20'+_0x4801d4:''));for(const _0x5e68e5 of[_0x38564a(0xd3),_0x38564a(0xa1),'response','data'])Object[_0x38564a(0xa9)](_0x3dc53d,_0x5e68e5,{'get'(){const _0x8f1bf8=_0x38564a,_0x1bb544={};return _0x1bb544[_0x8f1bf8(0xd3)]=_0x120b8d,_0x1bb544['options']=_0x5c81da,_0x1bb544['response']=_0x4acd19,_0x1bb544[_0x8f1bf8(0xd0)]=_0x4acd19['data'],_0x1bb544[_0x5e68e5];}});return _0x3dc53d;}function normalizeError(_0x3034d6){const _0x16a809=_0x57f845;if(_0x3034d6 instanceof Error)return _0x3034d6;return Object['assign'](new Error(_0x3034d6?.[_0x16a809(0xd5)]||_0x3034d6?.[_0x16a809(0xba)]||_0x16a809(0xc0)),{'cause':_0x3034d6});}async function callRequestHooks(_0x6f0f5c,_0x1ee3a7){await _0x1ee3a7['onRequest']?.({'options':_0x1ee3a7,'resource':_0x6f0f5c});}async function callRequestErrorHooks(_0x3f2864,_0x24fc1a,_0x4060c8){const _0x244376=_0x57f845;await _0x24fc1a[_0x244376(0xb4)]?.({'options':_0x24fc1a,'resource':_0x3f2864,'error':_0x4060c8});}async function callResponseHooks(_0x487d01,_0x460660,_0x533833){await _0x460660['onResponse']?.({'options':_0x460660,'resource':_0x487d01,'response':_0x533833});}async function callResponseErrorHooks(_0x36b914,_0x918b9b,_0x3d2f68){const _0x257c74=_0x57f845;await _0x918b9b[_0x257c74(0xcb)]?.({'options':_0x918b9b,'resource':_0x36b914,'response':_0x3d2f68});}async function refineResponse(_0x56588f,_0x57805e){const _0x3484bd=_0x57f845;if(_0x57805e['responseType']===_0x3484bd(0xdb)||!_0x57805e[_0x3484bd(0xc7)])return{..._0x56588f,'data':await parseJSONResponse(_0x56588f['data'],_0x57805e)};return _0x56588f;}function parseJSONResponse(_0x3e65f7,_0x29940c){const _0x2bd949=_0x57f845;if(typeof _0x3e65f7!==_0x2bd949(0xa6))return _0x3e65f7;if(_0x29940c[_0x2bd949(0x91)])return _0x29940c[_0x2bd949(0x91)](_0x3e65f7);return _0x3e65f7?JSON['parse'](_0x3e65f7):null;}function isResponseError(_0x49ea15){const _0x367455='statusCode'in _0x49ea15?_0x49ea15['statusCode']:void 0x0;return typeof _0x367455==='number'&&(_0x367455<0xc8||_0x367455>=0x12c);}const DEFAULT_RETRY_STATUS_CODES=[0x198,0x199,0x1a9,0x1ad,0x1f4,0x1f6,0x1f7,0x1f8],PAYLOAD_METHODS=new Set(['POST','PUT','DELETE',_0x57f845(0xb6)]);async function withRetry(_0x34897d,_0x446002){const _0x2c3560=_0x57f845,_0x16781e=resolveRetryCount(_0x34897d);for(let _0x250d1c=0x0;;_0x250d1c++)try{return await _0x446002();}catch(_0x124e4d){if(_0x250d1c>=_0x16781e||!shouldRetry(_0x124e4d,_0x34897d))throw _0x124e4d;await sleep(_0x34897d['retryDelay']??0x0,_0x34897d[_0x2c3560(0xa2)]);}}function resolveRetryCount(_0x21b926){const _0x15f6b8=_0x57f845,{retry:_0xf3c6ae}=_0x21b926;if(_0xf3c6ae===![])return 0x0;if(typeof _0xf3c6ae==='number')return _0xf3c6ae>0x0?_0xf3c6ae:0x0;return isPayloadMethod(_0x21b926[_0x15f6b8(0xc8)])?0x0:0x1;}function shouldRetry(_0x864885,_0x584ec0){const _0x33cb2c=_0x57f845;if(_0x584ec0['signal']?.['aborted']||isAbortError(_0x864885))return![];const _0x17966c=_0x864885?.[_0x33cb2c(0x96)]?.['statusCode'];if(typeof _0x17966c!==_0x33cb2c(0xd2))return!![];return(_0x584ec0[_0x33cb2c(0x9f)]??DEFAULT_RETRY_STATUS_CODES)['includes'](_0x17966c);}function isPayloadMethod(_0x36ffc7){const _0x3ba35d=_0x57f845;return!!_0x36ffc7&&PAYLOAD_METHODS['has'](_0x36ffc7[_0x3ba35d(0x92)]());}function sleep(_0x486888,_0x1ac3cf){return new Promise((_0x119a71,_0x4beef9)=>{const _0x3b3281=_0x5260;if(_0x1ac3cf?.['aborted']){_0x4beef9(_0x1ac3cf[_0x3b3281(0x9e)]);return;}if(!(_0x486888>0x0)){_0x119a71();return;}let _0x125745=()=>{};const _0x5cb00a=setTimeout(()=>{_0x125745(),_0x119a71();},_0x486888);_0x125745=onAbort(_0x1ac3cf,()=>{const _0x3e3f8d=_0x3b3281;clearTimeout(_0x5cb00a),_0x4beef9(_0x1ac3cf[_0x3e3f8d(0x9e)]);});});}function buildURL(_0x349937,_0x4ca0a9){const _0x3882f5=_0x57f845,_0xf6adf3=joinURL(_0x4ca0a9[_0x3882f5(0xc6)],_0x349937),_0x14aae8=_0x4ca0a9['query']??{},_0x5403d2=Object['keys'](_0x14aae8)['filter'](_0x3744e6=>_0x14aae8[_0x3744e6]!==void 0x0)[_0x3882f5(0xa7)](_0x4c7525=>{const _0x34625b=_0x14aae8[_0x4c7525];return(Array['isArray'](_0x34625b)?_0x34625b:[_0x34625b])['map'](_0x10765f=>encodeURIComponent(_0x4c7525)+'='+encodeURIComponent(String(_0x10765f)));})[_0x3882f5(0xbe)]('&');if(!_0x5403d2)return _0xf6adf3;return''+_0xf6adf3+(_0xf6adf3[_0x3882f5(0xb8)]('?')?'&':'?')+_0x5403d2;}function joinURL(_0x153cdb,_0x5cbc4a){const _0x4fdde0=_0x57f845;if(!_0x153cdb||isAbsoluteURL(_0x5cbc4a))return _0x5cbc4a;return _0x153cdb[_0x4fdde0(0xc2)](/\/+$/,'')+'/'+_0x5cbc4a[_0x4fdde0(0xc2)](/^\/+/,'');}function isAbsoluteURL(_0x3a0fda){const _0x1067ff=_0x57f845;return/^[a-z][a-z\d+\-.]*:\/\//i[_0x1067ff(0xa8)](_0x3a0fda)||_0x3a0fda['startsWith']('//');}function dispatchHttp(_0x2b4884,_0x6996e8,_0x390be5){const _0x44cf68=buildURL(_0x6996e8,_0x390be5);return withRetry(_0x390be5,()=>attemptRequest(_0x2b4884,_0x6996e8,_0x44cf68,_0x390be5));}function _0x3699(){const _0x2eadf9=['message','timeout','838788caFkyP','throwIfAborted','join','catch','HTTP\x20request\x20failed','<no\x20response>','replace','headers','body','statusCode','baseURL','responseType','method','4SagaFO','upload','onResponseError','enableQuic','emit','complete','success','data','<no\x20response\x20body>','number','request','arraybuffer','errMsg','function','query','text','filePath','aborted','json','17703KpRmLF','1327766ltnbpc','parseResponse','toUpperCase','tempFilePath','onFail','onProgress','response','then','onProgressUpdate','raw','onHeadersReceived','GET','onResponse','enableChunked','reason','retryStatusCodes','2128875aFlzWG','options','signal','7707685bkcLpU','removeEventListener','push','string','flatMap','test','defineProperty','downloadFile','type','7672EieCri','addEventListener','2036184iAoiEJ','abort','download','resolve','3641632sahcgS','file','onRequestError','VesselError','PATCH','name','includes','The\x20operation\x20was\x20aborted'];_0x3699=function(){return _0x2eadf9;};return _0x3699();}function attemptRequest(_0x59279e,_0x38693b,_0x4bfecc,_0x3640ac){const _0x4b1b52=_0x57f845,_0x4e13a2=!!_0x3640ac[_0x4b1b52(0x99)];return new Promise((_0x50f771,_0x499843)=>{const _0x94eade=_0x4b1b52;let _0x73be81=![];const _0x12520f=_0x200b54=>{if(_0x73be81)return;_0x73be81=!![],_0x200b54();},_0x3ebf85=onAbort(_0x3640ac['signal'],()=>{_0x12520f(()=>_0x499843(_0x3640ac['signal']['reason']));}),_0x1dca4c=_0x499a65=>{_0x3ebf85(),_0x12520f(_0x499a65);};callRequestHooks(_0x38693b,_0x3640ac)[_0x94eade(0x97)](()=>{if(_0x73be81)return;dispatch(_0x59279e,_0x4bfecc,_0x3640ac,{'onSuccess':_0x7739be=>{const _0x2974e3=_0x5260;Promise[_0x2974e3(0xb1)]()['then'](()=>refineResponse(_0x7739be,_0x3640ac))['then'](async _0x37fbc7=>{const _0x26e2fe=_0x2974e3;if(isResponseError(_0x7739be)){await callResponseErrorHooks(_0x38693b,_0x3640ac,_0x37fbc7);if(!_0x3640ac['ignoreResponseError'])throw createResponseError(_0x38693b,_0x3640ac,_0x37fbc7);}else await callResponseHooks(_0x38693b,_0x3640ac,_0x37fbc7);_0x1dca4c(()=>_0x50f771(_0x4e13a2?_0x37fbc7:_0x37fbc7[_0x26e2fe(0xd0)]));})[_0x2974e3(0xbf)](_0x1b7255=>_0x1dca4c(()=>_0x499843(_0x1b7255)));},'onFail':_0x3d107f=>{const _0x35c4b2=_0x5260;Promise[_0x35c4b2(0xb1)]()[_0x35c4b2(0x97)](async()=>{const _0x199d38=normalizeError(_0x3d107f);if(!isAbortError(_0x199d38))await callRequestErrorHooks(_0x38693b,_0x3640ac,_0x199d38);throw _0x199d38;})['catch'](_0x231939=>_0x1dca4c(()=>_0x499843(_0x231939)));}});})[_0x94eade(0xbf)](async _0x53334f=>{const _0x2e9c7d=normalizeError(_0x53334f);await callRequestErrorHooks(_0x38693b,_0x3640ac,_0x2e9c7d),_0x1dca4c(()=>_0x499843(_0x2e9c7d));});});}const _0x4cc407={};_0x4cc407['method']='GET',_0x4cc407[_0x57f845(0xc7)]='json';const defaultConfig=_0x4cc407;function createVessel(_0x1efca1={}){const _0x43c6bd=_0x57f845,_0x2edc28=(_0xd743d7,_0x2155f5)=>{return dispatchHttp('request',_0xd743d7,mergeOptions(defaultConfig,_0x1efca1,_0x2155f5));},_0x4df490=(_0x8c7a77,_0x5321ec)=>{const _0x5e217a=_0x5260,_0x503715={};return _0x503715[_0x5e217a(0xc8)]='POST',dispatchHttp('upload',_0x8c7a77,mergeOptions(defaultConfig,_0x1efca1,_0x5321ec,_0x503715));},_0x378f37=(_0x1a0cc5,_0xa64481)=>{const _0x3ca6b1=_0x5260,_0x428336={};return _0x428336[_0x3ca6b1(0xc8)]=_0x3ca6b1(0x9b),dispatchHttp('download',_0x1a0cc5,mergeOptions(defaultConfig,_0x1efca1,_0xa64481,_0x428336));},_0x127e66=_0x5a3652=>createVessel(mergeOptions(_0x1efca1,_0x5a3652)),_0x1dd501={};return _0x1dd501['request']=_0x2edc28,_0x1dd501[_0x43c6bd(0xca)]=_0x4df490,_0x1dd501[_0x43c6bd(0xb0)]=_0x378f37,_0x1dd501['create']=_0x127e66,_0x1dd501;}const vessel=createVessel();export{vessel as n,createBeacon as r,createVessel as t};
|
package/dist/oiyo-DZ6BFYIw.cjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @oiyo/framework v0.4.0-beta.1
|
|
3
|
-
* Copyright (c) 2026 skiyee. All rights reserved.
|
|
4
|
-
* Commercial software. See LICENSE for terms.
|
|
5
|
-
* Official site: https://oiyo.js.org
|
|
6
|
-
*/
|
|
7
|
-
const _0x39377b=_0x43fc;(function(_0xf7877b,_0x42d449){const _0x23ab28=_0x43fc,_0x4e04a0=_0xf7877b();while(!![]){try{const _0x2743ef=parseInt(_0x23ab28(0xa9))/0x1*(parseInt(_0x23ab28(0xba))/0x2)+parseInt(_0x23ab28(0x90))/0x3+parseInt(_0x23ab28(0x8b))/0x4*(-parseInt(_0x23ab28(0x98))/0x5)+-parseInt(_0x23ab28(0x7f))/0x6+parseInt(_0x23ab28(0x91))/0x7+parseInt(_0x23ab28(0xaa))/0x8*(-parseInt(_0x23ab28(0x9e))/0x9)+-parseInt(_0x23ab28(0x7c))/0xa*(-parseInt(_0x23ab28(0xa8))/0xb);if(_0x2743ef===_0x42d449)break;else _0x4e04a0['push'](_0x4e04a0['shift']());}catch(_0x23cd82){_0x4e04a0['push'](_0x4e04a0['shift']());}}}(_0x12aa,0xcd60c));const ABORT_ERROR_NAME=_0x39377b(0xab);var Emitter=class{[_0x39377b(0xbe)]=[];[_0x39377b(0xa5)](_0x521dbe,_0x4a9c78){const _0x4fd409=_0x39377b;if(_0x521dbe!=='abort')return;this[_0x4fd409(0xbe)][_0x4fd409(0x93)](_0x4a9c78);}['removeEventListener'](_0x3d3dad,_0x84d2ee){const _0x3c42b5=_0x39377b;if(_0x3d3dad!=='abort')return;const _0xd19fdd=this[_0x3c42b5(0xbe)][_0x3c42b5(0x9d)](_0x84d2ee);if(_0xd19fdd!==-0x1)this['listeners'][_0x3c42b5(0x96)](_0xd19fdd,0x1);}[_0x39377b(0xbf)](_0x373704){const _0x1726b4=_0x39377b;for(const _0x4793c3 of this['listeners']['slice']())_0x4793c3[_0x1726b4(0xc0)](this,_0x373704);}},BeaconSignal=class extends Emitter{['aborted']=![];['reason']=void 0x0;['onabort']=null;['_abort'](_0x1e68e8){const _0xf5f281=_0x39377b;if(this['aborted'])return;this['aborted']=!![],this[_0xf5f281(0x8c)]=_0x1e68e8===void 0x0?createAbortError():_0x1e68e8;const _0x42da32={};_0x42da32[_0xf5f281(0x92)]='abort';const _0xb65297=_0x42da32;if(typeof this['onabort']==='function')this[_0xf5f281(0xc3)](_0xb65297);this['emit'](_0xb65297);}['throwIfAborted'](){const _0x167ca7=_0x39377b;if(this[_0x167ca7(0x86)])throw this[_0x167ca7(0x8c)];}};function createBeacon(){const _0x45ed5d=_0x39377b,_0x52ad6e=new BeaconSignal();return{'signal':_0x52ad6e,'abort':_0x34a7ad=>_0x52ad6e[_0x45ed5d(0x7b)](_0x34a7ad)};}function createAbortError(_0x5eb9fb='The\x20operation\x20was\x20aborted'){const _0x3de4da=_0x39377b,_0xeaad92=new Error(_0x5eb9fb);return _0xeaad92[_0x3de4da(0x7e)]=ABORT_ERROR_NAME,_0xeaad92;}function isAbortError(_0x4298c0){return _0x4298c0 instanceof Error&&_0x4298c0['name']===ABORT_ERROR_NAME;}function onAbort(_0x1e7600,_0x3e85b6){const _0x58c3ac=_0x39377b;if(!_0x1e7600)return()=>{};if(_0x1e7600[_0x58c3ac(0x86)])return _0x3e85b6(),()=>{};return _0x1e7600['addEventListener'](_0x58c3ac(0x76),_0x3e85b6),()=>_0x1e7600['removeEventListener'](_0x58c3ac(0x76),_0x3e85b6);}function _0x43fc(_0x108aff,_0x4963f1){_0x108aff=_0x108aff-0x75;const _0x12aa7d=_0x12aa();let _0x43fcb3=_0x12aa7d[_0x108aff];return _0x43fcb3;}const HOOK_NAMES=[_0x39377b(0x8d),'onRequestError','onResponse','onResponseError'];function mergeOptions(..._0xe7c681){const _0x43b2e1=_0x39377b,_0xa6b99={},_0x5a9115={};for(const _0x25ddff of _0xe7c681){if(!_0x25ddff)continue;for(const _0x30472a of HOOK_NAMES)collectHook(_0x5a9115,_0x30472a,_0x25ddff);const _0x442c00=_0xa6b99[_0x43b2e1(0x97)],_0x31e9a8=_0xa6b99['query'];Object['assign'](_0xa6b99,_0x25ddff);const _0xeeed8a={..._0x442c00,..._0x25ddff[_0x43b2e1(0x97)]};_0xa6b99[_0x43b2e1(0x97)]=_0xeeed8a;const _0x29bc4a={..._0x31e9a8,..._0x25ddff['query']};_0xa6b99['query']=_0x29bc4a;}for(const [_0x549968,_0x115b2e]of Object[_0x43b2e1(0xae)](_0x5a9115))Object['assign'](_0xa6b99,{[_0x549968]:async _0x5e74d8=>{for(const _0x32bc64 of _0x115b2e)await _0x32bc64(_0x5e74d8);}});return _0xa6b99;}function collectHook(_0x4111b9,_0x4529c0,_0xfa2a45){const _0x49d405=_0x39377b,_0x343b02=_0xfa2a45[_0x4529c0];if(typeof _0x343b02!=='function')return;_0x4111b9[_0x4529c0]??=[],_0x4111b9[_0x4529c0][_0x49d405(0x93)](_0x343b02);}function dispatch(_0x32c944,_0x4a440e,_0x16b25e,_0x2346bf){let _0x3e40c6;if(_0x32c944==='upload')_0x3e40c6=dispatchUpload(_0x4a440e,_0x16b25e,_0x2346bf);else{if(_0x32c944==='download')_0x3e40c6=dispatchDownload(_0x4a440e,_0x16b25e,_0x2346bf);else _0x3e40c6=dispatchRequest(_0x4a440e,_0x16b25e,_0x2346bf);}bindTask(_0x3e40c6,_0x16b25e);}function bindTask(_0x10bc7c,_0x3666bd){const _0x4e7ee2=_0x39377b;onAbort(_0x3666bd['signal'],()=>_0x10bc7c[_0x4e7ee2(0x76)]());if(typeof _0x3666bd['onHeadersReceived']==='function')_0x10bc7c['onHeadersReceived'](_0x3666bd[_0x4e7ee2(0xb8)]);const _0x2eb32b=_0x3666bd[_0x4e7ee2(0xb1)];if(typeof _0x2eb32b===_0x4e7ee2(0x9c)&&_0x4e7ee2(0x82)in _0x10bc7c)_0x10bc7c['onProgressUpdate'](_0x2eb32b);}function dispatchRequest(_0x278a4d,_0x527aee,_0x53aab4){const _0x48b3d9=_0x39377b,_0x376bfe={'url':_0x278a4d,'method':_0x527aee[_0x48b3d9(0x83)],'header':_0x527aee['headers'],'data':_0x527aee[_0x48b3d9(0x89)]??{},'timeout':_0x527aee[_0x48b3d9(0xb7)],'dataType':_0x527aee['dataType']||'json','responseType':mappedResponseBodyType(_0x527aee[_0x48b3d9(0x85)]),'sslVerify':_0x527aee[_0x48b3d9(0x87)],'withCredentials':_0x527aee[_0x48b3d9(0xb2)],'firstIpv4':_0x527aee[_0x48b3d9(0xb4)],'enableHttp2':_0x527aee['enableHttp2'],'enableQuic':_0x527aee['enableQuic'],'enableCache':_0x527aee['enableCache'],'enableHttpDNS':_0x527aee[_0x48b3d9(0xc4)],'httpDNSServiceId':_0x527aee['httpDNSServiceId'],'enableChunked':_0x527aee[_0x48b3d9(0x80)],'forceCellularNetwork':_0x527aee[_0x48b3d9(0x81)],'success':_0x53aab4[_0x48b3d9(0x77)],'fail':_0x53aab4['onFail'],'complete':()=>{}};return uni['request'](_0x376bfe);}function dispatchUpload(_0x27007c,_0x59eeca,_0x5d9560){const _0x2d4bcf=_0x39377b,_0x47814d={};_0x47814d['url']=_0x27007c,_0x47814d['fileType']=_0x59eeca['fileType'],_0x47814d[_0x2d4bcf(0xbc)]=_0x59eeca['file'],_0x47814d['filePath']=_0x59eeca[_0x2d4bcf(0xb6)],_0x47814d[_0x2d4bcf(0x7e)]=_0x59eeca[_0x2d4bcf(0x7e)]??'file',_0x47814d['files']=_0x59eeca[_0x2d4bcf(0xbb)],_0x47814d[_0x2d4bcf(0x75)]=_0x59eeca[_0x2d4bcf(0x97)],_0x47814d['formData']=_0x59eeca[_0x2d4bcf(0x89)]??{},_0x47814d['timeout']=_0x59eeca[_0x2d4bcf(0xb7)],_0x47814d[_0x2d4bcf(0xa1)]=_0x5d9560['onSuccess'],_0x47814d['fail']=_0x5d9560['onFail'],_0x47814d['complete']=()=>{};const _0x163011=_0x47814d;return uni[_0x2d4bcf(0xb9)](_0x163011);}function dispatchDownload(_0x138162,_0x44802f,_0x1e7b18){const _0x28837c=_0x39377b,_0x10c153={'url':_0x138162,'header':_0x44802f['headers'],'timeout':_0x44802f['timeout'],'success':_0x42e0d2=>{const _0x3e1b8f=_0x43fc,_0x50c581={..._0x42e0d2};_0x50c581[_0x3e1b8f(0x84)]={},_0x50c581[_0x3e1b8f(0x84)][_0x3e1b8f(0xa2)]=_0x42e0d2[_0x3e1b8f(0xa2)],_0x1e7b18[_0x3e1b8f(0x77)](_0x50c581);},'fail':_0x1e7b18[_0x28837c(0xc5)],'complete':()=>{}};return uni['downloadFile'](_0x10c153);}function mappedResponseBodyType(_0xf5cc69){const _0x17ad2e=_0x39377b;if(!_0xf5cc69||_0xf5cc69==='json')return'text';if(_0xf5cc69===_0x17ad2e(0xa0))return'arraybuffer';return'text';}var VesselError=class extends Error{constructor(_0x1f41bf){const _0x51cd72=_0x39377b;super(_0x1f41bf),this[_0x51cd72(0x7e)]='VesselError';}};function createResponseError(_0x40f8b8,_0x2de955,_0x4a9253){const _0x2a984c=_0x39377b,_0x5a28d3=_0x40f8b8,_0x3a5ce5='['+(_0x2de955?.['method']||'GET')+']\x20'+_0x5a28d3,_0x79b8f8=_0x4a9253?_0x4a9253['statusCode']+'\x20'+(_0x4a9253[_0x2a984c(0x78)]||''):'<no\x20response>',_0x259390=_0x4a9253?JSON[_0x2a984c(0xac)](_0x4a9253[_0x2a984c(0x84)]):'<no\x20response\x20body>',_0x5d35f6=new VesselError(_0x3a5ce5+':\x20'+_0x79b8f8+(_0x4a9253['data']?'\x20'+_0x259390:''));for(const _0x447a2e of[_0x2a984c(0x95),_0x2a984c(0x94),_0x2a984c(0xb3),_0x2a984c(0x84)])Object['defineProperty'](_0x5d35f6,_0x447a2e,{'get'(){const _0x56697c=_0x2a984c,_0x374f6e={};return _0x374f6e['request']=_0x40f8b8,_0x374f6e[_0x56697c(0x94)]=_0x2de955,_0x374f6e['response']=_0x4a9253,_0x374f6e['data']=_0x4a9253[_0x56697c(0x84)],_0x374f6e[_0x447a2e];}});return _0x5d35f6;}function normalizeError(_0x18457e){const _0x12d30f=_0x39377b;if(_0x18457e instanceof Error)return _0x18457e;return Object['assign'](new Error(_0x18457e?.[_0x12d30f(0x78)]||_0x18457e?.['message']||'HTTP\x20request\x20failed'),{'cause':_0x18457e});}async function callRequestHooks(_0x4cf6c2,_0x5c9e0a){await _0x5c9e0a['onRequest']?.({'options':_0x5c9e0a,'resource':_0x4cf6c2});}async function callRequestErrorHooks(_0x14da47,_0x435038,_0x71a13){await _0x435038['onRequestError']?.({'options':_0x435038,'resource':_0x14da47,'error':_0x71a13});}async function callResponseHooks(_0x44fb74,_0x85d332,_0x7b233){await _0x85d332['onResponse']?.({'options':_0x85d332,'resource':_0x44fb74,'response':_0x7b233});}async function callResponseErrorHooks(_0x3c7a88,_0x455851,_0x560b64){const _0x1171a2=_0x39377b;await _0x455851[_0x1171a2(0xc2)]?.({'options':_0x455851,'resource':_0x3c7a88,'response':_0x560b64});}async function refineResponse(_0x520f07,_0x340458){const _0x392393=_0x39377b;if(_0x340458['responseType']===_0x392393(0xbd)||!_0x340458[_0x392393(0x85)])return{..._0x520f07,'data':await parseJSONResponse(_0x520f07['data'],_0x340458)};return _0x520f07;}function parseJSONResponse(_0x21cf4e,_0x2151bf){const _0x21ef2c=_0x39377b;if(typeof _0x21cf4e!=='string')return _0x21cf4e;if(_0x2151bf[_0x21ef2c(0xb5)])return _0x2151bf['parseResponse'](_0x21cf4e);return _0x21cf4e?JSON['parse'](_0x21cf4e):null;}function isResponseError(_0x1580aa){const _0x158ada=_0x39377b,_0x424994='statusCode'in _0x1580aa?_0x1580aa['statusCode']:void 0x0;return typeof _0x424994===_0x158ada(0xb0)&&(_0x424994<0xc8||_0x424994>=0x12c);}const DEFAULT_RETRY_STATUS_CODES=[0x198,0x199,0x1a9,0x1ad,0x1f4,0x1f6,0x1f7,0x1f8],PAYLOAD_METHODS=new Set([_0x39377b(0x7a),_0x39377b(0x8e),'DELETE',_0x39377b(0xaf)]);async function withRetry(_0x193985,_0x1aaf05){const _0x2f10ef=_0x39377b,_0x201418=resolveRetryCount(_0x193985);for(let _0x2ab680=0x0;;_0x2ab680++)try{return await _0x1aaf05();}catch(_0x454c93){if(_0x2ab680>=_0x201418||!shouldRetry(_0x454c93,_0x193985))throw _0x454c93;await sleep(_0x193985[_0x2f10ef(0xc6)]??0x0,_0x193985['signal']);}}function resolveRetryCount(_0x416d9f){const _0x87b757=_0x39377b,{retry:_0x1be4b8}=_0x416d9f;if(_0x1be4b8===![])return 0x0;if(typeof _0x1be4b8==='number')return _0x1be4b8>0x0?_0x1be4b8:0x0;return isPayloadMethod(_0x416d9f[_0x87b757(0x83)])?0x0:0x1;}function shouldRetry(_0x301bd3,_0x2a8f6e){const _0xfa53fb=_0x39377b;if(_0x2a8f6e['signal']?.['aborted']||isAbortError(_0x301bd3))return![];const _0xd7fe93=_0x301bd3?.['response']?.['statusCode'];if(typeof _0xd7fe93!==_0xfa53fb(0xb0))return!![];return(_0x2a8f6e[_0xfa53fb(0xad)]??DEFAULT_RETRY_STATUS_CODES)[_0xfa53fb(0x9b)](_0xd7fe93);}function isPayloadMethod(_0x2a1a68){const _0x1a1692=_0x39377b;return!!_0x2a1a68&&PAYLOAD_METHODS[_0x1a1692(0xa6)](_0x2a1a68['toUpperCase']());}function sleep(_0x165433,_0xc5b077){return new Promise((_0x27bc3c,_0x32fa66)=>{const _0x3feba3=_0x43fc;if(_0xc5b077?.[_0x3feba3(0x86)]){_0x32fa66(_0xc5b077['reason']);return;}if(!(_0x165433>0x0)){_0x27bc3c();return;}let _0x4fe6ba=()=>{};const _0x153ef4=setTimeout(()=>{_0x4fe6ba(),_0x27bc3c();},_0x165433);_0x4fe6ba=onAbort(_0xc5b077,()=>{const _0x210ef6=_0x3feba3;clearTimeout(_0x153ef4),_0x32fa66(_0xc5b077[_0x210ef6(0x8c)]);});});}function buildURL(_0x26be9a,_0x402635){const _0x20f9b5=_0x39377b,_0x19b8dd=joinURL(_0x402635['baseURL'],_0x26be9a),_0x77c2ea=_0x402635['query']??{},_0x32a81c=Object[_0x20f9b5(0x9a)](_0x77c2ea)[_0x20f9b5(0x79)](_0x2faa54=>_0x77c2ea[_0x2faa54]!==void 0x0)['flatMap'](_0x14e180=>{const _0x41e015=_0x77c2ea[_0x14e180];return(Array['isArray'](_0x41e015)?_0x41e015:[_0x41e015])['map'](_0x5bc34b=>encodeURIComponent(_0x14e180)+'='+encodeURIComponent(String(_0x5bc34b)));})['join']('&');if(!_0x32a81c)return _0x19b8dd;return''+_0x19b8dd+(_0x19b8dd[_0x20f9b5(0x9b)]('?')?'&':'?')+_0x32a81c;}function joinURL(_0x58de7a,_0x4d0086){if(!_0x58de7a||isAbsoluteURL(_0x4d0086))return _0x4d0086;return _0x58de7a['replace'](/\/+$/,'')+'/'+_0x4d0086['replace'](/^\/+/,'');}function isAbsoluteURL(_0x4de141){const _0x4b42c2=_0x39377b;return/^[a-z][a-z\d+\-.]*:\/\//i[_0x4b42c2(0x7d)](_0x4de141)||_0x4de141['startsWith']('//');}function dispatchHttp(_0x3d9e1b,_0x103b76,_0x36af1e){const _0x22b378=buildURL(_0x103b76,_0x36af1e);return withRetry(_0x36af1e,()=>attemptRequest(_0x3d9e1b,_0x103b76,_0x22b378,_0x36af1e));}function attemptRequest(_0x5961a2,_0x5a1a28,_0x1986bf,_0x1b2875){const _0x54bc28=!!_0x1b2875['raw'];return new Promise((_0x4f87ed,_0x41c1d0)=>{const _0x77633f=_0x43fc;let _0x50214c=![];const _0x598cec=_0x11c8f8=>{if(_0x50214c)return;_0x50214c=!![],_0x11c8f8();},_0x23ebc3=onAbort(_0x1b2875[_0x77633f(0xa4)],()=>{const _0x30cef8=_0x77633f;_0x598cec(()=>_0x41c1d0(_0x1b2875[_0x30cef8(0xa4)]['reason']));}),_0x50e9c0=_0x340b20=>{_0x23ebc3(),_0x598cec(_0x340b20);};callRequestHooks(_0x5a1a28,_0x1b2875)[_0x77633f(0x8f)](()=>{if(_0x50214c)return;dispatch(_0x5961a2,_0x1986bf,_0x1b2875,{'onSuccess':_0x32f26d=>{const _0x15ec5a=_0x43fc;Promise['resolve']()['then'](()=>refineResponse(_0x32f26d,_0x1b2875))['then'](async _0x5a1b75=>{const _0x46f241=_0x43fc;if(isResponseError(_0x32f26d)){await callResponseErrorHooks(_0x5a1a28,_0x1b2875,_0x5a1b75);if(!_0x1b2875[_0x46f241(0xa7)])throw createResponseError(_0x5a1a28,_0x1b2875,_0x5a1b75);}else await callResponseHooks(_0x5a1a28,_0x1b2875,_0x5a1b75);_0x50e9c0(()=>_0x4f87ed(_0x54bc28?_0x5a1b75:_0x5a1b75['data']));})[_0x15ec5a(0x9f)](_0x3c68b3=>_0x50e9c0(()=>_0x41c1d0(_0x3c68b3)));},'onFail':_0x4deaa3=>{const _0x3f92c4=_0x43fc;Promise[_0x3f92c4(0x99)]()[_0x3f92c4(0x8f)](async()=>{const _0x426d95=normalizeError(_0x4deaa3);if(!isAbortError(_0x426d95))await callRequestErrorHooks(_0x5a1a28,_0x1b2875,_0x426d95);throw _0x426d95;})['catch'](_0x44d9d5=>_0x50e9c0(()=>_0x41c1d0(_0x44d9d5)));}});})[_0x77633f(0x9f)](async _0x3d4b71=>{const _0x56ad43=normalizeError(_0x3d4b71);await callRequestErrorHooks(_0x5a1a28,_0x1b2875,_0x56ad43),_0x50e9c0(()=>_0x41c1d0(_0x56ad43));});});}const _0x4f241b={};_0x4f241b[_0x39377b(0x83)]='GET',_0x4f241b[_0x39377b(0x85)]='json';const defaultConfig=_0x4f241b;function createVessel(_0x2dc6d3={}){const _0x2b4ad6=_0x39377b,_0x25ad99=(_0x885fe8,_0x304640)=>{return dispatchHttp('request',_0x885fe8,mergeOptions(defaultConfig,_0x2dc6d3,_0x304640));},_0x43ed9f=(_0x111923,_0x2da874)=>{const _0x4283f2=_0x43fc,_0x21f4b6={};return _0x21f4b6[_0x4283f2(0x83)]=_0x4283f2(0x7a),dispatchHttp('upload',_0x111923,mergeOptions(defaultConfig,_0x2dc6d3,_0x2da874,_0x21f4b6));},_0x4ddfa9=(_0x4c2903,_0x219418)=>{const _0x39d725=_0x43fc,_0x3a9958={};return _0x3a9958['method']='GET',dispatchHttp(_0x39d725(0x88),_0x4c2903,mergeOptions(defaultConfig,_0x2dc6d3,_0x219418,_0x3a9958));},_0x471b8f=_0x2047eb=>createVessel(mergeOptions(_0x2dc6d3,_0x2047eb)),_0x496079={};return _0x496079[_0x2b4ad6(0x95)]=_0x25ad99,_0x496079['upload']=_0x43ed9f,_0x496079[_0x2b4ad6(0x88)]=_0x4ddfa9,_0x496079[_0x2b4ad6(0xc1)]=_0x471b8f,_0x496079;}function _0x12aa(){const _0x5edd1b=['7892759GIEvDt','type','push','options','request','splice','headers','1405hitSJG','resolve','keys','includes','function','indexOf','4113jxXdhy','catch','arrayBuffer','success','tempFilePath','get','signal','addEventListener','has','ignoreResponseError','957qtdSeg','233787HfjRas','17192TjEkuV','AbortError','stringify','retryStatusCodes','entries','PATCH','number','onProgress','withCredentials','response','firstIpv4','parseResponse','filePath','timeout','onHeadersReceived','uploadFile','6sAInWp','files','file','json','listeners','emit','call','create','onResponseError','onabort','enableHttpDNS','onFail','retryDelay','header','abort','onSuccess','errMsg','filter','POST','_abort','1450NzcuMm','test','name','7983276YdZyMD','enableChunked','forceCellularNetwork','onProgressUpdate','method','data','responseType','aborted','sslVerify','download','body','enumerable','1016RVuyvh','reason','onRequest','PUT','then','4151184TyZtBN'];_0x12aa=function(){return _0x5edd1b;};return _0x12aa();}const vessel=createVessel(),_0x45dd10={};_0x45dd10[_0x39377b(0x8a)]=!![],_0x45dd10[_0x39377b(0xa3)]=function(){return createBeacon;},Object['defineProperty'](exports,'createBeacon',_0x45dd10);const _0x3132c5={};_0x3132c5['enumerable']=!![],_0x3132c5['get']=function(){return createVessel;},Object['defineProperty'](exports,'createVessel',_0x3132c5);const _0x383d46={};_0x383d46['enumerable']=!![],_0x383d46['get']=function(){return vessel;},Object['defineProperty'](exports,'vessel',_0x383d46);
|