@atb-as/generate-assets 1.0.1 → 2.0.2
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 +43 -19
- package/files/atb/{favicon.ico → colors/favicon.ico} +0 -0
- package/files/atb/colors/icons/favicon.svg +3 -0
- package/files/atb/{images → colors/images}/app.png +0 -0
- package/files/atb/{images → colors/images}/background-illustration-dark.svg +0 -0
- package/files/atb/{images → colors/images}/background-illustration.svg +0 -0
- package/files/atb/{images → colors/images}/empty-illustration-dark.svg +0 -0
- package/files/atb/{images → colors/images}/empty-illustration.svg +0 -0
- package/files/atb/{images → colors/images}/travel-illustration-dark.svg +0 -0
- package/files/atb/{images → colors/images}/travel-illustration.svg +0 -0
- package/files/atb/{images → colors/images}/travelcard-help-icons-dark.svg +0 -0
- package/files/atb/{images → colors/images}/travelcard-help-icons.svg +0 -0
- package/files/atb/{images → colors/images}/travelcard-help-illustration.svg +0 -0
- package/files/atb/mono/logo/logo.svg +3 -0
- package/files/atb/{icons → mono/ticketing}/travelcard-outlined.svg +2 -2
- package/files/atb/{icons → mono/ticketing}/travelcard.svg +2 -2
- package/files/common/{icons → colors/icons}/badge-android.svg +0 -0
- package/files/common/{icons → colors/icons}/badge-ios.svg +0 -0
- package/files/common/{icons → colors/icons}/bus-ticket.svg +0 -0
- package/files/common/{icons → colors/icons}/menu.svg +0 -0
- package/files/common/{icons → colors/icons}/paymentcard-mastercard.svg +0 -0
- package/files/common/{icons → colors/icons}/paymentcard-visa.svg +0 -0
- package/files/common/{icons → colors/icons}/token-card.svg +0 -0
- package/files/common/{icons → colors/icons}/token-paper.svg +0 -0
- package/files/common/{icons → colors/icons}/travelcard-help-icons.svg +0 -0
- package/files/common/{icons → colors/icons}/waving-hand.png +0 -0
- package/files/common/{images → colors/images}/.gitkeep +0 -0
- package/files/common/mono/actions/Add.svg +3 -0
- package/files/common/mono/actions/Adjust.svg +14 -0
- package/files/common/mono/actions/Chat.svg +5 -0
- package/files/common/mono/actions/ChatUnread.svg +6 -0
- package/files/common/mono/actions/Close.svg +5 -0
- package/files/common/mono/actions/Confirm.svg +4 -0
- package/files/common/mono/actions/Context.svg +11 -0
- package/files/common/mono/actions/Delete.svg +6 -0
- package/files/common/mono/actions/DragHandle.svg +5 -0
- package/files/common/mono/actions/Edit.svg +5 -0
- package/files/common/mono/actions/Interchange.svg +4 -0
- package/files/common/mono/actions/Remove.svg +3 -0
- package/files/common/mono/actions/Reorder.svg +7 -0
- package/files/common/mono/actions/Search.svg +5 -0
- package/files/common/mono/actions/Support.svg +3 -0
- package/files/common/mono/actions/Swap.svg +8 -0
- package/files/common/mono/navigation/ArrowLeft.svg +5 -0
- package/files/common/mono/navigation/ArrowRight.svg +5 -0
- package/files/common/mono/navigation/ArrowUpLeft.svg +5 -0
- package/files/common/mono/navigation/ChevronLeft.svg +4 -0
- package/files/common/mono/navigation/ChevronRight.svg +4 -0
- package/files/common/mono/navigation/Expand.svg +5 -0
- package/files/common/mono/navigation/ExpandLess.svg +5 -0
- package/files/common/mono/navigation/UnfoldLess.svg +8 -0
- package/files/common/mono/navigation/UnfoldMore.svg +8 -0
- package/files/common/mono/other/Banner.svg +4 -0
- package/files/common/mono/other/Dot.svg +3 -0
- package/files/common/mono/places/CurrentLocationArrow.svg +5 -0
- package/files/common/mono/places/DestinationFlag.svg +5 -0
- package/files/common/mono/places/Favorite.svg +5 -0
- package/files/common/mono/places/FavoriteFill.svg +4 -0
- package/files/common/mono/places/FavoriteSemi.svg +3 -0
- package/files/common/mono/places/MapPointPin.svg +5 -0
- package/files/common/mono/status/Check.svg +8 -0
- package/files/common/mono/status/Error.svg +7 -0
- package/files/common/mono/status/Info.svg +7 -0
- package/files/common/mono/status/Unknown.svg +9 -0
- package/files/common/mono/status/Warning.svg +7 -0
- package/files/common/mono/tab-bar/assistant.svg +4 -0
- package/files/common/mono/tab-bar/nearby.svg +5 -0
- package/files/common/mono/tab-bar/profile.svg +5 -0
- package/files/common/mono/tab-bar/tickets.svg +4 -0
- package/files/common/mono/ticketing/AddTicket.svg +6 -0
- package/files/common/mono/ticketing/BlankTicket.svg +5 -0
- package/files/common/mono/ticketing/CreditCard.svg +5 -0
- package/files/common/mono/ticketing/InvalidTicket.svg +8 -0
- package/files/common/mono/ticketing/MasterCard.svg +5 -0
- package/files/common/mono/ticketing/MultipleTickets.svg +6 -0
- package/files/common/mono/ticketing/ValidTicket.svg +8 -0
- package/files/common/mono/ticketing/Vipps.svg +4 -0
- package/files/common/mono/ticketing/Visa.svg +4 -0
- package/files/common/mono/time/Date.svg +4 -0
- package/files/common/mono/transportation/BusSide.svg +3 -0
- package/files/common/mono/transportation/Duration.svg +3 -0
- package/files/common/mono/transportation/FerrySide.svg +3 -0
- package/files/common/mono/transportation/PlaneSide.svg +1 -0
- package/files/common/mono/transportation/Subway.svg +4 -0
- package/files/common/mono/transportation/TrainSide.svg +3 -0
- package/files/common/mono/transportation/TramSide.svg +3 -0
- package/files/common/mono/transportation/Wait.svg +3 -0
- package/files/common/mono/transportation/WalkingPerson.svg +3 -0
- package/files/nfk/colors/favicon.ico +0 -0
- package/files/nfk/colors/icons/favicon.svg +7 -0
- package/files/nfk/{images → colors/images}/app.png +0 -0
- package/files/nfk/colors/images/background-illustration-dark.svg +9 -0
- package/files/nfk/colors/images/background-illustration.svg +4 -0
- package/files/nfk/colors/images/empty-illustration-dark.svg +26 -0
- package/files/nfk/colors/images/empty-illustration.svg +27 -0
- package/files/nfk/colors/images/travel-illustration-dark.svg +45 -0
- package/files/nfk/colors/images/travel-illustration.svg +44 -0
- package/files/nfk/colors/images/travelcard-help-icons-dark.svg +7 -0
- package/files/nfk/colors/images/travelcard-help-icons.svg +7 -0
- package/files/nfk/{images → colors/images}/travelcard-help-illustration.svg +0 -0
- package/files/nfk/mono/logo/logo.svg +7 -0
- package/files/nfk/{icons → mono/ticketing}/travelcard-outlined.svg +2 -2
- package/files/nfk/{icons → mono/ticketing}/travelcard.svg +2 -2
- package/lib/bin.js +53 -17
- package/lib/bin.js.map +1 -1
- package/lib/generate.d.ts +13 -3
- package/lib/generate.js +76 -32
- package/lib/generate.js.map +1 -1
- package/lib/package.json +33 -0
- package/lib/src/bin.d.ts +2 -0
- package/lib/src/bin.js +72 -0
- package/lib/src/bin.js.map +1 -0
- package/lib/src/generate.d.ts +13 -0
- package/lib/src/generate.js +89 -0
- package/lib/src/generate.js.map +1 -0
- package/lib/src/utils.d.ts +4 -0
- package/lib/src/utils.js +25 -0
- package/lib/src/utils.js.map +1 -0
- package/lib/utils.d.ts +4 -0
- package/lib/utils.js +25 -0
- package/lib/utils.js.map +1 -0
- package/package.json +9 -2
- package/files/atb/icons/icon.svg +0 -3
- package/files/atb/icons/travelcard-dark.svg +0 -3
- package/files/atb/icons/travelcard-outlined-dark.svg +0 -3
- package/files/nfk/favicon.ico +0 -0
- package/files/nfk/icons/icon.svg +0 -7
- package/files/nfk/icons/travelcard-dark.svg +0 -3
- package/files/nfk/icons/travelcard-outlined-dark.svg +0 -3
- package/files/nfk/images/background-illustration-dark.svg +0 -1
- package/files/nfk/images/background-illustration.svg +0 -1
- package/files/nfk/images/empty-illustration-dark.svg +0 -26
- package/files/nfk/images/empty-illustration.svg +0 -27
- package/files/nfk/images/travel-illustration-dark.svg +0 -1
- package/files/nfk/images/travel-illustration.svg +0 -1
- package/files/nfk/images/travelcard-help-icons-dark.svg +0 -1
- package/files/nfk/images/travelcard-help-icons.svg +0 -1
package/lib/generate.js
CHANGED
|
@@ -3,43 +3,87 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.generateAssets = exports.vaildOrgIds = void 0;
|
|
7
|
-
const
|
|
6
|
+
exports.generateMonoIconsInDestinationDirectory = exports.generateAssets = exports.searchGlobSvg = exports.searchGlob = exports.vaildOrgIds = void 0;
|
|
7
|
+
const promises_1 = __importDefault(require("fs/promises"));
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
const lib_1 = require("@atb-as/theme/lib/");
|
|
10
|
+
const micromatch_1 = __importDefault(require("micromatch"));
|
|
11
|
+
const fast_glob_1 = __importDefault(require("fast-glob"));
|
|
12
|
+
const stream_editor_1 = require("stream-editor");
|
|
13
|
+
const utils_1 = require("./utils");
|
|
14
|
+
const fs_1 = require("fs");
|
|
15
|
+
exports.vaildOrgIds = [lib_1.ThemeVariant.AtB, lib_1.ThemeVariant.Nfk];
|
|
16
|
+
exports.searchGlob = '**/*.{svg,png,jpg,jpeg,ico}';
|
|
17
|
+
exports.searchGlobSvg = '**/*.svg';
|
|
18
|
+
const defaultOpts = {
|
|
19
|
+
generateMonoTheme: true,
|
|
20
|
+
onlyOutputMono: false,
|
|
21
|
+
};
|
|
22
|
+
async function generateAssets(assetType, orgId, destinationDirectory, opts = defaultOpts) {
|
|
23
|
+
const assetDir = assetType == 'all' ? '{colors,mono}' : assetType;
|
|
24
|
+
const fromBase = (...p) => (0, fast_glob_1.default)(path_1.default.join(__dirname, '..', 'files', ...p, assetDir, exports.searchGlob));
|
|
25
|
+
if (!exports.vaildOrgIds.includes(orgId))
|
|
26
|
+
throw new Error(`Invalid orgId provided, valid orgIds are ${exports.vaildOrgIds}`);
|
|
27
|
+
const commonFiles = await fromBase('common');
|
|
28
|
+
const orgFiles = await fromBase((0, utils_1.themeVariantAsString)(orgId));
|
|
29
|
+
const allFilesToBeCopied = mergeFiles(assetType, commonFiles, orgFiles);
|
|
30
|
+
const potentiallyFiltered = opts.patterns
|
|
31
|
+
? (0, micromatch_1.default)(allFilesToBeCopied, opts.patterns)
|
|
32
|
+
: allFilesToBeCopied;
|
|
33
|
+
let allFiles = potentiallyFiltered.map(async (absolutePath) => {
|
|
34
|
+
const relativePath = getGeneralNameWithoutFullPath(assetType, absolutePath);
|
|
35
|
+
const destinationPath = path_1.default.join(destinationDirectory, relativePath);
|
|
36
|
+
await promises_1.default.mkdir(path_1.default.dirname(destinationPath), { recursive: true });
|
|
37
|
+
await promises_1.default.copyFile(absolutePath, destinationPath);
|
|
38
|
+
return destinationPath;
|
|
13
39
|
});
|
|
40
|
+
if (opts.generateMonoTheme && assetType !== 'colors') {
|
|
41
|
+
const allExtraMonoIcons = await generateMonoIconsInDestinationDirectory(assetType, orgId, destinationDirectory);
|
|
42
|
+
allFiles = allFiles.concat(allExtraMonoIcons);
|
|
43
|
+
}
|
|
44
|
+
return Promise.all(allFiles);
|
|
45
|
+
}
|
|
46
|
+
exports.generateAssets = generateAssets;
|
|
47
|
+
async function generateMonoIconsInDestinationDirectory(assetType, orgId, destinationDirectory) {
|
|
48
|
+
const themes = (0, lib_1.createThemesFor)(orgId);
|
|
49
|
+
// Assume mono-icons is created directly on destination root.
|
|
50
|
+
const base = path_1.default.join(destinationDirectory, assetType === 'all' ? 'mono' : '');
|
|
51
|
+
const folder = path_1.default.join(base, exports.searchGlobSvg);
|
|
52
|
+
await promises_1.default.mkdir(path_1.default.join(base, 'dark'), { recursive: true });
|
|
53
|
+
await promises_1.default.mkdir(path_1.default.join(base, 'light'), { recursive: true });
|
|
14
54
|
let files = [];
|
|
15
|
-
for (
|
|
16
|
-
//
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
55
|
+
for await (const entry of fast_glob_1.default.stream(folder, {
|
|
56
|
+
// Avoid trying to convert what we have from before.
|
|
57
|
+
ignore: ['**/dark/**', '**/light/**'],
|
|
58
|
+
})) {
|
|
59
|
+
files = files.concat([
|
|
60
|
+
rewriteAndSave('dark', themes, entry.toString('utf-8'), base),
|
|
61
|
+
rewriteAndSave('light', themes, entry.toString('utf-8'), base),
|
|
62
|
+
]);
|
|
23
63
|
}
|
|
24
64
|
return files;
|
|
25
65
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const splitPath = filepath.split(`/files/${orgId}`)[1] ??
|
|
36
|
-
filepath.split(`/files/common`)[1];
|
|
37
|
-
const destinationPath = destinationDirectory + splitPath;
|
|
38
|
-
await fs_1.default.promises.mkdir(path_1.default.dirname(destinationPath), { recursive: true });
|
|
39
|
-
await fs_1.default.promises.copyFile(filepath, destinationPath);
|
|
66
|
+
exports.generateMonoIconsInDestinationDirectory = generateMonoIconsInDestinationDirectory;
|
|
67
|
+
async function rewriteAndSave(color, themes, absoluteFile, monoIconsBase) {
|
|
68
|
+
const relativeFileName = path_1.default.relative(monoIconsBase, absoluteFile);
|
|
69
|
+
const destination = path_1.default.join(monoIconsBase, color, relativeFileName);
|
|
70
|
+
await (0, stream_editor_1.sed)({
|
|
71
|
+
from: (0, fs_1.createReadStream)(absoluteFile),
|
|
72
|
+
to: (0, fs_1.createWriteStream)(destination),
|
|
73
|
+
match: /((fill|stroke)\=\"(?:[^"]+)\")/,
|
|
74
|
+
replacement: `$2="${themes[color].text.colors.primary}"`,
|
|
40
75
|
});
|
|
41
|
-
return
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
76
|
+
return destination;
|
|
77
|
+
}
|
|
78
|
+
function mergeFiles(assetType, commonFiles, orgFiles) {
|
|
79
|
+
const relativeOrgFiles = orgFiles.map((f) => getGeneralNameWithoutFullPath(assetType, f));
|
|
80
|
+
const commonsWithoutOverrides = commonFiles.filter(function (filepath) {
|
|
81
|
+
return !relativeOrgFiles.includes(getGeneralNameWithoutFullPath(assetType, filepath));
|
|
82
|
+
});
|
|
83
|
+
return commonsWithoutOverrides.concat(orgFiles);
|
|
84
|
+
}
|
|
85
|
+
function getGeneralNameWithoutFullPath(assetType, fullPath) {
|
|
86
|
+
const assetDir = assetType == 'all' ? '' : `\/${assetType}`;
|
|
87
|
+
return fullPath.replace(new RegExp(`^.*\/files\/[^\/]+${assetDir}`), '');
|
|
88
|
+
}
|
|
45
89
|
//# sourceMappingURL=generate.js.map
|
package/lib/generate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../src/generate.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../src/generate.ts"],"names":[],"mappings":";;;;;;AAAA,2DAA6B;AAC7B,gDAAwB;AAExB,4CAAyE;AAEzE,4DAAoC;AACpC,0DAA2B;AAC3B,iDAAiD;AAEjD,mCAA6C;AAC7C,2BAAuD;AAE1C,QAAA,WAAW,GAAG,CAAC,kBAAY,CAAC,GAAG,EAAE,kBAAY,CAAC,GAAG,CAAC,CAAC;AACnD,QAAA,UAAU,GAAG,6BAA6B,CAAC;AAC3C,QAAA,aAAa,GAAG,UAAU,CAAC;AASxC,MAAM,WAAW,GAAY;IAC3B,iBAAiB,EAAE,IAAI;IACvB,cAAc,EAAE,KAAK;CACtB,CAAC;AAEK,KAAK,UAAU,cAAc,CAClC,SAAqB,EACrB,KAAmB,EACnB,oBAA4B,EAC5B,OAAgB,WAAW;IAE3B,MAAM,QAAQ,GAAG,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC;IAClE,MAAM,QAAQ,GAAG,CAAC,GAAG,CAAW,EAAE,EAAE,CAClC,IAAA,mBAAE,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,kBAAU,CAAC,CAAC,CAAC;IAEtE,IAAI,CAAC,mBAAW,CAAC,QAAQ,CAAC,KAAK,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,4CAA4C,mBAAW,EAAE,CAAC,CAAC;IAE7E,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC7C,MAAM,QAAQ,G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
"license": "EUPL-1.2",
|
|
7
|
+
"bin": {
|
|
8
|
+
"generate-assets": "./lib/bin.js"
|
|
9
|
+
},
|
|
10
|
+
"main": "./lib/generate.js",
|
|
11
|
+
"files": [
|
|
12
|
+
"lib",
|
|
13
|
+
"files"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc",
|
|
17
|
+
"pack": "yarn pack"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@types/micromatch": "^4.0.2",
|
|
21
|
+
"@types/node": "^16.11.9",
|
|
22
|
+
"commander": "^8.3.0",
|
|
23
|
+
"typescript": "^4.5.2"
|
|
24
|
+
},
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"access": "public"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"fast-glob": "^3.2.7",
|
|
30
|
+
"micromatch": "^4.0.4",
|
|
31
|
+
"stream-editor": "^1.11.0"
|
|
32
|
+
}
|
|
33
|
+
}
|
package/lib/src/bin.d.ts
ADDED
package/lib/src/bin.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const generate_1 = require("./generate");
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const utils_1 = require("./utils");
|
|
10
|
+
const commander_1 = require("commander");
|
|
11
|
+
const package_json_1 = __importDefault(require("../package.json"));
|
|
12
|
+
commander_1.program
|
|
13
|
+
.version(package_json_1.default.version)
|
|
14
|
+
.name('npx @atb-as/generate-assets')
|
|
15
|
+
.addArgument(new commander_1.Argument('<type>', 'Type of assets to generate')
|
|
16
|
+
.choices(['colors', 'all', 'mono'])
|
|
17
|
+
.argRequired())
|
|
18
|
+
.addArgument(new commander_1.Argument('<orgId>', 'Generate for specific organization')
|
|
19
|
+
.choices(generate_1.vaildOrgIds.map(utils_1.themeVariantAsString))
|
|
20
|
+
.argRequired())
|
|
21
|
+
.requiredOption('-o, --out-dir <output>', 'Output directory')
|
|
22
|
+
.option('-d, --debug', 'Log all files generated', false)
|
|
23
|
+
.option('-im, --ignore-mono', 'Ignore generating mono-icons with theme colors.', false)
|
|
24
|
+
.option('-g, --glob [glob]', 'Pass in custom blob for matching files.', generate_1.searchGlob);
|
|
25
|
+
commander_1.program.showHelpAfterError();
|
|
26
|
+
commander_1.program.showSuggestionAfterError();
|
|
27
|
+
commander_1.program.parse();
|
|
28
|
+
const opts = commander_1.program.opts();
|
|
29
|
+
const assetType = commander_1.program.args[0];
|
|
30
|
+
const orgId = commander_1.program.args[1];
|
|
31
|
+
const main = async () => {
|
|
32
|
+
const outputFolder = path_1.default.join(process.cwd(), opts.outDir);
|
|
33
|
+
try {
|
|
34
|
+
const potentialGlob = findPotentialGlobPattern(process.argv);
|
|
35
|
+
console.log(`Writing assets for ${orgId} to ${outputFolder}`);
|
|
36
|
+
const assets = await (0, generate_1.generateAssets)(assetType, (0, utils_1.stringAsThemeVariant)(orgId), outputFolder, {
|
|
37
|
+
patterns: potentialGlob,
|
|
38
|
+
ignoreGenerateMonoIcons: opts.ignoreMono,
|
|
39
|
+
});
|
|
40
|
+
if (opts.debug) {
|
|
41
|
+
console.log(`Written ${assets.length} assets for ${orgId}:\n`);
|
|
42
|
+
console.log();
|
|
43
|
+
assets.forEach((i) => console.log(i));
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
console.log(`Successfully written ${assets.length} assets for ${orgId} to ${outputFolder}`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
catch (e) {
|
|
50
|
+
console.error(e?.message);
|
|
51
|
+
commander_1.program.help({ error: true });
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
main();
|
|
55
|
+
function findPotentialGlobPattern(args) {
|
|
56
|
+
for (let arg in args) {
|
|
57
|
+
if (!args[arg]?.startsWith('--glob') && !args[arg]?.startsWith('-g'))
|
|
58
|
+
continue;
|
|
59
|
+
// Is glob, check for valid next argument or if using =
|
|
60
|
+
if (args[arg].includes('=')) {
|
|
61
|
+
const [, glob] = args[arg].split('=');
|
|
62
|
+
return glob;
|
|
63
|
+
}
|
|
64
|
+
const potentialGlob = args[Number(arg) + 1];
|
|
65
|
+
if (!potentialGlob) {
|
|
66
|
+
throw new Error('Missing argument to --glob.');
|
|
67
|
+
}
|
|
68
|
+
return potentialGlob;
|
|
69
|
+
}
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=bin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../../src/bin.ts"],"names":[],"mappings":";;;;;;AAEA,yCAAmE;AACnE,gDAA2B;AAC3B,mCAAmE;AAEnE,yCAA4C;AAC5C,mEAAkC;AAUlC,mBAAO;KACJ,OAAO,CAAC,sBAAG,CAAC,OAAO,CAAC;KACpB,IAAI,CAAC,6BAA6B,CAAC;KACnC,WAAW,CACV,IAAI,oBAAQ,CAAC,QAAQ,EAAE,4BAA4B,CAAC;KACjD,OAAO,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;KAClC,WAAW,EAAE,CACjB;KACA,WAAW,CACV,IAAI,oBAAQ,CAAC,SAAS,EAAE,oCAAoC,CAAC;KAC1D,OAAO,CAAC,sBAAW,CAAC,GAAG,CAAC,4BAAoB,CAAC,CAAC;KAC9C,WAAW,EAAE,CACjB;KACA,cAAc,CAAC,wBAAwB,EAAE,kBAAkB,CAAC;KAC5D,MAAM,CAAC,aAAa,EAAE,yBAAyB,EAAE,KAAK,CAAC;KACvD,MAAM,CACL,oBAAoB,EACpB,iDAAiD,EACjD,KAAK,CACN;KACA,MAAM,CACL,mBAAmB,EACnB,yCAAyC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O,CAAC,EAAE;QACV,OAAO,CAAC,KAAK,CAAE,CAAW,EAAE,OAAO,CAAC,CAAC;QACrC,mBAAO,CAAC,IAAI,CAAC,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAC;KAC7B;AACH,CAAC,CAAC;AAEF,IAAI,EAAE,CAAC;AAEP,SAAS,wBAAwB,CAAC,IAAc;IAC9C,KAAK,IAAI,GAAG,IAAI,IAAI,EAAE;QACpB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC;YAClE,SAAS;QAEX,uDAAuD;QACvD,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YAC3B,MAAM,CAAC,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACtC,OAAO,IAAI,CAAC;SACb;QACD,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QAC5C,IAAI,CAAC,aAAa,EAAE;YAClB,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;SAChD;QACD,OAAO,aAAa,CAAC;KACtB;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ThemeVariant } from '@atb-as/theme/lib/';
|
|
2
|
+
export declare const vaildOrgIds: ThemeVariant[];
|
|
3
|
+
export declare const searchGlob = "**/*.{svg,png,jpg,jpeg,ico}";
|
|
4
|
+
export declare const searchGlobSvg = "**/*.svg";
|
|
5
|
+
declare type AssetTypes = 'colors' | 'mono' | 'all';
|
|
6
|
+
declare type Options = {
|
|
7
|
+
ignoreGenerateMonoIcons?: boolean;
|
|
8
|
+
onlyOutputMono?: boolean;
|
|
9
|
+
patterns?: string | readonly string[];
|
|
10
|
+
};
|
|
11
|
+
export declare function generateAssets(assetType: AssetTypes, orgId: ThemeVariant, destinationDirectory: string, opts?: Options): Promise<string[]>;
|
|
12
|
+
export declare function generateMonoIconsInDestinationDirectory(assetType: AssetTypes, orgId: ThemeVariant, destinationDirectory: string): Promise<Promise<string>[]>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.generateMonoIconsInDestinationDirectory = exports.generateAssets = exports.searchGlobSvg = exports.searchGlob = exports.vaildOrgIds = void 0;
|
|
7
|
+
const promises_1 = __importDefault(require("fs/promises"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const lib_1 = require("@atb-as/theme/lib/");
|
|
10
|
+
const micromatch_1 = __importDefault(require("micromatch"));
|
|
11
|
+
const fast_glob_1 = __importDefault(require("fast-glob"));
|
|
12
|
+
const stream_editor_1 = require("stream-editor");
|
|
13
|
+
const utils_1 = require("./utils");
|
|
14
|
+
const fs_1 = require("fs");
|
|
15
|
+
exports.vaildOrgIds = [lib_1.ThemeVariant.AtB, lib_1.ThemeVariant.Nfk];
|
|
16
|
+
exports.searchGlob = '**/*.{svg,png,jpg,jpeg,ico}';
|
|
17
|
+
exports.searchGlobSvg = '**/*.svg';
|
|
18
|
+
const defaultOpts = {
|
|
19
|
+
ignoreGenerateMonoIcons: false,
|
|
20
|
+
onlyOutputMono: false,
|
|
21
|
+
};
|
|
22
|
+
async function generateAssets(assetType, orgId, destinationDirectory, opts = defaultOpts) {
|
|
23
|
+
const assetDir = assetType == 'all' ? '{colors,mono}' : assetType;
|
|
24
|
+
const fromBase = (...p) => (0, fast_glob_1.default)(path_1.default.join(__dirname, '..', 'files', ...p, assetDir, exports.searchGlob));
|
|
25
|
+
if (!exports.vaildOrgIds.includes(orgId))
|
|
26
|
+
throw new Error(`Invalid orgId provided, valid orgIds are ${exports.vaildOrgIds}`);
|
|
27
|
+
const commonFiles = await fromBase('common');
|
|
28
|
+
const orgFiles = await fromBase((0, utils_1.themeVariantAsString)(orgId));
|
|
29
|
+
const allFilesToBeCopied = mergeFiles(assetType, commonFiles, orgFiles);
|
|
30
|
+
const potentiallyFiltered = opts.patterns
|
|
31
|
+
? (0, micromatch_1.default)(allFilesToBeCopied, opts.patterns)
|
|
32
|
+
: allFilesToBeCopied;
|
|
33
|
+
let allFiles = potentiallyFiltered.map(async (absolutePath) => {
|
|
34
|
+
const relativePath = getGeneralNameWithoutFullPath(assetType, absolutePath);
|
|
35
|
+
const destinationPath = path_1.default.join(destinationDirectory, relativePath);
|
|
36
|
+
await promises_1.default.mkdir(path_1.default.dirname(destinationPath), { recursive: true });
|
|
37
|
+
await promises_1.default.copyFile(absolutePath, destinationPath);
|
|
38
|
+
return destinationPath;
|
|
39
|
+
});
|
|
40
|
+
if (!opts.ignoreGenerateMonoIcons && assetType !== 'colors') {
|
|
41
|
+
const allExtraMonoIcons = await generateMonoIconsInDestinationDirectory(assetType, orgId, destinationDirectory);
|
|
42
|
+
allFiles = allFiles.concat(allExtraMonoIcons);
|
|
43
|
+
}
|
|
44
|
+
return Promise.all(allFiles);
|
|
45
|
+
}
|
|
46
|
+
exports.generateAssets = generateAssets;
|
|
47
|
+
async function generateMonoIconsInDestinationDirectory(assetType, orgId, destinationDirectory) {
|
|
48
|
+
const themes = (0, lib_1.createThemesFor)(orgId);
|
|
49
|
+
// Assume mono-icons is created directly on destination root.
|
|
50
|
+
const base = path_1.default.join(destinationDirectory, assetType === 'all' ? 'mono' : '');
|
|
51
|
+
const folder = path_1.default.join(base, exports.searchGlobSvg);
|
|
52
|
+
await promises_1.default.mkdir(path_1.default.join(base, 'dark'), { recursive: true });
|
|
53
|
+
await promises_1.default.mkdir(path_1.default.join(base, 'light'), { recursive: true });
|
|
54
|
+
let files = [];
|
|
55
|
+
for await (const entry of fast_glob_1.default.stream(folder, {
|
|
56
|
+
// Avoid trying to convert what we have from before.
|
|
57
|
+
ignore: ['**/dark/**', '**/light/**'],
|
|
58
|
+
})) {
|
|
59
|
+
files = files.concat([
|
|
60
|
+
rewriteAndSave('dark', themes, entry.toString('utf-8'), base),
|
|
61
|
+
rewriteAndSave('light', themes, entry.toString('utf-8'), base),
|
|
62
|
+
]);
|
|
63
|
+
}
|
|
64
|
+
return files;
|
|
65
|
+
}
|
|
66
|
+
exports.generateMonoIconsInDestinationDirectory = generateMonoIconsInDestinationDirectory;
|
|
67
|
+
async function rewriteAndSave(color, themes, absoluteFile, monoIconsBase) {
|
|
68
|
+
const relativeFileName = path_1.default.relative(monoIconsBase, absoluteFile);
|
|
69
|
+
const destination = path_1.default.join(monoIconsBase, color, relativeFileName);
|
|
70
|
+
await (0, stream_editor_1.sed)({
|
|
71
|
+
from: (0, fs_1.createReadStream)(absoluteFile),
|
|
72
|
+
to: (0, fs_1.createWriteStream)(destination),
|
|
73
|
+
match: /((fill|stroke)\=\"(?:[^"]+)\")/,
|
|
74
|
+
replacement: `$2="${themes[color].text.colors.primary}"`,
|
|
75
|
+
});
|
|
76
|
+
return destination;
|
|
77
|
+
}
|
|
78
|
+
function mergeFiles(assetType, commonFiles, orgFiles) {
|
|
79
|
+
const relativeOrgFiles = orgFiles.map((f) => getGeneralNameWithoutFullPath(assetType, f));
|
|
80
|
+
const commonsWithoutOverrides = commonFiles.filter(function (filepath) {
|
|
81
|
+
return !relativeOrgFiles.includes(getGeneralNameWithoutFullPath(assetType, filepath));
|
|
82
|
+
});
|
|
83
|
+
return commonsWithoutOverrides.concat(orgFiles);
|
|
84
|
+
}
|
|
85
|
+
function getGeneralNameWithoutFullPath(assetType, fullPath) {
|
|
86
|
+
const assetDir = assetType == 'all' ? '' : `\/${assetType}`;
|
|
87
|
+
return fullPath.replace(new RegExp(`^.*\/files\/[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C,YAAY,CAAC;QACpC,EAAE,EAAE,IAAA,sBAAiB,EAAC,WAAW,CAAC;QAClC,KAAK,EAAE,gCAAgC;QACvC,WAAW,EAAE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,GAAG;KACzD,CAAC,CAAC;IAEH,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,SAAS,UAAU,CACjB,SAAqB,EACrB,WAAqB,EACrB,QAAkB;IAElB,MAAM,gBAAgB,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAC1C,6BAA6B,CAAC,SAAS,EAAE,CAAC,CAAC,CAC5C,CAAC;IACF,MAAM,uBAAuB,GAAG,WAAW,CAAC,MAAM,CAAC,UAAU,QAAQ;QACnE,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAC/B,6BAA6B,CAAC,SAAS,EAAE,QAAQ,CAAC,CACnD,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,uBAAuB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,6BAA6B,CACpC,SAAqB,EACrB,QAAgB;IAEhB,MAAM,QAAQ,GAAG,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC;IAC5D,OAAO,QAAQ,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,qBAAqB,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AAC3E,CAAC"}
|
package/lib/src/utils.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stringAsThemeVariant = exports.themeVariantAsString = exports.ThemeVariant = void 0;
|
|
4
|
+
const lib_1 = require("@atb-as/theme/lib/");
|
|
5
|
+
Object.defineProperty(exports, "ThemeVariant", { enumerable: true, get: function () { return lib_1.ThemeVariant; } });
|
|
6
|
+
function themeVariantAsString(org) {
|
|
7
|
+
switch (org) {
|
|
8
|
+
case lib_1.ThemeVariant.Nfk:
|
|
9
|
+
return 'nfk';
|
|
10
|
+
case lib_1.ThemeVariant.AtB:
|
|
11
|
+
return 'atb';
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.themeVariantAsString = themeVariantAsString;
|
|
15
|
+
function stringAsThemeVariant(org) {
|
|
16
|
+
switch (org) {
|
|
17
|
+
case 'nfk':
|
|
18
|
+
return lib_1.ThemeVariant.Nfk;
|
|
19
|
+
case 'atb':
|
|
20
|
+
return lib_1.ThemeVariant.AtB;
|
|
21
|
+
}
|
|
22
|
+
throw new Error('Invalid org');
|
|
23
|
+
}
|
|
24
|
+
exports.stringAsThemeVariant = stringAsThemeVariant;
|
|
25
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";;;AAAA,4CAAgD;AAExC,6FAFA,kBAAY,OAEA;AAEpB,SAAgB,oBAAoB,CAAC,GAAiB;IACpD,QAAQ,GAAG,EAAE;QACX,KAAK,kBAAY,CAAC,GAAG;YACnB,OAAO,KAAK,CAAC;QACf,KAAK,kBAAY,CAAC,GAAG;YACnB,OAAO,KAAK,CAAC;KAChB;AACH,CAAC;AAPD,oDAOC;AAED,SAAgB,oBAAoB,CAAC,GAAW;IAC9C,QAAQ,GAAG,EAAE;QACX,KAAK,KAAK;YACR,OAAO,kBAAY,CAAC,GAAG,CAAC;QAC1B,KAAK,KAAK;YACR,OAAO,kBAAY,CAAC,GAAG,CAAC;KAC3B;IAED,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC;AACjC,CAAC;AATD,oDASC"}
|
package/lib/utils.d.ts
ADDED
package/lib/utils.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stringAsThemeVariant = exports.themeVariantAsString = exports.ThemeVariant = void 0;
|
|
4
|
+
const lib_1 = require("@atb-as/theme/lib/");
|
|
5
|
+
Object.defineProperty(exports, "ThemeVariant", { enumerable: true, get: function () { return lib_1.ThemeVariant; } });
|
|
6
|
+
function themeVariantAsString(org) {
|
|
7
|
+
switch (org) {
|
|
8
|
+
case lib_1.ThemeVariant.Nfk:
|
|
9
|
+
return 'nfk';
|
|
10
|
+
case lib_1.ThemeVariant.AtB:
|
|
11
|
+
return 'atb';
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.themeVariantAsString = themeVariantAsString;
|
|
15
|
+
function stringAsThemeVariant(org) {
|
|
16
|
+
switch (org) {
|
|
17
|
+
case 'nfk':
|
|
18
|
+
return lib_1.ThemeVariant.Nfk;
|
|
19
|
+
case 'atb':
|
|
20
|
+
return lib_1.ThemeVariant.AtB;
|
|
21
|
+
}
|
|
22
|
+
throw new Error('Invalid org');
|
|
23
|
+
}
|
|
24
|
+
exports.stringAsThemeVariant = stringAsThemeVariant;
|
|
25
|
+
//# sourceMappingURL=utils.js.map
|
package/lib/utils.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;AAAA,4CAAgD;AAExC,6FAFA,kBAAY,OAEA;AAEpB,SAAgB,oBAAoB,CAAC,GAAiB;IACpD,QAAQ,GAAG,EAAE;QACX,KAAK,kBAAY,CAAC,GAAG;YACnB,OAAO,KAAK,CAAC;QACf,KAAK,kBAAY,CAAC,GAAG;YACnB,OAAO,KAAK,CAAC;KAChB;AACH,CAAC;AAPD,oDAOC;AAED,SAAgB,oBAAoB,CAAC,GAAW;IAC9C,QAAQ,GAAG,EAAE;QACX,KAAK,KAAK;YACR,OAAO,kBAAY,CAAC,GAAG,CAAC;QAC1B,KAAK,KAAK;YACR,OAAO,kBAAY,CAAC,GAAG,CAAC;KAC3B;IAED,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC;AACjC,CAAC;AATD,oDASC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atb-as/generate-assets",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "OOS Design System generate-assets",
|
|
6
6
|
"license": "EUPL-1.2",
|
|
@@ -17,11 +17,18 @@
|
|
|
17
17
|
"pack": "yarn pack"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
+
"@types/micromatch": "^4.0.2",
|
|
20
21
|
"@types/node": "^16.11.9",
|
|
21
22
|
"typescript": "^4.5.2"
|
|
22
23
|
},
|
|
23
24
|
"publishConfig": {
|
|
24
25
|
"access": "public"
|
|
25
26
|
},
|
|
26
|
-
"
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"commander": "^8.3.0",
|
|
29
|
+
"fast-glob": "^3.2.7",
|
|
30
|
+
"micromatch": "^4.0.4",
|
|
31
|
+
"stream-editor": "^1.11.0"
|
|
32
|
+
},
|
|
33
|
+
"gitHead": "aff08b43c84c3c738b0bd22998a587c418c53ed0"
|
|
27
34
|
}
|
package/files/atb/icons/icon.svg
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.9999 2.96761C17.9999 2.43289 17.5664 2 17.0323 2L6.33204 2.00464C3.93952 2.00481 2 3.94436 2 6.337L2.00446 17.033C2.00458 17.5683 2.43881 18 2.972 18H17.0323C17.5654 18 17.9999 17.5684 17.9999 17.0327V2.96761ZM15.085 4.73948C16.1294 4.24797 16.8592 3.62522 17.176 2.72727L6.33237 2.72944C4.34135 2.72944 2.72728 4.34351 2.72728 6.33452L2.728 8.04053C2.96027 7.85655 3.19344 7.6899 3.42673 7.5415L3.46075 7.51904C3.80457 7.28491 4.1732 7.08973 4.58753 6.92236C5.82779 6.42116 7.25861 6.26884 8.77328 6.10774L8.77795 6.10724L8.77797 6.10724L8.77799 6.10723C9.08844 6.07422 9.40912 6.04011 9.73384 6.00214C11.1766 5.83363 13.2622 5.48492 15.0063 4.78035L15.085 4.73948ZM8.94181 7.57343C9.25329 7.54032 9.5751 7.50611 9.90458 7.46756C11.437 7.28857 13.6614 6.91452 15.5573 6.14854C16.198 5.88967 16.6898 5.61237 17.2727 5.18889V17.0318C17.2727 17.1646 17.1651 17.2727 17.0323 17.2727H2.97207C2.83932 17.2727 2.73174 17.1646 2.73174 17.0318L2.72885 10.0323C3.0926 9.65568 3.62059 9.16519 4.22089 8.78404L4.27537 8.74828L4.28488 8.74184C4.54196 8.5664 4.82118 8.41878 5.13858 8.29061C6.18806 7.86641 7.51941 7.72475 8.92915 7.57478L8.94181 7.57343ZM14.1909 14.5024C14.0794 14.6223 13.9513 14.682 13.8066 14.682H13.3719V13.2279H13.8066C13.9513 13.2279 14.0794 13.2893 14.1909 13.4117C14.3023 13.5343 14.3581 13.7126 14.3581 13.9466C14.3581 14.1973 14.3023 14.3826 14.1909 14.5024ZM14.1157 11.9952C14.0321 12.1151 13.9096 12.1748 13.748 12.1748H13.3719V10.9548H13.748C13.9096 10.9548 14.0321 11.0161 14.1157 11.1387C14.1994 11.2612 14.2411 11.406 14.2411 11.5732C14.2411 11.7349 14.1994 11.8754 14.1157 11.9952ZM6.00951 13.5872L6.43575 11.0551H6.45243L6.87861 13.5872H6.00951ZM9.58214 15.6514C9.68509 15.7295 9.8772 15.8024 10.2372 15.8024L11.7881 15.8019H14.1659C14.4889 15.8019 14.7647 15.7587 14.9932 15.6724C15.2216 15.5861 15.4069 15.4648 15.549 15.3088C15.691 15.1529 15.7956 14.9662 15.8623 14.7489C15.9292 14.5316 15.9626 14.2949 15.9626 14.0385C15.9626 13.8826 15.9418 13.728 15.9 13.5746C15.8582 13.4215 15.7927 13.2809 15.7036 13.1526C15.6144 13.0246 15.5001 12.9174 15.361 12.8308C15.2216 12.7446 15.0545 12.693 14.8595 12.6763V12.6596C15.0266 12.6262 15.1688 12.5677 15.2858 12.4841C15.4027 12.4005 15.4989 12.299 15.574 12.179C15.6493 12.0594 15.7048 11.9256 15.7413 11.7779C15.7773 11.6303 15.7956 11.4785 15.7956 11.3224C15.7956 10.8712 15.6632 10.5105 15.3985 10.2402C15.1339 9.97004 14.7229 9.83494 14.1659 9.83494H11.8238L11.8261 14.799H11.1491C11.0265 14.799 10.936 14.7726 10.8775 14.7197C10.819 14.6667 10.7898 14.5763 10.7898 14.448V12.2919H11.3831V11.2807H10.7898V9.95191H9.28546V11.2807H7.77602L7.42184 9.83494H5.46628L4.03734 15.8019H5.66676L5.82558 14.7572H7.06248L7.22124 15.8019H8.87589L8.0187 12.2919H9.28546V14.6988C9.28546 14.9495 9.30912 15.1514 9.35638 15.3046C9.40382 15.458 9.47901 15.5735 9.58214 15.6514Z" fill="white"/>
|
|
3
|
-
</svg>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="20" height="20" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.00001 5.99997L32 5.99999C35.3137 5.99999 38 8.68628 38 12V28C38 31.3137 35.3137 34 32 34H8C4.68629 34 2 31.3137 2 28V12C2 8.68626 4.6863 5.99997 8.00001 5.99997ZM20.6563 25.0937C20.3516 25.1562 19.7734 25.2109 19.1641 25.2109C16.7109 25.2109 15.7422 24.5 15.7422 22.7656V18.7422H14.4219V16.4297H15.7422V14.5H18.9453V16.4297H20.6563V18.7422H18.9453V22.0547C18.9453 22.6094 19.2656 22.8984 19.9375 22.8984C20.2813 22.8984 20.4688 22.8828 20.6563 22.8594V25.0937ZM26.0025 18.5625C26.0025 19.5469 25.315 20.2578 24.2681 20.2578C23.2213 20.2578 22.5338 19.5469 22.5338 18.5625C22.5338 17.5781 23.2213 16.8672 24.2681 16.8672C25.315 16.8672 26.0025 17.5781 26.0025 18.5625ZM26.0025 23.8281C26.0025 24.8125 25.315 25.5234 24.2681 25.5234C23.2213 25.5234 22.5338 24.8125 22.5338 23.8281C22.5338 22.8437 23.2213 22.1328 24.2681 22.1328C25.315 22.1328 26.0025 22.8437 26.0025 23.8281Z" fill="#ffffff"/>
|
|
3
|
-
</svg>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="40" height="30" viewBox="0 0 24 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.9375 12.2746C12.9375 12.5133 12.7687 12.7187 12.5345 12.7651C12.2888 12.8137 11.8686 12.8499 11.4427 12.8499C10.6027 12.8499 9.90107 12.7375 9.40395 12.3929C8.86021 12.016 8.66146 11.4388 8.66146 10.7779V8.69141H8.28125C8.00511 8.69141 7.78125 8.46756 7.78125 8.19141V6.70481C7.78125 6.42866 8.00511 6.20481 8.28125 6.20481H8.66146V5.46429C8.66146 5.18815 8.88532 4.96429 9.16146 4.96429H11.2969C11.573 4.96429 11.7969 5.18815 11.7969 5.46429V6.20481H12.4375C12.7136 6.20481 12.9375 6.42866 12.9375 6.70481V8.19141C12.9375 8.46756 12.7136 8.69141 12.4375 8.69141H11.7969V10.3209C11.7969 10.3311 11.7973 10.3395 11.7978 10.3464C11.7984 10.3465 11.7989 10.3467 11.7995 10.3468C11.8287 10.3549 11.8793 10.3633 11.9583 10.3633C12.1688 10.3633 12.2737 10.3543 12.3777 10.3418C12.5197 10.3247 12.6622 10.3692 12.7692 10.4641C12.8762 10.559 12.9375 10.6951 12.9375 10.8382V12.2746ZM12.4375 12.2746C12.2344 12.3147 11.849 12.3499 11.4427 12.3499C9.80729 12.3499 9.16146 11.8929 9.16146 10.7779V8.19141H8.28125V6.70481H9.16146V5.46429H11.2969V6.70481H12.4375V8.19141H11.2969V10.3209C11.2969 10.6719 11.5038 10.8574 11.9375 10.8632C11.9444 10.8632 11.9513 10.8633 11.9583 10.8633C12.1875 10.8633 12.3125 10.8532 12.4375 10.8382V12.2746ZM20 0.500012L4 0.5C2.04971 0.499999 0.500001 2.02003 0.5 3.85714V14.1429C0.5 15.98 2.04971 17.5 4 17.5H20C21.9503 17.5 23.5 15.98 23.5 14.1429V3.85715C23.5 2.02004 21.9503 0.500013 20 0.500012ZM16.0312 9.21917C15.724 9.51344 15.3052 9.66574 14.8454 9.66574C14.3856 9.66574 13.9668 9.51344 13.6597 9.21917C13.3515 8.92388 13.1892 8.51721 13.1892 8.0759C13.1892 7.63459 13.3515 7.22792 13.6597 6.93263C13.9668 6.63836 14.3856 6.48606 14.8454 6.48606C15.3052 6.48606 15.724 6.63836 16.0312 6.93263C16.3394 7.22792 16.5017 7.63459 16.5017 8.0759C16.5017 8.51721 16.3394 8.92388 16.0312 9.21917ZM16.0312 12.6042C15.724 12.8985 15.3052 13.0508 14.8454 13.0508C14.3856 13.0508 13.9668 12.8985 13.6597 12.6042C13.3515 12.3089 13.1892 11.9023 13.1892 11.4609C13.1892 11.0196 13.3515 10.613 13.6597 10.3177C13.9668 10.0234 14.3856 9.8711 14.8454 9.8711C15.3052 9.8711 15.724 10.0234 16.0312 10.3177C16.3394 10.613 16.5017 11.0196 16.5017 11.4609C16.5017 11.9023 16.3394 12.3089 16.0312 12.6042ZM20 1.14952e-05L4 0C1.79086 0 0 1.7269 0 3.85714V14.1429C0 16.2731 1.79086 18 4 18H20C22.2091 18 24 16.2731 24 14.1429V3.85715C24 1.72691 22.2091 1.30823e-05 20 1.14952e-05ZM14.8454 9.16574C15.5433 9.16574 16.0017 8.70871 16.0017 8.0759C16.0017 7.44309 15.5433 6.98606 14.8454 6.98606C14.1475 6.98606 13.6892 7.44309 13.6892 8.0759C13.6892 8.70871 14.1475 9.16574 14.8454 9.16574ZM14.8454 12.5508C15.5433 12.5508 16.0017 12.0938 16.0017 11.4609C16.0017 10.8281 15.5433 10.3711 14.8454 10.3711C14.1475 10.3711 13.6892 10.8281 13.6892 11.4609C13.6892 12.0938 14.1475 12.5508 14.8454 12.5508Z" fill="#ffffff"></path>
|
|
3
|
-
</svg>
|
package/files/nfk/favicon.ico
DELETED
|
Binary file
|
package/files/nfk/icons/icon.svg
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<svg width="18" height="16" viewBox="0 0 18 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M13.1098 10.4268C11.801 10.4268 11.1073 9.9832 10.5314 9.61784C10.0733 9.31773 9.73295 9.10895 8.9869 9.10895C8.24084 9.10895 7.90054 9.31773 7.44243 9.61784C6.87962 9.9832 6.17283 10.4268 4.87705 10.4268C3.56819 10.4268 2.87449 9.9832 2.31167 9.61784C1.85357 9.31773 1.51327 9.10895 0.767212 9.10895V6.49927C2.07608 6.49927 2.76978 6.94291 3.33259 7.30827C3.79069 7.60838 4.131 7.81716 4.87705 7.81716C5.62311 7.81716 5.96341 7.60838 6.42152 7.30827C6.98433 6.94291 7.69112 6.49927 8.9869 6.49927C10.2958 6.49927 10.9895 6.94291 11.5654 7.30827C12.0235 7.60838 12.3638 7.81716 13.1098 7.81716C13.8559 7.81716 14.1962 7.60838 14.6543 7.30827C15.2171 6.94291 15.9239 6.49927 17.2328 6.49927V9.10895C16.4867 9.10895 16.1464 9.31773 15.6883 9.61784C15.1124 9.97015 14.4187 10.4268 13.1098 10.4268Z" fill="white"/>
|
|
3
|
-
<path d="M5.30898 12.6973H0.767212V15.1243H5.30898V12.6973Z" fill="white"/>
|
|
4
|
-
<path d="M11.2643 12.6973H6.72253V15.1243H11.2643V12.6973Z" fill="white"/>
|
|
5
|
-
<path d="M17.2327 12.6973H12.6909V15.1243H17.2327V12.6973Z" fill="white"/>
|
|
6
|
-
<path d="M12.9528 0.875488L9.02616 3.72004L5.09956 0.875488L0.767212 4.03321V4.43771H8.13613H9.91619H17.2197V3.99406L12.9528 0.875488Z" fill="white"/>
|
|
7
|
-
</svg>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="20" height="20" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 12C2 8.68629 4.68629 6 8 6H32C35.3137 6 38 8.68629 38 12V28C38 31.3137 35.3137 34 32 34H8C4.68629 34 2 31.3137 2 28V12ZM8 10C6.89543 10 6 10.8954 6 12V18H34V12C34 10.8954 33.1046 10 32 10H8ZM34 26H6V28C6 29.1046 6.89543 30 8 30H32C33.1046 30 34 29.1046 34 28V26Z" fill="#FFFFFF"/>
|
|
3
|
-
</svg>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M38 15.4582V9C38 7.89543 37.1046 7 36 7H4C2.89543 7 2 7.89543 2 9V15.7439C2 16.2277 2.46354 16.5789 2.94737 16.5789C4.9821 16.5789 6.63158 18.2284 6.63158 20.2632C6.63158 22.2979 4.9821 23.9474 2.94737 23.9474C2.46354 23.9474 2 24.2986 2 24.7824V31.5263C2 32.6309 2.89543 33.5263 4 33.5263H36C37.1046 33.5263 38 32.6309 38 31.5263V25.0681L38 25.0627V24.7824C38 24.2986 37.5365 23.9474 37.0526 23.9474C35.0179 23.9474 33.3684 22.2979 33.3684 20.2632C33.3684 18.2284 35.0179 16.5789 37.0526 16.5789C37.5365 16.5789 38 16.2277 38 15.7439V15.4636L38 15.4582ZM36 9H4V14.6762C6.63639 15.1699 8.63158 17.4835 8.63158 20.2632C8.63158 23.0428 6.63639 25.3564 4 25.8501V31.5263H36V25.8501C33.3636 25.3564 31.3684 23.0428 31.3684 20.2632C31.3684 17.4835 33.3636 15.1699 36 14.6762V9Z" fill="#ffffff"/>
|
|
3
|
-
</svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 6388 4087" style="enable-background:new 0 0 6388 4087" xml:space="preserve"><style>.st3{fill:#fff}.st4{fill:#e3f2f7}.st5{fill:#e6f1f4}.st6{fill:#030b0f}.st7{fill:#000f0f}.st8{fill:#0085a9}.st9{fill:#00242d}.st10,.st9{clip-path:url(#SVGID_00000019637084859796277590000009983440645654097595_)}.st11{fill:#ff989b}.st12,.st13{display:none;fill:#00ac79}.st13{fill:#00242d}.st14{fill:#1c273f}.st15{fill:#2a3756}.st16{fill:#db807d}.st17{fill:#ffbb46}.st18{opacity:.2;fill:#00242d}.st19{opacity:.7}.st20{opacity:.32;fill:#fff}.st21{fill:#ff282e}.st22{fill:#00242d}.st22,.st23{clip-path:url(#SVGID_00000119833039003113506800000002682544675818530711_)}.st24{fill:#ffcbcd}.st25{fill:#ffb2b4}.st26{fill:#ff7e81}.st27{display:none;fill:#ffbb46}.st28{fill:#8e9093}.st29{opacity:.2;fill:#231f20}.st29,.st30{display:none}.st31{display:inline;fill:#006275}.st32{fill:#3a3a3a}.st32,.st33{display:inline}.st34,.st35{fill:#ffd690}.st35,.st36,.st37{display:inline}.st36{opacity:.57;fill:#cecccc}.st37{fill:#2a3756}.st38{fill:#4a940d}.st39{fill:#49890d}.st40{display:none;fill:#e3f2f7}.st41{fill:#f0f0f0}.st42{fill:#dce4e6}.st43{fill:#020d10}.st44{fill:#09171d}.st45{fill:#00242d}.st45,.st46{clip-path:url(#SVGID_00000165937135850675484260000015459748536447797949_)}.st47{fill:#00242d}.st47,.st48{clip-path:url(#SVGID_00000146482394633932201950000014515620874951632279_)}.st49{fill:#00242d}.st49,.st50{clip-path:url(#SVGID_00000044156854941919152380000016971971201028132283_)}.st51{fill:#00242d}.st51,.st52{clip-path:url(#SVGID_00000102534913700958412120000008849373528454883243_)}</style><g id="Bakgrunner"><path style="fill:#00242d" d="M0 0h6388v4087H0z"/><g style="opacity:.2"><path d="M6389 4087V1926.86c-507.52 0-779.75 174.92-998.5 315.46-178.64 114.77-307.69 197.69-598.81 197.69-291.12 0-420.17-82.92-598.81-197.69-218.73-140.54-490.95-315.46-998.48-315.46-507.5 0-779.72 174.92-998.45 315.46-178.61 114.77-307.67 197.69-598.77 197.69-291.08 0-420.14-82.92-598.74-197.68C779.71 2101.78 507.5 1926.86 0 1926.86V4087h6389z" style="fill:#006275"/></g></g></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg width="6388" height="4087" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6388 0H0v4087h6388V0Z" fill="#D3E5EA"/><path d="M6389 4087V1926.86c-507.52 0-779.75 174.92-998.5 315.46-178.64 114.77-307.69 197.69-598.81 197.69-291.12 0-420.17-82.92-598.81-197.69-218.73-140.54-490.95-315.46-998.48-315.46-507.5 0-779.72 174.92-998.45 315.46-178.61 114.77-307.67 197.69-598.77 197.69-291.08 0-420.14-82.92-598.74-197.68C779.71 2101.78 507.5 1926.86 0 1926.86V4087h6389Z" fill="#E6F2F6"/></svg>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<svg width="2872" height="1466" viewBox="0 0 2872 1466" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M1903 896.486C1940.71 760.881 1823.52 610.596 1646.7 457.658C1469.87 304.72 1338.3 93.0058 1114.43 261.929C890.55 430.851 820.205 816.813 936.158 990.64C1052.12 1164.47 1781.85 1332.13 1903 896.486V896.486Z" fill="#0085A9"/>
|
|
3
|
-
<path d="M1868.33 650.673C1868.33 650.673 1905.88 651.927 1916.82 688.363C1927.75 724.798 1922.64 934.656 1922.64 934.656L1868.33 650.673Z" fill="#FF989B"/>
|
|
4
|
-
<path d="M1500.27 771.153C1500.27 771.153 1470.4 852.535 1465.09 867.764C1459.79 882.992 1531.2 874.996 1548.44 833.313C1558.2 809.701 1566.58 749.397 1549.11 738.875C1539.46 733.06 1500.27 771.153 1500.27 771.153Z" fill="#FFCBCD"/>
|
|
5
|
-
<path d="M1477.6 695.26C1477.6 695.26 1450.81 767.889 1445.75 787.911C1440.69 807.932 1501.73 805.639 1537.9 751.278C1574.07 696.917 1553.73 648.595 1553.73 648.595L1477.6 695.26V695.26Z" fill="#FFB2B4"/>
|
|
6
|
-
<path d="M1552.45 407.806C1552.45 407.806 1479.58 381.086 1471.07 377.444C1462.57 373.802 1445.57 453.965 1552.45 484.327C1659.33 514.69 1552.45 407.806 1552.45 407.806ZM1550.62 614.418C1550.62 614.418 1503.02 612.417 1485.9 625.636C1468.78 638.854 1437.19 669.732 1424.65 679.704C1412.11 689.676 1450.34 745.678 1534.86 676.827C1619.38 607.985 1550.62 614.418 1550.62 614.418Z" fill="#FF989B"/>
|
|
7
|
-
<path d="M1641.22 885.037C1641.22 885.037 1637.41 1024.28 1762.89 1095.32C1762.89 1095.32 1788.39 1135.39 1751.74 1200.97C1715.09 1266.55 1977.06 1319.9 1984.92 1244.69C1988.11 1214.1 1994.21 1168.18 1988.56 1111.7C1984.15 1067.56 1964.06 1016.38 1964.06 1016.38L1897.47 885.028H1641.22V885.037Z" fill="#FF7E81"/>
|
|
8
|
-
<path d="M1570.59 366.51C1548.13 366.51 1527.86 389.641 1527.86 412.093V889.624C1527.86 912.076 1549.81 934.648 1572.26 934.648H1774.61C1797.07 934.648 1819.57 912.625 1819.57 890.173V411.543C1819.57 389.091 1799.28 366.51 1776.84 366.51H1570.59V366.51Z" fill="#00242D"/>
|
|
9
|
-
<path d="M1775.52 941.983H1571.9C1543.32 941.983 1520.07 918.732 1520.07 890.147V411.199C1520.07 382.615 1543.32 359.364 1571.9 359.364H1775.52C1804.09 359.364 1827.35 382.615 1827.35 411.199V890.147C1827.35 918.732 1804.1 941.983 1775.52 941.983V941.983ZM1571.91 370.487C1549.46 370.487 1531.2 388.756 1531.2 411.199V890.147C1531.2 912.599 1549.46 930.86 1571.91 930.86H1775.52C1797.98 930.86 1816.24 912.591 1816.24 890.147V411.199C1816.24 388.747 1797.97 370.487 1775.52 370.487H1571.91V370.487Z" fill="#E3F2F7"/>
|
|
10
|
-
<path d="M1515.83 476.58H1527.86V501.042H1515.83V476.58Z" fill="#E3F2F7"/>
|
|
11
|
-
<path d="M1819.57 529.953H1831.59V579.985H1819.57V529.953Z" fill="#8E9093"/>
|
|
12
|
-
<path d="M1515.83 513.273H1527.86V548.849H1515.83V513.273ZM1515.83 561.089H1527.86V596.665H1515.83V561.089Z" fill="#E3F2F7"/>
|
|
13
|
-
<path d="M1864.58 549.906C1859.72 532.899 1865.8 479.466 1852.44 478.246C1839.08 477.035 1788.83 523.391 1796.57 579.057C1809.92 675.058 1809.72 738.454 1796.04 789.173C1779.6 850.148 1721.43 962.854 1796.04 1041.8C1870.66 1120.74 1971.46 1051.51 1971.46 1051.51C1971.46 1051.51 1869.45 566.912 1864.58 549.906Z" fill="#FF7E81"/>
|
|
14
|
-
<path d="M1776.13 764.669H1571.29C1565.3 764.669 1560.44 759.816 1560.44 753.82V548.978C1560.44 542.983 1565.3 538.13 1571.29 538.13H1776.13C1782.13 538.13 1786.98 542.983 1786.98 548.978V753.82C1786.98 759.807 1782.12 764.669 1776.13 764.669Z" fill="#0085A9"/>
|
|
15
|
-
<path d="M1714.18 673.7C1701.32 673.7 1694.43 669.268 1688.88 665.704C1684.35 662.792 1681.08 660.696 1673.7 660.696C1666.32 660.696 1663.05 662.801 1658.53 665.704C1652.99 669.268 1646.09 673.7 1633.24 673.7C1620.38 673.7 1613.48 669.268 1607.94 665.704C1603.41 662.792 1600.14 660.696 1592.77 660.696V634.929C1605.63 634.929 1612.53 639.361 1618.07 642.926C1622.59 645.837 1625.87 647.933 1633.24 647.933C1640.61 647.933 1643.89 645.829 1648.4 642.926C1653.94 639.361 1660.84 634.929 1673.7 634.929C1686.56 634.929 1693.45 639.361 1699 642.926C1703.53 645.837 1706.8 647.933 1714.18 647.933C1721.56 647.933 1724.83 645.829 1729.36 642.926C1734.9 639.361 1741.79 634.929 1754.66 634.929V660.696C1747.28 660.696 1744.01 662.801 1739.48 665.704C1733.94 669.268 1727.04 673.7 1714.18 673.7ZM1592.76 696.101H1637.4V720.073H1592.76V696.101ZM1651.39 696.101H1696.03V720.073H1651.39V696.101ZM1710.01 696.101H1754.65V720.073H1710.01V696.101ZM1712.67 579.478L1674 607.555L1635.33 579.478L1592.76 610.665V614.59H1754.65V610.21L1712.67 579.478V579.478Z" fill="white"/>
|
|
16
|
-
<path d="M1419.43 231.652C1419.43 302.152 1291.78 548.849 1291.78 548.849C1291.78 548.849 1164.13 302.152 1164.13 231.652C1164.13 161.161 1221.28 104 1291.78 104C1362.29 104 1419.43 161.161 1419.43 231.652V231.652Z" fill="#FF282E"/>
|
|
17
|
-
<path d="M1368.15 242.294C1368.15 284.467 1333.96 318.651 1291.78 318.651C1249.62 318.651 1215.41 284.475 1215.41 242.294C1215.41 200.113 1249.61 165.928 1291.78 165.928C1333.96 165.928 1368.15 200.113 1368.15 242.294ZM1301.15 795.435C1301.83 796.379 1301.61 797.694 1300.66 798.372L1264.36 824.346C1263.9 824.659 1263.34 824.782 1262.8 824.686C1262.25 824.591 1261.77 824.286 1261.45 823.836C1261.13 823.386 1261 822.829 1261.08 822.283C1261.17 821.737 1261.47 821.247 1261.91 820.919L1298.22 794.945C1298.67 794.622 1299.24 794.493 1299.79 794.584C1300.34 794.676 1300.83 794.982 1301.15 795.435V795.435Z" fill="#00242D"/>
|
|
18
|
-
<path d="M1248.4 817.242C1248.4 817.242 1262.29 806.446 1263.29 805.948C1264.3 805.449 1275.39 802.838 1275.78 802.77C1276.16 802.701 1285.62 800.949 1285.62 800.949C1285.62 800.949 1286.54 804.539 1283.88 806.437C1281.23 808.335 1276.16 809.048 1276.16 809.048L1260.01 820.73L1248.4 817.242Z" fill="#FF7E81"/>
|
|
19
|
-
<path d="M1241.77 820.884C1241.77 820.884 1259.62 811.015 1261.46 810.431C1263.31 809.856 1285.92 808.026 1286.91 807.906C1292.47 807.219 1292.77 812.922 1290.32 814.081C1287.88 815.241 1284.1 815.55 1284.1 815.55C1284.1 815.55 1286.62 820.738 1281.48 821.691C1285.61 827.068 1279.83 829.258 1279.83 829.258C1279.83 829.258 1280.02 832.823 1279.22 833.991C1278.42 835.159 1274 837.934 1272.47 838.535C1270.93 839.136 1245.95 844.161 1245.95 844.161L1221.76 851.436L1218.92 829.422L1241.77 820.884V820.884Z" fill="#FF989B"/>
|
|
20
|
-
<path d="M1124.16 868.082L1233.15 819.252L1252.11 850.268C1252.11 850.268 1170.76 914.188 1129.72 916.164C1088.69 918.156 1037.19 806.137 1124.16 868.082Z" fill="#FFBB46"/>
|
|
21
|
-
<path d="M1132.4 575.802C1149.83 576.884 1171.07 587.251 1167.03 615.758C1164.19 635.728 1157.55 669.818 1144.26 670.188C1138.38 670.351 1118.71 662.02 1118.71 662.02L1114.73 694.298L1078.65 674.036L1095.05 643.725C1095.04 643.716 1074.96 572.246 1132.4 575.802V575.802ZM1163.38 1141.03C1157.65 1113.78 1143.97 945.53 1143.97 945.53C1143.97 945.53 1033.4 889.89 1026.4 931.083C1026.4 931.083 1114.97 1104.18 1120.17 1119.47C1125.38 1134.76 1121.82 1167.24 1142.74 1219.26C1153.19 1245.27 1185.84 1332.17 1185.84 1332.17L1213.11 1344.38C1213.1 1344.38 1167.41 1160.23 1163.38 1141.03Z" fill="#FF989B"/>
|
|
22
|
-
<path d="M1041.08 913.02C1029.36 941.69 1045.31 997.898 1038.42 1049.7C1031.53 1101.48 1031.08 1110.19 999.623 1173.18C989.505 1193.44 966.332 1307.95 966.332 1307.95L983.785 1326.3C983.785 1326.3 1045.4 1169.02 1054.36 1152.67C1067.73 1128.32 1124.78 964.967 1124.78 964.967C1124.78 964.967 1052.8 884.341 1041.08 913.02V913.02Z" fill="#FF989B"/>
|
|
23
|
-
<path d="M1093.44 673.907C1076.14 674.981 1055.47 680.976 1049.01 722.865C1039.95 781.727 997.253 1129.95 997.253 1129.95L1179.67 1150.11C1179.67 1150.11 1161.98 824.544 1135.29 714.139C1127.29 681.036 1108.16 672.997 1093.44 673.907Z" fill="#FFBB46"/>
|
|
24
|
-
<path d="M1101.53 564.344C1034.62 587.363 1023.32 774.898 970.463 787.936C1071 824.062 1110.91 632.456 1110.91 632.456C1112.68 630.025 1105.34 620.096 1112.14 613.388C1117.66 607.934 1124.88 607.891 1126.61 617.364C1126.61 617.364 1148.55 587.595 1162.45 589.33C1159.01 569.738 1119.88 555.651 1101.53 564.344Z" fill="#00242D"/>
|
|
25
|
-
<path d="M1183.79 1331.4C1182.35 1332.32 1186.76 1361.57 1189.76 1362.23C1192.76 1362.89 1264.41 1341.84 1267.28 1336.5C1268.79 1333.69 1263.54 1325 1261.92 1325.05C1232 1325.93 1207.51 1317.65 1207.51 1317.65C1207.51 1317.65 1201.24 1322.37 1203.24 1325.88L1204.58 1327.21C1204.58 1327.21 1201.43 1332.74 1197 1333.66C1192.58 1334.59 1187.45 1329.05 1183.79 1331.4ZM966.057 1299.96C964.374 1299.63 947.401 1323.86 949.119 1326.42C950.837 1328.97 1017.24 1363.13 1023 1361.24C1026.03 1360.25 1028.23 1350.34 1027.01 1349.25C1004.74 1329.25 992.709 1306.37 992.709 1306.37C992.709 1306.37 984.927 1305.47 983.948 1309.38L984 1311.26C984 1311.26 977.91 1313.09 974.062 1310.72C970.214 1308.34 970.326 1300.79 966.057 1299.96V1299.96Z" fill="#006275"/>
|
|
26
|
-
</svg>
|