@tamagui/static 1.135.3 → 1.135.4-1761748186554

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/dist/check-dep-versions.mjs +268 -0
  2. package/dist/check-dep-versions.mjs.map +1 -0
  3. package/dist/checkDeps.mjs +33 -0
  4. package/dist/checkDeps.mjs.map +1 -0
  5. package/dist/constants.mjs +50 -0
  6. package/dist/constants.mjs.map +1 -0
  7. package/dist/exports.mjs +42 -0
  8. package/dist/exports.mjs.map +1 -0
  9. package/dist/extractor/accessSafe.mjs +47 -0
  10. package/dist/extractor/accessSafe.mjs.map +1 -0
  11. package/dist/extractor/babelParse.mjs +55 -0
  12. package/dist/extractor/babelParse.mjs.map +1 -0
  13. package/dist/extractor/bundle.mjs +149 -0
  14. package/dist/extractor/bundle.mjs.map +1 -0
  15. package/dist/extractor/bundleConfig.mjs +331 -0
  16. package/dist/extractor/bundleConfig.mjs.map +1 -0
  17. package/dist/extractor/concatClassName.mjs +79 -0
  18. package/dist/extractor/concatClassName.mjs.map +1 -0
  19. package/dist/extractor/createEvaluator.mjs +76 -0
  20. package/dist/extractor/createEvaluator.mjs.map +1 -0
  21. package/dist/extractor/createExtractor.mjs +976 -0
  22. package/dist/extractor/createExtractor.mjs.map +1 -0
  23. package/dist/extractor/createLogger.mjs +46 -0
  24. package/dist/extractor/createLogger.mjs.map +1 -0
  25. package/dist/extractor/errors.mjs +27 -0
  26. package/dist/extractor/errors.mjs.map +1 -0
  27. package/dist/extractor/esbuildAliasPlugin.mjs +45 -0
  28. package/dist/extractor/esbuildAliasPlugin.mjs.map +1 -0
  29. package/dist/extractor/esbuildTsconfigPaths.mjs +85 -0
  30. package/dist/extractor/esbuildTsconfigPaths.mjs.map +1 -0
  31. package/dist/extractor/evaluateAstNode.mjs +84 -0
  32. package/dist/extractor/evaluateAstNode.mjs.map +1 -0
  33. package/dist/extractor/extractHelpers.mjs +121 -0
  34. package/dist/extractor/extractHelpers.mjs.map +1 -0
  35. package/dist/extractor/extractMediaStyle.mjs +129 -0
  36. package/dist/extractor/extractMediaStyle.mjs.map +1 -0
  37. package/dist/extractor/extractToClassNames.mjs +304 -0
  38. package/dist/extractor/extractToClassNames.mjs.map +1 -0
  39. package/dist/extractor/extractToNative.mjs +262 -0
  40. package/dist/extractor/extractToNative.mjs.map +1 -0
  41. package/dist/extractor/findTopmostFunction.mjs +35 -0
  42. package/dist/extractor/findTopmostFunction.mjs.map +1 -0
  43. package/dist/extractor/{generatedUid.native.js → generatedUid.mjs} +26 -23
  44. package/dist/extractor/generatedUid.mjs.map +1 -0
  45. package/dist/extractor/getPrefixLogs.mjs +30 -0
  46. package/dist/extractor/getPrefixLogs.mjs.map +1 -0
  47. package/dist/extractor/getPropValueFromAttributes.mjs +68 -0
  48. package/dist/extractor/getPropValueFromAttributes.mjs.map +1 -0
  49. package/dist/extractor/getSourceModule.mjs +65 -0
  50. package/dist/extractor/getSourceModule.mjs.map +1 -0
  51. package/dist/extractor/getStaticBindingsForScope.mjs +149 -0
  52. package/dist/extractor/getStaticBindingsForScope.mjs.map +1 -0
  53. package/dist/extractor/getTamaguiConfigPathFromOptionsConfig.mjs +36 -0
  54. package/dist/extractor/getTamaguiConfigPathFromOptionsConfig.mjs.map +1 -0
  55. package/dist/extractor/literalToAst.mjs +85 -0
  56. package/dist/extractor/literalToAst.mjs.map +1 -0
  57. package/dist/extractor/loadFile.mjs +12 -0
  58. package/dist/extractor/loadFile.mjs.map +1 -0
  59. package/dist/extractor/loadTamagui.mjs +296 -0
  60. package/dist/extractor/loadTamagui.mjs.map +1 -0
  61. package/dist/extractor/logLines.mjs +36 -0
  62. package/dist/extractor/logLines.mjs.map +1 -0
  63. package/dist/extractor/{normalizeTernaries.native.js → normalizeTernaries.mjs} +45 -31
  64. package/dist/extractor/normalizeTernaries.mjs.map +1 -0
  65. package/dist/extractor/propsToFontFamilyCache.mjs +39 -0
  66. package/dist/extractor/propsToFontFamilyCache.mjs.map +1 -0
  67. package/dist/extractor/regenerateConfig.mjs +145 -0
  68. package/dist/extractor/regenerateConfig.mjs.map +1 -0
  69. package/dist/extractor/removeUnusedHooks.mjs +77 -0
  70. package/dist/extractor/removeUnusedHooks.mjs.map +1 -0
  71. package/dist/extractor/timer.mjs +44 -0
  72. package/dist/extractor/timer.mjs.map +1 -0
  73. package/dist/extractor/{validHTMLAttributes.native.js → validHTMLAttributes.mjs} +17 -16
  74. package/dist/extractor/validHTMLAttributes.mjs.map +1 -0
  75. package/dist/extractor/watchTamaguiConfig.mjs +59 -0
  76. package/dist/extractor/watchTamaguiConfig.mjs.map +1 -0
  77. package/dist/getPragmaOptions.mjs +55 -0
  78. package/dist/getPragmaOptions.mjs.map +1 -0
  79. package/dist/helpers/memoize.mjs +38 -0
  80. package/dist/helpers/memoize.mjs.map +1 -0
  81. package/dist/helpers/requireTamaguiCore.mjs +34 -0
  82. package/dist/helpers/requireTamaguiCore.mjs.map +1 -0
  83. package/dist/index.mjs +41 -0
  84. package/dist/index.mjs.map +1 -0
  85. package/dist/registerRequire.mjs +107 -0
  86. package/dist/registerRequire.mjs.map +1 -0
  87. package/dist/server.mjs +76 -0
  88. package/dist/server.mjs.map +1 -0
  89. package/dist/setup.mjs +2 -0
  90. package/dist/setup.mjs.map +1 -0
  91. package/dist/{types.native.js → types.mjs} +8 -6
  92. package/dist/types.mjs.map +1 -0
  93. package/package.json +19 -21
  94. package/dist/check-dep-versions.native.js +0 -602
  95. package/dist/check-dep-versions.native.js.map +0 -6
  96. package/dist/checkDeps.native.js +0 -34
  97. package/dist/checkDeps.native.js.map +0 -6
  98. package/dist/constants.native.js +0 -45
  99. package/dist/constants.native.js.map +0 -6
  100. package/dist/exports.native.js +0 -52
  101. package/dist/exports.native.js.map +0 -6
  102. package/dist/extractor/accessSafe.native.js +0 -48
  103. package/dist/extractor/accessSafe.native.js.map +0 -6
  104. package/dist/extractor/babelParse.native.js +0 -62
  105. package/dist/extractor/babelParse.native.js.map +0 -6
  106. package/dist/extractor/bundle.native.js +0 -168
  107. package/dist/extractor/bundle.native.js.map +0 -6
  108. package/dist/extractor/bundleConfig.native.js +0 -394
  109. package/dist/extractor/bundleConfig.native.js.map +0 -6
  110. package/dist/extractor/concatClassName.native.js +0 -69
  111. package/dist/extractor/concatClassName.native.js.map +0 -6
  112. package/dist/extractor/createEvaluator.native.js +0 -63
  113. package/dist/extractor/createEvaluator.native.js.map +0 -6
  114. package/dist/extractor/createExtractor.native.js +0 -1229
  115. package/dist/extractor/createExtractor.native.js.map +0 -6
  116. package/dist/extractor/createLogger.native.js +0 -35
  117. package/dist/extractor/createLogger.native.js.map +0 -6
  118. package/dist/extractor/errors.native.js +0 -119
  119. package/dist/extractor/errors.native.js.map +0 -6
  120. package/dist/extractor/esbuildAliasPlugin.native.js +0 -52
  121. package/dist/extractor/esbuildAliasPlugin.native.js.map +0 -6
  122. package/dist/extractor/esbuildTsconfigPaths.native.js +0 -79
  123. package/dist/extractor/esbuildTsconfigPaths.native.js.map +0 -6
  124. package/dist/extractor/evaluateAstNode.native.js +0 -98
  125. package/dist/extractor/evaluateAstNode.native.js.map +0 -6
  126. package/dist/extractor/extractHelpers.native.js +0 -183
  127. package/dist/extractor/extractHelpers.native.js.map +0 -6
  128. package/dist/extractor/extractMediaStyle.native.js +0 -138
  129. package/dist/extractor/extractMediaStyle.native.js.map +0 -6
  130. package/dist/extractor/extractToClassNames.native.js +0 -332
  131. package/dist/extractor/extractToClassNames.native.js.map +0 -6
  132. package/dist/extractor/extractToNative.native.js +0 -276
  133. package/dist/extractor/extractToNative.native.js.map +0 -6
  134. package/dist/extractor/findTopmostFunction.native.js +0 -37
  135. package/dist/extractor/findTopmostFunction.native.js.map +0 -6
  136. package/dist/extractor/generatedUid.native.js.map +0 -6
  137. package/dist/extractor/getPrefixLogs.native.js +0 -30
  138. package/dist/extractor/getPrefixLogs.native.js.map +0 -6
  139. package/dist/extractor/getPropValueFromAttributes.native.js +0 -68
  140. package/dist/extractor/getPropValueFromAttributes.native.js.map +0 -6
  141. package/dist/extractor/getSourceModule.native.js +0 -80
  142. package/dist/extractor/getSourceModule.native.js.map +0 -6
  143. package/dist/extractor/getStaticBindingsForScope.native.js +0 -183
  144. package/dist/extractor/getStaticBindingsForScope.native.js.map +0 -6
  145. package/dist/extractor/getTamaguiConfigPathFromOptionsConfig.native.js +0 -37
  146. package/dist/extractor/getTamaguiConfigPathFromOptionsConfig.native.js.map +0 -6
  147. package/dist/extractor/literalToAst.native.js +0 -106
  148. package/dist/extractor/literalToAst.native.js.map +0 -6
  149. package/dist/extractor/loadFile.native.js +0 -21
  150. package/dist/extractor/loadFile.native.js.map +0 -6
  151. package/dist/extractor/loadTamagui.native.js +0 -314
  152. package/dist/extractor/loadTamagui.native.js.map +0 -6
  153. package/dist/extractor/logLines.native.js +0 -53
  154. package/dist/extractor/logLines.native.js.map +0 -6
  155. package/dist/extractor/normalizeTernaries.native.js.map +0 -6
  156. package/dist/extractor/propsToFontFamilyCache.native.js +0 -40
  157. package/dist/extractor/propsToFontFamilyCache.native.js.map +0 -6
  158. package/dist/extractor/regenerateConfig.native.js +0 -148
  159. package/dist/extractor/regenerateConfig.native.js.map +0 -6
  160. package/dist/extractor/removeUnusedHooks.native.js +0 -111
  161. package/dist/extractor/removeUnusedHooks.native.js.map +0 -6
  162. package/dist/extractor/timer.native.js +0 -44
  163. package/dist/extractor/timer.native.js.map +0 -6
  164. package/dist/extractor/validHTMLAttributes.native.js.map +0 -6
  165. package/dist/extractor/watchTamaguiConfig.native.js +0 -60
  166. package/dist/extractor/watchTamaguiConfig.native.js.map +0 -6
  167. package/dist/getPragmaOptions.native.js +0 -62
  168. package/dist/getPragmaOptions.native.js.map +0 -6
  169. package/dist/helpers/memoize.native.js +0 -40
  170. package/dist/helpers/memoize.native.js.map +0 -6
  171. package/dist/helpers/requireTamaguiCore.native.js +0 -34
  172. package/dist/helpers/requireTamaguiCore.native.js.map +0 -6
  173. package/dist/index.native.js +0 -35
  174. package/dist/index.native.js.map +0 -6
  175. package/dist/registerRequire.native.js +0 -124
  176. package/dist/registerRequire.native.js.map +0 -6
  177. package/dist/server.native.js +0 -70
  178. package/dist/server.native.js.map +0 -6
  179. package/dist/setup.native.js +0 -2
  180. package/dist/setup.native.js.map +0 -6
  181. package/dist/types.native.js.map +0 -6
@@ -1,314 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: !0 });
10
- }, __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from == "object" || typeof from == "function")
12
- for (let key of __getOwnPropNames(from))
13
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- return to;
15
- };
16
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
- // If the importer is in node compatibility mode or this is not an ESM
18
- // file that has been converted to a CommonJS file using a Babel-
19
- // compatible transform (i.e. "__esModule" has not been set), then set
20
- // "default" to the CommonJS "module.exports" for node compatibility.
21
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
22
- mod
23
- )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
24
- var loadTamagui_exports = {};
25
- __export(loadTamagui_exports, {
26
- esbuildWatchFiles: () => esbuildWatchFiles,
27
- generateThemesAndLog: () => generateThemesAndLog,
28
- getOptions: () => getOptions,
29
- loadTamagui: () => loadTamagui,
30
- loadTamaguiBuildConfigSync: () => loadTamaguiBuildConfigSync,
31
- loadTamaguiSync: () => loadTamaguiSync,
32
- resolveWebOrNativeSpecificEntry: () => resolveWebOrNativeSpecificEntry
33
- });
34
- module.exports = __toCommonJS(loadTamagui_exports);
35
- var import_node_path = require("node:path"), import_cli_color = require("@tamagui/cli-color"), import_esbuild = __toESM(require("esbuild")), fsExtra = __toESM(require("fs-extra")), import_constants = require("../constants"), import_requireTamaguiCore = require("../helpers/requireTamaguiCore"), import_registerRequire = require("../registerRequire"), import_bundleConfig = require("./bundleConfig"), import_getTamaguiConfigPathFromOptionsConfig = require("./getTamaguiConfigPathFromOptionsConfig"), import_regenerateConfig = require("./regenerateConfig"), getFilledOptions = function(propsIn) {
36
- return {
37
- // defaults
38
- platform: "native",
39
- config: "tamagui.config.ts",
40
- components: [
41
- "tamagui"
42
- ],
43
- ...propsIn
44
- };
45
- }, isLoadingPromise;
46
- async function loadTamagui(propsIn) {
47
- if (isLoadingPromise) return await isLoadingPromise;
48
- var resolvePromise, rejectPromise;
49
- isLoadingPromise = new Promise(function(res, rej) {
50
- resolvePromise = res, rejectPromise = rej;
51
- });
52
- try {
53
- var props = getFilledOptions(propsIn), bundleInfo = await (0, import_bundleConfig.getBundledConfig)(props);
54
- if (!bundleInfo)
55
- return console.warn("No bundled config generated, maybe an error in bundling. Set DEBUG=tamagui and re-run to get logs."), resolvePromise(null), null;
56
- await generateThemesAndLog(props);
57
- var maybeTamaguiConfig = bundleInfo.tamaguiConfig;
58
- if (maybeTamaguiConfig && !maybeTamaguiConfig.parsed) {
59
- var { createTamagui } = (0, import_requireTamaguiCore.requireTamaguiCore)(props.platform || "web");
60
- bundleInfo.tamaguiConfig = createTamagui(bundleInfo.tamaguiConfig);
61
- }
62
- return (0, import_bundleConfig.hasBundledConfigChanged)() ? (process.env.NODE_ENV === "development" && await (0, import_regenerateConfig.regenerateConfig)(props, bundleInfo), resolvePromise(bundleInfo), bundleInfo) : (resolvePromise(bundleInfo), bundleInfo);
63
- } catch (err) {
64
- throw rejectPromise(), err;
65
- } finally {
66
- isLoadingPromise = null;
67
- }
68
- }
69
- var waiting = !1, generateThemesAndLog = async function(options) {
70
- var force = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
71
- if (!waiting && options.themeBuilder)
72
- try {
73
- waiting = !0, await new Promise(function(res) {
74
- return setTimeout(res, 30);
75
- });
76
- var didGenerate = await (0, import_regenerateConfig.generateTamaguiThemes)(options, force);
77
- if (didGenerate) {
78
- var whitespaceBefore = " ";
79
- if ((0, import_cli_color.colorLog)(import_cli_color.Color.FgYellow, `${whitespaceBefore}\u27A1 [tamagui] generated themes: ${(0, import_node_path.relative)(process.cwd(), options.themeBuilder.output)}`), options.outputCSS) {
80
- var loadedConfig = (0, import_bundleConfig.getLoadedConfig)();
81
- loadedConfig && await (0, import_bundleConfig.writeTamaguiCSS)(options.outputCSS, loadedConfig);
82
- }
83
- }
84
- } finally {
85
- waiting = !1;
86
- }
87
- }, last = {}, lastVersion = {};
88
- function loadTamaguiBuildConfigSync(tamaguiOptions) {
89
- var _tamaguiOptions_buildFile, buildFilePath = (_tamaguiOptions_buildFile = tamaguiOptions == null ? void 0 : tamaguiOptions.buildFile) !== null && _tamaguiOptions_buildFile !== void 0 ? _tamaguiOptions_buildFile : "tamagui.build.ts";
90
- if (fsExtra.existsSync(buildFilePath)) {
91
- var registered = (0, import_registerRequire.registerRequire)("web");
92
- try {
93
- var out = require(buildFilePath).default;
94
- if (!out)
95
- throw new Error(`No default export found in ${buildFilePath}: ${out}`);
96
- if (tamaguiOptions != null && tamaguiOptions.config && out.config)
97
- throw new Error("You're configuring tamagui from both the plugin and tamagui.build.ts, please choose one or the other.");
98
- tamaguiOptions = {
99
- ...tamaguiOptions,
100
- ...out
101
- };
102
- } finally {
103
- registered.unregister();
104
- }
105
- }
106
- if (!tamaguiOptions)
107
- throw new Error("No tamagui build options found either via input props or at tamagui.build.ts");
108
- return {
109
- config: "tamagui.config.ts",
110
- components: [
111
- "tamagui",
112
- "@tamagui/core"
113
- ],
114
- ...tamaguiOptions
115
- };
116
- }
117
- function loadTamaguiSync(param) {
118
- var { forceExports, cacheKey, ...propsIn } = param, key = JSON.stringify(propsIn);
119
- if (last[key] && !(0, import_bundleConfig.hasBundledConfigChanged)() && (!lastVersion[key] || lastVersion[key] === cacheKey))
120
- return last[key];
121
- lastVersion[key] = cacheKey || "";
122
- var props = getFilledOptions(propsIn);
123
- process.env.IS_STATIC = "is_static", process.env.TAMAGUI_IS_SERVER = "true";
124
- var { unregister } = (0, import_registerRequire.registerRequire)(props.platform || "web", {
125
- proxyWormImports: !!forceExports
126
- });
127
- try {
128
- var devValueOG = globalThis.__DEV__;
129
- globalThis.__DEV__ = process.env.NODE_ENV === "development";
130
- try {
131
- var tamaguiConfig = null;
132
- if (propsIn.config) {
133
- var configPath = (0, import_getTamaguiConfigPathFromOptionsConfig.getTamaguiConfigPathFromOptionsConfig)(propsIn.config), exp = require(configPath);
134
- if (!exp || exp._isProxyWorm)
135
- throw new Error("Got a empty / proxied config!");
136
- if (tamaguiConfig = exp.default || exp.config || exp, !tamaguiConfig || !tamaguiConfig.parsed) {
137
- var confPath = require.resolve(configPath);
138
- throw new Error(`Can't find valid config in ${confPath}:
139
-
140
- Be sure you "export default" or "export const config" the config.`);
141
- }
142
- if (tamaguiConfig) {
143
- var { createTamagui } = (0, import_requireTamaguiCore.requireTamaguiCore)(props.platform || "web");
144
- createTamagui(tamaguiConfig);
145
- }
146
- }
147
- var components = (0, import_bundleConfig.loadComponents)(props, forceExports);
148
- if (!components)
149
- throw new Error("No components loaded");
150
- process.env.DEBUG === "tamagui" && console.info("components", components), process.env.IS_STATIC = void 0, globalThis.__DEV__ = devValueOG;
151
- var info = {
152
- components,
153
- tamaguiConfig,
154
- nameToPaths: (0, import_registerRequire.getNameToPaths)()
155
- };
156
- if (tamaguiConfig) {
157
- var { outputCSS } = props;
158
- outputCSS && (0, import_bundleConfig.writeTamaguiCSS)(outputCSS, tamaguiConfig), (0, import_regenerateConfig.regenerateConfigSync)(props, info);
159
- }
160
- return last[key] = {
161
- ...info,
162
- cached: !0
163
- }, info;
164
- } catch (err) {
165
- err instanceof Error ? !import_constants.SHOULD_DEBUG && !forceExports ? (console.warn("Error loading tamagui.config.ts (set DEBUG=tamagui to see full stack), running tamagui without custom config"), console.info(`
166
-
167
- ${err.message}
168
-
169
- `)) : import_constants.SHOULD_DEBUG && console.error(err) : console.error("Error loading tamagui.config.ts", err);
170
- var { createTamagui: createTamagui1 } = (0, import_requireTamaguiCore.requireTamaguiCore)(props.platform || "web"), { getDefaultTamaguiConfig } = require("@tamagui/config-default");
171
- return {
172
- components: [],
173
- tamaguiConfig: createTamagui1(getDefaultTamaguiConfig()),
174
- nameToPaths: {}
175
- };
176
- }
177
- } finally {
178
- unregister();
179
- }
180
- }
181
- async function getOptions() {
182
- var { root = process.cwd(), tsconfigPath = "tsconfig.json", tamaguiOptions, host, debug } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, dotDir = (0, import_node_path.join)(root, ".tamagui"), pkgJson = {};
183
- try {
184
- pkgJson = await fsExtra.readJSON((0, import_node_path.join)(root, "package.json"));
185
- } catch {
186
- }
187
- var _tamaguiOptions_config;
188
- return {
189
- mode: process.env.NODE_ENV === "production" ? "production" : "development",
190
- root,
191
- host: host || "127.0.0.1",
192
- pkgJson,
193
- debug,
194
- tsconfigPath,
195
- tamaguiOptions: {
196
- platform: "native",
197
- components: [
198
- "tamagui"
199
- ],
200
- ...tamaguiOptions,
201
- config: (_tamaguiOptions_config = tamaguiOptions == null ? void 0 : tamaguiOptions.config) !== null && _tamaguiOptions_config !== void 0 ? _tamaguiOptions_config : await getDefaultTamaguiConfigPath(root, tamaguiOptions == null ? void 0 : tamaguiOptions.config)
202
- },
203
- paths: {
204
- root,
205
- dotDir,
206
- conf: (0, import_node_path.join)(dotDir, "tamagui.config.json"),
207
- types: (0, import_node_path.join)(dotDir, "types.json")
208
- }
209
- };
210
- }
211
- function resolveWebOrNativeSpecificEntry(entry) {
212
- var workspaceRoot = (0, import_node_path.resolve)(), resolved = require.resolve(entry, {
213
- paths: [
214
- workspaceRoot
215
- ]
216
- }), ext = (0, import_node_path.extname)(resolved), fileName = (0, import_node_path.basename)(resolved).replace(ext, ""), specificExt = "native", specificFile = (0, import_node_path.join)((0, import_node_path.dirname)(resolved), fileName + "." + specificExt + ext);
217
- return fsExtra.existsSync(specificFile) ? specificFile : entry;
218
- }
219
- var defaultPaths = [
220
- "tamagui.config.ts",
221
- (0, import_node_path.join)("src", "tamagui.config.ts")
222
- ], hasWarnedOnce = !1;
223
- async function getDefaultTamaguiConfigPath(root, configPath) {
224
- var searchPaths = [
225
- ...new Set([
226
- configPath,
227
- ...defaultPaths
228
- ].filter(Boolean).map(function(p) {
229
- return (0, import_node_path.join)(root, p);
230
- }))
231
- ], _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
232
- try {
233
- for (var _iterator = searchPaths[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
234
- var path = _step.value;
235
- if (await fsExtra.pathExists(path))
236
- return path;
237
- }
238
- } catch (err) {
239
- _didIteratorError = !0, _iteratorError = err;
240
- } finally {
241
- try {
242
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
243
- } finally {
244
- if (_didIteratorError)
245
- throw _iteratorError;
246
- }
247
- }
248
- hasWarnedOnce || (hasWarnedOnce = !0, console.warn(`Warning: couldn't find tamagui.config.ts in the following paths given configuration "${configPath}":
249
- ${searchPaths.join(`
250
- `)}
251
- `));
252
- }
253
- async function esbuildWatchFiles(entry, onChanged) {
254
- var hasRunOnce = !1, context = await import_esbuild.default.context({
255
- bundle: !0,
256
- entryPoints: [
257
- entry
258
- ],
259
- resolveExtensions: [
260
- ".ts",
261
- ".tsx",
262
- ".js",
263
- ".mjs"
264
- ],
265
- logLevel: "silent",
266
- write: !1,
267
- alias: {
268
- "@react-native/normalize-color": "@tamagui/proxy-worm",
269
- "react-native-web": "@tamagui/react-native-web-lite",
270
- "react-native": "@tamagui/proxy-worm"
271
- },
272
- plugins: [
273
- // to log what its watching:
274
- // {
275
- // name: 'test',
276
- // setup({ onResolve }) {
277
- // onResolve({ filter: /.*/ }, (args) => {
278
- // console.log('wtf', args.path)
279
- // })
280
- // },
281
- // },
282
- {
283
- name: "on-rebuild",
284
- setup(param) {
285
- var { onEnd, onResolve } = param, filter = /^[^.\/]|^\.[^.\/]|^\.\.[^\/]/;
286
- onResolve({
287
- filter
288
- }, function(args) {
289
- return {
290
- path: args.path,
291
- external: !0
292
- };
293
- }), onEnd(function() {
294
- hasRunOnce ? onChanged() : hasRunOnce = !0;
295
- });
296
- }
297
- }
298
- ]
299
- });
300
- return context.watch(), function() {
301
- context.dispose();
302
- };
303
- }
304
- // Annotate the CommonJS export names for ESM import in node:
305
- 0 && (module.exports = {
306
- esbuildWatchFiles,
307
- generateThemesAndLog,
308
- getOptions,
309
- loadTamagui,
310
- loadTamaguiBuildConfigSync,
311
- loadTamaguiSync,
312
- resolveWebOrNativeSpecificEntry
313
- });
314
- //# sourceMappingURL=loadTamagui.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/extractor/loadTamagui.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAoE,sBAEpE,mBAAgC,+BAChC,iBAAoB,6BACpB,UAAyB,8BACzB,mBAA6B,yBAC7B,4BAAmC,0CACnC,yBAAgD,+BAChD,sBAA4G,2BAC5G,+CAAsD,oDACtD,0BAA8E,+BAC1E,mBAAmB,SAAS,SAAS;AACrC,SAAO;AAAA;AAAA,IAEH,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,YAAY;AAAA,MACR;AAAA,IACJ;AAAA,IACA,GAAG;AAAA,EACP;AACJ,GACI;AACJ,eAAsB,YAAY,SAAS;AACvC,MAAI,iBAAkB,QAAO,MAAM;AACnC,MAAI,gBACA;AACJ,qBAAmB,IAAI,QAAQ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QAAQ,QAAQ;AAAA,IAClC,QAAQ;AAAA,IACR,aAAa;AAAA,MACT;AAAA,IACJ;AAAA,IACA,mBAAmB;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,IACA,UAAU;AAAA,IACV,OAAO;AAAA,IACP,OAAO;AAAA,MACH,iCAAiC;AAAA,MACjC,oBAAoB;AAAA,MACpB,gBAAgB;AAAA,IACpB;AAAA,IACA,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAUL;AAAA,QACI,MAAM;AAAA,QACN,MAAO,OAAO;AACV,cAAI,EAAE,OAAO,UAAU,IAAI,OAEvB,SAAS;AAEb,oBAAU;AAAA,YACN;AAAA,UACJ,GAAG,SAAS,MAAM;AACd,mBAAO;AAAA,cACH,MAAM,KAAK;AAAA,cACX,UAAU;AAAA,YACd;AAAA,UACJ,CAAC,GACD,MAAM,WAAW;AACb,YAAK,aAGD,UAAU,IAFV,aAAa;AAAA,UAIrB,CAAC;AAAA,QACL;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ,CAAC;AAED,SAAK,QAAQ,MAAM,GACZ,WAAW;AACd,YAAQ,QAAQ;AAAA,EACpB;AACJ;",
5
- "names": ["esbuild"]
6
- }
@@ -1,53 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: !0 });
9
- }, __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from == "object" || typeof from == "function")
11
- for (let key of __getOwnPropNames(from))
12
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- return to;
14
- };
15
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
16
- var logLines_exports = {};
17
- __export(logLines_exports, {
18
- logLines: () => logLines
19
- });
20
- module.exports = __toCommonJS(logLines_exports);
21
- var prefix = " ", logLines = function(str) {
22
- var singleLine = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
23
- if (singleLine)
24
- return prefix + str.split(" ").join(`
25
- ${prefix}`);
26
- var lines = [
27
- ""
28
- ], items = str.split(" "), _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
29
- try {
30
- for (var _iterator = items[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
31
- var item = _step.value;
32
- item.length + lines[lines.length - 1].length > 85 && lines.push(""), lines[lines.length - 1] += item + " ";
33
- }
34
- } catch (err) {
35
- _didIteratorError = !0, _iteratorError = err;
36
- } finally {
37
- try {
38
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
39
- } finally {
40
- if (_didIteratorError)
41
- throw _iteratorError;
42
- }
43
- }
44
- return lines.map(function(line, i) {
45
- return prefix + (i == 0 ? "" : " ") + line.trim();
46
- }).join(`
47
- `);
48
- };
49
- // Annotate the CommonJS export names for ESM import in node:
50
- 0 && (module.exports = {
51
- logLines
52
- });
53
- //# sourceMappingURL=logLines.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/extractor/logLines.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAI,SAAS,eACF,WAAW,SAAS,KAAK;AAChC,MAAI,aAAa,UAAU,SAAS,KAAK,UAAU,CAAC,MAAM,SAAS,UAAU,CAAC,IAAI;AAClF,MAAI;AACA,WAAO,SAAS,IAAI,MAAM,GAAG,EAAE,KAAK;AAAA,EAAK,MAAM,EAAE;AAErD,MAAI,QAAQ;AAAA,IACR;AAAA,EACJ,GACI,QAAQ,IAAI,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,EAAE,sBAAsB,IAAI,MAC5B,cAAc,KAAK;AAGvB,QAAI,aAAa;AACjB,IAAI,EAAE,kBAAkB,IAAI,KAAK,KAAK,aAAa,OAC/C,cAAc,KAAK,UACnB,aAAa,MACN,EAAE,mBAAmB,IAAI,MAC5B,KAAK,aAAa,SAAS,KAAK,aAAa,UAC7C,cAAc,EAAE,iBAAiB,KAAK,SAAS,QAAQ,KAAK,GAAG,GAAG,KAAK,MAAM,KAAK,KAAK,GACvF,aAAa;AAIrB,QAAI,UAAM,iBAAAC,SAAS,WAAW,EAAE;AAChC,IAAK,eAAe,GAAG,MACnB,eAAe,GAAG,IAAI;AAAA,MAClB,GAAG;AAAA,MACH,WAAW,CAAC;AAAA,MACZ,YAAY,CAAC;AAAA,MACb,MAAM;AAAA,MACN;AAAA,IACJ;AAEJ,QAAI,MACA,YAAY,OAAO,aAAa,aAAa,eAAe,QAAQ,SAAS,SAAS,OAAO,CAAC,GAC9F,OACA,aAAa,QAAQ,aAAa,YAAY,gBAAgB,QAAQ,UAAU,SAAS,QAAQ,CAAC,GAClG,UAAU,eAAe,GAAG,EAAE;AAClC,mBAAe,GAAG,EAAE,gBAAY,uBAAW,UAAU,OAAO,OAC5D,qDAAsB,UAAU,eAAe,GAAG,EAAE,SAAS;AAC7D,QAAI,WAAW,eAAe,GAAG,EAAE;AACnC,mBAAe,GAAG,EAAE,iBAAa,uBAAW,WAAW,QAAQ,OAC/D,qDAAsB,WAAW,eAAe,GAAG,EAAE,UAAU;AAAA,EACnE;AACA,MAAI,oBAAoB,OAAO,KAAK,cAAc,EAAE,IAAI,SAASC,MAAK;AAClE,WAAO,eAAeA,IAAG;AAAA,EAC7B,CAAC;AACD,SAAO;AACX;",
5
- "names": ["invariant", "generate", "key"]
6
- }
@@ -1,40 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: !0 });
9
- }, __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from == "object" || typeof from == "function")
11
- for (let key of __getOwnPropNames(from))
12
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- return to;
14
- };
15
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
16
- var propsToFontFamilyCache_exports = {};
17
- __export(propsToFontFamilyCache_exports, {
18
- forwardFontFamilyName: () => forwardFontFamilyName,
19
- getFontFamilyNameFromProps: () => getFontFamilyNameFromProps,
20
- setPropsToFontFamily: () => setPropsToFontFamily
21
- });
22
- module.exports = __toCommonJS(propsToFontFamilyCache_exports);
23
- var cache = /* @__PURE__ */ new WeakMap();
24
- function setPropsToFontFamily(props, ff) {
25
- cache.set(props, ff.replace("$", "").trim());
26
- }
27
- function getFontFamilyNameFromProps(props) {
28
- return cache.get(props);
29
- }
30
- function forwardFontFamilyName(prev, next, fallback) {
31
- var ff = getFontFamilyNameFromProps(prev) || fallback;
32
- ff && setPropsToFontFamily(next, ff);
33
- }
34
- // Annotate the CommonJS export names for ESM import in node:
35
- 0 && (module.exports = {
36
- forwardFontFamilyName,
37
- getFontFamilyNameFromProps,
38
- setPropsToFontFamily
39
- });
40
- //# sourceMappingURL=propsToFontFamilyCache.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/extractor/propsToFontFamilyCache.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,IAAI,QAAQ,oBAAI,QAAQ;AACjB,SAAS,qBAAqB,OAAO,IAAI;AAC5C,QAAM,IAAI,OAAO,GAAG,QAAQ,KAAK,EAAE,EAAE,KAAK,CAAC;AAC/C;AACO,SAAS,2BAA2B,OAAO;AAC9C,SAAO,MAAM,IAAI,KAAK;AAC1B;AACO,SAAS,sBAAsB,MAAM,MAAM,UAAU;AACxD,MAAI,KAAK,2BAA2B,IAAI,KAAK;AAC7C,EAAI,MACA,qBAAqB,MAAM,EAAE;AAErC;",
5
- "names": []
6
- }
@@ -1,148 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: !0 });
10
- }, __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from == "object" || typeof from == "function")
12
- for (let key of __getOwnPropNames(from))
13
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- return to;
15
- };
16
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
- // If the importer is in node compatibility mode or this is not an ESM
18
- // file that has been converted to a CommonJS file using a Babel-
19
- // compatible transform (i.e. "__esModule" has not been set), then set
20
- // "default" to the CommonJS "module.exports" for node compatibility.
21
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
22
- mod
23
- )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
24
- var regenerateConfig_exports = {};
25
- __export(regenerateConfig_exports, {
26
- generateTamaguiThemes: () => generateTamaguiThemes,
27
- regenerateConfig: () => regenerateConfig,
28
- regenerateConfigSync: () => regenerateConfigSync
29
- });
30
- module.exports = __toCommonJS(regenerateConfig_exports);
31
- var import_node_path = require("node:path"), import_generate_themes = require("@tamagui/generate-themes"), FS = __toESM(require("fs-extra")), import_requireTamaguiCore = require("../helpers/requireTamaguiCore"), import_bundleConfig = require("./bundleConfig"), tamaguiDir = (0, import_node_path.join)(process.cwd(), ".tamagui"), confFile = (0, import_node_path.join)(tamaguiDir, "tamagui.config.json");
32
- async function regenerateConfig(tamaguiOptions, configIn) {
33
- var rebuild = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
34
- try {
35
- var config = configIn ?? await (0, import_bundleConfig.getBundledConfig)(tamaguiOptions, rebuild);
36
- if (!config) return;
37
- var out = transformConfig(config, tamaguiOptions.platform || "web");
38
- await FS.ensureDir((0, import_node_path.dirname)(confFile)), await FS.writeJSON(confFile, out, {
39
- spaces: 2
40
- });
41
- } catch (err) {
42
- var _process_env_DEBUG;
43
- (!((_process_env_DEBUG = process.env.DEBUG) === null || _process_env_DEBUG === void 0) && _process_env_DEBUG.includes("tamagui") || process.env.IS_TAMAGUI_DEV) && console.warn("regenerateConfig error", err);
44
- }
45
- }
46
- function regenerateConfigSync(_tamaguiOptions, config) {
47
- try {
48
- FS.ensureDirSync((0, import_node_path.dirname)(confFile)), FS.writeJSONSync(confFile, transformConfig(config, _tamaguiOptions.platform || "web"), {
49
- spaces: 2
50
- });
51
- } catch (err) {
52
- var _process_env_DEBUG;
53
- (!((_process_env_DEBUG = process.env.DEBUG) === null || _process_env_DEBUG === void 0) && _process_env_DEBUG.includes("tamagui") || process.env.IS_TAMAGUI_DEV) && console.warn("regenerateConfig error", err);
54
- }
55
- }
56
- async function generateTamaguiThemes(tamaguiOptions) {
57
- var force = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
58
- if (tamaguiOptions.themeBuilder) {
59
- var { input, output } = tamaguiOptions.themeBuilder, inPath = resolveRelativePath(input), outPath = resolveRelativePath(output), generatedOutput = await (0, import_generate_themes.generateThemes)(inPath), hasChanged = force || await async function() {
60
- try {
61
- if (!generatedOutput) return !1;
62
- var next = generatedOutput.generated, current = await FS.readFile(outPath, "utf-8");
63
- return next !== current;
64
- } catch {
65
- }
66
- return !0;
67
- }();
68
- return hasChanged && await (0, import_generate_themes.writeGeneratedThemes)(tamaguiDir, outPath, generatedOutput), hasChanged;
69
- }
70
- }
71
- var resolveRelativePath = function(inputPath) {
72
- return inputPath.startsWith(".") ? (0, import_node_path.join)(process.cwd(), inputPath) : require.resolve(inputPath);
73
- };
74
- function cloneDeepSafe(x) {
75
- var excludeKeys = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
76
- return x && (Array.isArray(x) ? x.map(function(_) {
77
- return cloneDeepSafe(_);
78
- }) : typeof x == "function" ? "Function" : typeof x != "object" ? x : "$$typeof" in x ? "Component" : Object.fromEntries(Object.entries(x).flatMap(function(param) {
79
- var [k, v] = param;
80
- return excludeKeys[k] ? [] : [
81
- [
82
- k,
83
- cloneDeepSafe(v)
84
- ]
85
- ];
86
- })));
87
- }
88
- function transformConfig(config, platform) {
89
- if (!config)
90
- return null;
91
- var { getVariableValue } = (0, import_requireTamaguiCore.requireTamaguiCore)(platform), next = cloneDeepSafe(config, {
92
- validStyles: !0
93
- }), { components, nameToPaths, tamaguiConfig } = next, { themes, tokens } = tamaguiConfig;
94
- for (var key in themes) {
95
- var theme = themes[key];
96
- theme.id = key;
97
- for (var tkey in theme)
98
- theme[tkey] = getVariableValue(theme[tkey]);
99
- }
100
- for (var key1 in tokens) {
101
- var token = {
102
- ...tokens[key1]
103
- };
104
- for (var tkey1 in token)
105
- token[tkey1] = getVariableValue(token[tkey1]);
106
- }
107
- var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
108
- try {
109
- for (var _iterator = components[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
110
- var component = _step.value;
111
- for (var _ in component.nameToInfo) {
112
- var compDefinition = {
113
- ...component.nameToInfo[_]
114
- };
115
- component.nameToInfo[_] = compDefinition;
116
- var { parentStaticConfig, ...rest } = compDefinition.staticConfig;
117
- compDefinition.staticConfig = rest;
118
- }
119
- }
120
- } catch (err) {
121
- _didIteratorError = !0, _iteratorError = err;
122
- } finally {
123
- try {
124
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
125
- } finally {
126
- if (_didIteratorError)
127
- throw _iteratorError;
128
- }
129
- }
130
- next.nameToPaths = {};
131
- for (var key2 in nameToPaths)
132
- next.nameToPaths[key2] = [
133
- ...nameToPaths[key2]
134
- ];
135
- var { fontsParsed, getCSS, tokensParsed, themeConfig, ...cleanedConfig } = next.tamaguiConfig;
136
- return {
137
- components,
138
- nameToPaths,
139
- tamaguiConfig: cleanedConfig
140
- };
141
- }
142
- // Annotate the CommonJS export names for ESM import in node:
143
- 0 && (module.exports = {
144
- generateTamaguiThemes,
145
- regenerateConfig,
146
- regenerateConfigSync
147
- });
148
- //# sourceMappingURL=regenerateConfig.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/extractor/regenerateConfig.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAA8B,sBAC9B,yBAAqD,qCACrD,KAAoB,8BACpB,4BAAmC,0CACnC,sBAAiC,2BAC7B,iBAAa,uBAAK,QAAQ,IAAI,GAAG,UAAU,GAC3C,eAAW,uBAAK,YAAY,qBAAqB;AAGjD,eAAsB,iBAAiB,gBAAgB,UAAU;AACjE,MAAI,UAAU,UAAU,SAAS,KAAK,UAAU,CAAC,MAAM,SAAS,UAAU,CAAC,IAAI;AAC/E,MAAI;AAGA,QAAI,SAAS,YAAsD,UAAM,sCAAiB,gBAAgB,OAAO;AACjH,QAAI,CAAC,OAAQ;AACb,QAAI,MAAM,gBAAgB,QAAQ,eAAe,YAAY,KAAK;AAClE,UAAM,GAAG,cAAU,0BAAQ,QAAQ,CAAC,GACpC,MAAM,GAAG,UAAU,UAAU,KAAK;AAAA,MAC9B,QAAQ;AAAA,IACZ,CAAC;AAAA,EACL,SAAS,KAAK;AACV,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