@furystack/shades 6.1.5 → 7.1.0

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.
Files changed (65) hide show
  1. package/dist/component-factory.spec.js +6 -6
  2. package/dist/component-factory.spec.js.map +1 -1
  3. package/dist/components/lazy-load.js +17 -14
  4. package/dist/components/lazy-load.js.map +1 -1
  5. package/dist/components/route-link.js +7 -3
  6. package/dist/components/route-link.js.map +1 -1
  7. package/dist/components/route-link.spec.js +2 -2
  8. package/dist/components/route-link.spec.js.map +1 -1
  9. package/dist/components/router.js +25 -26
  10. package/dist/components/router.js.map +1 -1
  11. package/dist/components/router.spec.js +2 -2
  12. package/dist/components/router.spec.js.map +1 -1
  13. package/dist/services/location-service.js +52 -4
  14. package/dist/services/location-service.js.map +1 -1
  15. package/dist/services/location-service.spec.js +63 -5
  16. package/dist/services/location-service.spec.js.map +1 -1
  17. package/dist/services/resource-manager.js +48 -0
  18. package/dist/services/resource-manager.js.map +1 -0
  19. package/dist/services/resource-manager.spec.js +32 -0
  20. package/dist/services/resource-manager.spec.js.map +1 -0
  21. package/dist/shade-component.js +28 -14
  22. package/dist/shade-component.js.map +1 -1
  23. package/dist/shade-resources.integration.spec.js +7 -8
  24. package/dist/shade-resources.integration.spec.js.map +1 -1
  25. package/dist/shade.js +79 -69
  26. package/dist/shade.js.map +1 -1
  27. package/dist/shades.integration.spec.js +197 -187
  28. package/dist/shades.integration.spec.js.map +1 -1
  29. package/package.json +6 -6
  30. package/src/component-factory.spec.tsx +7 -7
  31. package/src/components/lazy-load.tsx +19 -15
  32. package/src/components/route-link.spec.tsx +2 -2
  33. package/src/components/route-link.tsx +11 -10
  34. package/src/components/router.spec.tsx +2 -2
  35. package/src/components/router.tsx +32 -32
  36. package/src/jsx.ts +3 -2
  37. package/src/models/render-options.ts +59 -9
  38. package/src/services/location-service.spec.ts +75 -6
  39. package/src/services/location-service.tsx +58 -4
  40. package/src/services/resource-manager.spec.ts +33 -0
  41. package/src/services/resource-manager.ts +60 -0
  42. package/src/shade-component.ts +35 -15
  43. package/src/shade-resources.integration.spec.tsx +8 -14
  44. package/src/shade.ts +95 -104
  45. package/src/shades.integration.spec.tsx +265 -252
  46. package/types/components/lazy-load.d.ts +1 -1
  47. package/types/components/lazy-load.d.ts.map +1 -1
  48. package/types/components/route-link.d.ts +1 -1
  49. package/types/components/route-link.d.ts.map +1 -1
  50. package/types/components/router.d.ts +6 -8
  51. package/types/components/router.d.ts.map +1 -1
  52. package/types/jsx.d.ts +3 -2
  53. package/types/jsx.d.ts.map +1 -1
  54. package/types/models/render-options.d.ts +46 -7
  55. package/types/models/render-options.d.ts.map +1 -1
  56. package/types/services/location-service.d.ts +21 -1
  57. package/types/services/location-service.d.ts.map +1 -1
  58. package/types/services/resource-manager.d.ts +16 -0
  59. package/types/services/resource-manager.d.ts.map +1 -0
  60. package/types/services/resource-manager.spec.d.ts +2 -0
  61. package/types/services/resource-manager.spec.d.ts.map +1 -0
  62. package/types/shade-component.d.ts +16 -5
  63. package/types/shade-component.d.ts.map +1 -1
  64. package/types/shade.d.ts +8 -27
  65. package/types/shade.d.ts.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"jsx.d.ts","sourceRoot":"","sources":["../src/jsx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE5D,OAAO,CAAC,MAAM,CAAC;IAEb,MAAM,WAAW,GAAG,CAAC;QACnB,UAAU,OAAO,CAAC,MAAM,GAAG,GAAG,EAAE,MAAM,GAAG,GAAG,CAAE,SAAQ,WAAW;YAC/D,QAAQ,EAAE,QAAQ,CAAA;YAClB,KAAK,EAAE,MAAM,CAAA;YACb,KAAK,EAAE,MAAM,CAAA;YACb,eAAe,EAAE,MAAM,IAAI,CAAA;YAC3B,aAAa,CAAC,EAAE,YAAY,CA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,EAAE,cAAc,CAAC,WAAW,CAAC,CAAA;SACjC;KACF;CACF"}
@@ -1,13 +1,52 @@
1
1
  import type { Injector } from '@furystack/inject';
2
- import type { PartialElement } from './partial-element';
3
2
  import type { ChildrenList } from './children-list';
4
- export type RenderOptions<TProps, TState> = {
3
+ import type { Disposable, ObservableValue } from '@furystack/utils';
4
+ export type RenderOptions<TProps> = {
5
5
  readonly props: TProps;
6
6
  injector: Injector;
7
7
  children?: ChildrenList;
8
- element: JSX.Element<TProps, TState>;
9
- } & (unknown extends TState ? {} : {
10
- getState: () => TState;
11
- updateState: (newState: PartialElement<TState>, skipRender?: boolean) => void;
12
- });
8
+ element: JSX.Element<TProps>;
9
+ /**
10
+ * Creates and disposes a resource after the component has been detached from the DOM
11
+ *
12
+ * @param key The key for caching the disposable resource
13
+ * @param factory A factory method for creating the disposable resource
14
+ * @returns The Disposable instance
15
+ */
16
+ useDisposable: <T extends Disposable>(key: string, factory: () => T) => T;
17
+ /**
18
+ *
19
+ * @param key The key for caching the observable value
20
+ * @param observable The observable value to observe
21
+ * @param callback Optional callback for reacting to changes. If no callback provided, the component will re-render on change
22
+ * @param getLast An option to trigger the callback with the initial value
23
+ * @returns tuple with the current value and a setter function
24
+ */
25
+ useObservable: <T>(key: string, observable: ObservableValue<T>, onChange?: (newValue: T) => void, getLast?: boolean) => [value: T, setValue: (newValue: T) => void];
26
+ /**
27
+ * Creates a state object that will trigger a component re-render on change
28
+ *
29
+ * @param key The Key for caching the observable value
30
+ * @param initialValue The initial value for the observable
31
+ * @returns tuple with the current value and a setter function
32
+ */
33
+ useState: <T>(key: string, initialValue: T) => [value: T, setValue: (newValue: T) => void];
34
+ /**
35
+ * Creates a state object that will use a value from the search string of the current location. Triggers a component re-render on change
36
+ *
37
+ * @param key The Key for caching the observable value
38
+ * @param initialValue The initial value - if the value is not found in the search string
39
+ * @returns a tuple with the current value and a setter function
40
+ */
41
+ useSearchState: <T>(key: string, initialValue: T) => [value: T, setValue: (newValue: T) => void];
42
+ /**
43
+ * Creates a state object that will use a value from the storage area. Triggers a component re-render on change
44
+ *
45
+ * @param key The key in the storage area
46
+ * @param initialValue The initial value that will be used if the key is not found in the storage area
47
+ * @param storageArea The storage area to use
48
+ * @returns a tuple with the current value and a setter function
49
+ */
50
+ useStoredState: <T>(key: string, initialValue: T, storageArea?: Storage) => [value: T, setValue: (newValue: T) => void];
51
+ };
13
52
  //# sourceMappingURL=render-options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"render-options.d.ts","sourceRoot":"","sources":["../../src/models/render-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAEnD,MAAM,MAAM,aAAa,CAAC,MAAM,EAAE,MAAM,IAAI;IAC1C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IAEtB,QAAQ,EAAE,QAAQ,CAAA;IAClB,QAAQ,CAAC,EAAE,YAAY,CAAA;IACvB,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACrC,GAAG,CAAC,OAAO,SAAS,MAAM,GACvB,EAAE,GACF;IACE,QAAQ,EAAE,MAAM,MAAM,CAAA;IACtB,WAAW,EAAE,CAAC,QAAQ,EAAE,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;CAC9E,CAAC,CAAA"}
1
+ {"version":3,"file":"render-options.d.ts","sourceRoot":"","sources":["../../src/models/render-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE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Q,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,IAAI,CAAC,CAAA;CACjD,CAAA"}
@@ -2,8 +2,28 @@ import type { Disposable } from '@furystack/utils';
2
2
  import { ObservableValue } from '@furystack/utils';
3
3
  export declare class LocationService implements Disposable {
4
4
  dispose(): void;
5
- onLocationChanged: ObservableValue<string>;
5
+ /**
6
+ * Observable value that will be updated when the location pathname (e.g. /page/1) changes
7
+ */
8
+ onLocationPathChanged: ObservableValue<string>;
9
+ /**
10
+ * Observable value that will be updated when the location hash (e.g. #hash) changes
11
+ */
12
+ onLocationHashChanged: ObservableValue<string>;
13
+ /**
14
+ * Observable value that will be updated when the location search (e.g. ?search=1) changes
15
+ */
16
+ onLocationSearchChanged: ObservableValue<string>;
6
17
  updateState(): void;
18
+ readonly searchParamObservables: Map<string, ObservableValue<any>>;
19
+ private tryGetValueFromSearch;
20
+ /**
21
+ *
22
+ * @param key The search param key (e.g. ?search=1 -> search)
23
+ * @param defaultValue The default value if not provided
24
+ * @returns An observable with the current value (or default value) of the search param
25
+ */
26
+ useSearchParam<T>(key: string, defaultValue: T): ObservableValue<T>;
7
27
  private pushStateTracer;
8
28
  private replaceStateTracer;
9
29
  constructor();
@@ -1 +1 @@
1
- {"version":3,"file":"location-service.d.ts","sourceRoot":"","sources":["../../src/services/location-service.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,eAAe,EAAS,MAAM,kBAAkB,CAAA;AAEzD,qBACa,eAAgB,YAAW,UAAU;IACzC,OAAO;IAQP,iBAAiB,0BAAuD;IAExE,WAAW;IAKlB,OAAO,CAAC,eAAe,CAAY;IACnC,OAAO,CAAC,kBAAkB,CAAY;;CAoBvC"}
1
+ {"version":3,"file":"location-service.d.ts","sourceRoot":"","sources":["../../src/services/location-service.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,eAAe,EAAS,MAAM,kBAAkB,CAAA;AAEzD,qBACa,eAAgB,YAAW,UAAU;IACzC,OAAO;IAQd;;OAEG;IACI,qBAAqB,0BAAuD;IAEnF;;OAEG;IACI,qBAAqB,0BAAqC;IAEjE;;OAEG;IACI,uBAAuB,0BAAuC;IAE9D,WAAW;IAMlB,SAAgB,sBAAsB,oCAA0C;IAEhF,OAAO,CAAC,qBAAqB,CAU5B;IAED;;;;;OAKG;IACI,cAAc,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;IAoBrD,OAAO,CAAC,eAAe,CAAY;IACnC,OAAO,CAAC,kBAAkB,CAAY;;CAoBvC"}
@@ -0,0 +1,16 @@
1
+ import { ObservableValue } from '@furystack/utils';
2
+ import type { Disposable, ValueChangeCallback } from '@furystack/utils';
3
+ import type { ValueObserver } from '@furystack/utils';
4
+ /**
5
+ * Class for managing observables and disposables for components, based on key-value maps
6
+ */
7
+ export declare class ResourceManager {
8
+ private readonly disposables;
9
+ useDisposable<T extends Disposable>(key: string, factory: () => T): T;
10
+ readonly observers: Map<string, ValueObserver<any>>;
11
+ useObservable: <T>(key: string, observable: ObservableValue<T>, callback: ValueChangeCallback<T>, getLast?: boolean) => [value: T, setValue: (newValue: T) => void];
12
+ readonly stateObservers: Map<string, ObservableValue<any>>;
13
+ useState: <T>(key: string, initialValue: T, callback: ValueChangeCallback<T>) => [value: T, setValue: (newValue: T) => void];
14
+ dispose(): void;
15
+ }
16
+ //# sourceMappingURL=resource-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource-manager.d.ts","sourceRoot":"","sources":["../../src/services/resource-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAErD;;GAEG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAgC;IAErD,aAAa,CAAC,CAAC,SAAS,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC;IAO5E,SAAgB,SAAS,kCAAwC;IAE1D,aAAa,WACb,MAAM,8EAGD,OAAO,2CACsB,IAAI,EAQ5C;IAED,SAAgB,cAAc,oCAA0C;IAEjE,QAAQ,WACR,MAAM,8FAG4B,IAAI,EAQ5C;IAEM,OAAO;CASf"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=resource-manager.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource-manager.spec.d.ts","sourceRoot":"","sources":["../../src/services/resource-manager.spec.ts"],"names":[],"mappings":""}
@@ -15,14 +15,25 @@ export declare const hasStyle: (props: any) => props is {
15
15
  */
16
16
  export declare const attachStyles: (el: HTMLElement, props: any) => void;
17
17
  export declare const attachDataAttributes: (el: HTMLElement, props: any) => void;
18
+ /**
19
+ *
20
+ * @param el The Target HTML Element
21
+ * @param props The Props to attach
22
+ */
23
+ export declare const attachProps: (el: HTMLElement, props: any) => void;
24
+ type CreateComponentArgs<TProps> = [
25
+ elementType: string | ShadeComponent<TProps>,
26
+ props: TProps,
27
+ ...children: ChildrenList
28
+ ];
18
29
  /**
19
30
  * Factory method that creates a component. This should be configured as a default JSX Factory in tsconfig.
20
31
  *
21
- * @param elementType The type of the element (component or stateless component factory method)
22
- * @param props The props for the component
23
- * @param children additional rest parameters will be parsed as children objects
24
32
  * @returns the created JSX element
25
33
  */
26
- export declare const createComponent: <TProps>(elementType: string | ShadeComponent<TProps>, props: TProps, ...children: ChildrenList) => HTMLElement | undefined;
27
- export declare const createFragment: (_props: any, children: ChildrenList) => DocumentFragment;
34
+ export declare const createComponentInner: <TProps>(elementType: string | ShadeComponent<TProps>, props: TProps, ...children: (string | HTMLElement | JSX.Element<any> | string[] | HTMLElement[] | JSX.Element<any>[])[]) => HTMLElement | undefined;
35
+ type CreateFragmentArgs = [props: null, ...children: ChildrenList];
36
+ export declare const createFragmentInner: (props: null, ...children: (string | HTMLElement | JSX.Element<any> | string[] | HTMLElement[] | JSX.Element<any>[])[]) => DocumentFragment;
37
+ export declare const createComponent: <TProps>(...args: [props: null, ...children: (string | HTMLElement | JSX.Element<any> | string[] | HTMLElement[] | JSX.Element<any>[])[]] | [elementType: string | ShadeComponent<TProps>, props: TProps, ...children: (string | HTMLElement | JSX.Element<any> | string[] | HTMLElement[] | JSX.Element<any>[])[]]) => HTMLElement | DocumentFragment | undefined;
38
+ export {};
28
39
  //# sourceMappingURL=shade-component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shade-component.d.ts","sourceRoot":"","sources":["../src/shade-component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAG5D;;;;;GAKG;AACH,eAAO,MAAM,WAAW,OAAQ,WAAW,GAAG,gBAAgB,iCAY7D,CAAA;AAED,eAAO,MAAM,QAAQ,UAAW,GAAG;WAAqB,QAAQ,mBAAmB,CAAC;CAEnF,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,OAAQ,WAAW,SAAS,GAAG,SAOvD,CAAA;AAED,eAAO,MAAM,oBAAoB,OAAQ,WAAW,SAAS,GAAG,SAK/D,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,6HAuB3B,CAAA;AAED,eAAO,MAAM,cAAc,WAAY,GAAG,6CAIzC,CAAA"}
1
+ {"version":3,"file":"shade-component.d.ts","sourceRoot":"","sources":["../src/shade-component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAG5D;;;;;GAKG;AACH,eAAO,MAAM,WAAW,OAAQ,WAAW,GAAG,gBAAgB,iCAY7D,CAAA;AAED,eAAO,MAAM,QAAQ,UAAW,GAAG;WAAqB,QAAQ,mBAAmB,CAAC;CAEnF,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,OAAQ,WAAW,SAAS,GAAG,SAOvD,CAAA;AAED,eAAO,MAAM,oBAAoB,OAAQ,WAAW,SAAS,GAAG,SAK/D,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW,OAAQ,WAAW,SAAS,GAAG,SAOtD,CAAA;AAED,KAAK,mBAAmB,CAAC,MAAM,IAAI;IACjC,WAAW,EAAE,MAAM,GAAG,cAAc,CAAC,MAAM,CAAC;IAC5C,KAAK,EAAE,MAAM;IACb,GAAG,QAAQ,EAAE,YAAY;CAC1B,CAAA;AAGD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,4MAgBhC,CAAA;AAED,KAAK,kBAAkB,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,QAAQ,EAAE,YAAY,CAAC,CAAA;AAElE,eAAO,MAAM,mBAAmB,6IAI/B,CAAA;AAED,eAAO,MAAM,eAAe,oWAK3B,CAAA"}
package/types/shade.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import type { Disposable } from '@furystack/utils';
2
- import { Injector } from '@furystack/inject';
3
2
  import type { ChildrenList, RenderOptions } from './models';
4
- export type ShadeOptions<TProps, TState> = {
3
+ export type ShadeOptions<TProps> = {
5
4
  /**
6
5
  * Explicit shadow dom name. Will fall back to 'shade-{guid}' if not provided
7
6
  */
@@ -9,47 +8,29 @@ export type ShadeOptions<TProps, TState> = {
9
8
  /**
10
9
  * Render hook, this method will be executed on each and every render.
11
10
  */
12
- render: (options: RenderOptions<TProps, TState>) => JSX.Element | string | null;
11
+ render: (options: RenderOptions<TProps>) => JSX.Element | string | null;
13
12
  /**
14
13
  * Construct hook. Will be executed once when the element has been constructed and initialized
15
14
  */
16
- constructed?: (options: RenderOptions<TProps, TState>) => void | undefined | (() => void) | Promise<void | undefined | (() => void)>;
15
+ constructed?: (options: RenderOptions<TProps>) => void | undefined | (() => void) | Promise<void | undefined | (() => void)>;
17
16
  /**
18
17
  * Will be executed when the element is attached to the DOM.
19
18
  */
20
- onAttach?: (options: RenderOptions<TProps, TState>) => void;
19
+ onAttach?: (options: RenderOptions<TProps>) => void;
21
20
  /**
22
21
  * Will be executed when the element is detached from the DOM.
23
22
  */
24
- onDetach?: (options: RenderOptions<TProps, TState>) => void;
23
+ onDetach?: (options: RenderOptions<TProps>) => void;
25
24
  /**
26
25
  * A factory method that creates a list of disposable resources that will be disposed when the element is detached.
27
26
  */
28
- resources?: (options: RenderOptions<TProps, TState>) => Disposable[];
29
- /**
30
- * An optional method that checks the state for changes and returns true if the element should be rerendered. This will not be called if `skipRender` is set to true in the relevant `updateState()` call.
31
- */
32
- compareState?: (options: {
33
- oldState: TState;
34
- newState: TState;
35
- props: TProps;
36
- element: HTMLElement;
37
- injector: Injector;
38
- }) => boolean;
39
- } & (unknown extends TState ? {} : {
40
- /**
41
- * The initial state of the component
42
- */
43
- getInitialState: (options: {
44
- injector: Injector;
45
- props: TProps;
46
- }) => TState;
47
- });
27
+ resources?: (options: RenderOptions<TProps>) => Disposable[];
28
+ };
48
29
  /**
49
30
  * Factory method for creating Shade components
50
31
  *
51
32
  * @param o for component creation
52
33
  * @returns the JSX element
53
34
  */
54
- export declare const Shade: <TProps, TState = unknown>(o: ShadeOptions<TProps, TState>) => (props: TProps, children: ChildrenList) => JSX.Element<any, any>;
35
+ export declare const Shade: <TProps>(o: ShadeOptions<TProps>) => (props: TProps, children: ChildrenList) => JSX.Element<any>;
55
36
  //# sourceMappingURL=shade.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shade.d.ts","sourceRoot":"","sources":["../src/shade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,KAAK,EAAE,YA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