@dooboostore/simple-web-component 1.0.15 → 1.0.16
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/README.md +183 -92
- package/dist/cjs/decorators/addEventListener.js +2 -3
- package/dist/cjs/decorators/addEventListener.js.map +2 -2
- package/dist/cjs/decorators/elementDefine.js +89 -33
- package/dist/cjs/decorators/elementDefine.js.map +2 -2
- package/dist/cjs/decorators/emitCustomEvent.js +2 -14
- package/dist/cjs/decorators/emitCustomEvent.js.map +2 -2
- package/dist/cjs/decorators/query.js +25 -36
- package/dist/cjs/decorators/query.js.map +2 -2
- package/dist/cjs/decorators/queryAll.js +28 -36
- package/dist/cjs/decorators/queryAll.js.map +2 -2
- package/dist/cjs/types.js +1 -0
- package/dist/cjs/types.js.map +2 -2
- package/dist/cjs/utils/Utils.js +36 -143
- package/dist/cjs/utils/Utils.js.map +2 -2
- package/dist/esm/decorators/addEventListener.js +2 -3
- package/dist/esm/decorators/addEventListener.js.map +2 -2
- package/dist/esm/decorators/elementDefine.js +89 -33
- package/dist/esm/decorators/elementDefine.js.map +2 -2
- package/dist/esm/decorators/emitCustomEvent.js +2 -14
- package/dist/esm/decorators/emitCustomEvent.js.map +2 -2
- package/dist/esm/decorators/query.js +25 -36
- package/dist/esm/decorators/query.js.map +2 -2
- package/dist/esm/decorators/queryAll.js +28 -36
- package/dist/esm/decorators/queryAll.js.map +2 -2
- package/dist/esm/types.js +1 -0
- package/dist/esm/types.js.map +2 -2
- package/dist/esm/utils/Utils.js +36 -143
- package/dist/esm/utils/Utils.js.map +2 -2
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +183 -266
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +3 -3
- package/dist/types/decorators/addEventListener.d.ts +9 -4
- package/dist/types/decorators/addEventListener.d.ts.map +1 -1
- package/dist/types/decorators/elementDefine.d.ts.map +1 -1
- package/dist/types/decorators/emitCustomEvent.d.ts.map +1 -1
- package/dist/types/decorators/query.d.ts +6 -5
- package/dist/types/decorators/query.d.ts.map +1 -1
- package/dist/types/decorators/queryAll.d.ts +6 -5
- package/dist/types/decorators/queryAll.d.ts.map +1 -1
- package/dist/types/types.d.ts +3 -1
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils/Utils.d.ts +6 -14
- package/dist/types/utils/Utils.d.ts.map +1 -1
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +183 -266
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +3 -3
- package/package.json +3 -3
- package/src/decorators/addEventListener.ts +10 -7
- package/src/decorators/elementDefine.ts +86 -31
- package/src/decorators/emitCustomEvent.ts +5 -21
- package/src/decorators/query.ts +33 -46
- package/src/decorators/queryAll.ts +36 -46
- package/src/types.ts +6 -4
- package/src/utils/Utils.ts +40 -176
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ReflectUtils } from "@dooboostore/core/reflect/ReflectUtils";
|
|
2
2
|
const EMIT_CUSTOM_EVENT_METADATA_KEY = Symbol("simple-web-component:emit-custom-event");
|
|
3
3
|
function emitCustomEvent(typeOrOptions) {
|
|
4
|
-
return (target, propertyKey
|
|
4
|
+
return (target, propertyKey) => {
|
|
5
5
|
const constructor = target.constructor;
|
|
6
6
|
const options = typeof typeOrOptions === "string" ? { type: typeOrOptions } : typeOrOptions;
|
|
7
7
|
if (!options.attributeName) {
|
|
8
|
-
options.attributeName = `on
|
|
8
|
+
options.attributeName = `swc-on-${options.type}`;
|
|
9
9
|
}
|
|
10
10
|
if (options.bubbles === void 0) options.bubbles = true;
|
|
11
11
|
if (options.composed === void 0) options.composed = true;
|
|
@@ -15,18 +15,6 @@ function emitCustomEvent(typeOrOptions) {
|
|
|
15
15
|
ReflectUtils.defineMetadata(EMIT_CUSTOM_EVENT_METADATA_KEY, list, constructor);
|
|
16
16
|
}
|
|
17
17
|
list.push({ propertyKey, options });
|
|
18
|
-
const originalMethod = descriptor.value;
|
|
19
|
-
descriptor.value = function(...args) {
|
|
20
|
-
const detail = originalMethod.apply(this, args);
|
|
21
|
-
const event = new CustomEvent(options.type, {
|
|
22
|
-
detail,
|
|
23
|
-
bubbles: options.bubbles,
|
|
24
|
-
composed: options.composed,
|
|
25
|
-
cancelable: options.cancelable
|
|
26
|
-
});
|
|
27
|
-
this.dispatchEvent(event);
|
|
28
|
-
return detail;
|
|
29
|
-
};
|
|
30
18
|
};
|
|
31
19
|
}
|
|
32
20
|
const getEmitCustomEventMetadataList = (target) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/decorators/emitCustomEvent.ts"],
|
|
4
|
-
"sourcesContent": ["import { ReflectUtils } from '@dooboostore/core/reflect/ReflectUtils';\n\nexport interface EmitCustomEventOptions {\n type: string;\n attributeName?: string
|
|
5
|
-
"mappings": "AAAA,SAAS,oBAAoB;AAetB,MAAM,iCAAiC,OAAO,wCAAwC;AAEtF,SAAS,gBAAgB,eAAiE;AAC/F,SAAO,CAAC,QAAgB,
|
|
4
|
+
"sourcesContent": ["import { ReflectUtils } from '@dooboostore/core/reflect/ReflectUtils';\n\nexport interface EmitCustomEventOptions {\n type: string;\n attributeName?: string;\n bubbles?: boolean;\n composed?: boolean;\n cancelable?: boolean;\n}\n\nexport interface EmitCustomEventMetadata {\n propertyKey: string | symbol;\n options: EmitCustomEventOptions;\n}\n\nexport const EMIT_CUSTOM_EVENT_METADATA_KEY = Symbol('simple-web-component:emit-custom-event');\n\nexport function emitCustomEvent(typeOrOptions: string | EmitCustomEventOptions): MethodDecorator {\n return (target: Object, propertyKey: string | symbol) => {\n const constructor = target.constructor;\n const options: EmitCustomEventOptions = typeof typeOrOptions === 'string' ? { type: typeOrOptions } : typeOrOptions;\n\n if (!options.attributeName) {\n options.attributeName = `swc-on-${options.type}`;\n }\n if (options.bubbles === undefined) options.bubbles = true;\n if (options.composed === undefined) options.composed = true;\n\n let list = ReflectUtils.getMetadata<EmitCustomEventMetadata[]>(EMIT_CUSTOM_EVENT_METADATA_KEY, constructor);\n if (!list) {\n list = [];\n ReflectUtils.defineMetadata(EMIT_CUSTOM_EVENT_METADATA_KEY, list, constructor);\n }\n list.push({ propertyKey, options });\n };\n}\n\nexport const getEmitCustomEventMetadataList = (target: any): EmitCustomEventMetadata[] | undefined => {\n const constructor = target instanceof Function ? target : target.constructor;\n return ReflectUtils.getMetadata(EMIT_CUSTOM_EVENT_METADATA_KEY, constructor);\n};\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,oBAAoB;AAetB,MAAM,iCAAiC,OAAO,wCAAwC;AAEtF,SAAS,gBAAgB,eAAiE;AAC/F,SAAO,CAAC,QAAgB,gBAAiC;AACvD,UAAM,cAAc,OAAO;AAC3B,UAAM,UAAkC,OAAO,kBAAkB,WAAW,EAAE,MAAM,cAAc,IAAI;AAEtG,QAAI,CAAC,QAAQ,eAAe;AAC1B,cAAQ,gBAAgB,UAAU,QAAQ,IAAI;AAAA,IAChD;AACA,QAAI,QAAQ,YAAY,OAAW,SAAQ,UAAU;AACrD,QAAI,QAAQ,aAAa,OAAW,SAAQ,WAAW;AAEvD,QAAI,OAAO,aAAa,YAAuC,gCAAgC,WAAW;AAC1G,QAAI,CAAC,MAAM;AACT,aAAO,CAAC;AACR,mBAAa,eAAe,gCAAgC,MAAM,WAAW;AAAA,IAC/E;AACA,SAAK,KAAK,EAAE,aAAa,QAAQ,CAAC;AAAA,EACpC;AACF;AAEO,MAAM,iCAAiC,CAAC,WAAuD;AACpG,QAAM,cAAc,kBAAkB,WAAW,SAAS,OAAO;AACjE,SAAO,aAAa,YAAY,gCAAgC,WAAW;AAC7E;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,47 +1,36 @@
|
|
|
1
1
|
import { ReflectUtils } from "@dooboostore/core/reflect/ReflectUtils";
|
|
2
2
|
const QUERY_METADATA_KEY = Symbol("simple-web-component:query");
|
|
3
|
-
function query(
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
function query(selector, options = {}) {
|
|
4
|
+
return (target, propertyKey, descriptor) => {
|
|
5
|
+
if (descriptor !== void 0) {
|
|
6
|
+
throw new Error(`@query decorator cannot be used on methods. (Method: ${String(propertyKey)})`);
|
|
7
|
+
}
|
|
6
8
|
const constructor = target.constructor;
|
|
7
9
|
let queries = ReflectUtils.getMetadata(QUERY_METADATA_KEY, constructor);
|
|
8
10
|
if (!queries) {
|
|
9
11
|
queries = [];
|
|
10
12
|
ReflectUtils.defineMetadata(QUERY_METADATA_KEY, queries, constructor);
|
|
11
13
|
}
|
|
12
|
-
queries.push({ selector, options, propertyKey
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (arg1 && typeof arg2 === "string") {
|
|
33
|
-
return decorator("", {}, arg1, arg2);
|
|
34
|
-
}
|
|
35
|
-
return (target, propertyKey, descriptor) => {
|
|
36
|
-
let selector = "";
|
|
37
|
-
let options = {};
|
|
38
|
-
if (typeof arg1 === "string") {
|
|
39
|
-
selector = arg1;
|
|
40
|
-
} else if (typeof arg1 === "object") {
|
|
41
|
-
options = arg1;
|
|
42
|
-
selector = options.selector || "";
|
|
43
|
-
}
|
|
44
|
-
decorator(selector, options, target, propertyKey, descriptor);
|
|
14
|
+
queries.push({ selector, options, propertyKey });
|
|
15
|
+
Object.defineProperty(target, propertyKey, {
|
|
16
|
+
get() {
|
|
17
|
+
if (!selector || selector === ":host")
|
|
18
|
+
return this;
|
|
19
|
+
const r = options.root || "auto";
|
|
20
|
+
if (r === "shadow") {
|
|
21
|
+
return this.shadowRoot ? this.shadowRoot.querySelector(selector) : null;
|
|
22
|
+
}
|
|
23
|
+
if (r === "light") {
|
|
24
|
+
return this.querySelector(selector);
|
|
25
|
+
}
|
|
26
|
+
if (r === "all") {
|
|
27
|
+
return this.shadowRoot?.querySelector(selector) || this.querySelector(selector);
|
|
28
|
+
}
|
|
29
|
+
return (this.shadowRoot || this).querySelector(selector);
|
|
30
|
+
},
|
|
31
|
+
enumerable: true,
|
|
32
|
+
configurable: true
|
|
33
|
+
});
|
|
45
34
|
};
|
|
46
35
|
}
|
|
47
36
|
const getQueryMetadata = (target) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/decorators/query.ts"],
|
|
4
|
-
"sourcesContent": ["import { ReflectUtils } from '@dooboostore/core/reflect/ReflectUtils';\n\nexport interface QueryOptions {\n
|
|
5
|
-
"mappings": "AAAA,SAAS,oBAAoB;
|
|
4
|
+
"sourcesContent": ["import { ReflectUtils } from '@dooboostore/core/reflect/ReflectUtils';\n\nexport interface QueryOptions {\n root?: 'light' | 'shadow' | 'all' | 'auto';\n}\n\nexport interface QueryMetadata {\n selector: string;\n options: QueryOptions;\n propertyKey: string | symbol;\n}\n\nexport const QUERY_METADATA_KEY = Symbol('simple-web-component:query');\n\n/**\n * @query decorator to inject a single element into a class property.\n * Usage: @query('.my-class') myEl!: HTMLElement;\n * Usage: @query('#my-id', { root: 'shadow' }) myEl!: HTMLElement;\n */\nexport function query(selector: string, options: QueryOptions = {}): PropertyDecorator {\n return (target: Object, propertyKey: string | symbol, descriptor?: never): void => {\n if (descriptor !== undefined) {\n throw new Error(`@query decorator cannot be used on methods. (Method: ${String(propertyKey)})`);\n }\n\n const constructor = target.constructor;\n let queries = ReflectUtils.getMetadata<QueryMetadata[]>(QUERY_METADATA_KEY, constructor);\n if (!queries) {\n queries = [];\n ReflectUtils.defineMetadata(QUERY_METADATA_KEY, queries, constructor);\n }\n queries.push({ selector, options, propertyKey });\n\n Object.defineProperty(target, propertyKey, {\n get(this: HTMLElement) {\n if (!selector || selector === ':host') return this;\n const r = options.root || 'auto';\n\n if (r === 'shadow') {\n return this.shadowRoot ? this.shadowRoot.querySelector(selector) : null;\n }\n if (r === 'light') {\n return this.querySelector(selector);\n }\n if (r === 'all') {\n return this.shadowRoot?.querySelector(selector) || this.querySelector(selector);\n }\n // auto\n return (this.shadowRoot || this).querySelector(selector);\n },\n enumerable: true,\n configurable: true\n });\n };\n}\n\nexport const getQueryMetadata = (target: any): QueryMetadata[] | undefined => {\n const constructor = target instanceof Function ? target : target.constructor;\n return ReflectUtils.getMetadata(QUERY_METADATA_KEY, constructor);\n};\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,oBAAoB;AAYtB,MAAM,qBAAqB,OAAO,4BAA4B;AAO/D,SAAU,MAAM,UAAkB,UAAwB,CAAA,GAAE;AAChE,SAAO,CAAC,QAAgB,aAA8B,eAA4B;AAChF,QAAI,eAAe,QAAW;AAC5B,YAAM,IAAI,MAAM,wDAAwD,OAAO,WAAW,CAAC,GAAG;IAChG;AAEA,UAAM,cAAc,OAAO;AAC3B,QAAI,UAAU,aAAa,YAA6B,oBAAoB,WAAW;AACvF,QAAI,CAAC,SAAS;AACZ,gBAAU,CAAA;AACV,mBAAa,eAAe,oBAAoB,SAAS,WAAW;IACtE;AACA,YAAQ,KAAK,EAAE,UAAU,SAAS,YAAW,CAAE;AAE/C,WAAO,eAAe,QAAQ,aAAa;MACzC,MAAG;AACD,YAAI,CAAC,YAAY,aAAa;AAAS,iBAAO;AAC9C,cAAM,IAAI,QAAQ,QAAQ;AAE1B,YAAI,MAAM,UAAU;AAClB,iBAAO,KAAK,aAAa,KAAK,WAAW,cAAc,QAAQ,IAAI;QACrE;AACA,YAAI,MAAM,SAAS;AACjB,iBAAO,KAAK,cAAc,QAAQ;QACpC;AACA,YAAI,MAAM,OAAO;AACf,iBAAO,KAAK,YAAY,cAAc,QAAQ,KAAK,KAAK,cAAc,QAAQ;QAChF;AAEA,gBAAQ,KAAK,cAAc,MAAM,cAAc,QAAQ;MACzD;MACA,YAAY;MACZ,cAAc;KACf;EACH;AACF;AAEO,MAAM,mBAAmB,CAAC,WAA4C;AAC3E,QAAM,cAAc,kBAAkB,WAAW,SAAS,OAAO;AACjE,SAAO,aAAa,YAAY,oBAAoB,WAAW;AACjE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,47 +1,39 @@
|
|
|
1
1
|
import { ReflectUtils } from "@dooboostore/core/reflect/ReflectUtils";
|
|
2
2
|
const QUERY_ALL_METADATA_KEY = Symbol("simple-web-component:query-all");
|
|
3
|
-
function queryAll(
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
function queryAll(selector, options = {}) {
|
|
4
|
+
return (target, propertyKey, descriptor) => {
|
|
5
|
+
if (descriptor !== void 0) {
|
|
6
|
+
throw new Error(`@queryAll decorator cannot be used on methods. (Method: ${String(propertyKey)})`);
|
|
7
|
+
}
|
|
6
8
|
const constructor = target.constructor;
|
|
7
9
|
let queries = ReflectUtils.getMetadata(QUERY_ALL_METADATA_KEY, constructor);
|
|
8
10
|
if (!queries) {
|
|
9
11
|
queries = [];
|
|
10
12
|
ReflectUtils.defineMetadata(QUERY_ALL_METADATA_KEY, queries, constructor);
|
|
11
13
|
}
|
|
12
|
-
queries.push({ selector, options, propertyKey
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return (target, propertyKey, descriptor) => {
|
|
36
|
-
let selector = "";
|
|
37
|
-
let options = {};
|
|
38
|
-
if (typeof arg1 === "string") {
|
|
39
|
-
selector = arg1;
|
|
40
|
-
} else if (typeof arg1 === "object") {
|
|
41
|
-
options = arg1;
|
|
42
|
-
selector = options.selector || "";
|
|
43
|
-
}
|
|
44
|
-
decorator(selector, options, target, propertyKey, descriptor);
|
|
14
|
+
queries.push({ selector, options, propertyKey });
|
|
15
|
+
Object.defineProperty(target, propertyKey, {
|
|
16
|
+
get() {
|
|
17
|
+
if (!selector || selector === ":host")
|
|
18
|
+
return [this];
|
|
19
|
+
const r = options.root || "auto";
|
|
20
|
+
if (r === "shadow") {
|
|
21
|
+
return this.shadowRoot ? this.shadowRoot.querySelectorAll(selector) : [];
|
|
22
|
+
}
|
|
23
|
+
if (r === "light") {
|
|
24
|
+
return this.querySelectorAll(selector);
|
|
25
|
+
}
|
|
26
|
+
if (r === "all") {
|
|
27
|
+
const sNodes = this.shadowRoot ? Array.from(this.shadowRoot.querySelectorAll(selector)) : [];
|
|
28
|
+
const lNodes = Array.from(this.querySelectorAll(selector));
|
|
29
|
+
return [...sNodes, ...lNodes];
|
|
30
|
+
}
|
|
31
|
+
const root = this.shadowRoot || this;
|
|
32
|
+
return root.querySelectorAll(selector);
|
|
33
|
+
},
|
|
34
|
+
enumerable: true,
|
|
35
|
+
configurable: true
|
|
36
|
+
});
|
|
45
37
|
};
|
|
46
38
|
}
|
|
47
39
|
const getQueryAllMetadata = (target) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/decorators/queryAll.ts"],
|
|
4
|
-
"sourcesContent": ["import { ReflectUtils } from '@dooboostore/core/reflect/ReflectUtils';\n\nexport interface QueryAllOptions {\n
|
|
5
|
-
"mappings": "AAAA,SAAS,oBAAoB;
|
|
4
|
+
"sourcesContent": ["import { ReflectUtils } from '@dooboostore/core/reflect/ReflectUtils';\n\nexport interface QueryAllOptions {\n root?: 'light' | 'shadow' | 'all' | 'auto';\n}\n\nexport interface QueryAllMetadata {\n selector: string;\n options: QueryAllOptions;\n propertyKey: string | symbol;\n}\n\nexport const QUERY_ALL_METADATA_KEY = Symbol('simple-web-component:query-all');\n\n/**\n * @queryAll decorator to inject a list of elements into a class property.\n * Usage: @queryAll('.items') list!: NodeListOf<HTMLElement>;\n * Usage: @queryAll('li', { root: 'shadow' }) list!: HTMLElement[];\n */\nexport function queryAll(selector: string, options: QueryAllOptions = {}): PropertyDecorator {\n return (target: Object, propertyKey: string | symbol, descriptor?: never): void => {\n if (descriptor !== undefined) {\n throw new Error(`@queryAll decorator cannot be used on methods. (Method: ${String(propertyKey)})`);\n }\n\n const constructor = target.constructor;\n let queries = ReflectUtils.getMetadata<QueryAllMetadata[]>(QUERY_ALL_METADATA_KEY, constructor);\n if (!queries) {\n queries = [];\n ReflectUtils.defineMetadata(QUERY_ALL_METADATA_KEY, queries, constructor);\n }\n queries.push({ selector, options, propertyKey });\n\n Object.defineProperty(target, propertyKey, {\n get(this: HTMLElement) {\n if (!selector || selector === ':host') return [this];\n const r = options.root || 'auto';\n\n if (r === 'shadow') {\n return this.shadowRoot ? this.shadowRoot.querySelectorAll(selector) : [];\n }\n if (r === 'light') {\n return this.querySelectorAll(selector);\n }\n if (r === 'all') {\n const sNodes = this.shadowRoot ? Array.from(this.shadowRoot.querySelectorAll(selector)) : [];\n const lNodes = Array.from(this.querySelectorAll(selector));\n return [...sNodes, ...lNodes];\n }\n // auto\n const root = this.shadowRoot || this;\n return root.querySelectorAll(selector);\n },\n enumerable: true,\n configurable: true\n });\n };\n}\n\nexport const getQueryAllMetadata = (target: any): QueryAllMetadata[] | undefined => {\n const constructor = target instanceof Function ? target : target.constructor;\n return ReflectUtils.getMetadata(QUERY_ALL_METADATA_KEY, constructor);\n};\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,oBAAoB;AAYtB,MAAM,yBAAyB,OAAO,gCAAgC;AAOvE,SAAU,SAAS,UAAkB,UAA2B,CAAA,GAAE;AACtE,SAAO,CAAC,QAAgB,aAA8B,eAA4B;AAChF,QAAI,eAAe,QAAW;AAC5B,YAAM,IAAI,MAAM,2DAA2D,OAAO,WAAW,CAAC,GAAG;IACnG;AAEA,UAAM,cAAc,OAAO;AAC3B,QAAI,UAAU,aAAa,YAAgC,wBAAwB,WAAW;AAC9F,QAAI,CAAC,SAAS;AACZ,gBAAU,CAAA;AACV,mBAAa,eAAe,wBAAwB,SAAS,WAAW;IAC1E;AACA,YAAQ,KAAK,EAAE,UAAU,SAAS,YAAW,CAAE;AAE/C,WAAO,eAAe,QAAQ,aAAa;MACzC,MAAG;AACD,YAAI,CAAC,YAAY,aAAa;AAAS,iBAAO,CAAC,IAAI;AACnD,cAAM,IAAI,QAAQ,QAAQ;AAE1B,YAAI,MAAM,UAAU;AAClB,iBAAO,KAAK,aAAa,KAAK,WAAW,iBAAiB,QAAQ,IAAI,CAAA;QACxE;AACA,YAAI,MAAM,SAAS;AACjB,iBAAO,KAAK,iBAAiB,QAAQ;QACvC;AACA,YAAI,MAAM,OAAO;AACf,gBAAM,SAAS,KAAK,aAAa,MAAM,KAAK,KAAK,WAAW,iBAAiB,QAAQ,CAAC,IAAI,CAAA;AAC1F,gBAAM,SAAS,MAAM,KAAK,KAAK,iBAAiB,QAAQ,CAAC;AACzD,iBAAO,CAAC,GAAG,QAAQ,GAAG,MAAM;QAC9B;AAEA,cAAM,OAAO,KAAK,cAAc;AAChC,eAAO,KAAK,iBAAiB,QAAQ;MACvC;MACA,YAAY;MACZ,cAAc;KACf;EACH;AACF;AAEO,MAAM,sBAAsB,CAAC,WAA+C;AACjF,QAAM,cAAc,kBAAkB,WAAW,SAAS,OAAO;AACjE,SAAO,aAAa,YAAY,wBAAwB,WAAW;AACrE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/types.js
CHANGED
|
@@ -3,6 +3,7 @@ var InjectSituationType = /* @__PURE__ */ ((InjectSituationType2) => {
|
|
|
3
3
|
InjectSituationType2["APP_HOST"] = "SIMPLE_WEB_COMPONENT://APPHOST";
|
|
4
4
|
InjectSituationType2["APP_HOSTS"] = "SIMPLE_WEB_COMPONENT://APPHOSTS";
|
|
5
5
|
InjectSituationType2["HOST"] = "SIMPLE_WEB_COMPONENT://HOST";
|
|
6
|
+
InjectSituationType2["PARENT_HOST"] = "SIMPLE_WEB_COMPONENT://PARENTHOST";
|
|
6
7
|
InjectSituationType2["HOSTS"] = "SIMPLE_WEB_COMPONENT://HOSTS";
|
|
7
8
|
InjectSituationType2["FIRST_HOST"] = "SIMPLE_WEB_COMPONENT://FIRSTHOST";
|
|
8
9
|
InjectSituationType2["LAST_HOST"] = "SIMPLE_WEB_COMPONENT://LASTHOST";
|
package/dist/esm/types.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/types.ts"],
|
|
4
|
-
"sourcesContent": ["import { SimpleApplication } from '@dooboostore/simple-boot/SimpleApplication';\nimport { Router } from '@dooboostore/core-web/routers/Router';\n\nexport enum InjectSituationType {\n HOST_SET = 'SIMPLE_WEB_COMPONENT://HOSTSET',\n APP_HOST = 'SIMPLE_WEB_COMPONENT://APPHOST',\n APP_HOSTS = 'SIMPLE_WEB_COMPONENT://APPHOSTS',\n HOST = 'SIMPLE_WEB_COMPONENT://HOST',\n HOSTS = 'SIMPLE_WEB_COMPONENT://HOSTS',\n FIRST_HOST = 'SIMPLE_WEB_COMPONENT://FIRSTHOST',\n LAST_HOST = 'SIMPLE_WEB_COMPONENT://LASTHOST',\n FIRST_APP_HOST = 'SIMPLE_WEB_COMPONENT://FIRSTAPPHOST',\n LAST_APP_HOST = 'SIMPLE_WEB_COMPONENT://LASTAPPHOST'\n}\n\nexport type HostSet = {\n $host: HTMLElement | null
|
|
5
|
-
"mappings": "AAGO,IAAK,sBAAL,kBAAKA,yBAAL;AACL,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,eAAY;AACZ,EAAAA,qBAAA,UAAO;AACP,EAAAA,qBAAA,WAAQ;AACR,EAAAA,qBAAA,gBAAa;AACb,EAAAA,qBAAA,eAAY;AACZ,EAAAA,qBAAA,oBAAiB;AACjB,EAAAA,qBAAA,mBAAgB;
|
|
4
|
+
"sourcesContent": ["import { SimpleApplication } from '@dooboostore/simple-boot/SimpleApplication';\nimport { Router } from '@dooboostore/core-web/routers/Router';\n\nexport enum InjectSituationType {\n HOST_SET = 'SIMPLE_WEB_COMPONENT://HOSTSET',\n APP_HOST = 'SIMPLE_WEB_COMPONENT://APPHOST',\n APP_HOSTS = 'SIMPLE_WEB_COMPONENT://APPHOSTS',\n HOST = 'SIMPLE_WEB_COMPONENT://HOST',\n PARENT_HOST = 'SIMPLE_WEB_COMPONENT://PARENTHOST',\n HOSTS = 'SIMPLE_WEB_COMPONENT://HOSTS',\n FIRST_HOST = 'SIMPLE_WEB_COMPONENT://FIRSTHOST',\n LAST_HOST = 'SIMPLE_WEB_COMPONENT://LASTHOST',\n FIRST_APP_HOST = 'SIMPLE_WEB_COMPONENT://FIRSTAPPHOST',\n LAST_APP_HOST = 'SIMPLE_WEB_COMPONENT://LASTAPPHOST'\n}\n\nexport type HostSet = {\n $host: HTMLElement; // Current component itself\n $parentHost: HTMLElement | null; // Nearest parent SWC component\n $hosts: HTMLElement[]; // [self, parent, ..., top]\n $firstHost: HTMLElement | null; // Top-most SWC ancestor\n $lastHost: HTMLElement | null; // Same as $parentHost (for backward compatibility or clarity)\n $appHost: SwcAppInterface | null;\n $appHosts: SwcAppInterface[];\n $firstAppHost: SwcAppInterface | null;\n $lastAppHost: SwcAppInterface | null;\n};\n\nexport interface SwcAppInterface extends HTMLElement {\n simpleApplication?: SimpleApplication;\n router?: Router;\n routing(path: string): Promise<void>;\n}\n"],
|
|
5
|
+
"mappings": "AAGO,IAAK,sBAAL,kBAAKA,yBAAL;AACL,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,eAAY;AACZ,EAAAA,qBAAA,UAAO;AACP,EAAAA,qBAAA,iBAAc;AACd,EAAAA,qBAAA,WAAQ;AACR,EAAAA,qBAAA,gBAAa;AACb,EAAAA,qBAAA,eAAY;AACZ,EAAAA,qBAAA,oBAAiB;AACjB,EAAAA,qBAAA,mBAAgB;AAVN,SAAAA;AAAA,GAAA;",
|
|
6
6
|
"names": ["InjectSituationType"]
|
|
7
7
|
}
|
package/dist/esm/utils/Utils.js
CHANGED
|
@@ -1,146 +1,42 @@
|
|
|
1
|
+
import { getElementConfig } from "../decorators/elementDefine.js";
|
|
1
2
|
const SWC_NOT_FOUND = Symbol("SWC_NOT_FOUND");
|
|
2
3
|
class SwcUtils {
|
|
3
4
|
static getValueByPath(obj, path, rootName) {
|
|
4
5
|
if (!obj || !path) return SWC_NOT_FOUND;
|
|
5
6
|
const parts = path.split(".");
|
|
6
|
-
|
|
7
|
-
const subParts = parts.slice(1);
|
|
8
|
-
let subResult = obj;
|
|
9
|
-
for (const part of subParts) {
|
|
10
|
-
if (subResult === null || typeof subResult !== "object" || !(part in subResult)) return SWC_NOT_FOUND;
|
|
11
|
-
subResult = subResult[part];
|
|
12
|
-
}
|
|
13
|
-
return subResult;
|
|
14
|
-
}
|
|
15
|
-
let result = obj;
|
|
7
|
+
let current = obj;
|
|
16
8
|
for (const part of parts) {
|
|
17
|
-
if (
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
result = result[part];
|
|
21
|
-
}
|
|
22
|
-
if (result !== obj && !(result instanceof HTMLElement)) {
|
|
23
|
-
return result;
|
|
9
|
+
if (current === null || current === void 0) return SWC_NOT_FOUND;
|
|
10
|
+
current = current[part];
|
|
24
11
|
}
|
|
25
|
-
return
|
|
26
|
-
}
|
|
27
|
-
static evalExpression(expr, context) {
|
|
28
|
-
try {
|
|
29
|
-
const keys = Object.keys(context);
|
|
30
|
-
const values = Object.values(context);
|
|
31
|
-
return new Function(...keys, `return (${expr})`).apply(null, values);
|
|
32
|
-
} catch {
|
|
33
|
-
return SWC_NOT_FOUND;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
static applyData(node, data, options) {
|
|
37
|
-
const { asKey, asIndexKey, index, hostContext } = options;
|
|
38
|
-
const context = {};
|
|
39
|
-
if (index !== void 0) {
|
|
40
|
-
context[asIndexKey] = index;
|
|
41
|
-
}
|
|
42
|
-
if (data !== null && data !== void 0) {
|
|
43
|
-
context[asKey] = data;
|
|
44
|
-
context["value"] = data;
|
|
45
|
-
}
|
|
46
|
-
const fullContext = { ...hostContext || {}, ...context };
|
|
47
|
-
const resolveExpr = (expr, match) => {
|
|
48
|
-
expr = expr.trim();
|
|
49
|
-
const simpleVal = SwcUtils.getValueByPath(data, expr, asKey);
|
|
50
|
-
if (simpleVal !== SWC_NOT_FOUND && typeof simpleVal !== "symbol") {
|
|
51
|
-
return simpleVal === null || simpleVal === void 0 ? "" : String(simpleVal);
|
|
52
|
-
}
|
|
53
|
-
const exprVal = SwcUtils.evalExpression(expr, fullContext);
|
|
54
|
-
if (exprVal !== SWC_NOT_FOUND && typeof exprVal !== "symbol") {
|
|
55
|
-
return exprVal === null || exprVal === void 0 ? "" : String(exprVal);
|
|
56
|
-
}
|
|
57
|
-
return match;
|
|
58
|
-
};
|
|
59
|
-
const walk = (n) => {
|
|
60
|
-
if (n.nodeType === Node.TEXT_NODE) {
|
|
61
|
-
if (!n._original) n._original = n.textContent;
|
|
62
|
-
let text = n._original;
|
|
63
|
-
text = text.replace(/{{(.*?)}}/g, (match, path) => {
|
|
64
|
-
return resolveExpr(path, match);
|
|
65
|
-
});
|
|
66
|
-
if (n.textContent !== text) n.textContent = text;
|
|
67
|
-
} else if (n.nodeType === Node.ELEMENT_NODE) {
|
|
68
|
-
const el = n;
|
|
69
|
-
Array.from(el.attributes).forEach((a) => {
|
|
70
|
-
if (!a._original) a._original = a.value;
|
|
71
|
-
let val = a._original;
|
|
72
|
-
val = val.replace(/{{(.*?)}}/g, (match, path) => {
|
|
73
|
-
return resolveExpr(path, match);
|
|
74
|
-
});
|
|
75
|
-
if (a.value !== val) a.value = val;
|
|
76
|
-
});
|
|
77
|
-
el.childNodes.forEach(walk);
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
walk(node);
|
|
81
|
-
}
|
|
82
|
-
static createReactiveProxy(target, onChange, onIndexChange) {
|
|
83
|
-
const makeRecursiveProxy = (obj) => {
|
|
84
|
-
if (typeof obj !== "object" || obj === null || obj instanceof Node) return obj;
|
|
85
|
-
if (obj.__swc_is_proxy) return obj;
|
|
86
|
-
const IS_PROXY_KEY = "__swc_is_proxy";
|
|
87
|
-
const proxy = new Proxy(obj, {
|
|
88
|
-
get: (t, prop) => {
|
|
89
|
-
if (prop === IS_PROXY_KEY) return true;
|
|
90
|
-
if (typeof prop === "symbol") return t[prop];
|
|
91
|
-
return t[prop];
|
|
92
|
-
},
|
|
93
|
-
set: (t, prop, val) => {
|
|
94
|
-
if (prop === IS_PROXY_KEY) return true;
|
|
95
|
-
if (typeof prop === "symbol") {
|
|
96
|
-
t[prop] = val;
|
|
97
|
-
return true;
|
|
98
|
-
}
|
|
99
|
-
const oldVal = t[prop];
|
|
100
|
-
if (oldVal === val) return true;
|
|
101
|
-
t[prop] = makeRecursiveProxy(val);
|
|
102
|
-
const isIndex = !isNaN(Number(prop)) && Array.isArray(t);
|
|
103
|
-
if (isIndex && onIndexChange) {
|
|
104
|
-
onIndexChange(Number(prop), val);
|
|
105
|
-
} else {
|
|
106
|
-
onChange();
|
|
107
|
-
}
|
|
108
|
-
return true;
|
|
109
|
-
},
|
|
110
|
-
deleteProperty: (t, prop) => {
|
|
111
|
-
delete t[prop];
|
|
112
|
-
onChange();
|
|
113
|
-
return true;
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
return proxy;
|
|
117
|
-
};
|
|
118
|
-
return makeRecursiveProxy(target);
|
|
12
|
+
return current;
|
|
119
13
|
}
|
|
120
14
|
static findNearestSwcHost(el) {
|
|
121
|
-
|
|
122
|
-
|
|
15
|
+
let current = el instanceof Node && !(el instanceof HTMLElement) ? el.host : el;
|
|
16
|
+
current = current?.parentElement || current?.getRootNode()?.host;
|
|
17
|
+
while (current) {
|
|
18
|
+
if (getElementConfig(current)) return current;
|
|
19
|
+
current = current.parentElement || current?.getRootNode()?.host;
|
|
20
|
+
}
|
|
21
|
+
return void 0;
|
|
123
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Returns all SWC ancestors (excluding self) in [root, ..., parent] order.
|
|
25
|
+
*/
|
|
124
26
|
static findAllSwcHosts(el) {
|
|
125
27
|
const hosts = [];
|
|
126
|
-
let
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
curr = curr.parentElement || curr?.getRootNode()?.host;
|
|
28
|
+
let current = this.findNearestSwcHost(el);
|
|
29
|
+
while (current) {
|
|
30
|
+
hosts.push(current);
|
|
31
|
+
current = this.findNearestSwcHost(current);
|
|
131
32
|
}
|
|
132
33
|
return hosts.reverse();
|
|
133
34
|
}
|
|
134
35
|
static getHosts(el) {
|
|
135
|
-
return this.findAllSwcHosts(el);
|
|
36
|
+
return [...this.findAllSwcHosts(el), el];
|
|
136
37
|
}
|
|
137
38
|
static getHost(el) {
|
|
138
|
-
|
|
139
|
-
return hosts.length > 0 ? hosts[hosts.length - 1] : void 0;
|
|
140
|
-
}
|
|
141
|
-
static getFirstHost(el) {
|
|
142
|
-
const hosts = this.getHosts(el);
|
|
143
|
-
return hosts.length > 0 ? hosts[0] : void 0;
|
|
39
|
+
return el;
|
|
144
40
|
}
|
|
145
41
|
static getAppHosts(el) {
|
|
146
42
|
const hosts = this.getHosts(el);
|
|
@@ -148,31 +44,28 @@ class SwcUtils {
|
|
|
148
44
|
}
|
|
149
45
|
static getAppHost(el) {
|
|
150
46
|
const appHosts = this.getAppHosts(el);
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
static getFirstAppHost(el) {
|
|
154
|
-
const appHosts = this.getAppHosts(el);
|
|
155
|
-
return appHosts.length > 0 ? appHosts[0] : void 0;
|
|
156
|
-
}
|
|
157
|
-
static getLastAppHost(el) {
|
|
158
|
-
return this.getAppHost(el);
|
|
47
|
+
const appHostsWithoutSelf = appHosts.filter((h) => h !== el);
|
|
48
|
+
return appHostsWithoutSelf.length > 0 ? appHostsWithoutSelf[appHostsWithoutSelf.length - 1] : void 0;
|
|
159
49
|
}
|
|
160
50
|
static getHostSet(el) {
|
|
161
|
-
const
|
|
162
|
-
const $
|
|
163
|
-
const $
|
|
164
|
-
const $
|
|
165
|
-
const $
|
|
166
|
-
const $
|
|
51
|
+
const ancestors = this.findAllSwcHosts(el);
|
|
52
|
+
const $host = el;
|
|
53
|
+
const $hosts = [...ancestors, $host];
|
|
54
|
+
const $parentHost = ancestors.length > 0 ? ancestors[ancestors.length - 1] : null;
|
|
55
|
+
const $firstHost = ancestors.length > 0 ? ancestors[0] : null;
|
|
56
|
+
const $appHosts = $hosts.filter((h) => h.tagName.toLowerCase() === "swc-app" || h.getAttribute("is")?.startsWith("swc-app-"));
|
|
57
|
+
const $appHost = $appHosts.length > 0 ? $appHosts[$appHosts.length - 1] === el ? $appHosts.length > 1 ? $appHosts[$appHosts.length - 2] : null : $appHosts[$appHosts.length - 1] : null;
|
|
58
|
+
const $firstAppHost = $appHosts.length > 0 ? $appHosts[0] : null;
|
|
167
59
|
return {
|
|
168
|
-
$host
|
|
60
|
+
$host,
|
|
61
|
+
$parentHost,
|
|
169
62
|
$hosts,
|
|
170
63
|
$firstHost,
|
|
171
|
-
$lastHost,
|
|
172
|
-
$appHost
|
|
64
|
+
$lastHost: $parentHost,
|
|
65
|
+
$appHost,
|
|
173
66
|
$appHosts,
|
|
174
67
|
$firstAppHost,
|
|
175
|
-
$lastAppHost
|
|
68
|
+
$lastAppHost: $appHost
|
|
176
69
|
};
|
|
177
70
|
}
|
|
178
71
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/utils/Utils.ts"],
|
|
4
|
-
"sourcesContent": ["import {
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { SwcAppInterface, HostSet } from '../types';\nimport { getElementConfig } from '../decorators/elementDefine';\n\nexport const SWC_NOT_FOUND = Symbol('SWC_NOT_FOUND');\n\nexport class SwcUtils {\n static getValueByPath(obj: any, path: string, rootName: string) {\n if (!obj || !path) return SWC_NOT_FOUND;\n\n const parts = path.split('.');\n let current = obj;\n\n for (const part of parts) {\n if (current === null || current === undefined) return SWC_NOT_FOUND;\n current = current[part];\n }\n return current;\n }\n\n static findNearestSwcHost(el: HTMLElement | Node): HTMLElement | undefined {\n let current: any = el instanceof Node && !(el instanceof HTMLElement) ? (el as any).host : el;\n current = current?.parentElement || (current?.getRootNode() as any)?.host;\n\n while (current) {\n if (getElementConfig(current)) return current as HTMLElement;\n current = current.parentElement || (current?.getRootNode() as any)?.host;\n }\n return undefined;\n }\n\n /**\n * Returns all SWC ancestors (excluding self) in [root, ..., parent] order.\n */\n static findAllSwcHosts(el: HTMLElement | Node): HTMLElement[] {\n const hosts: HTMLElement[] = [];\n let current = this.findNearestSwcHost(el);\n while (current) {\n hosts.push(current);\n current = this.findNearestSwcHost(current);\n }\n return hosts.reverse();\n }\n\n static getHosts(el: HTMLElement): HTMLElement[] {\n return [...this.findAllSwcHosts(el), el];\n }\n\n static getHost(el: HTMLElement): HTMLElement | undefined {\n return el;\n }\n\n static getAppHosts(el: HTMLElement): SwcAppInterface[] {\n const hosts = this.getHosts(el);\n return hosts.filter(host => host.tagName.toLowerCase() === 'swc-app' || host.getAttribute('is')?.startsWith('swc-app-')) as SwcAppInterface[];\n }\n\n static getAppHost(el: HTMLElement): SwcAppInterface | undefined {\n const appHosts = this.getAppHosts(el);\n const appHostsWithoutSelf = appHosts.filter(h => h !== el);\n // Nearest app host is the last one in [root, ..., parent]\n return appHostsWithoutSelf.length > 0 ? appHostsWithoutSelf[appHostsWithoutSelf.length - 1] : undefined;\n }\n\n static getHostSet(el: HTMLElement): HostSet {\n const ancestors = this.findAllSwcHosts(el); // [root, ..., parent]\n const $host = el;\n const $hosts = [...ancestors, $host]; // [root, ..., parent, self]\n const $parentHost = ancestors.length > 0 ? ancestors[ancestors.length - 1] : null;\n const $firstHost = ancestors.length > 0 ? ancestors[0] : null;\n\n const $appHosts = $hosts.filter(h => h.tagName.toLowerCase() === 'swc-app' || h.getAttribute('is')?.startsWith('swc-app-')) as SwcAppInterface[];\n const $appHost = $appHosts.length > 0 ? ($appHosts[$appHosts.length - 1] === el ? ($appHosts.length > 1 ? $appHosts[$appHosts.length - 2] : null) : $appHosts[$appHosts.length - 1]) : null;\n const $firstAppHost = $appHosts.length > 0 ? $appHosts[0] : null;\n\n return {\n $host,\n $parentHost,\n $hosts,\n $firstHost,\n $lastHost: $parentHost,\n $appHost,\n $appHosts,\n $firstAppHost,\n $lastAppHost: $appHost\n };\n }\n}\n"],
|
|
5
|
+
"mappings": "AACA,SAAS,wBAAwB;AAE1B,MAAM,gBAAgB,OAAO,eAAe;AAE5C,MAAM,SAAS;AAAA,EACpB,OAAO,eAAe,KAAU,MAAc,UAAkB;AAC9D,QAAI,CAAC,OAAO,CAAC,KAAM,QAAO;AAE1B,UAAM,QAAQ,KAAK,MAAM,GAAG;AAC5B,QAAI,UAAU;AAEd,eAAW,QAAQ,OAAO;AACxB,UAAI,YAAY,QAAQ,YAAY,OAAW,QAAO;AACtD,gBAAU,QAAQ,IAAI;AAAA,IACxB;AACA,WAAO;AAAA,EACT;AAAA,EAEA,OAAO,mBAAmB,IAAiD;AACzE,QAAI,UAAe,cAAc,QAAQ,EAAE,cAAc,eAAgB,GAAW,OAAO;AAC3F,cAAU,SAAS,iBAAkB,SAAS,YAAY,GAAW;AAErE,WAAO,SAAS;AACd,UAAI,iBAAiB,OAAO,EAAG,QAAO;AACtC,gBAAU,QAAQ,iBAAkB,SAAS,YAAY,GAAW;AAAA,IACtE;AACA,WAAO;AAAA,EACT;AAAA;AAAA;AAAA;AAAA,EAKA,OAAO,gBAAgB,IAAuC;AAC5D,UAAM,QAAuB,CAAC;AAC9B,QAAI,UAAU,KAAK,mBAAmB,EAAE;AACxC,WAAO,SAAS;AACd,YAAM,KAAK,OAAO;AAClB,gBAAU,KAAK,mBAAmB,OAAO;AAAA,IAC3C;AACA,WAAO,MAAM,QAAQ;AAAA,EACvB;AAAA,EAEA,OAAO,SAAS,IAAgC;AAC9C,WAAO,CAAC,GAAG,KAAK,gBAAgB,EAAE,GAAG,EAAE;AAAA,EACzC;AAAA,EAEA,OAAO,QAAQ,IAA0C;AACvD,WAAO;AAAA,EACT;AAAA,EAEA,OAAO,YAAY,IAAoC;AACrD,UAAM,QAAQ,KAAK,SAAS,EAAE;AAC9B,WAAO,MAAM,OAAO,UAAQ,KAAK,QAAQ,YAAY,MAAM,aAAa,KAAK,aAAa,IAAI,GAAG,WAAW,UAAU,CAAC;AAAA,EACzH;AAAA,EAEA,OAAO,WAAW,IAA8C;AAC9D,UAAM,WAAW,KAAK,YAAY,EAAE;AACpC,UAAM,sBAAsB,SAAS,OAAO,OAAK,MAAM,EAAE;AAEzD,WAAO,oBAAoB,SAAS,IAAI,oBAAoB,oBAAoB,SAAS,CAAC,IAAI;AAAA,EAChG;AAAA,EAEA,OAAO,WAAW,IAA0B;AAC1C,UAAM,YAAY,KAAK,gBAAgB,EAAE;AACzC,UAAM,QAAQ;AACd,UAAM,SAAS,CAAC,GAAG,WAAW,KAAK;AACnC,UAAM,cAAc,UAAU,SAAS,IAAI,UAAU,UAAU,SAAS,CAAC,IAAI;AAC7E,UAAM,aAAa,UAAU,SAAS,IAAI,UAAU,CAAC,IAAI;AAEzD,UAAM,YAAY,OAAO,OAAO,OAAK,EAAE,QAAQ,YAAY,MAAM,aAAa,EAAE,aAAa,IAAI,GAAG,WAAW,UAAU,CAAC;AAC1H,UAAM,WAAW,UAAU,SAAS,IAAK,UAAU,UAAU,SAAS,CAAC,MAAM,KAAM,UAAU,SAAS,IAAI,UAAU,UAAU,SAAS,CAAC,IAAI,OAAQ,UAAU,UAAU,SAAS,CAAC,IAAK;AACvL,UAAM,gBAAgB,UAAU,SAAS,IAAI,UAAU,CAAC,IAAI;AAE5D,WAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA,cAAc;AAAA,IAChB;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|