dozy 1.0.16 → 1.0.18

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.
@@ -0,0 +1,2 @@
1
+ @import './styles/reset.css';
2
+ @import './styles/variables.css';
@@ -0,0 +1,7 @@
1
+ @import 'tailwindcss';
2
+
3
+ @layer base {
4
+ @import './styles/reset.css';
5
+ @import './styles/variables.css';
6
+ }
7
+ @import './styles/utilities.css';
@@ -1,3 +1,4 @@
1
+ /* 自己去设置滚动吧 */
1
2
  /* =========================================
2
3
  CSS Reset and Global Styles
3
4
  Project: xaidozy
@@ -8,7 +9,9 @@
8
9
  ======================= */
9
10
  @font-face {
10
11
  font-family: 'xaifont';
11
- src: url('@/assets/fonts/xaifont.ttf') format('truetype');
12
+ src: url('/fonts/xaifont.woff2') format('woff2'),
13
+ url('https://xaidozy.github.io/fonts/xaifont.woff2') format('woff2');
14
+ font-display: swap;
12
15
  }
13
16
 
14
17
  /* @font-face {
@@ -37,6 +40,9 @@
37
40
  margin: 0; /* 2 */
38
41
  padding: 0; /* 2 */
39
42
  border: 0 solid; /* 3 */
43
+
44
+ font-family: inherit !important;
45
+ font-size: inherit !important;
40
46
  }
41
47
 
42
48
  /* =======================
@@ -50,11 +56,7 @@
50
56
  -webkit-font-smoothing: antialiased; /* WebKit字体抗锯齿 */
51
57
  -moz-osx-font-smoothing: grayscale; /* Firefox字体抗锯齿 */
52
58
 
53
- --base-font-size: 16;
54
- --px: calc(1 / 16 * 1rem);
55
-
56
- --content-width: 0;
57
- --modal-max-height: 0;
59
+ --status-bar-height: 0;
58
60
  }
59
61
 
60
62
  /* HTML 基础设置
@@ -65,7 +67,7 @@
65
67
  5. 禁用 iOS 点击高亮
66
68
  */
67
69
  html {
68
- font-size: calc(var(--base-font-size) * 1px);
70
+ font-size: 16px !important;
69
71
  width: 100%;
70
72
  height: 100%;
71
73
  overflow-x: hidden;
@@ -77,7 +79,7 @@ html {
77
79
 
78
80
  /* 字体栈 */
79
81
  font-family: xaifont, Inter, system-ui, Avenir, Helvetica, Arial, ui-sans-serif,
80
- 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif; /* 4 */
82
+ 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif !important; /* 4 */
81
83
 
82
84
  font-feature-settings: normal;
83
85
  font-variation-settings: normal;
@@ -104,11 +106,7 @@ body {
104
106
  background-blend-mode: hard-light;
105
107
  }
106
108
 
107
- /* React根元素 */
108
- div#root {
109
- width: 100%;
110
- height: 100%;
111
- }
109
+ /* 根元素 */
112
110
 
113
111
  /* 全局激进重置 (Aggressive Global Reset)
114
112
  注意:此处包含所有元素的过渡动画、文字阴影和背景默认行为。
@@ -117,7 +115,7 @@ div#root {
117
115
  *,
118
116
  *::before,
119
117
  *::after {
120
- text-shadow: 0 var(--px) var(--px) #000;
118
+ text-shadow: 0 1px 1px #000;
121
119
  user-select: inherit;
122
120
 
123
121
  /* 背景图默认行为 */
@@ -152,27 +150,39 @@ div#root {
152
150
 
153
151
  /* WebKit 浏览器 (Chrome / Edge / Safari) */
154
152
  ::-webkit-scrollbar {
153
+ width: 0px; /* 隐藏垂直滚动条 */
154
+ height: 0px; /* 隐藏水平滚动条 */
155
+ }
156
+ ::-webkit-scrollbar-track,
157
+ ::-webkit-scrollbar-thumb {
158
+ background: transparent; /* 轨道和滑块透明 */
159
+ }
160
+ * {
161
+ scrollbar-width: none; /* Firefox 隐藏滚动条 */
162
+ }
163
+ /* @media (pointer: coarse) and (hover: none) { */
164
+ .scrollbar::-webkit-scrollbar {
155
165
  width: 8px; /* 垂直滚动条宽度 */
156
166
  height: 8px; /* 水平滚动条高度 */
157
167
  }
158
- ::-webkit-scrollbar-track {
168
+ .scrollbar::-webkit-scrollbar-track {
159
169
  background: #888; /* 轨道背景 */
160
170
  }
161
- ::-webkit-scrollbar-thumb {
171
+ .scrollbar::-webkit-scrollbar-thumb {
162
172
  background-color: #ccc; /* 滑块颜色 */
163
173
  border-radius: 9999px; /* 大圆角 */
164
174
  border: 2px solid transparent; /*以此模拟内边距效果 */
165
175
  background-clip: padding-box;
166
176
  }
167
- ::-webkit-scrollbar-thumb:hover {
177
+ .scrollbar::-webkit-scrollbar-thumb:hover {
168
178
  background-color: #fff; /* 悬停颜色 */
169
179
  }
170
-
171
180
  /* Firefox 浏览器 */
172
- * {
181
+ .scrollbar {
173
182
  scrollbar-width: thin; /* 细滚动条 */
174
183
  scrollbar-color: #ccc #888; /* 滑块颜色 轨道背景 */
175
184
  }
185
+ /* } */
176
186
 
177
187
  /* =======================
178
188
  5. 排版与文本 (Typography)
@@ -208,7 +218,7 @@ li {
208
218
  hr {
209
219
  height: 0;
210
220
  color: inherit;
211
- border-top-width: 1em;
221
+ border-top-width: 0.1em;
212
222
  }
213
223
 
214
224
  /* 缩写下划线样式 */
@@ -0,0 +1,49 @@
1
+ @utility xbase {
2
+ @apply text-(--text)!;
3
+ }
4
+
5
+ @utility frame-base {
6
+ @apply xbase;
7
+ @apply bg-(--primary)!;
8
+ @apply shadow-[0_0_2px_0_#000]!;
9
+ }
10
+
11
+ @utility frame {
12
+ @apply frame-base;
13
+ @apply px-2! py-1! rounded-lg!;
14
+ }
15
+
16
+ @utility with-border {
17
+ @apply rounded-lg! border-2! border-(--border)!;
18
+ }
19
+
20
+ @utility border-frame {
21
+ @apply frame;
22
+ @apply border-2! border-(--active)!;
23
+ }
24
+
25
+ @utility inlineb {
26
+ @apply mx-0.5!;
27
+ @apply inline-block;
28
+ }
29
+
30
+ @utility scroller {
31
+ @apply overflow-y-scroll! overflow-x-hidden! h-full!;
32
+ }
33
+
34
+ @utility nowrap {
35
+ @apply whitespace-nowrap!;
36
+ }
37
+
38
+ @utility even-wrapper {
39
+ @apply flex! flex-row! justify-center! items-center! gap-4! p-4!;
40
+ }
41
+
42
+ @utility container {
43
+ @apply border-frame! px-5! py-3! rounded-2xl!;
44
+ }
45
+
46
+ /* @utility contained {
47
+ @apply bg-(--primary-light)!;
48
+ @apply p-3! rounded-xl!;
49
+ } */
@@ -0,0 +1,15 @@
1
+ :root {
2
+ --primary: #ea9580;
3
+ --primary-light: #ffdad2; /* 卡片,框等的背景颜色 */
4
+ --primary-dark: #c96f58; /* 卡片,框等内部input,text label的背景 */
5
+
6
+ --text: #ffd700; /* 文本颜色 */
7
+ --back: #332e00;
8
+ --active: #5ff; /* 这个目前也作为border color */
9
+ --deactive: #007070;
10
+ --border: #a50;
11
+
12
+ --success: #5f5;
13
+ --danger: #f55;
14
+ --warning: #fa0;
15
+ }
package/dist/Dozy.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export type LogFilter = (msg: string) => boolean;
2
1
  export type DozyConfigItem = {};
3
2
  export type DozyConfig = Partial<DozyConfigItem>;
4
3
  declare class Dozy {
5
- config: DozyConfigItem;
4
+ loadConfig(config: DozyConfig): void;
5
+ config: DozyConfig;
6
6
  }
7
7
  export declare const dozy: Dozy;
8
8
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"Dozy.d.ts","sourceRoot":"","sources":["../src/Dozy.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAA;AAEhD,MAAM,MAAM,cAAc,GAAG,EAAE,CAAA;AAC/B,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;AAChD,cAAM,IAAI;IACT,MAAM,EAAE,cAAc,CAAK;CAC3B;AACD,eAAO,MAAM,IAAI,MAAa,CAAA"}
1
+ {"version":3,"file":"Dozy.d.ts","sourceRoot":"","sources":["../src/Dozy.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,cAAc,GAAG,EAAE,CAAA;AAC/B,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;AAChD,cAAM,IAAI;IACT,UAAU,CAAC,MAAM,EAAE,UAAU;IAG7B,MAAM,EAAE,UAAU,CAAK;CACvB;AACD,eAAO,MAAM,IAAI,MAAa,CAAA"}
@@ -2,4 +2,44 @@ export declare function $isObject(value: unknown): value is Record<string, unkno
2
2
  export declare function $deepClone<T>(value: T): T;
3
3
  export declare function $capitalize(s: string): string;
4
4
  export declare function $clamp(n: number, min: number, max: number): number;
5
+ export declare function $loadOpt(thiz: Object, obj?: Object): any;
6
+ export declare function errMsg(msg: string): void;
7
+ export declare function $pureText(fragment: string): string;
8
+ export declare function $oc(o: any): o is Record<string, any>;
9
+ export declare function $s(s: any, val?: boolean): s is string;
10
+ export declare function $sc(n: any): n is number;
11
+ export declare function $lplus(v: number, t: number, plus?: number): number;
12
+ export declare function $lindex(arr: Array<any>, i: number): any;
13
+ export declare function $validName(id?: string): id is string;
14
+ export type FileType = 'text' | 'image' | 'audio' | 'video' | 'font' | 'unknown';
15
+ export declare function $getFileType(fileName: string): FileType;
16
+ export declare function $isValidOrBriefURL(url?: string): boolean;
17
+ export declare function $getTimeString(stampTicks: number, short: boolean, unitS?: boolean, exact?: boolean): string;
18
+ export declare function $magic(start: number, end?: number): number;
19
+ export declare function $randomByte(len?: number): string;
20
+ export declare function $rsValue(s?: string, path?: string, def?: any): any;
21
+ export declare function $rsetValue(obj: Object, path: string, value: any): any;
22
+ export declare function $rvalue(obj: Object, path?: string, def?: any, sdef?: boolean, set?: boolean): any;
23
+ export declare function $hasKey(obj: Object, key: string): boolean;
24
+ export declare function maybeString(a: any, maxLength?: number): string;
25
+ export declare function errToString(e: unknown): string;
26
+ export declare function smallChance(): boolean;
27
+ export declare function $isPlainClass(obj: any, clas?: Function): boolean;
28
+ export declare function $encodeUnicodeToBase64(str: string): string;
29
+ export declare function $decodeBase64ToUnicode(base64: string): string;
30
+ export declare function $fileToBase64(file: File): Promise<string>;
31
+ export declare function $decodeBase64ToBinary(base64: string): Uint8Array<ArrayBuffer>;
32
+ export declare function $setRange(v: number, min?: number, max?: number): number;
33
+ export declare function $inRange2(v: number, mid: number, range: number): boolean;
34
+ export declare function $inRange(v: number, min?: number, max?: number): boolean;
35
+ export declare function $strings(str: string, cut?: string): string[];
36
+ export declare function $genSSF(f: (s1: string, s2: string) => string, gap?: string): (...args: string[]) => string;
37
+ export declare function xtrim(s: string): string;
38
+ export declare function $if<T extends string | number | symbol, V>(val: T, fs: Record<T, Function | V>): any;
39
+ export declare function $lastIndex(items: Array<any> | number): number;
40
+ export declare function $replaceHolesWithUndefined<T>(arr: Array<T | undefined>): Array<T | undefined>;
41
+ export declare function $stringToRange(str: string, max: number): number;
42
+ export declare function $rmvSlash(path: string): string;
43
+ export declare function $parseParams(path: string): (string | undefined)[];
44
+ export declare function $formatWithCommas(num: number | string): string;
5
45
  //# sourceMappingURL=Functions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Functions.d.ts","sourceRoot":"","sources":["../src/Functions.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE1E;AACD,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAMzC;AAkBD,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,UAGpC;AACD,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,UAEzD"}
1
+ {"version":3,"file":"Functions.d.ts","sourceRoot":"","sources":["../src/Functions.ts"],"names":[],"mappings":"AAGA,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE1E;AACD,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAMzC;AAkBD,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,UAGpC;AACD,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,MA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AAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,WAI7D;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,MAAY,YAEtD;AAED,wBAAgB,OAAO,CACtB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,MAAM,EACrC,GAAG,GAAE,MAAW,GACd,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,KAAK,MAAM,CAa/B;AAED,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,UAK9B;AAED,wBAAgB,GAAG,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC,EAAE,QAAQ,GAAG,CAAC,CAAC,OAI7F;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,MAAM,UAIpD;AAED,wBAAgB,0BAA0B,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,SAAS,CAAC,CAQ7F;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAS/D;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,UAErC;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CA8BjE;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAI9D"}
package/dist/index.d.ts CHANGED
@@ -1,17 +1,58 @@
1
- import axios from 'axios';
2
- import l from 'lodash';
1
+ import { default as axios } from 'axios';
2
+ import * as l from 'lodash-es';
3
+ import { default as z } from 'zod';
3
4
 
4
- export type LogFilter = (msg: string) => boolean;
5
5
  export type DozyConfigItem = {};
6
6
  export type DozyConfig = Partial<DozyConfigItem>;
7
7
  declare class Dozy {
8
- config: DozyConfigItem;
8
+ loadConfig(config: DozyConfig): void;
9
+ config: DozyConfig;
9
10
  }
10
11
  export declare const dozy: Dozy;
11
12
  export declare function $isObject(value: unknown): value is Record<string, unknown>;
12
13
  export declare function $deepClone<T>(value: T): T;
13
14
  export declare function $capitalize(s: string): string;
14
15
  export declare function $clamp(n: number, min: number, max: number): number;
16
+ export declare function $loadOpt(thiz: Object, obj?: Object): any;
17
+ export declare function errMsg(msg: string): void;
18
+ export declare function $pureText(fragment: string): string;
19
+ export declare function $oc(o: any): o is Record<string, any>;
20
+ export declare function $s(s: any, val?: boolean): s is string;
21
+ export declare function $sc(n: any): n is number;
22
+ export declare function $lplus(v: number, t: number, plus?: number): number;
23
+ export declare function $lindex(arr: Array<any>, i: number): any;
24
+ export declare function $validName(id?: string): id is string;
25
+ export type FileType = "text" | "image" | "audio" | "video" | "font" | "unknown";
26
+ export declare function $getFileType(fileName: string): FileType;
27
+ export declare function $isValidOrBriefURL(url?: string): boolean;
28
+ export declare function $getTimeString(stampTicks: number, short: boolean, unitS?: boolean, exact?: boolean): string;
29
+ export declare function $magic(start: number, end?: number): number;
30
+ export declare function $randomByte(len?: number): string;
31
+ export declare function $rsValue(s?: string, path?: string, def?: any): any;
32
+ export declare function $rsetValue(obj: Object, path: string, value: any): any;
33
+ export declare function $rvalue(obj: Object, path?: string, def?: any, sdef?: boolean, set?: boolean): any;
34
+ export declare function $hasKey(obj: Object, key: string): boolean;
35
+ export declare function maybeString(a: any, maxLength?: number): string;
36
+ export declare function errToString(e: unknown): string;
37
+ export declare function smallChance(): boolean;
38
+ export declare function $isPlainClass(obj: any, clas?: Function): boolean;
39
+ export declare function $encodeUnicodeToBase64(str: string): string;
40
+ export declare function $decodeBase64ToUnicode(base64: string): string;
41
+ export declare function $fileToBase64(file: File): Promise<string>;
42
+ export declare function $decodeBase64ToBinary(base64: string): Uint8Array<ArrayBuffer>;
43
+ export declare function $setRange(v: number, min?: number, max?: number): number;
44
+ export declare function $inRange2(v: number, mid: number, range: number): boolean;
45
+ export declare function $inRange(v: number, min?: number, max?: number): boolean;
46
+ export declare function $strings(str: string, cut?: string): string[];
47
+ export declare function $genSSF(f: (s1: string, s2: string) => string, gap?: string): (...args: string[]) => string;
48
+ export declare function xtrim(s: string): string;
49
+ export declare function $if<T extends string | number | symbol, V>(val: T, fs: Record<T, Function | V>): any;
50
+ export declare function $lastIndex(items: Array<any> | number): number;
51
+ export declare function $replaceHolesWithUndefined<T>(arr: Array<T | undefined>): Array<T | undefined>;
52
+ export declare function $stringToRange(str: string, max: number): number;
53
+ export declare function $rmvSlash(path: string): string;
54
+ export declare function $parseParams(path: string): (string | undefined)[];
55
+ export declare function $formatWithCommas(num: number | string): string;
15
56
  export declare function web$setPathTarget(s: string): void;
16
57
  export declare function web$pathStartData(): {
17
58
  href: string;
@@ -108,13 +149,50 @@ export declare const $Response: {
108
149
  json(data: any, init?: ResponseInit): Response;
109
150
  redirect(url: string | URL, status?: number): Response;
110
151
  } | undefined;
152
+ export declare const $log: <T>(a?: T, ...x: any[]) => T | undefined;
111
153
  export declare const $crypto: Crypto | undefined;
112
- export declare const DOZY = "1.0.16";
154
+ export type ScaleComputer = undefined | ((scaler: Scaler) => number);
155
+ export type ScaleIniter = (scaler: Scaler) => void;
156
+ declare class Scaler {
157
+ #private;
158
+ get clientWidth(): number;
159
+ set clientWidth(val: number);
160
+ get clientHeight(): number;
161
+ set clientHeight(val: number);
162
+ set mainScale(val: number);
163
+ get mainScale(): number;
164
+ get scaleComputer(): ScaleComputer;
165
+ set scaleComputer(val: ScaleComputer);
166
+ onMainScaleChange?: (scale: number) => void;
167
+ innerContainer: HTMLElement;
168
+ constructor(innerContainer: HTMLElement);
169
+ }
170
+ export declare function useScaler(outerContainer: HTMLElement, initer?: ScaleIniter): Scaler | undefined;
171
+ export declare const standardIniter: (args: {
172
+ maxScreenWidth?: number;
173
+ setFullScreenWidth?: (x: number) => void;
174
+ setFullContentHeight?: (x: number) => void;
175
+ setMainScale?: (x: number) => void;
176
+ }) => ScaleIniter;
177
+ export declare class StringObfuscator {
178
+ key: string;
179
+ length: number;
180
+ constructor(key: string, length?: number);
181
+ xors(str: string, key: string): string;
182
+ en(input: string): string;
183
+ de(obfuscated: string): string;
184
+ }
185
+ export type Items<T> = {
186
+ [key: string]: T;
187
+ };
188
+ export declare const DOZY = "1.0.18";
113
189
  export * from "axios";
190
+ export * from "zod";
114
191
 
115
192
  export {
116
193
  axios,
117
194
  l,
195
+ z,
118
196
  };
119
197
 
120
198
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA;AAE1B,cAAc,OAAO,CAAA;AACrB,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,OAAO,CAAC,MAAM,QAAQ,CAAA;AACtB,OAAO,EAAE,CAAC,EAAE,CAAA;AAEZ,OAAO,QAAQ,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,CAAA;AAEnB,eAAO,MAAM,IAAI,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AAEnC,cAAc,OAAO,CAAA;AACrB,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,OAAO,CAAA;AAExC,OAAO,KAAK,CAAC,MAAM,WAAW,CAAA;AAC9B,OAAO,EAAE,CAAC,EAAE,CAAA;AAEZ,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,WAAW,CAAA;AAE/C,cAAc,KAAK,CAAA;AACnB,OAAO,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,KAAK,CAAA;AAElC,eAAO,MAAM,IAAI,WAAW,CAAA"}