@knighted/css 1.2.0-rc.1 → 1.2.0-rc.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.
@@ -0,0 +1,62 @@
1
+ export type BrowserDialect = 'css' | 'sass' | 'less' | 'module';
2
+ export type CssFromSourceResult = {
3
+ ok: true;
4
+ css: string;
5
+ exports?: Record<string, string | string[]>;
6
+ };
7
+ export type CssFromSourceError = {
8
+ ok: false;
9
+ error: {
10
+ message: string;
11
+ code?: string;
12
+ };
13
+ };
14
+ export type CssFromSourceResponse = CssFromSourceResult | CssFromSourceError;
15
+ export type SassLike = {
16
+ compile?: (source: string, options?: Record<string, unknown>) => {
17
+ css: string;
18
+ } | {
19
+ css: {
20
+ toString: () => string;
21
+ };
22
+ };
23
+ compileString?: (source: string, options?: Record<string, unknown>) => {
24
+ css: string;
25
+ } | {
26
+ css: {
27
+ toString: () => string;
28
+ };
29
+ };
30
+ compileStringAsync?: (source: string, options?: Record<string, unknown>) => Promise<{
31
+ css: string;
32
+ } | {
33
+ css: {
34
+ toString: () => string;
35
+ };
36
+ }>;
37
+ };
38
+ export type LessLike = {
39
+ render: (source: string, options?: Record<string, unknown>) => Promise<{
40
+ css: string;
41
+ }>;
42
+ };
43
+ export type LightningCssWasm = {
44
+ transform: (options: {
45
+ filename?: string;
46
+ code: Uint8Array;
47
+ cssModules?: boolean;
48
+ }) => {
49
+ code: Uint8Array;
50
+ exports?: Record<string, string | string[]>;
51
+ };
52
+ };
53
+ export type CssFromSourceOptions = {
54
+ dialect: BrowserDialect;
55
+ filename?: string;
56
+ sass?: SassLike;
57
+ less?: LessLike;
58
+ lightningcss?: LightningCssWasm;
59
+ sassOptions?: Record<string, unknown>;
60
+ lessOptions?: Record<string, unknown>;
61
+ };
62
+ export declare function cssFromSource(source: string, options: CssFromSourceOptions): Promise<CssFromSourceResponse>;
@@ -0,0 +1,81 @@
1
+ const defaultFilename = 'input.css';
2
+ function resolveCssText(value) {
3
+ const raw = value.css;
4
+ if (typeof raw === 'string') {
5
+ return raw;
6
+ }
7
+ if (raw && typeof raw.toString === 'function') {
8
+ return String(raw.toString());
9
+ }
10
+ return '';
11
+ }
12
+ function toErrorResult(error) {
13
+ if (error && typeof error === 'object') {
14
+ const message = 'message' in error && typeof error.message === 'string'
15
+ ? error.message
16
+ : 'Unknown error';
17
+ const code = 'code' in error && typeof error.code === 'string'
18
+ ? error.code
19
+ : undefined;
20
+ return { ok: false, error: { message, code } };
21
+ }
22
+ return { ok: false, error: { message: String(error) } };
23
+ }
24
+ async function cssFromSourceInternal(source, options) {
25
+ const filename = options.filename ?? defaultFilename;
26
+ if (options.dialect === 'css') {
27
+ return { ok: true, css: source };
28
+ }
29
+ if (options.dialect === 'sass') {
30
+ if (!options.sass) {
31
+ throw new Error('@knighted/css: Missing Sass compiler for browser usage.');
32
+ }
33
+ if (typeof options.sass.compileStringAsync === 'function') {
34
+ const result = await options.sass.compileStringAsync(source, options.sassOptions);
35
+ return { ok: true, css: resolveCssText(result) };
36
+ }
37
+ if (typeof options.sass.compileString === 'function') {
38
+ const result = options.sass.compileString(source, options.sassOptions);
39
+ return { ok: true, css: resolveCssText(result) };
40
+ }
41
+ if (typeof options.sass.compile === 'function') {
42
+ const result = options.sass.compile(source, options.sassOptions);
43
+ return { ok: true, css: resolveCssText(result) };
44
+ }
45
+ throw new Error('@knighted/css: Sass compiler does not expose compileStringAsync, compileString, or compile APIs.');
46
+ }
47
+ if (options.dialect === 'less') {
48
+ if (!options.less) {
49
+ throw new Error('@knighted/css: Missing Less compiler for browser usage.');
50
+ }
51
+ const result = await options.less.render(source, options.lessOptions);
52
+ return { ok: true, css: result.css };
53
+ }
54
+ if (options.dialect === 'module') {
55
+ if (!options.lightningcss) {
56
+ throw new Error('@knighted/css: Missing Lightning CSS WASM compiler.');
57
+ }
58
+ const encoder = new TextEncoder();
59
+ const decoder = new TextDecoder();
60
+ const result = options.lightningcss.transform({
61
+ filename,
62
+ code: encoder.encode(source),
63
+ cssModules: true,
64
+ });
65
+ return {
66
+ ok: true,
67
+ css: decoder.decode(result.code),
68
+ exports: result.exports,
69
+ };
70
+ }
71
+ return { ok: true, css: source };
72
+ }
73
+ export async function cssFromSource(source, options) {
74
+ try {
75
+ return await cssFromSourceInternal(source, options);
76
+ }
77
+ catch (error) {
78
+ return toErrorResult(error);
79
+ }
80
+ }
81
+ //# sourceMappingURL=browser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAsDA,MAAM,eAAe,GAAG,WAAW,CAAA;AAEnC,SAAS,cAAc,CAAC,KAAuB;IAC7C,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAA;IACrB,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC5B,OAAO,GAAG,CAAA;IACZ,CAAC;IACD,IAAI,GAAG,IAAI,OAAQ,GAA8B,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC;QAC1E,OAAO,MAAM,CAAE,GAAkC,CAAC,QAAQ,EAAE,CAAC,CAAA;IAC/D,CAAC;IACD,OAAO,EAAE,CAAA;AACX,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACvC,MAAM,OAAO,GACX,SAAS,IAAI,KAAK,IAAI,OAAQ,KAA+B,CAAC,OAAO,KAAK,QAAQ;YAChF,CAAC,CAAE,KAA6B,CAAC,OAAO;YACxC,CAAC,CAAC,eAAe,CAAA;QACrB,MAAM,IAAI,GACR,MAAM,IAAI,KAAK,IAAI,OAAQ,KAA4B,CAAC,IAAI,KAAK,QAAQ;YACvE,CAAC,CAAE,KAA0B,CAAC,IAAI;YAClC,CAAC,CAAC,SAAS,CAAA;QACf,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAA;IAChD,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,CAAA;AACzD,CAAC;AAED,KAAK,UAAU,qBAAqB,CAClC,MAAc,EACd,OAA6B;IAE7B,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,eAAe,CAAA;IAEpD,IAAI,OAAO,CAAC,OAAO,KAAK,KAAK,EAAE,CAAC;QAC9B,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,CAAA;IAClC,CAAC;IAED,IAAI,OAAO,CAAC,OAAO,KAAK,MAAM,EAAE,CAAC;QAC/B,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAA;QAC5E,CAAC;QACD,IAAI,OAAO,OAAO,CAAC,IAAI,CAAC,kBAAkB,KAAK,UAAU,EAAE,CAAC;YAC1D,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;YACjF,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,cAAc,CAAC,MAAM,CAAC,EAAE,CAAA;QAClD,CAAC;QACD,IAAI,OAAO,OAAO,CAAC,IAAI,CAAC,aAAa,KAAK,UAAU,EAAE,CAAC;YACrD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;YACtE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,cAAc,CAAC,MAAM,CAAC,EAAE,CAAA;QAClD,CAAC;QACD,IAAI,OAAO,OAAO,CAAC,IAAI,CAAC,OAAO,KAAK,UAAU,EAAE,CAAC;YAC/C,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;YAChE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,cAAc,CAAC,MAAM,CAAC,EAAE,CAAA;QAClD,CAAC;QACD,MAAM,IAAI,KAAK,CACb,kGAAkG,CACnG,CAAA;IACH,CAAC;IAED,IAAI,OAAO,CAAC,OAAO,KAAK,MAAM,EAAE,CAAC;QAC/B,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAA;QAC5E,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;QACrE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,CAAA;IACtC,CAAC;IAED,IAAI,OAAO,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;QACjC,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAA;QACxE,CAAC;QACD,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAA;QACjC,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAA;QACjC,MAAM,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC;YAC5C,QAAQ;YACR,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC;YAC5B,UAAU,EAAE,IAAI;SACjB,CAAC,CAAA;QACF,OAAO;YACL,EAAE,EAAE,IAAI;YACR,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;YAChC,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB,CAAA;IACH,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,CAAA;AAClC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,MAAc,EACd,OAA6B;IAE7B,IAAI,CAAC;QACH,OAAO,MAAM,qBAAqB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACrD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,aAAa,CAAC,KAAK,CAAC,CAAA;IAC7B,CAAC;AACH,CAAC"}
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cssFromSource = cssFromSource;
4
+ const defaultFilename = 'input.css';
5
+ function resolveCssText(value) {
6
+ const raw = value.css;
7
+ if (typeof raw === 'string') {
8
+ return raw;
9
+ }
10
+ if (raw && typeof raw.toString === 'function') {
11
+ return String(raw.toString());
12
+ }
13
+ return '';
14
+ }
15
+ function toErrorResult(error) {
16
+ if (error && typeof error === 'object') {
17
+ const message = 'message' in error && typeof error.message === 'string'
18
+ ? error.message
19
+ : 'Unknown error';
20
+ const code = 'code' in error && typeof error.code === 'string'
21
+ ? error.code
22
+ : undefined;
23
+ return { ok: false, error: { message, code } };
24
+ }
25
+ return { ok: false, error: { message: String(error) } };
26
+ }
27
+ async function cssFromSourceInternal(source, options) {
28
+ const filename = options.filename ?? defaultFilename;
29
+ if (options.dialect === 'css') {
30
+ return { ok: true, css: source };
31
+ }
32
+ if (options.dialect === 'sass') {
33
+ if (!options.sass) {
34
+ throw new Error('@knighted/css: Missing Sass compiler for browser usage.');
35
+ }
36
+ if (typeof options.sass.compileStringAsync === 'function') {
37
+ const result = await options.sass.compileStringAsync(source, options.sassOptions);
38
+ return { ok: true, css: resolveCssText(result) };
39
+ }
40
+ if (typeof options.sass.compileString === 'function') {
41
+ const result = options.sass.compileString(source, options.sassOptions);
42
+ return { ok: true, css: resolveCssText(result) };
43
+ }
44
+ if (typeof options.sass.compile === 'function') {
45
+ const result = options.sass.compile(source, options.sassOptions);
46
+ return { ok: true, css: resolveCssText(result) };
47
+ }
48
+ throw new Error('@knighted/css: Sass compiler does not expose compileStringAsync, compileString, or compile APIs.');
49
+ }
50
+ if (options.dialect === 'less') {
51
+ if (!options.less) {
52
+ throw new Error('@knighted/css: Missing Less compiler for browser usage.');
53
+ }
54
+ const result = await options.less.render(source, options.lessOptions);
55
+ return { ok: true, css: result.css };
56
+ }
57
+ if (options.dialect === 'module') {
58
+ if (!options.lightningcss) {
59
+ throw new Error('@knighted/css: Missing Lightning CSS WASM compiler.');
60
+ }
61
+ const encoder = new TextEncoder();
62
+ const decoder = new TextDecoder();
63
+ const result = options.lightningcss.transform({
64
+ filename,
65
+ code: encoder.encode(source),
66
+ cssModules: true,
67
+ });
68
+ return {
69
+ ok: true,
70
+ css: decoder.decode(result.code),
71
+ exports: result.exports,
72
+ };
73
+ }
74
+ return { ok: true, css: source };
75
+ }
76
+ async function cssFromSource(source, options) {
77
+ try {
78
+ return await cssFromSourceInternal(source, options);
79
+ }
80
+ catch (error) {
81
+ return toErrorResult(error);
82
+ }
83
+ }
84
+ //# sourceMappingURL=browser.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.cjs","names":[],"sources":["../../src/browser.ts"],"sourcesContent":[null],"mappings":[[],[],[[0,0,142,0],[1,0,142,0],[2,0,142,0],[3,0,142,0],[4,0,142,0],[5,0,142,0],[6,0,142,0],[7,0,142,0],[8,0,142,0],[9,0,142,0],[10,0,142,0],[11,0,142,0],[12,0,142,0],[13,0,142,0],[14,0,142,0],[15,0,142,0],[16,0,142,0],[17,0,142,0],[18,0,142,0],[19,0,142,0],[20,0,142,0],[21,0,142,0],[22,0,142,0],[23,0,142,0],[24,0,142,0],[25,0,142,0],[26,0,142,0],[27,0,142,0],[28,0,142,0],[29,0,142,0],[30,0,142,0],[31,0,142,0],[32,0,142,0],[33,0,142,0],[34,0,142,0],[35,0,142,0],[36,0,142,0],[37,0,142,0]],[[0,0,54,0],[1,0,54,0],[2,0,54,0],[3,0,54,0],[4,0,54,0],[5,0,54,0],[6,0,54,6],[7,0,54,6],[8,0,54,6],[9,0,54,6],[10,0,54,6],[11,0,54,6],[12,0,54,6],[13,0,54,6],[14,0,54,6],[15,0,54,6],[16,0,54,6],[17,0,54,6],[18,0,54,6],[19,0,54,6],[20,0,54,6],[21,0,54,21],[22,0,54,21],[23,0,54,21],[24,0,54,24],[25,0,54,24],[26,0,54,24],[27,0,54,24],[28,0,54,24],[29,0,54,24],[30,0,54,24],[31,0,54,24],[32,0,54,24],[33,0,54,24],[34,0,54,24],[35,0,54,35]],[[0,0,56,0],[1,0,56,0],[2,0,56,0],[3,0,56,0],[4,0,56,0],[5,0,56,0],[6,0,56,0],[7,0,56,0],[8,0,56,0],[9,0,56,9],[10,0,56,9],[11,0,56,9],[12,0,56,9],[13,0,56,9],[14,0,56,9],[15,0,56,9],[16,0,56,9],[17,0,56,9],[18,0,56,9],[19,0,56,9],[20,0,56,9],[21,0,56,9],[22,0,56,9],[23,0,56,23],[24,0,56,24],[25,0,56,24],[26,0,56,24],[27,0,56,24],[28,0,56,24],[29,0,56,47],[30,0,56,47],[31,0,56,47]],[[4,0,57,2],[5,0,57,2],[6,0,57,2],[7,0,57,2],[8,0,57,2],[9,0,57,2],[10,0,57,8],[11,0,57,8],[12,0,57,8],[13,0,57,11],[14,0,57,11],[15,0,57,11],[16,0,57,14],[17,0,57,14],[18,0,57,14],[19,0,57,14],[20,0,57,14],[21,0,57,19],[22,0,57,20],[23,0,57,20],[24,0,57,20],[25,0,57,23]],[[4,0,58,2],[5,0,58,2],[6,0,58,2],[7,0,58,2],[8,0,58,6],[9,0,58,6],[10,0,58,6],[11,0,58,6],[12,0,58,6],[13,0,58,6],[14,0,58,6],[15,0,58,13],[16,0,58,13],[17,0,58,13],[18,0,58,16],[19,0,58,16],[20,0,58,16],[21,0,58,16],[22,0,58,16],[23,0,58,21],[24,0,58,21],[25,0,58,21],[26,0,58,21],[27,0,58,21],[28,0,58,21],[29,0,58,21],[30,0,58,21],[31,0,58,29],[32,0,58,29],[33,0,58,31]],[[8,0,59,4],[9,0,59,4],[10,0,59,4],[11,0,59,4],[12,0,59,4],[13,0,59,4],[14,0,59,4],[15,0,59,11],[16,0,59,11],[17,0,59,11],[18,0,59,14]],[[4,0,60,2]],[[4,0,61,2],[5,0,61,2],[6,0,61,2],[7,0,61,2],[8,0,61,6],[9,0,61,6],[10,0,61,6],[11,0,61,9],[12,0,61,9],[13,0,61,9],[14,0,61,9],[15,0,61,13],[16,0,61,13],[17,0,61,13],[18,0,61,13],[19,0,61,13],[20,0,61,13],[21,0,61,13],[22,0,61,21],[23,0,61,21],[24,0,61,21],[25,0,61,51],[26,0,61,52],[27,0,61,52],[28,0,61,52],[29,0,61,52],[30,0,61,52],[31,0,61,52],[32,0,61,52],[33,0,61,52],[34,0,61,60],[35,0,61,60],[36,0,61,60],[37,0,61,60],[38,0,61,60],[39,0,61,65],[40,0,61,65],[41,0,61,65],[42,0,61,65],[43,0,61,65],[44,0,61,65],[45,0,61,65],[46,0,61,65],[47,0,61,65],[48,0,61,65],[49,0,61,75],[50,0,61,75],[51,0,61,77]],[[8,0,62,4],[9,0,62,4],[10,0,62,4],[11,0,62,4],[12,0,62,4],[13,0,62,4],[14,0,62,4],[15,0,62,11],[16,0,62,11],[17,0,62,11],[18,0,62,11],[19,0,62,11],[20,0,62,11],[21,0,62,17],[22,0,62,19],[23,0,62,19],[24,0,62,19],[25,0,62,53],[26,0,62,54],[27,0,62,54],[28,0,62,54],[29,0,62,54],[30,0,62,54],[31,0,62,54],[32,0,62,54],[33,0,62,54],[34,0,62,62],[35,0,62,62],[36,0,62,64],[37,0,62,65]],[[4,0,63,2]],[[4,0,64,2],[5,0,64,2],[6,0,64,2],[7,0,64,2],[8,0,64,2],[9,0,64,2],[10,0,64,2],[11,0,64,9],[12,0,64,9],[13,0,64,11]],[[0,0,65,0]],[[0,0,67,0],[1,0,67,0],[2,0,67,0],[3,0,67,0],[4,0,67,0],[5,0,67,0],[6,0,67,0],[7,0,67,0],[8,0,67,0],[9,0,67,9],[10,0,67,9],[11,0,67,9],[12,0,67,9],[13,0,67,9],[14,0,67,9],[15,0,67,9],[16,0,67,9],[17,0,67,9],[18,0,67,9],[19,0,67,9],[20,0,67,9],[21,0,67,9],[22,0,67,22],[23,0,67,23],[24,0,67,23],[25,0,67,23],[26,0,67,23],[27,0,67,23],[28,0,67,37],[29,0,67,37],[30,0,67,37]],[[4,0,68,2],[5,0,68,2],[6,0,68,2],[7,0,68,2],[8,0,68,6],[9,0,68,6],[10,0,68,6],[11,0,68,6],[12,0,68,6],[13,0,68,11],[14,0,68,11],[15,0,68,11],[16,0,68,11],[17,0,68,15],[18,0,68,15],[19,0,68,15],[20,0,68,15],[21,0,68,15],[22,0,68,15],[23,0,68,15],[24,0,68,22],[25,0,68,22],[26,0,68,22],[27,0,68,22],[28,0,68,22],[29,0,68,27],[30,0,68,27],[31,0,68,27],[32,0,68,27],[33,0,68,27],[34,0,68,32],[35,0,68,32],[36,0,68,32],[37,0,68,32],[38,0,68,32],[39,0,68,32],[40,0,68,32],[41,0,68,32],[42,0,68,40],[43,0,68,40],[44,0,68,42]],[[8,0,69,4],[9,0,69,4],[10,0,69,4],[11,0,69,4],[12,0,69,4],[13,0,69,4],[14,0,69,10],[15,0,69,10],[16,0,69,10],[17,0,69,10],[18,0,69,10],[19,0,69,10],[20,0,69,10],[21,0,69,17],[22,0,69,17],[23,0,69,17],[24,0,70,6],[25,0,70,6],[26,0,70,6],[27,0,70,6],[28,0,70,6],[29,0,70,6],[30,0,70,6],[31,0,70,6],[32,0,70,6],[33,0,70,15],[34,0,70,15],[35,0,70,15],[36,0,70,15],[37,0,70,19],[38,0,70,19],[39,0,70,19],[40,0,70,19],[41,0,70,19],[42,0,70,24],[43,0,70,24],[44,0,70,24],[45,0,70,24],[46,0,70,28],[47,0,70,28],[48,0,70,28],[49,0,70,28],[50,0,70,28],[51,0,70,28],[52,0,70,28],[53,0,70,36],[54,0,70,36],[55,0,70,36],[56,0,70,36],[57,0,70,36],[58,0,70,67],[59,0,70,68],[60,0,70,68],[61,0,70,68],[62,0,70,68],[63,0,70,68],[64,0,70,68],[65,0,70,68],[66,0,70,75],[67,0,70,75],[68,0,70,75],[69,0,70,75],[70,0,70,75],[71,0,70,80],[72,0,70,80],[73,0,70,80],[74,0,70,80],[75,0,70,80],[76,0,70,80],[77,0,70,80],[78,0,70,80]],[[12,0,71,8],[13,0,71,9],[14,0,71,11],[15,0,71,11],[16,0,71,11],[17,0,71,11],[18,0,71,11],[19,0,71,40],[20,0,71,41],[21,0,71,41],[22,0,71,41],[23,0,71,41],[24,0,71,41],[25,0,71,41],[26,0,71,41]],[[12,0,72,8],[13,0,72,9],[14,0,72,10],[15,0,72,10],[16,0,72,10],[17,0,72,10],[18,0,72,10],[19,0,72,10],[20,0,72,10],[21,0,72,10],[22,0,72,10],[23,0,72,10],[24,0,72,10],[25,0,72,10],[26,0,72,10],[27,0,72,10],[28,0,72,10],[29,0,72,25]],[[8,0,73,4],[9,0,73,4],[10,0,73,4],[11,0,73,4],[12,0,73,4],[13,0,73,4],[14,0,73,10],[15,0,73,10],[16,0,73,10],[17,0,73,10],[18,0,73,14],[19,0,73,14],[20,0,73,14],[21,0,74,6],[22,0,74,6],[23,0,74,6],[24,0,74,6],[25,0,74,6],[26,0,74,6],[27,0,74,12],[28,0,74,12],[29,0,74,12],[30,0,74,12],[31,0,74,16],[32,0,74,16],[33,0,74,16],[34,0,74,16],[35,0,74,16],[36,0,74,21],[37,0,74,21],[38,0,74,21],[39,0,74,21],[40,0,74,25],[41,0,74,25],[42,0,74,25],[43,0,74,25],[44,0,74,25],[45,0,74,25],[46,0,74,25],[47,0,74,33],[48,0,74,33],[49,0,74,33],[50,0,74,33],[51,0,74,33],[52,0,74,61],[53,0,74,62],[54,0,74,62],[55,0,74,62],[56,0,74,62],[57,0,74,66],[58,0,74,66],[59,0,74,66],[60,0,74,66],[61,0,74,66],[62,0,74,71],[63,0,74,71],[64,0,74,71],[65,0,74,71],[66,0,74,71],[67,0,74,71],[68,0,74,71],[69,0,74,71]],[[12,0,75,8],[13,0,75,9],[14,0,75,11],[15,0,75,11],[16,0,75,11],[17,0,75,11],[18,0,75,11],[19,0,75,37],[20,0,75,38],[21,0,75,38],[22,0,75,38],[23,0,75,38]],[[12,0,76,8],[13,0,76,9],[14,0,76,10],[15,0,76,10],[16,0,76,10],[17,0,76,10],[18,0,76,10],[19,0,76,10],[20,0,76,10],[21,0,76,10],[22,0,76,10],[23,0,76,19]],[[8,0,77,4],[9,0,77,4],[10,0,77,4],[11,0,77,4],[12,0,77,4],[13,0,77,4],[14,0,77,4],[15,0,77,11],[16,0,77,11],[17,0,77,13],[18,0,77,13],[19,0,77,15],[20,0,77,15],[21,0,77,17],[22,0,77,17],[23,0,77,17],[24,0,77,17],[25,0,77,17],[26,0,77,22],[27,0,77,22],[28,0,77,24],[29,0,77,24],[30,0,77,24],[31,0,77,24],[32,0,77,24],[33,0,77,29],[34,0,77,29],[35,0,77,31],[36,0,77,31],[37,0,77,33],[38,0,77,33],[39,0,77,33],[40,0,77,33],[41,0,77,33],[42,0,77,33],[43,0,77,33],[44,0,77,40],[45,0,77,40],[46,0,77,42],[47,0,77,42],[48,0,77,42],[49,0,77,42],[50,0,77,46],[51,0,77,46],[52,0,77,48],[53,0,77,48],[54,0,77,50]],[[4,0,78,2]],[[4,0,79,2],[5,0,79,2],[6,0,79,2],[7,0,79,2],[8,0,79,2],[9,0,79,2],[10,0,79,2],[11,0,79,9],[12,0,79,9],[13,0,79,11],[14,0,79,11],[15,0,79,13],[16,0,79,13],[17,0,79,15],[18,0,79,15],[19,0,79,15],[20,0,79,15],[21,0,79,15],[22,0,79,20],[23,0,79,20],[24,0,79,22],[25,0,79,22],[26,0,79,22],[27,0,79,22],[28,0,79,22],[29,0,79,27],[30,0,79,27],[31,0,79,29],[32,0,79,29],[33,0,79,31],[34,0,79,31],[35,0,79,31],[36,0,79,31],[37,0,79,31],[38,0,79,31],[39,0,79,31],[40,0,79,38],[41,0,79,38],[42,0,79,40],[43,0,79,40],[44,0,79,40],[45,0,79,40],[46,0,79,40],[47,0,79,40],[48,0,79,46],[49,0,79,47],[50,0,79,47],[51,0,79,47],[52,0,79,47],[53,0,79,47],[54,0,79,52],[55,0,79,53],[56,0,79,53],[57,0,79,55],[58,0,79,55],[59,0,79,57]],[[0,0,80,0]],[[0,0,82,0],[1,0,82,0],[2,0,82,0],[3,0,82,0],[4,0,82,0],[5,0,82,5],[6,0,82,5],[7,0,82,5],[8,0,82,5],[9,0,82,5],[10,0,82,5],[11,0,82,5],[12,0,82,5],[13,0,82,5],[14,0,82,5],[15,0,82,15],[16,0,82,15],[17,0,82,15],[18,0,82,15],[19,0,82,15],[20,0,82,15],[21,0,82,15],[22,0,82,15],[23,0,82,15],[24,0,82,15],[25,0,82,15],[26,0,82,15],[27,0,82,15],[28,0,82,15],[29,0,82,15],[30,0,82,15],[31,0,82,15],[32,0,82,15],[33,0,82,15],[34,0,82,15],[35,0,82,15],[36,0,82,36],[37,0,83,2],[38,0,83,2],[39,0,83,2],[40,0,83,2],[41,0,83,2],[42,0,83,2],[43,0,83,16],[44,0,83,16],[45,0,84,2],[46,0,84,2],[47,0,84,2],[48,0,84,2],[49,0,84,2],[50,0,84,2],[51,0,84,2],[52,0,84,31],[53,0,84,31],[54,0,84,31]],[[4,0,86,2],[5,0,86,2],[6,0,86,2],[7,0,86,2],[8,0,86,2],[9,0,86,2],[10,0,86,8],[11,0,86,8],[12,0,86,8],[13,0,86,8],[14,0,86,8],[15,0,86,8],[16,0,86,8],[17,0,86,8],[18,0,86,16],[19,0,86,16],[20,0,86,16],[21,0,86,19],[22,0,86,19],[23,0,86,19],[24,0,86,19],[25,0,86,19],[26,0,86,19],[27,0,86,19],[28,0,86,26],[29,0,86,27],[30,0,86,27],[31,0,86,27],[32,0,86,27],[33,0,86,27],[34,0,86,27],[35,0,86,27],[36,0,86,27],[37,0,86,35],[38,0,86,35],[39,0,86,35],[40,0,86,35],[41,0,86,39],[42,0,86,39],[43,0,86,39],[44,0,86,39],[45,0,86,39],[46,0,86,39],[47,0,86,39],[48,0,86,39],[49,0,86,39],[50,0,86,39],[51,0,86,39],[52,0,86,39],[53,0,86,39],[54,0,86,39],[55,0,86,39],[56,0,86,54]],[[4,0,88,2],[5,0,88,2],[6,0,88,2],[7,0,88,2],[8,0,88,6],[9,0,88,6],[10,0,88,6],[11,0,88,6],[12,0,88,6],[13,0,88,6],[14,0,88,6],[15,0,88,13],[16,0,88,14],[17,0,88,14],[18,0,88,14],[19,0,88,14],[20,0,88,14],[21,0,88,14],[22,0,88,14],[23,0,88,21],[24,0,88,21],[25,0,88,21],[26,0,88,21],[27,0,88,21],[28,0,88,26],[29,0,88,26],[30,0,88,26],[31,0,88,26],[32,0,88,26],[33,0,88,31],[34,0,88,31],[35,0,88,33]],[[8,0,89,4],[9,0,89,4],[10,0,89,4],[11,0,89,4],[12,0,89,4],[13,0,89,4],[14,0,89,4],[15,0,89,11],[16,0,89,11],[17,0,89,13],[18,0,89,13],[19,0,89,15],[20,0,89,15],[21,0,89,17],[22,0,89,17],[23,0,89,17],[24,0,89,17],[25,0,89,21],[26,0,89,21],[27,0,89,23],[28,0,89,23],[29,0,89,23],[30,0,89,26],[31,0,89,26],[32,0,89,28],[33,0,89,28],[34,0,89,28],[35,0,89,28],[36,0,89,28],[37,0,89,28],[38,0,89,34],[39,0,89,34],[40,0,89,36]],[[4,0,90,2]],[[4,0,92,2],[5,0,92,2],[6,0,92,2],[7,0,92,2],[8,0,92,6],[9,0,92,6],[10,0,92,6],[11,0,92,6],[12,0,92,6],[13,0,92,6],[14,0,92,6],[15,0,92,13],[16,0,92,14],[17,0,92,14],[18,0,92,14],[19,0,92,14],[20,0,92,14],[21,0,92,14],[22,0,92,14],[23,0,92,21],[24,0,92,21],[25,0,92,21],[26,0,92,21],[27,0,92,21],[28,0,92,26],[29,0,92,26],[30,0,92,26],[31,0,92,26],[32,0,92,26],[33,0,92,26],[34,0,92,32],[35,0,92,32],[36,0,92,34]],[[8,0,93,4],[9,0,93,4],[10,0,93,4],[11,0,93,4],[12,0,93,8],[13,0,93,9],[14,0,93,9],[15,0,93,9],[16,0,93,9],[17,0,93,9],[18,0,93,9],[19,0,93,9],[20,0,93,16],[21,0,93,17],[22,0,93,17],[23,0,93,17],[24,0,93,17],[25,0,93,21],[26,0,93,21],[27,0,93,23]],[[12,0,94,6],[13,0,94,6],[14,0,94,6],[15,0,94,6],[16,0,94,6],[17,0,94,6],[18,0,94,12],[19,0,94,12],[20,0,94,12],[21,0,94,12],[22,0,94,16],[23,0,94,16],[24,0,94,16],[25,0,94,16],[26,0,94,16],[27,0,94,21],[28,0,94,22],[29,0,94,22],[30,0,94,22],[31,0,94,22],[32,0,94,22],[33,0,94,22],[34,0,94,22],[35,0,94,22],[36,0,94,22],[37,0,94,22],[38,0,94,22],[39,0,94,22],[40,0,94,22],[41,0,94,22],[42,0,94,22],[43,0,94,22],[44,0,94,22],[45,0,94,22],[46,0,94,22],[47,0,94,22],[48,0,94,22],[49,0,94,22],[50,0,94,22],[51,0,94,22],[52,0,94,22],[53,0,94,22],[54,0,94,22],[55,0,94,22],[56,0,94,22],[57,0,94,22],[58,0,94,22],[59,0,94,22],[60,0,94,22],[61,0,94,22],[62,0,94,22],[63,0,94,22],[64,0,94,22],[65,0,94,22],[66,0,94,22],[67,0,94,22],[68,0,94,22],[69,0,94,22],[70,0,94,22],[71,0,94,22],[72,0,94,22],[73,0,94,22],[74,0,94,22],[75,0,94,22],[76,0,94,22],[77,0,94,22],[78,0,94,22],[79,0,94,22],[80,0,94,22],[81,0,94,22],[82,0,94,22],[83,0,94,22],[84,0,94,22],[85,0,94,79],[86,0,94,80]],[[8,0,95,4]],[[8,0,96,4],[9,0,96,4],[10,0,96,4],[11,0,96,4],[12,0,96,8],[13,0,96,8],[14,0,96,8],[15,0,96,8],[16,0,96,8],[17,0,96,8],[18,0,96,8],[19,0,96,15],[20,0,96,15],[21,0,96,15],[22,0,96,15],[23,0,96,15],[24,0,96,15],[25,0,96,15],[26,0,96,22],[27,0,96,23],[28,0,96,23],[29,0,96,23],[30,0,96,23],[31,0,96,27],[32,0,96,28],[33,0,96,28],[34,0,96,28],[35,0,96,28],[36,0,96,28],[37,0,96,28],[38,0,96,28],[39,0,96,28],[40,0,96,28],[41,0,96,28],[42,0,96,28],[43,0,96,28],[44,0,96,28],[45,0,96,28],[46,0,96,28],[47,0,96,28],[48,0,96,28],[49,0,96,28],[50,0,96,46],[51,0,96,46],[52,0,96,46],[53,0,96,46],[54,0,96,46],[55,0,96,51],[56,0,96,51],[57,0,96,51],[58,0,96,51],[59,0,96,51],[60,0,96,51],[61,0,96,51],[62,0,96,51],[63,0,96,51],[64,0,96,51],[65,0,96,61],[66,0,96,61],[67,0,96,63]],[[12,0,97,6],[13,0,97,6],[14,0,97,6],[15,0,97,6],[16,0,97,6],[17,0,97,6],[18,0,97,12],[19,0,97,12],[20,0,97,12],[21,0,97,12],[22,0,97,12],[23,0,97,12],[24,0,97,18],[25,0,97,18],[26,0,97,18],[27,0,97,21],[28,0,97,21],[29,0,97,21],[30,0,97,21],[31,0,97,21],[32,0,97,21],[33,0,97,27],[34,0,97,27],[35,0,97,27],[36,0,97,27],[37,0,97,27],[38,0,97,27],[39,0,97,27],[40,0,97,34],[41,0,97,35],[42,0,97,35],[43,0,97,35],[44,0,97,35],[45,0,97,39],[46,0,97,40],[47,0,97,40],[48,0,97,40],[49,0,97,40],[50,0,97,40],[51,0,97,40],[52,0,97,40],[53,0,97,40],[54,0,97,40],[55,0,97,40],[56,0,97,40],[57,0,97,40],[58,0,97,40],[59,0,97,40],[60,0,97,40],[61,0,97,40],[62,0,97,40],[63,0,97,40],[64,0,97,58],[65,0,97,59],[66,0,97,59],[67,0,97,59],[68,0,97,59],[69,0,97,59],[70,0,97,59],[71,0,97,65],[72,0,97,65],[73,0,97,67],[74,0,97,67],[75,0,97,67],[76,0,97,67],[77,0,97,67],[78,0,97,67],[79,0,97,67],[80,0,97,74],[81,0,97,75],[82,0,97,75],[83,0,97,75],[84,0,97,75],[85,0,97,75],[86,0,97,75],[87,0,97,75],[88,0,97,75],[89,0,97,75],[90,0,97,75],[91,0,97,75],[92,0,97,86],[93,0,97,87]],[[12,0,98,6],[13,0,98,6],[14,0,98,6],[15,0,98,6],[16,0,98,6],[17,0,98,6],[18,0,98,6],[19,0,98,13],[20,0,98,13],[21,0,98,15],[22,0,98,15],[23,0,98,17],[24,0,98,17],[25,0,98,19],[26,0,98,19],[27,0,98,19],[28,0,98,19],[29,0,98,23],[30,0,98,23],[31,0,98,25],[32,0,98,25],[33,0,98,25],[34,0,98,28],[35,0,98,28],[36,0,98,30],[37,0,98,30],[38,0,98,30],[39,0,98,30],[40,0,98,30],[41,0,98,30],[42,0,98,30],[43,0,98,30],[44,0,98,30],[45,0,98,30],[46,0,98,30],[47,0,98,30],[48,0,98,30],[49,0,98,30],[50,0,98,44],[51,0,98,45],[52,0,98,45],[53,0,98,45],[54,0,98,45],[55,0,98,45],[56,0,98,45],[57,0,98,51],[58,0,98,52],[59,0,98,52],[60,0,98,54]],[[8,0,99,4]],[[8,0,100,4],[9,0,100,4],[10,0,100,4],[11,0,100,4],[12,0,100,8],[13,0,100,8],[14,0,100,8],[15,0,100,8],[16,0,100,8],[17,0,100,8],[18,0,100,8],[19,0,100,15],[20,0,100,15],[21,0,100,15],[22,0,100,15],[23,0,100,15],[24,0,100,15],[25,0,100,15],[26,0,100,22],[27,0,100,23],[28,0,100,23],[29,0,100,23],[30,0,100,23],[31,0,100,27],[32,0,100,28],[33,0,100,28],[34,0,100,28],[35,0,100,28],[36,0,100,28],[37,0,100,28],[38,0,100,28],[39,0,100,28],[40,0,100,28],[41,0,100,28],[42,0,100,28],[43,0,100,28],[44,0,100,28],[45,0,100,41],[46,0,100,41],[47,0,100,41],[48,0,100,41],[49,0,100,41],[50,0,100,46],[51,0,100,46],[52,0,100,46],[53,0,100,46],[54,0,100,46],[55,0,100,46],[56,0,100,46],[57,0,100,46],[58,0,100,46],[59,0,100,46],[60,0,100,56],[61,0,100,56],[62,0,100,58]],[[12,0,101,6],[13,0,101,6],[14,0,101,6],[15,0,101,6],[16,0,101,6],[17,0,101,6],[18,0,101,12],[19,0,101,12],[20,0,101,12],[21,0,101,12],[22,0,101,12],[23,0,101,12],[24,0,101,18],[25,0,101,18],[26,0,101,18],[27,0,101,21],[28,0,101,21],[29,0,101,21],[30,0,101,21],[31,0,101,21],[32,0,101,21],[33,0,101,21],[34,0,101,28],[35,0,101,29],[36,0,101,29],[37,0,101,29],[38,0,101,29],[39,0,101,33],[40,0,101,34],[41,0,101,34],[42,0,101,34],[43,0,101,34],[44,0,101,34],[45,0,101,34],[46,0,101,34],[47,0,101,34],[48,0,101,34],[49,0,101,34],[50,0,101,34],[51,0,101,34],[52,0,101,34],[53,0,101,47],[54,0,101,48],[55,0,101,48],[56,0,101,48],[57,0,101,48],[58,0,101,48],[59,0,101,48],[60,0,101,54],[61,0,101,54],[62,0,101,56],[63,0,101,56],[64,0,101,56],[65,0,101,56],[66,0,101,56],[67,0,101,56],[68,0,101,56],[69,0,101,63],[70,0,101,64],[71,0,101,64],[72,0,101,64],[73,0,101,64],[74,0,101,64],[75,0,101,64],[76,0,101,64],[77,0,101,64],[78,0,101,64],[79,0,101,64],[80,0,101,64],[81,0,101,75],[82,0,101,76]],[[12,0,102,6],[13,0,102,6],[14,0,102,6],[15,0,102,6],[16,0,102,6],[17,0,102,6],[18,0,102,6],[19,0,102,13],[20,0,102,13],[21,0,102,15],[22,0,102,15],[23,0,102,17],[24,0,102,17],[25,0,102,19],[26,0,102,19],[27,0,102,19],[28,0,102,19],[29,0,102,23],[30,0,102,23],[31,0,102,25],[32,0,102,25],[33,0,102,25],[34,0,102,28],[35,0,102,28],[36,0,102,30],[37,0,102,30],[38,0,102,30],[39,0,102,30],[40,0,102,30],[41,0,102,30],[42,0,102,30],[43,0,102,30],[44,0,102,30],[45,0,102,30],[46,0,102,30],[47,0,102,30],[48,0,102,30],[49,0,102,30],[50,0,102,44],[51,0,102,45],[52,0,102,45],[53,0,102,45],[54,0,102,45],[55,0,102,45],[56,0,102,45],[57,0,102,51],[58,0,102,52],[59,0,102,52],[60,0,102,54]],[[8,0,103,4]],[[8,0,104,4],[9,0,104,4],[10,0,104,4],[11,0,104,4],[12,0,104,8],[13,0,104,8],[14,0,104,8],[15,0,104,8],[16,0,104,8],[17,0,104,8],[18,0,104,8],[19,0,104,15],[20,0,104,15],[21,0,104,15],[22,0,104,15],[23,0,104,15],[24,0,104,15],[25,0,104,15],[26,0,104,22],[27,0,104,23],[28,0,104,23],[29,0,104,23],[30,0,104,23],[31,0,104,27],[32,0,104,28],[33,0,104,28],[34,0,104,28],[35,0,104,28],[36,0,104,28],[37,0,104,28],[38,0,104,28],[39,0,104,35],[40,0,104,35],[41,0,104,35],[42,0,104,35],[43,0,104,35],[44,0,104,40],[45,0,104,40],[46,0,104,40],[47,0,104,40],[48,0,104,40],[49,0,104,40],[50,0,104,40],[51,0,104,40],[52,0,104,40],[53,0,104,40],[54,0,104,50],[55,0,104,50],[56,0,104,52]],[[12,0,105,6],[13,0,105,6],[14,0,105,6],[15,0,105,6],[16,0,105,6],[17,0,105,6],[18,0,105,12],[19,0,105,12],[20,0,105,12],[21,0,105,12],[22,0,105,12],[23,0,105,12],[24,0,105,18],[25,0,105,18],[26,0,105,18],[27,0,105,21],[28,0,105,21],[29,0,105,21],[30,0,105,21],[31,0,105,21],[32,0,105,21],[33,0,105,21],[34,0,105,28],[35,0,105,29],[36,0,105,29],[37,0,105,29],[38,0,105,29],[39,0,105,33],[40,0,105,34],[41,0,105,34],[42,0,105,34],[43,0,105,34],[44,0,105,34],[45,0,105,34],[46,0,105,34],[47,0,105,41],[48,0,105,42],[49,0,105,42],[50,0,105,42],[51,0,105,42],[52,0,105,42],[53,0,105,42],[54,0,105,48],[55,0,105,48],[56,0,105,50],[57,0,105,50],[58,0,105,50],[59,0,105,50],[60,0,105,50],[61,0,105,50],[62,0,105,50],[63,0,105,57],[64,0,105,58],[65,0,105,58],[66,0,105,58],[67,0,105,58],[68,0,105,58],[69,0,105,58],[70,0,105,58],[71,0,105,58],[72,0,105,58],[73,0,105,58],[74,0,105,58],[75,0,105,69],[76,0,105,70]],[[12,0,106,6],[13,0,106,6],[14,0,106,6],[15,0,106,6],[16,0,106,6],[17,0,106,6],[18,0,106,6],[19,0,106,13],[20,0,106,13],[21,0,106,15],[22,0,106,15],[23,0,106,17],[24,0,106,17],[25,0,106,19],[26,0,106,19],[27,0,106,19],[28,0,106,19],[29,0,106,23],[30,0,106,23],[31,0,106,25],[32,0,106,25],[33,0,106,25],[34,0,106,28],[35,0,106,28],[36,0,106,30],[37,0,106,30],[38,0,106,30],[39,0,106,30],[40,0,106,30],[41,0,106,30],[42,0,106,30],[43,0,106,30],[44,0,106,30],[45,0,106,30],[46,0,106,30],[47,0,106,30],[48,0,106,30],[49,0,106,30],[50,0,106,44],[51,0,106,45],[52,0,106,45],[53,0,106,45],[54,0,106,45],[55,0,106,45],[56,0,106,45],[57,0,106,51],[58,0,106,52],[59,0,106,52],[60,0,106,54]],[[8,0,107,4]],[[8,0,108,4],[9,0,108,4],[10,0,108,4],[11,0,108,4],[12,0,108,4],[13,0,108,4],[14,0,108,10],[15,0,108,10],[16,0,108,10],[17,0,108,10],[18,0,108,14],[19,0,108,14],[20,0,108,14],[21,0,108,14],[22,0,108,14],[23,0,108,19],[24,0,109,6],[25,0,109,6],[26,0,109,6],[27,0,109,6],[28,0,109,6],[29,0,109,6],[30,0,109,6],[31,0,109,6],[32,0,109,6],[33,0,109,6],[34,0,109,6],[35,0,109,6],[36,0,109,6],[37,0,109,6],[38,0,109,6],[39,0,109,6],[40,0,109,6],[41,0,109,6],[42,0,109,6],[43,0,109,6],[44,0,109,6],[45,0,109,6],[46,0,109,6],[47,0,109,6],[48,0,109,6],[49,0,109,6],[50,0,109,6],[51,0,109,6],[52,0,109,6],[53,0,109,6],[54,0,109,6],[55,0,109,6],[56,0,109,6],[57,0,109,6],[58,0,109,6],[59,0,109,6],[60,0,109,6],[61,0,109,6],[62,0,109,6],[63,0,109,6],[64,0,109,6],[65,0,109,6],[66,0,109,6],[67,0,109,6],[68,0,109,6],[69,0,109,6],[70,0,109,6],[71,0,109,6],[72,0,109,6],[73,0,109,6],[74,0,109,6],[75,0,109,6],[76,0,109,6],[77,0,109,6],[78,0,109,6],[79,0,109,6],[80,0,109,6],[81,0,109,6],[82,0,109,6],[83,0,109,6],[84,0,109,6],[85,0,109,6],[86,0,109,6],[87,0,109,6],[88,0,109,6],[89,0,109,6],[90,0,109,6],[91,0,109,6],[92,0,109,6],[93,0,109,6],[94,0,109,6],[95,0,109,6],[96,0,109,6],[97,0,109,6],[98,0,109,6],[99,0,109,6],[100,0,109,6],[101,0,109,6],[102,0,109,6],[103,0,109,6],[104,0,109,6],[105,0,109,6],[106,0,109,6],[107,0,109,6],[108,0,109,6],[109,0,109,6],[110,0,109,6],[111,0,109,6],[112,0,109,6],[113,0,109,6],[114,0,109,6],[115,0,109,6],[116,0,109,6],[117,0,109,6],[118,0,109,6],[119,0,109,6],[120,0,109,6],[121,0,109,6],[122,0,109,104],[123,0,110,5]],[[4,0,111,2]],[[4,0,113,2],[5,0,113,2],[6,0,113,2],[7,0,113,2],[8,0,113,6],[9,0,113,6],[10,0,113,6],[11,0,113,6],[12,0,113,6],[13,0,113,6],[14,0,113,6],[15,0,113,13],[16,0,113,14],[17,0,113,14],[18,0,113,14],[19,0,113,14],[20,0,113,14],[21,0,113,14],[22,0,113,14],[23,0,113,21],[24,0,113,21],[25,0,113,21],[26,0,113,21],[27,0,113,21],[28,0,113,26],[29,0,113,26],[30,0,113,26],[31,0,113,26],[32,0,113,26],[33,0,113,26],[34,0,113,32],[35,0,113,32],[36,0,113,34]],[[8,0,114,4],[9,0,114,4],[10,0,114,4],[11,0,114,4],[12,0,114,8],[13,0,114,9],[14,0,114,9],[15,0,114,9],[16,0,114,9],[17,0,114,9],[18,0,114,9],[19,0,114,9],[20,0,114,16],[21,0,114,17],[22,0,114,17],[23,0,114,17],[24,0,114,17],[25,0,114,21],[26,0,114,21],[27,0,114,23]],[[12,0,115,6],[13,0,115,6],[14,0,115,6],[15,0,115,6],[16,0,115,6],[17,0,115,6],[18,0,115,12],[19,0,115,12],[20,0,115,12],[21,0,115,12],[22,0,115,16],[23,0,115,16],[24,0,115,16],[25,0,115,16],[26,0,115,16],[27,0,115,21],[28,0,115,22],[29,0,115,22],[30,0,115,22],[31,0,115,22],[32,0,115,22],[33,0,115,22],[34,0,115,22],[35,0,115,22],[36,0,115,22],[37,0,115,22],[38,0,115,22],[39,0,115,22],[40,0,115,22],[41,0,115,22],[42,0,115,22],[43,0,115,22],[44,0,115,22],[45,0,115,22],[46,0,115,22],[47,0,115,22],[48,0,115,22],[49,0,115,22],[50,0,115,22],[51,0,115,22],[52,0,115,22],[53,0,115,22],[54,0,115,22],[55,0,115,22],[56,0,115,22],[57,0,115,22],[58,0,115,22],[59,0,115,22],[60,0,115,22],[61,0,115,22],[62,0,115,22],[63,0,115,22],[64,0,115,22],[65,0,115,22],[66,0,115,22],[67,0,115,22],[68,0,115,22],[69,0,115,22],[70,0,115,22],[71,0,115,22],[72,0,115,22],[73,0,115,22],[74,0,115,22],[75,0,115,22],[76,0,115,22],[77,0,115,22],[78,0,115,22],[79,0,115,22],[80,0,115,22],[81,0,115,22],[82,0,115,22],[83,0,115,22],[84,0,115,22],[85,0,115,79],[86,0,115,80]],[[8,0,116,4]],[[8,0,117,4],[9,0,117,4],[10,0,117,4],[11,0,117,4],[12,0,117,4],[13,0,117,4],[14,0,117,10],[15,0,117,10],[16,0,117,10],[17,0,117,10],[18,0,117,10],[19,0,117,10],[20,0,117,16],[21,0,117,16],[22,0,117,16],[23,0,117,19],[24,0,117,19],[25,0,117,19],[26,0,117,19],[27,0,117,19],[28,0,117,19],[29,0,117,25],[30,0,117,25],[31,0,117,25],[32,0,117,25],[33,0,117,25],[34,0,117,25],[35,0,117,25],[36,0,117,32],[37,0,117,33],[38,0,117,33],[39,0,117,33],[40,0,117,33],[41,0,117,37],[42,0,117,38],[43,0,117,38],[44,0,117,38],[45,0,117,38],[46,0,117,38],[47,0,117,38],[48,0,117,44],[49,0,117,45],[50,0,117,45],[51,0,117,45],[52,0,117,45],[53,0,117,45],[54,0,117,45],[55,0,117,51],[56,0,117,51],[57,0,117,53],[58,0,117,53],[59,0,117,53],[60,0,117,53],[61,0,117,53],[62,0,117,53],[63,0,117,53],[64,0,117,60],[65,0,117,61],[66,0,117,61],[67,0,117,61],[68,0,117,61],[69,0,117,61],[70,0,117,61],[71,0,117,61],[72,0,117,61],[73,0,117,61],[74,0,117,61],[75,0,117,61],[76,0,117,72],[77,0,117,73]],[[8,0,118,4],[9,0,118,4],[10,0,118,4],[11,0,118,4],[12,0,118,4],[13,0,118,4],[14,0,118,4],[15,0,118,11],[16,0,118,11],[17,0,118,13],[18,0,118,13],[19,0,118,15],[20,0,118,15],[21,0,118,17],[22,0,118,17],[23,0,118,17],[24,0,118,17],[25,0,118,21],[26,0,118,21],[27,0,118,23],[28,0,118,23],[29,0,118,23],[30,0,118,26],[31,0,118,26],[32,0,118,28],[33,0,118,28],[34,0,118,28],[35,0,118,28],[36,0,118,28],[37,0,118,28],[38,0,118,34],[39,0,118,35],[40,0,118,35],[41,0,118,35],[42,0,118,38],[43,0,118,38],[44,0,118,40]],[[4,0,119,2]],[[4,0,121,2],[5,0,121,2],[6,0,121,2],[7,0,121,2],[8,0,121,6],[9,0,121,6],[10,0,121,6],[11,0,121,6],[12,0,121,6],[13,0,121,6],[14,0,121,6],[15,0,121,13],[16,0,121,14],[17,0,121,14],[18,0,121,14],[19,0,121,14],[20,0,121,14],[21,0,121,14],[22,0,121,14],[23,0,121,21],[24,0,121,21],[25,0,121,21],[26,0,121,21],[27,0,121,21],[28,0,121,26],[29,0,121,26],[30,0,121,26],[31,0,121,26],[32,0,121,26],[33,0,121,26],[34,0,121,26],[35,0,121,26],[36,0,121,34],[37,0,121,34],[38,0,121,36]],[[8,0,122,4],[9,0,122,4],[10,0,122,4],[11,0,122,4],[12,0,122,8],[13,0,122,9],[14,0,122,9],[15,0,122,9],[16,0,122,9],[17,0,122,9],[18,0,122,9],[19,0,122,9],[20,0,122,16],[21,0,122,17],[22,0,122,17],[23,0,122,17],[24,0,122,17],[25,0,122,17],[26,0,122,17],[27,0,122,17],[28,0,122,17],[29,0,122,17],[30,0,122,17],[31,0,122,17],[32,0,122,17],[33,0,122,29],[34,0,122,29],[35,0,122,31]],[[12,0,123,6],[13,0,123,6],[14,0,123,6],[15,0,123,6],[16,0,123,6],[17,0,123,6],[18,0,123,12],[19,0,123,12],[20,0,123,12],[21,0,123,12],[22,0,123,16],[23,0,123,16],[24,0,123,16],[25,0,123,16],[26,0,123,16],[27,0,123,21],[28,0,123,22],[29,0,123,22],[30,0,123,22],[31,0,123,22],[32,0,123,22],[33,0,123,22],[34,0,123,22],[35,0,123,22],[36,0,123,22],[37,0,123,22],[38,0,123,22],[39,0,123,22],[40,0,123,22],[41,0,123,22],[42,0,123,22],[43,0,123,22],[44,0,123,22],[45,0,123,22],[46,0,123,22],[47,0,123,22],[48,0,123,22],[49,0,123,22],[50,0,123,22],[51,0,123,22],[52,0,123,22],[53,0,123,22],[54,0,123,22],[55,0,123,22],[56,0,123,22],[57,0,123,22],[58,0,123,22],[59,0,123,22],[60,0,123,22],[61,0,123,22],[62,0,123,22],[63,0,123,22],[64,0,123,22],[65,0,123,22],[66,0,123,22],[67,0,123,22],[68,0,123,22],[69,0,123,22],[70,0,123,22],[71,0,123,22],[72,0,123,22],[73,0,123,22],[74,0,123,22],[75,0,123,22],[76,0,123,22],[77,0,123,22],[78,0,123,22],[79,0,123,22],[80,0,123,22],[81,0,123,75],[82,0,123,76]],[[8,0,124,4]],[[8,0,125,4],[9,0,125,4],[10,0,125,4],[11,0,125,4],[12,0,125,4],[13,0,125,4],[14,0,125,10],[15,0,125,10],[16,0,125,10],[17,0,125,10],[18,0,125,10],[19,0,125,10],[20,0,125,10],[21,0,125,17],[22,0,125,17],[23,0,125,17],[24,0,125,20],[25,0,125,20],[26,0,125,20],[27,0,125,20],[28,0,125,24],[29,0,125,24],[30,0,125,24],[31,0,125,24],[32,0,125,24],[33,0,125,24],[34,0,125,24],[35,0,125,24],[36,0,125,24],[37,0,125,24],[38,0,125,24],[39,0,125,35],[40,0,125,35],[41,0,125,37]],[[8,0,126,4],[9,0,126,4],[10,0,126,4],[11,0,126,4],[12,0,126,4],[13,0,126,4],[14,0,126,10],[15,0,126,10],[16,0,126,10],[17,0,126,10],[18,0,126,10],[19,0,126,10],[20,0,126,10],[21,0,126,17],[22,0,126,17],[23,0,126,17],[24,0,126,20],[25,0,126,20],[26,0,126,20],[27,0,126,20],[28,0,126,24],[29,0,126,24],[30,0,126,24],[31,0,126,24],[32,0,126,24],[33,0,126,24],[34,0,126,24],[35,0,126,24],[36,0,126,24],[37,0,126,24],[38,0,126,24],[39,0,126,35],[40,0,126,35],[41,0,126,37]],[[8,0,127,4],[9,0,127,4],[10,0,127,4],[11,0,127,4],[12,0,127,4],[13,0,127,4],[14,0,127,10],[15,0,127,10],[16,0,127,10],[17,0,127,10],[18,0,127,10],[19,0,127,10],[20,0,127,16],[21,0,127,16],[22,0,127,16],[23,0,127,19],[24,0,127,19],[25,0,127,19],[26,0,127,19],[27,0,127,19],[28,0,127,19],[29,0,127,19],[30,0,127,26],[31,0,127,27],[32,0,127,27],[33,0,127,27],[34,0,127,27],[35,0,127,27],[36,0,127,27],[37,0,127,27],[38,0,127,27],[39,0,127,27],[40,0,127,27],[41,0,127,27],[42,0,127,27],[43,0,127,39],[44,0,127,40],[45,0,127,40],[46,0,127,40],[47,0,127,40],[48,0,127,40],[49,0,127,40],[50,0,127,40],[51,0,127,40],[52,0,127,40],[53,0,127,49],[54,0,127,50]],[[12,0,128,6],[13,0,128,6],[14,0,128,6],[15,0,128,6],[16,0,128,6],[17,0,128,6],[18,0,128,6],[19,0,128,6],[20,0,128,14]],[[12,0,129,6],[13,0,129,6],[14,0,129,6],[15,0,129,6],[16,0,129,10],[17,0,129,10],[18,0,129,12],[19,0,129,12],[20,0,129,12],[21,0,129,12],[22,0,129,12],[23,0,129,12],[24,0,129,12],[25,0,129,19],[26,0,129,20],[27,0,129,20],[28,0,129,20],[29,0,129,20],[30,0,129,20],[31,0,129,20],[32,0,129,26],[33,0,129,27],[34,0,129,27],[35,0,129,27],[36,0,129,27],[37,0,129,27],[38,0,129,27],[39,0,129,33],[40,0,129,34]],[[12,0,130,6],[13,0,130,6],[14,0,130,6],[15,0,130,6],[16,0,130,6],[17,0,130,6],[18,0,130,6],[19,0,130,6],[20,0,130,6],[21,0,130,6],[22,0,130,16],[23,0,130,16],[24,0,130,18],[25,0,130,18],[26,0,130,18],[27,0,130,18],[28,0,130,22]],[[9,0,131,5],[10,0,131,6]],[[8,0,132,4],[9,0,132,4],[10,0,132,4],[11,0,132,4],[12,0,132,4],[13,0,132,4],[14,0,132,4],[15,0,132,11]],[[12,0,133,6],[13,0,133,6],[14,0,133,8],[15,0,133,8],[16,0,133,10],[17,0,133,10],[18,0,133,10],[19,0,133,10],[20,0,133,14]],[[12,0,134,6],[13,0,134,6],[14,0,134,6],[15,0,134,9],[16,0,134,9],[17,0,134,11],[18,0,134,11],[19,0,134,11],[20,0,134,11],[21,0,134,11],[22,0,134,11],[23,0,134,11],[24,0,134,18],[25,0,134,19],[26,0,134,19],[27,0,134,19],[28,0,134,19],[29,0,134,19],[30,0,134,19],[31,0,134,25],[32,0,134,26],[33,0,134,26],[34,0,134,26],[35,0,134,26],[36,0,134,26],[37,0,134,26],[38,0,134,32],[39,0,134,33],[40,0,134,33],[41,0,134,33],[42,0,134,33],[43,0,134,37],[44,0,134,38]],[[12,0,135,6],[13,0,135,6],[14,0,135,6],[15,0,135,6],[16,0,135,6],[17,0,135,6],[18,0,135,6],[19,0,135,13],[20,0,135,13],[21,0,135,15],[22,0,135,15],[23,0,135,15],[24,0,135,15],[25,0,135,15],[26,0,135,15],[27,0,135,21],[28,0,135,22],[29,0,135,22],[30,0,135,22],[31,0,135,22],[32,0,135,22],[33,0,135,22],[34,0,135,22],[35,0,135,29]],[[9,0,136,5]],[[4,0,137,2]],[[4,0,139,2],[5,0,139,2],[6,0,139,2],[7,0,139,2],[8,0,139,2],[9,0,139,2],[10,0,139,2],[11,0,139,9],[12,0,139,9],[13,0,139,11],[14,0,139,11],[15,0,139,13],[16,0,139,13],[17,0,139,15],[18,0,139,15],[19,0,139,15],[20,0,139,15],[21,0,139,19],[22,0,139,19],[23,0,139,21],[24,0,139,21],[25,0,139,21],[26,0,139,24],[27,0,139,24],[28,0,139,26],[29,0,139,26],[30,0,139,26],[31,0,139,26],[32,0,139,26],[33,0,139,26],[34,0,139,32],[35,0,139,32],[36,0,139,34]],[[0,0,140,0]],[[0,0,142,7],[1,0,142,7],[2,0,142,7],[3,0,142,7],[4,0,142,7],[5,0,142,12],[6,0,142,12],[7,0,142,12],[8,0,142,12],[9,0,142,12],[10,0,142,12],[11,0,142,12],[12,0,142,12],[13,0,142,12],[14,0,142,12],[15,0,142,22],[16,0,142,22],[17,0,142,22],[18,0,142,22],[19,0,142,22],[20,0,142,22],[21,0,142,22],[22,0,142,22],[23,0,142,22],[24,0,142,22],[25,0,142,22],[26,0,142,22],[27,0,142,22],[28,0,142,35],[29,0,143,2],[30,0,143,2],[31,0,143,2],[32,0,143,2],[33,0,143,2],[34,0,143,2],[35,0,143,16],[36,0,143,16],[37,0,144,2],[38,0,144,2],[39,0,144,2],[40,0,144,2],[41,0,144,2],[42,0,144,2],[43,0,144,2],[44,0,144,31],[45,0,144,31],[46,0,144,31]],[[4,0,146,2],[5,0,146,2],[6,0,146,2],[7,0,146,2],[8,0,146,6]],[[8,0,147,4],[9,0,147,4],[10,0,147,4],[11,0,147,4],[12,0,147,4],[13,0,147,4],[14,0,147,4],[15,0,147,11],[16,0,147,11],[17,0,147,11],[18,0,147,11],[19,0,147,11],[20,0,147,11],[21,0,147,17],[22,0,147,17],[23,0,147,17],[24,0,147,17],[25,0,147,17],[26,0,147,17],[27,0,147,17],[28,0,147,17],[29,0,147,17],[30,0,147,17],[31,0,147,17],[32,0,147,17],[33,0,147,17],[34,0,147,17],[35,0,147,17],[36,0,147,17],[37,0,147,17],[38,0,147,17],[39,0,147,17],[40,0,147,17],[41,0,147,17],[42,0,147,38],[43,0,147,39],[44,0,147,39],[45,0,147,39],[46,0,147,39],[47,0,147,39],[48,0,147,39],[49,0,147,45],[50,0,147,45],[51,0,147,47],[52,0,147,47],[53,0,147,47],[54,0,147,47],[55,0,147,47],[56,0,147,47],[57,0,147,47],[58,0,147,54],[59,0,147,55]],[[4,0,148,2]],[[4,0,148,4],[5,0,148,4],[6,0,148,4],[7,0,148,4],[8,0,148,4],[9,0,148,4],[10,0,148,4],[11,0,148,11],[12,0,148,11],[13,0,148,11],[14,0,148,11],[15,0,148,11],[16,0,148,16],[17,0,148,16],[18,0,148,18]],[[8,0,149,4],[9,0,149,4],[10,0,149,4],[11,0,149,4],[12,0,149,4],[13,0,149,4],[14,0,149,4],[15,0,149,11],[16,0,149,11],[17,0,149,11],[18,0,149,11],[19,0,149,11],[20,0,149,11],[21,0,149,11],[22,0,149,11],[23,0,149,11],[24,0,149,11],[25,0,149,11],[26,0,149,11],[27,0,149,11],[28,0,149,24],[29,0,149,25],[30,0,149,25],[31,0,149,25],[32,0,149,25],[33,0,149,25],[34,0,149,30],[35,0,149,31]],[[4,0,150,2]],[[0,0,151,0]]],"ignoreList":[]}
@@ -0,0 +1,62 @@
1
+ export type BrowserDialect = 'css' | 'sass' | 'less' | 'module';
2
+ export type CssFromSourceResult = {
3
+ ok: true;
4
+ css: string;
5
+ exports?: Record<string, string | string[]>;
6
+ };
7
+ export type CssFromSourceError = {
8
+ ok: false;
9
+ error: {
10
+ message: string;
11
+ code?: string;
12
+ };
13
+ };
14
+ export type CssFromSourceResponse = CssFromSourceResult | CssFromSourceError;
15
+ export type SassLike = {
16
+ compile?: (source: string, options?: Record<string, unknown>) => {
17
+ css: string;
18
+ } | {
19
+ css: {
20
+ toString: () => string;
21
+ };
22
+ };
23
+ compileString?: (source: string, options?: Record<string, unknown>) => {
24
+ css: string;
25
+ } | {
26
+ css: {
27
+ toString: () => string;
28
+ };
29
+ };
30
+ compileStringAsync?: (source: string, options?: Record<string, unknown>) => Promise<{
31
+ css: string;
32
+ } | {
33
+ css: {
34
+ toString: () => string;
35
+ };
36
+ }>;
37
+ };
38
+ export type LessLike = {
39
+ render: (source: string, options?: Record<string, unknown>) => Promise<{
40
+ css: string;
41
+ }>;
42
+ };
43
+ export type LightningCssWasm = {
44
+ transform: (options: {
45
+ filename?: string;
46
+ code: Uint8Array;
47
+ cssModules?: boolean;
48
+ }) => {
49
+ code: Uint8Array;
50
+ exports?: Record<string, string | string[]>;
51
+ };
52
+ };
53
+ export type CssFromSourceOptions = {
54
+ dialect: BrowserDialect;
55
+ filename?: string;
56
+ sass?: SassLike;
57
+ less?: LessLike;
58
+ lightningcss?: LightningCssWasm;
59
+ sassOptions?: Record<string, unknown>;
60
+ lessOptions?: Record<string, unknown>;
61
+ };
62
+ export declare function cssFromSource(source: string, options: CssFromSourceOptions): Promise<CssFromSourceResponse>;
package/dist/cjs/css.cjs CHANGED
@@ -17,8 +17,8 @@ const moduleGraph_js_1 = require("./moduleGraph.cjs");
17
17
  const sassInternals_js_1 = require("./sassInternals.cjs");
18
18
  exports.DEFAULT_EXTENSIONS = ['.css', '.scss', '.sass', '.less', '.css.ts'];
19
19
  const isVisitor = (value) => Boolean(value);
20
- function appendStableSelectorsFromExports(css, exportsMap, config) {
21
- let output = css;
20
+ function appendStableSelectorsFromExports(cssText, exportsMap, config) {
21
+ let output = cssText;
22
22
  for (const [token, value] of Object.entries(exportsMap)) {
23
23
  const hashed = Array.isArray(value)
24
24
  ? value.join(' ')