spawn-term 0.1.19 → 0.1.21
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.
|
@@ -92,7 +92,9 @@ function Header(param) {
|
|
|
92
92
|
var icon = ICONS[state];
|
|
93
93
|
return /*#__PURE__*/ _react.default.createElement(_ink.Box, null, /*#__PURE__*/ _react.default.createElement(_ink.Box, {
|
|
94
94
|
marginRight: 1
|
|
95
|
-
}, icon), group && /*#__PURE__*/ _react.default.createElement(_ink.Text,
|
|
95
|
+
}, icon), group && /*#__PURE__*/ _react.default.createElement(_ink.Text, {
|
|
96
|
+
bold: true
|
|
97
|
+
}, "".concat(group).concat(_figures.default.pointer, " ")), /*#__PURE__*/ _react.default.createElement(_ink.Text, null, title));
|
|
96
98
|
}
|
|
97
99
|
function Output(param) {
|
|
98
100
|
var output = param.output;
|
|
@@ -118,6 +120,26 @@ function Lines(param) {
|
|
|
118
120
|
}, line.text)));
|
|
119
121
|
}));
|
|
120
122
|
}
|
|
123
|
+
var HEADINGS = [
|
|
124
|
+
_figures.default.tick,
|
|
125
|
+
_figures.default.cross,
|
|
126
|
+
spinner.frames[0]
|
|
127
|
+
];
|
|
128
|
+
function filterHeadings(lines) {
|
|
129
|
+
var _loop = function(i) {
|
|
130
|
+
var line = lines[i];
|
|
131
|
+
if (!HEADINGS.some(function(x) {
|
|
132
|
+
return line[0] === x;
|
|
133
|
+
})) return "break";
|
|
134
|
+
headings.push(line);
|
|
135
|
+
};
|
|
136
|
+
var headings = [];
|
|
137
|
+
for(var i = 0; i < lines.length; i++){
|
|
138
|
+
var _ret = _loop(i);
|
|
139
|
+
if (_ret === "break") break;
|
|
140
|
+
}
|
|
141
|
+
return headings;
|
|
142
|
+
}
|
|
121
143
|
function ChildProcess(param) {
|
|
122
144
|
var id = param.id;
|
|
123
145
|
var store = (0, _react.useContext)(_Store.default);
|
|
@@ -135,6 +157,7 @@ function ChildProcess(param) {
|
|
|
135
157
|
lines: lines
|
|
136
158
|
}));
|
|
137
159
|
}
|
|
160
|
+
var headings = filterHeadings(lines);
|
|
138
161
|
var errors = lines.filter(function(line) {
|
|
139
162
|
return line.type === _types.LineType.stderr;
|
|
140
163
|
});
|
|
@@ -145,6 +168,8 @@ function ChildProcess(param) {
|
|
|
145
168
|
flexDirection: "column"
|
|
146
169
|
}, /*#__PURE__*/ _react.default.createElement(Header, {
|
|
147
170
|
item: item
|
|
171
|
+
}), headings.length > 0 && /*#__PURE__*/ _react.default.createElement(Lines, {
|
|
172
|
+
lines: headings
|
|
148
173
|
}), state === 'running' && output && /*#__PURE__*/ _react.default.createElement(Output, {
|
|
149
174
|
output: output
|
|
150
175
|
}), errors.length > 0 && /*#__PURE__*/ _react.default.createElement(Lines, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node/spawn-term/src/components/ChildProcess.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { useStore } from 'zustand';\nimport StoreContext from '../contexts/Store';\nimport { Box, Text } from '../ink.mjs';\nimport figures from '../lib/figures';\nimport Spinner from './Spinner';\n\nimport type { AppState } from '../types';\nimport { LineType } from '../types';\n\n// From: https://github.com/sindresorhus/cli-spinners/blob/00de8fbeee16fa49502fa4f687449f70f2c8ca2c/spinners.json#L2\nconst spinner = {\n interval: 80,\n frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'],\n};\n\nconst ICONS = {\n error: <Text color=\"red\">{figures.cross}</Text>,\n success: <Text color=\"green\">{figures.tick}</Text>,\n running: <Spinner {...spinner} />,\n};\n\ntype ChildProcessProps = {\n id: string;\n};\n\nfunction Header({ item }) {\n const { group, title, state } = item;\n const icon = ICONS[state];\n\n return (\n <Box>\n <Box marginRight={1}>{icon}</Box>\n {group && <Text>{`${group}${figures.pointer} `}</Text>}\n <Text>{title}</Text>\n </Box>\n );\n}\n\nfunction Output({ output }) {\n return (\n <Box marginLeft={2}>\n <Text color=\"gray\">{`${figures.arrowRight} ${output.text}`}</Text>\n </Box>\n );\n}\n\nfunction Lines({ lines }) {\n return (\n <Box flexDirection=\"column\" marginLeft={2}>\n {lines.map((line, index) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: <explanation>\n <Box key={index} flexDirection=\"column\" height={1}>\n <Text color={line.type === LineType.stderr ? 'red' : 'black'}>{line.text}</Text>\n </Box>\n ))}\n </Box>\n );\n}\n\nexport default function ChildProcess({ id }: ChildProcessProps) {\n const store = useContext(StoreContext);\n const appState = useStore(store) as AppState;\n const item = appState.processes.find((x) => x.id === id);\n const { state, lines, expanded } = item;\n\n if (expanded) {\n return (\n <Box flexDirection=\"column\">\n <Header item={item} />\n <Lines lines={lines} />\n </Box>\n );\n }\n const errors = lines.filter((line) => line.type === LineType.stderr);\n const output = lines.filter((line) => line.text.length > 0).pop();\n\n return (\n <Box flexDirection=\"column\">\n <Header item={item} />\n {state === 'running' && output && <Output output={output} />}\n {errors.length > 0 && <Lines lines={errors} />}\n </Box>\n );\n}\n"],"names":["ChildProcess","spinner","interval","frames","ICONS","error","Text","color","figures","cross","success","tick","running","Spinner","Header","item","group","title","state","icon","Box","marginRight","pointer","Output","output","marginLeft","arrowRight","text","Lines","lines","flexDirection","map","line","index","key","height","type","LineType","stderr","id","store","useContext","StoreContext","appState","useStore","processes","find","
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node/spawn-term/src/components/ChildProcess.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { useStore } from 'zustand';\nimport StoreContext from '../contexts/Store';\nimport { Box, Text } from '../ink.mjs';\nimport figures from '../lib/figures';\nimport Spinner from './Spinner';\n\nimport type { AppState } from '../types';\nimport { LineType } from '../types';\n\n// From: https://github.com/sindresorhus/cli-spinners/blob/00de8fbeee16fa49502fa4f687449f70f2c8ca2c/spinners.json#L2\nconst spinner = {\n interval: 80,\n frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'],\n};\n\nconst ICONS = {\n error: <Text color=\"red\">{figures.cross}</Text>,\n success: <Text color=\"green\">{figures.tick}</Text>,\n running: <Spinner {...spinner} />,\n};\n\ntype ChildProcessProps = {\n id: string;\n};\n\nfunction Header({ item }) {\n const { group, title, state } = item;\n const icon = ICONS[state];\n\n return (\n <Box>\n <Box marginRight={1}>{icon}</Box>\n {group && <Text bold>{`${group}${figures.pointer} `}</Text>}\n <Text>{title}</Text>\n </Box>\n );\n}\n\nfunction Output({ output }) {\n return (\n <Box marginLeft={2}>\n <Text color=\"gray\">{`${figures.arrowRight} ${output.text}`}</Text>\n </Box>\n );\n}\n\nfunction Lines({ lines }) {\n return (\n <Box flexDirection=\"column\" marginLeft={2}>\n {lines.map((line, index) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: <explanation>\n <Box key={index} flexDirection=\"column\" height={1}>\n <Text color={line.type === LineType.stderr ? 'red' : 'black'}>{line.text}</Text>\n </Box>\n ))}\n </Box>\n );\n}\n\nconst HEADINGS = [figures.tick, figures.cross, spinner.frames[0]];\nfunction filterHeadings(lines) {\n const headings = [];\n for (let i = 0; i < lines.length; i++) {\n const line = lines[i];\n if (!HEADINGS.some((x) => line[0] === x)) break;\n headings.push(line);\n }\n return headings;\n}\n\nexport default function ChildProcess({ id }: ChildProcessProps) {\n const store = useContext(StoreContext);\n const appState = useStore(store) as AppState;\n const item = appState.processes.find((x) => x.id === id);\n const { state, lines, expanded } = item;\n\n if (expanded) {\n return (\n <Box flexDirection=\"column\">\n <Header item={item} />\n <Lines lines={lines} />\n </Box>\n );\n }\n const headings = filterHeadings(lines);\n const errors = lines.filter((line) => line.type === LineType.stderr);\n const output = lines.filter((line) => line.text.length > 0).pop();\n\n return (\n <Box flexDirection=\"column\">\n <Header item={item} />\n {headings.length > 0 && <Lines lines={headings} />}\n {state === 'running' && output && <Output output={output} />}\n {errors.length > 0 && <Lines lines={errors} />}\n </Box>\n );\n}\n"],"names":["ChildProcess","spinner","interval","frames","ICONS","error","Text","color","figures","cross","success","tick","running","Spinner","Header","item","group","title","state","icon","Box","marginRight","bold","pointer","Output","output","marginLeft","arrowRight","text","Lines","lines","flexDirection","map","line","index","key","height","type","LineType","stderr","HEADINGS","filterHeadings","i","some","x","headings","push","length","id","store","useContext","StoreContext","appState","useStore","processes","find","expanded","errors","filter","pop"],"mappings":";;;;+BAuEA;;;eAAwBA;;;6DAvEU;uBACT;4DACA;mBACC;8DACN;8DACA;qBAGK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEzB,oHAAoH;AACpH,IAAMC,UAAU;IACdC,UAAU;IACVC,QAAQ;QAAC;QAAK;QAAK;QAAK;QAAK;QAAK;QAAK;QAAK;QAAK;QAAK;KAAI;AAC5D;AAEA,IAAMC,QAAQ;IACZC,qBAAO,6BAACC,SAAI;QAACC,OAAM;OAAOC,gBAAO,CAACC,KAAK;IACvCC,uBAAS,6BAACJ,SAAI;QAACC,OAAM;OAASC,gBAAO,CAACG,IAAI;IAC1CC,uBAAS,6BAACC,gBAAO,EAAKZ;AACxB;AAMA,SAASa,OAAO,KAAQ;QAAR,AAAEC,OAAF,MAAEA;IAChB,IAAQC,QAAwBD,KAAxBC,OAAOC,QAAiBF,KAAjBE,OAAOC,QAAUH,KAAVG;IACtB,IAAMC,OAAOf,KAAK,CAACc,MAAM;IAEzB,qBACE,6BAACE,QAAG,sBACF,6BAACA,QAAG;QAACC,aAAa;OAAIF,OACrBH,uBAAS,6BAACV,SAAI;QAACgB,MAAAA;OAAM,AAAC,GAAUd,OAARQ,OAAwB,OAAhBR,gBAAO,CAACe,OAAO,EAAC,qBACjD,6BAACjB,SAAI,QAAEW;AAGb;AAEA,SAASO,OAAO,KAAU;QAAV,AAAEC,SAAF,MAAEA;IAChB,qBACE,6BAACL,QAAG;QAACM,YAAY;qBACf,6BAACpB,SAAI;QAACC,OAAM;OAAQ,AAAC,GAAwBkB,OAAtBjB,gBAAO,CAACmB,UAAU,EA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AWJ,eAAeX;IAChC,IAAM2B,SAAS3B,MAAM4B,MAAM,CAAC,SAACzB;eAASA,KAAKI,IAAI,KAAKC,eAAQ,CAACC,MAAM;;IACnE,IAAMd,SAASK,MAAM4B,MAAM,CAAC,SAACzB;eAASA,KAAKL,IAAI,CAACmB,MAAM,GAAG;OAAGY,GAAG;IAE/D,qBACE,6BAACvC,QAAG;QAACW,eAAc;qBACjB,6BAACjB;QAAOC,MAAMA;QACb8B,SAASE,MAAM,GAAG,mBAAK,6BAAClB;QAAMC,OAAOe;QACrC3B,UAAU,aAAaO,wBAAU,6BAACD;QAAOC,QAAQA;QACjDgC,OAAOV,MAAM,GAAG,mBAAK,6BAAClB;QAAMC,OAAO2B;;AAG1C"}
|
|
@@ -35,7 +35,9 @@ function Header({ item }) {
|
|
|
35
35
|
const icon = ICONS[state];
|
|
36
36
|
return /*#__PURE__*/ React.createElement(Box, null, /*#__PURE__*/ React.createElement(Box, {
|
|
37
37
|
marginRight: 1
|
|
38
|
-
}, icon), group && /*#__PURE__*/ React.createElement(Text,
|
|
38
|
+
}, icon), group && /*#__PURE__*/ React.createElement(Text, {
|
|
39
|
+
bold: true
|
|
40
|
+
}, `${group}${figures.pointer} `), /*#__PURE__*/ React.createElement(Text, null, title));
|
|
39
41
|
}
|
|
40
42
|
function Output({ output }) {
|
|
41
43
|
return /*#__PURE__*/ React.createElement(Box, {
|
|
@@ -57,6 +59,20 @@ function Lines({ lines }) {
|
|
|
57
59
|
color: line.type === LineType.stderr ? 'red' : 'black'
|
|
58
60
|
}, line.text))));
|
|
59
61
|
}
|
|
62
|
+
const HEADINGS = [
|
|
63
|
+
figures.tick,
|
|
64
|
+
figures.cross,
|
|
65
|
+
spinner.frames[0]
|
|
66
|
+
];
|
|
67
|
+
function filterHeadings(lines) {
|
|
68
|
+
const headings = [];
|
|
69
|
+
for(let i = 0; i < lines.length; i++){
|
|
70
|
+
const line = lines[i];
|
|
71
|
+
if (!HEADINGS.some((x)=>line[0] === x)) break;
|
|
72
|
+
headings.push(line);
|
|
73
|
+
}
|
|
74
|
+
return headings;
|
|
75
|
+
}
|
|
60
76
|
export default function ChildProcess({ id }) {
|
|
61
77
|
const store = useContext(StoreContext);
|
|
62
78
|
const appState = useStore(store);
|
|
@@ -71,12 +87,15 @@ export default function ChildProcess({ id }) {
|
|
|
71
87
|
lines: lines
|
|
72
88
|
}));
|
|
73
89
|
}
|
|
90
|
+
const headings = filterHeadings(lines);
|
|
74
91
|
const errors = lines.filter((line)=>line.type === LineType.stderr);
|
|
75
92
|
const output = lines.filter((line)=>line.text.length > 0).pop();
|
|
76
93
|
return /*#__PURE__*/ React.createElement(Box, {
|
|
77
94
|
flexDirection: "column"
|
|
78
95
|
}, /*#__PURE__*/ React.createElement(Header, {
|
|
79
96
|
item: item
|
|
97
|
+
}), headings.length > 0 && /*#__PURE__*/ React.createElement(Lines, {
|
|
98
|
+
lines: headings
|
|
80
99
|
}), state === 'running' && output && /*#__PURE__*/ React.createElement(Output, {
|
|
81
100
|
output: output
|
|
82
101
|
}), errors.length > 0 && /*#__PURE__*/ React.createElement(Lines, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node/spawn-term/src/components/ChildProcess.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { useStore } from 'zustand';\nimport StoreContext from '../contexts/Store';\nimport { Box, Text } from '../ink.mjs';\nimport figures from '../lib/figures';\nimport Spinner from './Spinner';\n\nimport type { AppState } from '../types';\nimport { LineType } from '../types';\n\n// From: https://github.com/sindresorhus/cli-spinners/blob/00de8fbeee16fa49502fa4f687449f70f2c8ca2c/spinners.json#L2\nconst spinner = {\n interval: 80,\n frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'],\n};\n\nconst ICONS = {\n error: <Text color=\"red\">{figures.cross}</Text>,\n success: <Text color=\"green\">{figures.tick}</Text>,\n running: <Spinner {...spinner} />,\n};\n\ntype ChildProcessProps = {\n id: string;\n};\n\nfunction Header({ item }) {\n const { group, title, state } = item;\n const icon = ICONS[state];\n\n return (\n <Box>\n <Box marginRight={1}>{icon}</Box>\n {group && <Text>{`${group}${figures.pointer} `}</Text>}\n <Text>{title}</Text>\n </Box>\n );\n}\n\nfunction Output({ output }) {\n return (\n <Box marginLeft={2}>\n <Text color=\"gray\">{`${figures.arrowRight} ${output.text}`}</Text>\n </Box>\n );\n}\n\nfunction Lines({ lines }) {\n return (\n <Box flexDirection=\"column\" marginLeft={2}>\n {lines.map((line, index) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: <explanation>\n <Box key={index} flexDirection=\"column\" height={1}>\n <Text color={line.type === LineType.stderr ? 'red' : 'black'}>{line.text}</Text>\n </Box>\n ))}\n </Box>\n );\n}\n\nexport default function ChildProcess({ id }: ChildProcessProps) {\n const store = useContext(StoreContext);\n const appState = useStore(store) as AppState;\n const item = appState.processes.find((x) => x.id === id);\n const { state, lines, expanded } = item;\n\n if (expanded) {\n return (\n <Box flexDirection=\"column\">\n <Header item={item} />\n <Lines lines={lines} />\n </Box>\n );\n }\n const errors = lines.filter((line) => line.type === LineType.stderr);\n const output = lines.filter((line) => line.text.length > 0).pop();\n\n return (\n <Box flexDirection=\"column\">\n <Header item={item} />\n {state === 'running' && output && <Output output={output} />}\n {errors.length > 0 && <Lines lines={errors} />}\n </Box>\n );\n}\n"],"names":["React","useContext","useStore","StoreContext","Box","Text","figures","Spinner","LineType","spinner","interval","frames","ICONS","error","color","cross","success","tick","running","Header","item","group","title","state","icon","marginRight","pointer","Output","output","marginLeft","arrowRight","text","Lines","lines","flexDirection","map","line","index","key","height","type","stderr","ChildProcess","id","store","appState","processes","find","
|
|
1
|
+
{"version":3,"sources":["/Users/kevin/Dev/OpenSource/node/spawn-term/src/components/ChildProcess.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { useStore } from 'zustand';\nimport StoreContext from '../contexts/Store';\nimport { Box, Text } from '../ink.mjs';\nimport figures from '../lib/figures';\nimport Spinner from './Spinner';\n\nimport type { AppState } from '../types';\nimport { LineType } from '../types';\n\n// From: https://github.com/sindresorhus/cli-spinners/blob/00de8fbeee16fa49502fa4f687449f70f2c8ca2c/spinners.json#L2\nconst spinner = {\n interval: 80,\n frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'],\n};\n\nconst ICONS = {\n error: <Text color=\"red\">{figures.cross}</Text>,\n success: <Text color=\"green\">{figures.tick}</Text>,\n running: <Spinner {...spinner} />,\n};\n\ntype ChildProcessProps = {\n id: string;\n};\n\nfunction Header({ item }) {\n const { group, title, state } = item;\n const icon = ICONS[state];\n\n return (\n <Box>\n <Box marginRight={1}>{icon}</Box>\n {group && <Text bold>{`${group}${figures.pointer} `}</Text>}\n <Text>{title}</Text>\n </Box>\n );\n}\n\nfunction Output({ output }) {\n return (\n <Box marginLeft={2}>\n <Text color=\"gray\">{`${figures.arrowRight} ${output.text}`}</Text>\n </Box>\n );\n}\n\nfunction Lines({ lines }) {\n return (\n <Box flexDirection=\"column\" marginLeft={2}>\n {lines.map((line, index) => (\n // biome-ignore lint/suspicious/noArrayIndexKey: <explanation>\n <Box key={index} flexDirection=\"column\" height={1}>\n <Text color={line.type === LineType.stderr ? 'red' : 'black'}>{line.text}</Text>\n </Box>\n ))}\n </Box>\n );\n}\n\nconst HEADINGS = [figures.tick, figures.cross, spinner.frames[0]];\nfunction filterHeadings(lines) {\n const headings = [];\n for (let i = 0; i < lines.length; i++) {\n const line = lines[i];\n if (!HEADINGS.some((x) => line[0] === x)) break;\n headings.push(line);\n }\n return headings;\n}\n\nexport default function ChildProcess({ id }: ChildProcessProps) {\n const store = useContext(StoreContext);\n const appState = useStore(store) as AppState;\n const item = appState.processes.find((x) => x.id === id);\n const { state, lines, expanded } = item;\n\n if (expanded) {\n return (\n <Box flexDirection=\"column\">\n <Header item={item} />\n <Lines lines={lines} />\n </Box>\n );\n }\n const headings = filterHeadings(lines);\n const errors = lines.filter((line) => line.type === LineType.stderr);\n const output = lines.filter((line) => line.text.length > 0).pop();\n\n return (\n <Box flexDirection=\"column\">\n <Header item={item} />\n {headings.length > 0 && <Lines lines={headings} />}\n {state === 'running' && output && <Output output={output} />}\n {errors.length > 0 && <Lines lines={errors} />}\n </Box>\n );\n}\n"],"names":["React","useContext","useStore","StoreContext","Box","Text","figures","Spinner","LineType","spinner","interval","frames","ICONS","error","color","cross","success","tick","running","Header","item","group","title","state","icon","marginRight","bold","pointer","Output","output","marginLeft","arrowRight","text","Lines","lines","flexDirection","map","line","index","key","height","type","stderr","HEADINGS","filterHeadings","headings","i","length","some","x","push","ChildProcess","id","store","appState","processes","find","expanded","errors","filter","pop"],"mappings":"AAAA,OAAOA,SAASC,UAAU,QAAQ,QAAQ;AAC1C,SAASC,QAAQ,QAAQ,UAAU;AACnC,OAAOC,kBAAkB,oBAAoB;AAC7C,SAASC,GAAG,EAAEC,IAAI,QAAQ,aAAa;AACvC,OAAOC,aAAa,iBAAiB;AACrC,OAAOC,aAAa,YAAY;AAGhC,SAASC,QAAQ,QAAQ,WAAW;AAEpC,oHAAoH;AACpH,MAAMC,UAAU;IACdC,UAAU;IACVC,QAAQ;QAAC;QAAK;QAAK;QAAK;QAAK;QAAK;QAAK;QAAK;QAAK;QAAK;KAAI;AAC5D;AAEA,MAAMC,QAAQ;IACZC,qBAAO,oBAACR;QAAKS,OAAM;OAAOR,QAAQS,KAAK;IACvCC,uBAAS,oBAACX;QAAKS,OAAM;OAASR,QAAQW,IAAI;IAC1CC,uBAAS,oBAACX,SAAYE;AACxB;AAMA,SAASU,OAAO,EAAEC,IAAI,EAAE;IACtB,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAEC,KAAK,EAAE,GAAGH;IAChC,MAAMI,OAAOZ,KAAK,CAACW,MAAM;IAEzB,qBACE,oBAACnB,yBACC,oBAACA;QAAIqB,aAAa;OAAID,OACrBH,uBAAS,oBAAChB;QAAKqB,MAAAA;OAAM,GAAGL,QAA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