@discomedia/utils 1.0.5 → 1.0.7

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 (87) hide show
  1. package/README.md +95 -3
  2. package/dist/index-frontend.cjs +16027 -0
  3. package/dist/index-frontend.cjs.map +1 -0
  4. package/dist/index-frontend.mjs +16023 -0
  5. package/dist/index-frontend.mjs.map +1 -0
  6. package/dist/index.cjs +1188 -921
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.mjs +1190 -921
  9. package/dist/index.mjs.map +1 -1
  10. package/dist/package.json +8 -2
  11. package/dist/test.js +835 -731
  12. package/dist/test.js.map +1 -1
  13. package/dist/types/alpaca-market-data-api.d.ts +3 -15
  14. package/dist/types/alpaca-market-data-api.d.ts.map +1 -1
  15. package/dist/types/alpaca-trading-api.d.ts +3 -6
  16. package/dist/types/alpaca-trading-api.d.ts.map +1 -1
  17. package/dist/types/index-frontend.d.ts +15 -0
  18. package/dist/types/index-frontend.d.ts.map +1 -0
  19. package/dist/types/index.d.ts +3 -28
  20. package/dist/types/index.d.ts.map +1 -1
  21. package/dist/types/market-time.d.ts +187 -117
  22. package/dist/types/market-time.d.ts.map +1 -1
  23. package/dist/types/old-test.d.ts +2 -0
  24. package/dist/types/old-test.d.ts.map +1 -0
  25. package/dist/types/testing/market-time-refactor-test.d.ts +1 -0
  26. package/dist/types/testing/market-time-refactor-test.d.ts.map +1 -0
  27. package/dist/types-frontend/alpaca-market-data-api.d.ts +372 -0
  28. package/dist/types-frontend/alpaca-market-data-api.d.ts.map +1 -0
  29. package/dist/types-frontend/alpaca-trading-api.d.ts +315 -0
  30. package/dist/types-frontend/alpaca-trading-api.d.ts.map +1 -0
  31. package/dist/types-frontend/format-tools.d.ts +46 -0
  32. package/dist/types-frontend/format-tools.d.ts.map +1 -0
  33. package/dist/types-frontend/index-frontend.d.ts +15 -0
  34. package/dist/types-frontend/index-frontend.d.ts.map +1 -0
  35. package/dist/types-frontend/index.d.ts +125 -0
  36. package/dist/types-frontend/index.d.ts.map +1 -0
  37. package/dist/types-frontend/json-tools.d.ts +33 -0
  38. package/dist/types-frontend/json-tools.d.ts.map +1 -0
  39. package/dist/types-frontend/llm-config.d.ts +36 -0
  40. package/dist/types-frontend/llm-config.d.ts.map +1 -0
  41. package/dist/types-frontend/llm-deepseek.d.ts +12 -0
  42. package/dist/types-frontend/llm-deepseek.d.ts.map +1 -0
  43. package/dist/types-frontend/llm-images.d.ts +49 -0
  44. package/dist/types-frontend/llm-images.d.ts.map +1 -0
  45. package/dist/types-frontend/llm-openai.d.ts +64 -0
  46. package/dist/types-frontend/llm-openai.d.ts.map +1 -0
  47. package/dist/types-frontend/llm-utils.d.ts +16 -0
  48. package/dist/types-frontend/llm-utils.d.ts.map +1 -0
  49. package/dist/types-frontend/logging.d.ts +12 -0
  50. package/dist/types-frontend/logging.d.ts.map +1 -0
  51. package/dist/types-frontend/market-hours.d.ts +24 -0
  52. package/dist/types-frontend/market-hours.d.ts.map +1 -0
  53. package/dist/types-frontend/market-time.d.ts +254 -0
  54. package/dist/types-frontend/market-time.d.ts.map +1 -0
  55. package/dist/types-frontend/misc-utils.d.ts +49 -0
  56. package/dist/types-frontend/misc-utils.d.ts.map +1 -0
  57. package/dist/types-frontend/old-test.d.ts +2 -0
  58. package/dist/types-frontend/old-test.d.ts.map +1 -0
  59. package/dist/types-frontend/polygon-indices.d.ts +85 -0
  60. package/dist/types-frontend/polygon-indices.d.ts.map +1 -0
  61. package/dist/types-frontend/polygon.d.ts +126 -0
  62. package/dist/types-frontend/polygon.d.ts.map +1 -0
  63. package/dist/types-frontend/technical-analysis.d.ts +90 -0
  64. package/dist/types-frontend/technical-analysis.d.ts.map +1 -0
  65. package/dist/types-frontend/test.d.ts +2 -0
  66. package/dist/types-frontend/test.d.ts.map +1 -0
  67. package/dist/types-frontend/testing/market-time-refactor-test.d.ts +1 -0
  68. package/dist/types-frontend/testing/market-time-refactor-test.d.ts.map +1 -0
  69. package/dist/types-frontend/types/alpaca-types.d.ts +962 -0
  70. package/dist/types-frontend/types/alpaca-types.d.ts.map +1 -0
  71. package/dist/types-frontend/types/index.d.ts +7 -0
  72. package/dist/types-frontend/types/index.d.ts.map +1 -0
  73. package/dist/types-frontend/types/llm-types.d.ts +82 -0
  74. package/dist/types-frontend/types/llm-types.d.ts.map +1 -0
  75. package/dist/types-frontend/types/logging-types.d.ts +10 -0
  76. package/dist/types-frontend/types/logging-types.d.ts.map +1 -0
  77. package/dist/types-frontend/types/market-time-types.d.ts +59 -0
  78. package/dist/types-frontend/types/market-time-types.d.ts.map +1 -0
  79. package/dist/types-frontend/types/polygon-indices-types.d.ts +190 -0
  80. package/dist/types-frontend/types/polygon-indices-types.d.ts.map +1 -0
  81. package/dist/types-frontend/types/polygon-types.d.ts +204 -0
  82. package/dist/types-frontend/types/polygon-types.d.ts.map +1 -0
  83. package/dist/types-frontend/types/ta-types.d.ts +89 -0
  84. package/dist/types-frontend/types/ta-types.d.ts.map +1 -0
  85. package/package.json +8 -2
  86. package/dist/types/time-utils.d.ts +0 -17
  87. package/dist/types/time-utils.d.ts.map +0 -1
@@ -0,0 +1,372 @@
1
+ import 'dotenv/config';
2
+ import { Bar, AlpacaQuote, TimeFrame, AlpacaAsset, OptionBar, OptionsChainParams, OptionsChainResponse, LatestOptionsTradesParams, LatestOptionsTradesResponse, LatestOptionsQuotesParams, LatestOptionsQuotesResponse, LatestQuotesResponse, LatestTradesResponse, HistoricalOptionsBarsParams, HistoricalOptionsBarsResponse, HistoricalOptionsTradesParams, HistoricalOptionsTradesResponse, OptionsSnapshotsParams, OptionsSnapshotsResponse, OptionsConditionCodesResponse, OptionsExchangeCodesResponse, OptionTickType, SimpleNews, DataFeed, StockStreamEventName, OptionStreamEventName, StockStreamEventMap, OptionStreamEventMap } from './types/alpaca-types';
3
+ import { EventEmitter } from 'events';
4
+ /**
5
+ * Parameters for retrieving historical market data bars
6
+ * @see https://data.alpaca.markets/v2/stocks/bars
7
+ */
8
+ export interface HistoricalBarsParams {
9
+ /** Comma-separated list of stock symbols to query, e.g. 'AAPL,MSFT,TSLA' */
10
+ symbols: string[];
11
+ /**
12
+ * Bar duration/timeframe
13
+ * Format: [1-59]Min/T, [1-23]Hour/H, 1Day/D, 1Week/W, [1,2,3,4,6,12]Month/M
14
+ * Examples: "1Min", "5Min", "1Hour", "1Day", "1Week", "1Month"
15
+ */
16
+ timeframe: TimeFrame;
17
+ /**
18
+ * Start datetime in RFC-3339 format (YYYY-MM-DD)
19
+ * Example: "2024-02-11T09:00:00Z"
20
+ */
21
+ start?: string;
22
+ /**
23
+ * End datetime in RFC-3339 format (YYYY-MM-DD)
24
+ * Example: "2024-02-11T16:00:00Z"
25
+ */
26
+ end?: string;
27
+ /**
28
+ * Number of bars to return (1-10000)
29
+ * Default: 1000
30
+ */
31
+ limit?: number;
32
+ /**
33
+
34
+ /**
35
+ * Pagination token for retrieving next page of results
36
+ * Returned in the next_page_token field of the response
37
+ */
38
+ page_token?: string;
39
+ /**
40
+ * Sort order of returned bars
41
+ * - asc: Oldest to newest (default)
42
+ * - desc: Newest to oldest
43
+ */
44
+ sort?: 'asc' | 'desc';
45
+ }
46
+ /**
47
+ * Response from historical bars endpoint
48
+ * Contains OHLCV (Open, High, Low, Close, Volume) data for requested symbols
49
+ */
50
+ export interface HistoricalBarsResponse {
51
+ /**
52
+ * Map of symbol to array of bar data
53
+ * Each bar contains OHLCV data for the specified timeframe
54
+ */
55
+ bars: {
56
+ [symbol: string]: Bar[];
57
+ };
58
+ /**
59
+ * Token for retrieving the next page of results
60
+ * null if there are no more results
61
+ */
62
+ next_page_token: string | null;
63
+ /** Currency of the price data in ISO 4217 format */
64
+ currency: string;
65
+ }
66
+ /**
67
+ * Response from latest bars endpoint
68
+ * Contains the most recent minute bar for each requested symbol
69
+ */
70
+ export interface LatestBarsResponse {
71
+ /**
72
+ * Map of symbol to latest bar data
73
+ * Each bar contains OHLCV data for the most recent minute
74
+ */
75
+ bars: {
76
+ [symbol: string]: Bar;
77
+ };
78
+ /** Currency of the price data in ISO 4217 format */
79
+ currency: string;
80
+ }
81
+ /**
82
+ * Response from last trade endpoint for a single symbol
83
+ * Contains detailed information about the most recent trade
84
+ */
85
+ export interface LastTradeResponse {
86
+ /** Status of the request */
87
+ status: string;
88
+ /** The stock symbol that was queried */
89
+ symbol: string;
90
+ /**
91
+ * Details of the last trade
92
+ * @property price - Trade price
93
+ * @property size - Trade size (quantity)
94
+ * @property exchange - Exchange where trade occurred (see Common Exchange Codes in docs)
95
+ * @property cond1-4 - Trade conditions
96
+ * @property timestamp - UNIX epoch timestamp in milliseconds
97
+ */
98
+ last: {
99
+ price: number;
100
+ size: number;
101
+ exchange: number;
102
+ cond1: number;
103
+ cond2: number;
104
+ cond3: number;
105
+ cond4: number;
106
+ timestamp: number;
107
+ };
108
+ }
109
+ /**
110
+ * Singleton class for interacting with Alpaca Market Data API
111
+ * Provides methods for fetching historical bars, latest bars, last trades, latest trades, latest quotes, and latest quote for a single symbol
112
+ */
113
+ export declare class AlpacaMarketDataAPI extends EventEmitter {
114
+ private static instance;
115
+ private headers;
116
+ private dataURL;
117
+ private apiURL;
118
+ private v1beta1url;
119
+ private stockStreamUrl;
120
+ private optionStreamUrl;
121
+ private stockWs;
122
+ private optionWs;
123
+ private stockSubscriptions;
124
+ private optionSubscriptions;
125
+ setMode(mode?: 'sandbox' | 'test' | 'production'): void;
126
+ getMode(): 'sandbox' | 'test' | 'production';
127
+ private constructor();
128
+ static getInstance(): AlpacaMarketDataAPI;
129
+ on<K extends StockStreamEventName>(event: K, listener: (data: StockStreamEventMap[K]) => void): this;
130
+ on<K extends OptionStreamEventName>(event: K, listener: (data: OptionStreamEventMap[K]) => void): this;
131
+ emit<K extends StockStreamEventName>(event: K, data: StockStreamEventMap[K]): boolean;
132
+ emit<K extends OptionStreamEventName>(event: K, data: OptionStreamEventMap[K]): boolean;
133
+ private connect;
134
+ private sendSubscription;
135
+ connectStockStream(): void;
136
+ connectOptionStream(): void;
137
+ disconnectStockStream(): void;
138
+ disconnectOptionStream(): void;
139
+ subscribe(streamType: 'stock' | 'option', subscriptions: {
140
+ trades?: string[];
141
+ quotes?: string[];
142
+ bars?: string[];
143
+ }): void;
144
+ unsubscribe(streamType: 'stock' | 'option', subscriptions: {
145
+ trades?: string[];
146
+ quotes?: string[];
147
+ bars?: string[];
148
+ }): void;
149
+ private makeRequest;
150
+ /**
151
+ * Get historical OHLCV bars for specified symbols, including pre-market and post-market data
152
+ * Automatically handles pagination to fetch all available data
153
+ * @param params Parameters for historical bars request
154
+ * @returns Historical bars data with all pages combined
155
+ */
156
+ getHistoricalBars(params: HistoricalBarsParams): Promise<HistoricalBarsResponse>;
157
+ /**
158
+ * Get the most recent minute bar for requested symbols
159
+ * @param symbols Array of stock symbols to query
160
+ * @param currency Optional currency in ISO 4217 format
161
+ * @returns Latest bar data for each symbol
162
+
163
+ */
164
+ getLatestBars(symbols: string[], currency?: string): Promise<LatestBarsResponse>;
165
+ /**
166
+ * Get the last trade for a single symbol
167
+ * @param symbol The stock symbol to query
168
+ * @returns Last trade details including price, size, exchange, and conditions
169
+ */
170
+ getLastTrade(symbol: string): Promise<LastTradeResponse>;
171
+ /**
172
+ * Get the most recent trades for requested symbols
173
+ * @param symbols Array of stock symbols to query
174
+ * @param feed Optional data source (sip/iex/delayed_sip)
175
+ * @param currency Optional currency in ISO 4217 format
176
+ * @returns Latest trade data for each symbol
177
+
178
+ */
179
+ getLatestTrades(symbols: string[], feed?: DataFeed, currency?: string): Promise<LatestTradesResponse>;
180
+ /**
181
+ * Get the most recent quotes for requested symbols
182
+ * @param symbols Array of stock symbols to query
183
+ * @param feed Optional data source (sip/iex/delayed_sip)
184
+ * @param currency Optional currency in ISO 4217 format
185
+ * @returns Latest quote data for each symbol
186
+ */
187
+ getLatestQuotes(symbols: string[], feed?: DataFeed, currency?: string): Promise<LatestQuotesResponse>;
188
+ /**
189
+ * Get the latest quote for a single symbol
190
+ * @param symbol The stock symbol to query
191
+ * @param feed Optional data source (sip/iex/delayed_sip)
192
+ * @param currency Optional currency in ISO 4217 format
193
+ * @returns Latest quote data with symbol and currency information
194
+ */
195
+ getLatestQuote(symbol: string, feed?: DataFeed, currency?: string): Promise<{
196
+ quote: AlpacaQuote;
197
+ symbol: string;
198
+ currency: string;
199
+ }>;
200
+ /**
201
+ * Get the previous day's closing price for a symbol
202
+ * @param symbol The stock symbol to query
203
+ * @param referenceDate Optional reference date to get the previous close for
204
+ * @returns Previous day's closing price data
205
+ */
206
+ getPreviousClose(symbol: string, referenceDate?: Date): Promise<Bar | null>;
207
+ /**
208
+ * Get hourly price data for a symbol
209
+ * @param symbol The stock symbol to query
210
+ * @param start Start time in milliseconds
211
+ * @param end End time in milliseconds
212
+ * @returns Array of hourly price bars
213
+ */
214
+ getHourlyPrices(symbol: string, start: number, end: number): Promise<Bar[]>;
215
+ /**
216
+ * Get half-hourly price data for a symbol
217
+ * @param symbol The stock symbol to query
218
+ * @param start Start time in milliseconds
219
+ * @param end End time in milliseconds
220
+ * @returns Array of half-hourly price bars
221
+ */
222
+ getHalfHourlyPrices(symbol: string, start: number, end: number): Promise<Bar[]>;
223
+ /**
224
+ * Get daily price data for a symbol
225
+ * @param symbol The stock symbol to query
226
+ * @param start Start time in milliseconds
227
+ * @param end End time in milliseconds
228
+ * @returns Array of daily price bars
229
+ */
230
+ getDailyPrices(symbol: string, start: number, end: number): Promise<Bar[]>;
231
+ /**
232
+ * Get intraday price data for a symbol
233
+ * @param symbol The stock symbol to query
234
+ * @param minutePeriod Minutes per bar (1, 5, 15, etc.)
235
+ * @param start Start time in milliseconds
236
+ * @param end End time in milliseconds
237
+ * @returns Array of intraday price bars
238
+ */
239
+ getIntradayPrices(symbol: string, minutePeriod: number, start: number, end: number): Promise<Bar[]>;
240
+ /**
241
+ * Analyzes an array of price bars and returns a summary string
242
+ * @param bars Array of price bars to analyze
243
+ * @returns A string summarizing the price data
244
+ */
245
+ static analyzeBars(bars: Bar[]): string;
246
+ /**
247
+ * Get all assets available for trade and data consumption from Alpaca
248
+ * @param params Optional query params: status (e.g. 'active'), asset_class (e.g. 'us_equity', 'crypto')
249
+ * @returns Array of AlpacaAsset objects
250
+ * @see https://docs.alpaca.markets/reference/get-v2-assets-1
251
+ */
252
+ getAssets(params?: {
253
+ status?: string;
254
+ asset_class?: string;
255
+ }): Promise<AlpacaAsset[]>;
256
+ /**
257
+ * Get a single asset by symbol or asset_id
258
+ * @param symbolOrAssetId Symbol or asset_id
259
+ * @returns AlpacaAsset object
260
+ * @see https://docs.alpaca.markets/reference/get-v2-assets-symbol_or_asset_id
261
+ */
262
+ getAsset(symbolOrAssetId: string): Promise<AlpacaAsset>;
263
+ /**
264
+ * Get options chain for an underlying symbol
265
+ * Provides the latest trade, latest quote, and greeks for each contract symbol of the underlying symbol
266
+ * @param params Options chain request parameters
267
+ * @returns Options chain data with snapshots for each contract
268
+ * @see https://docs.alpaca.markets/reference/optionchain
269
+ */
270
+ getOptionsChain(params: OptionsChainParams): Promise<OptionsChainResponse>;
271
+ /**
272
+ * Get the most recent trades for requested option contract symbols
273
+ * @param params Latest options trades request parameters
274
+ * @returns Latest trade data for each option contract symbol
275
+
276
+ * @see https://docs.alpaca.markets/reference/optionlatesttrades
277
+ */
278
+ getLatestOptionsTrades(params: LatestOptionsTradesParams): Promise<LatestOptionsTradesResponse>;
279
+ /**
280
+ * Get the most recent quotes for requested option contract symbols
281
+ * @param params Latest options quotes request parameters
282
+ * @returns Latest quote data for each option contract symbol
283
+
284
+ * @see https://docs.alpaca.markets/reference/optionlatestquotes
285
+ */
286
+ getLatestOptionsQuotes(params: LatestOptionsQuotesParams): Promise<LatestOptionsQuotesResponse>;
287
+ /**
288
+ * Get historical OHLCV bars for option contract symbols
289
+ * Automatically handles pagination to fetch all available data
290
+ * @param params Historical options bars request parameters
291
+ * @returns Historical bar data for each option contract symbol with all pages combined
292
+
293
+ * @see https://docs.alpaca.markets/reference/optionbars
294
+ */
295
+ getHistoricalOptionsBars(params: HistoricalOptionsBarsParams): Promise<HistoricalOptionsBarsResponse>;
296
+ /**
297
+ * Get historical trades for option contract symbols
298
+ * Automatically handles pagination to fetch all available data
299
+ * @param params Historical options trades request parameters
300
+ * @returns Historical trade data for each option contract symbol with all pages combined
301
+
302
+ * @see https://docs.alpaca.markets/reference/optiontrades
303
+ */
304
+ getHistoricalOptionsTrades(params: HistoricalOptionsTradesParams): Promise<HistoricalOptionsTradesResponse>;
305
+ /**
306
+ * Get snapshots for option contract symbols
307
+ * Provides latest trade, latest quote, and greeks for each contract symbol
308
+ * @param params Options snapshots request parameters
309
+ * @returns Snapshot data for each option contract symbol
310
+
311
+ * @see https://docs.alpaca.markets/reference/optionsnapshots
312
+ */
313
+ getOptionsSnapshot(params: OptionsSnapshotsParams): Promise<OptionsSnapshotsResponse>;
314
+ /**
315
+ * Get condition codes for options trades or quotes
316
+ * Returns the mapping between condition codes and their descriptions
317
+ * @param tickType The type of tick data ('trade' or 'quote')
318
+ * @returns Mapping of condition codes to descriptions
319
+
320
+ * @see https://docs.alpaca.markets/reference/optionmetaconditions
321
+ */
322
+ getOptionsConditionCodes(tickType: OptionTickType): Promise<OptionsConditionCodesResponse>;
323
+ /**
324
+ * Get exchange codes for options
325
+ * Returns the mapping between option exchange codes and exchange names
326
+ * @returns Mapping of exchange codes to exchange names
327
+
328
+ * @see https://docs.alpaca.markets/reference/optionmetaexchanges
329
+ */
330
+ getOptionsExchangeCodes(): Promise<OptionsExchangeCodesResponse>;
331
+ /**
332
+ * Analyzes an array of option bars and returns a summary string
333
+ * @param bars Array of option bars to analyze
334
+ * @returns A string summarizing the option price data
335
+ */
336
+ static analyzeOptionBars(bars: OptionBar[]): string;
337
+ /**
338
+ * Formats option greeks for display
339
+ * @param greeks Option greeks object
340
+ * @returns Formatted string with greek values
341
+ */
342
+ static formatOptionGreeks(greeks: any): string;
343
+ /**
344
+ * Interprets condition codes using the provided condition codes mapping
345
+ * @param conditionCodes Array of condition codes from trade or quote
346
+ * @param conditionCodesMap Mapping of condition codes to descriptions
347
+ * @returns Formatted string with condition descriptions
348
+ */
349
+ static interpretConditionCodes(conditionCodes: string[], conditionCodesMap: OptionsConditionCodesResponse): string;
350
+ /**
351
+ * Gets the exchange name from exchange code using the provided exchange codes mapping
352
+ * @param exchangeCode Exchange code from trade or quote
353
+ * @param exchangeCodesMap Mapping of exchange codes to names
354
+ * @returns Exchange name or formatted unknown exchange
355
+ */
356
+ static getExchangeName(exchangeCode: string, exchangeCodesMap: OptionsExchangeCodesResponse): string;
357
+ /**
358
+ * Fetches news articles from Alpaca API for a symbol, paginating through all results.
359
+ * @param symbol The symbol to fetch news for (e.g., 'AAPL')
360
+ * @param params Optional parameters: start, end, limit, sort, include_content
361
+ * @returns Array of SimpleNews articles
362
+ */
363
+ fetchNews(symbol: string, params?: {
364
+ start?: Date | string;
365
+ end?: Date | string;
366
+ limit?: number;
367
+ sort?: 'asc' | 'desc';
368
+ include_content?: boolean;
369
+ }): Promise<SimpleNews[]>;
370
+ }
371
+ export declare const marketDataAPI: AlpacaMarketDataAPI;
372
+ //# sourceMappingURL=alpaca-market-data-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alpaca-market-data-api.d.ts","sourceRoot":"","sources":["../../src/alpaca-market-data-api.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAGvB,OAAO,EACL,GAAG,EACH,WAAW,EACX,SAAS,EAET,WAAW,EACX,SAAS,EAET,kBAAkB,EAClB,oBAAoB,EACpB,yBAAyB,EACzB,2BAA2B,EAC3B,yBAAyB,EACzB,2BAA2B,EAC3B,oBAAoB,EACpB,oBAAoB,EACpB,2BAA2B,EAC3B,6BAA6B,EAC7B,6BAA6B,EAC7B,+BAA+B,EAC/B,sBAAsB,EACtB,wBAAwB,EACxB,6BAA6B,EAC7B,4BAA4B,EAC5B,cAAc,EACd,UAAU,EAEV,QAAQ,EAGR,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,sB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