@uipath/solution-sdk 1.204.0 → 1.205.0-preview.258

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 (29) hide show
  1. package/dist/THIRD-PARTY-NOTICES.md +2 -2
  2. package/dist/deployment-search.js +182 -0
  3. package/dist/{embedded-file-reader-rf2g1kfj.js → embedded-file-reader-z4becc02.js} +2 -2
  4. package/dist/index-78paj2kz.js +1908 -0
  5. package/dist/index-cs3g624n.js +28 -0
  6. package/dist/index-eav127tv.js +3004 -0
  7. package/dist/{index-fb21bjwj.js → index-enc2hqq5.js} +255 -1409
  8. package/dist/{index-6gp5j7j5.js → index-hkexw5er.js} +193 -118
  9. package/dist/{index-g0hcxnae.js → index-y4vgqz1w.js} +11 -1
  10. package/dist/index-zmneg45c.js +1184 -0
  11. package/dist/index.js +1551 -4214
  12. package/dist/package-search.js +105 -0
  13. package/dist/resources/index.js +1183 -1177
  14. package/dist/solution-auth.js +4 -3
  15. package/dist/src/deployment-search.d.ts +104 -0
  16. package/dist/src/legacy-deployment-search-v3.d.ts +24 -0
  17. package/dist/src/legacy-package-search.d.ts +25 -0
  18. package/dist/src/package-search.d.ts +41 -0
  19. package/dist/src/pipelines-route.d.ts +43 -0
  20. package/dist/src/resources/index.d.ts +3 -0
  21. package/dist/src/resources/providers/artefact-pair-binding-provider.d.ts +4 -0
  22. package/dist/src/resources/services/catalog-lookup-failure.d.ts +50 -0
  23. package/dist/src/resources/services/remote-resources.d.ts +2 -0
  24. package/dist/src/resources/services/resource-configurations.d.ts +44 -0
  25. package/dist/src/resources/services/resource-lookup.d.ts +29 -0
  26. package/dist/src/resources/services/resource-refresh-service.d.ts +13 -0
  27. package/dist/src/resources/services/sync-resources-from-bindings.d.ts +43 -6
  28. package/dist/src/zip-utils.d.ts +5 -0
  29. package/package.json +10 -2
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getFileSystem
3
- } from "./index-g0hcxnae.js";
3
+ } from "./index-y4vgqz1w.js";
4
4
  import {
5
5
  __commonJS,
6
6
  __require,
@@ -2637,6 +2637,223 @@ function settlePromiseLike(thenable) {
2637
2637
  return Promise.resolve(thenable).then((data) => [undefined, data]).catch((error) => [toError(error), undefined]);
2638
2638
  }
2639
2639
 
2640
+ // ../common/src/output-context.ts
2641
+ function createStorage() {
2642
+ const [error, mod] = catchError(() => __require("node:async_hooks"));
2643
+ if (error || typeof mod?.AsyncLocalStorage !== "function") {
2644
+ return {
2645
+ getStore: () => {
2646
+ return;
2647
+ },
2648
+ run: (_store, fn) => fn()
2649
+ };
2650
+ }
2651
+ return new mod.AsyncLocalStorage;
2652
+ }
2653
+ var storageSingleton = singleton("OutputStorage");
2654
+ var sinkSlot = singleton("OutputSink");
2655
+ var outputStorage = storageSingleton.getOrInit(createStorage, (v) => ("getStore" in v));
2656
+ var CONSOLE_FALLBACK = {
2657
+ writeOut: (str) => process.stdout.write(str),
2658
+ writeErr: (str) => process.stderr.write(str),
2659
+ writeLog: (str) => process.stdout.write(str),
2660
+ capabilities: {
2661
+ isInteractive: false,
2662
+ canReadInput: false,
2663
+ supportsColor: false,
2664
+ outputWidth: 80
2665
+ }
2666
+ };
2667
+ function getOutputSink() {
2668
+ return outputStorage.getStore() ?? sinkSlot.get() ?? CONSOLE_FALLBACK;
2669
+ }
2670
+
2671
+ // ../common/src/logger.ts
2672
+ var logFilePathSlot = singleton("logFilePath");
2673
+ function setGlobalLogFilePath(path) {
2674
+ logFilePathSlot.set(path);
2675
+ }
2676
+ function getGlobalLogFilePath() {
2677
+ return logFilePathSlot.get("");
2678
+ }
2679
+ var DEFAULT_LOG_LEVEL = 2 /* WARN */;
2680
+
2681
+ class SimpleLogger {
2682
+ __brand = "SimpleLogger";
2683
+ level;
2684
+ logFilePath;
2685
+ fileLoggingEnabled;
2686
+ pendingWrites = Promise.resolve();
2687
+ pendingInit = Promise.resolve();
2688
+ constructor() {
2689
+ this.level = SimpleLogger.resolveLevel();
2690
+ this.logFilePath = "";
2691
+ this.fileLoggingEnabled = false;
2692
+ }
2693
+ static getInstance() {
2694
+ return loggerSingleton.getOrInit(() => new SimpleLogger, (v) => ("__brand" in v) && v.__brand === "SimpleLogger");
2695
+ }
2696
+ static resetInstance() {
2697
+ loggerSingleton.clear();
2698
+ }
2699
+ static isNode = typeof process !== "undefined" && !!process.versions?.node;
2700
+ static resolveLevel() {
2701
+ if (SimpleLogger.isNode) {
2702
+ const explicitLevel = SimpleLogger.parseLevel(process.env?.UIP_LOG_LEVEL ?? "");
2703
+ if (explicitLevel !== undefined)
2704
+ return explicitLevel;
2705
+ const debugVal = process.env?.DEBUG;
2706
+ if (debugVal === "true" || debugVal === "1") {
2707
+ return 0 /* DEBUG */;
2708
+ }
2709
+ return DEFAULT_LOG_LEVEL;
2710
+ }
2711
+ const [localStorageError, hasDebug] = catchError(() => typeof localStorage !== "undefined" && !!localStorage.getItem("debug"));
2712
+ if (!localStorageError && hasDebug) {
2713
+ return 0 /* DEBUG */;
2714
+ }
2715
+ return DEFAULT_LOG_LEVEL;
2716
+ }
2717
+ static parseLevel(value) {
2718
+ switch (value.toLowerCase()) {
2719
+ case "debug":
2720
+ return 0 /* DEBUG */;
2721
+ case "info":
2722
+ return 1 /* INFO */;
2723
+ case "warn":
2724
+ return 2 /* WARN */;
2725
+ case "error":
2726
+ return 3 /* ERROR */;
2727
+ default:
2728
+ return;
2729
+ }
2730
+ }
2731
+ format(message, args) {
2732
+ if (args.length === 0)
2733
+ return `${message}
2734
+ `;
2735
+ return `${message} ${args.map(String).join(" ")}
2736
+ `;
2737
+ }
2738
+ isFileLoggingActive() {
2739
+ return this.fileLoggingEnabled || !!getGlobalLogFilePath();
2740
+ }
2741
+ writeToFile(formatted) {
2742
+ const path = this.logFilePath || getGlobalLogFilePath();
2743
+ if (!path)
2744
+ return;
2745
+ const timestamp = new Date().toISOString();
2746
+ this.pendingWrites = Promise.all([
2747
+ this.pendingWrites,
2748
+ this.pendingInit
2749
+ ]).then(() => getFileSystem().appendFile(path, `${timestamp} ${formatted}`).catch(() => {}));
2750
+ }
2751
+ write(formatted) {
2752
+ if (this.isFileLoggingActive()) {
2753
+ this.writeToFile(formatted);
2754
+ } else {
2755
+ getOutputSink().writeErr(formatted);
2756
+ }
2757
+ }
2758
+ debug(message, ...args) {
2759
+ if (this.level > 0 /* DEBUG */)
2760
+ return;
2761
+ const formatted = this.format(`[DEBUG] ${message}`, args);
2762
+ this.write(formatted);
2763
+ }
2764
+ info(message, ...args) {
2765
+ if (this.level > 1 /* INFO */)
2766
+ return;
2767
+ const formatted = this.format(message, args);
2768
+ this.write(formatted);
2769
+ }
2770
+ warn(message, ...args) {
2771
+ if (this.level > 2 /* WARN */)
2772
+ return;
2773
+ const formatted = this.format(`[WARN] ${message}`, args);
2774
+ this.write(formatted);
2775
+ }
2776
+ error(message, ...args) {
2777
+ if (this.level > 3 /* ERROR */)
2778
+ return;
2779
+ const formatted = this.format(`[ERROR] ${message}`, args);
2780
+ this.write(formatted);
2781
+ }
2782
+ report(message) {
2783
+ const formatted = this.format(message, []);
2784
+ this.write(formatted);
2785
+ }
2786
+ getLevel() {
2787
+ return this.level;
2788
+ }
2789
+ setLevel(level) {
2790
+ this.level = level;
2791
+ }
2792
+ setFileLogging(enabled) {
2793
+ this.fileLoggingEnabled = enabled;
2794
+ if (!enabled) {
2795
+ this.logFilePath = "";
2796
+ setGlobalLogFilePath("");
2797
+ }
2798
+ }
2799
+ setLogFile(path) {
2800
+ this.logFilePath = path;
2801
+ setGlobalLogFilePath(path);
2802
+ if (!path)
2803
+ return;
2804
+ this.fileLoggingEnabled = true;
2805
+ const fs = getFileSystem();
2806
+ this.pendingInit = (async () => {
2807
+ const [error] = await catchError((async () => {
2808
+ await fs.mkdir(fs.path.dirname(path));
2809
+ await fs.writeFile(path, "");
2810
+ })());
2811
+ if (error)
2812
+ this.fileLoggingEnabled = false;
2813
+ })();
2814
+ }
2815
+ async flushFile() {
2816
+ await this.pendingInit;
2817
+ await this.pendingWrites;
2818
+ }
2819
+ getLogFilePath() {
2820
+ return this.logFilePath || getGlobalLogFilePath();
2821
+ }
2822
+ handleLog = (logMessage) => {
2823
+ const parts = [];
2824
+ if (logMessage.source) {
2825
+ parts.push(`[${logMessage.source}]`);
2826
+ }
2827
+ if (logMessage.sourceTarget) {
2828
+ parts.push(`[${logMessage.sourceTarget}]`);
2829
+ }
2830
+ parts.push(logMessage.message);
2831
+ const msg = parts.join(" ");
2832
+ switch (logMessage.logLevel) {
2833
+ case "Debug":
2834
+ this.debug(msg);
2835
+ break;
2836
+ case "Information":
2837
+ this.info(msg);
2838
+ break;
2839
+ case "Warning":
2840
+ this.warn(msg);
2841
+ break;
2842
+ case "Error":
2843
+ this.error(msg);
2844
+ break;
2845
+ default:
2846
+ this.info(msg);
2847
+ break;
2848
+ }
2849
+ };
2850
+ }
2851
+ var loggerSingleton = singleton(SimpleLogger);
2852
+ var logger = SimpleLogger.getInstance();
2853
+ function getLogFilePath() {
2854
+ return logger.getLogFilePath();
2855
+ }
2856
+
2640
2857
  // ../common/src/error-graph.ts
2641
2858
  function* walkErrorGraph(error) {
2642
2859
  const queue = [error];
@@ -3046,237 +3263,20 @@ function setExitCode(code) {
3046
3263
  process.exitCode = code;
3047
3264
  }
3048
3265
 
3049
- // ../common/src/output-context.ts
3050
- function createStorage() {
3051
- const [error, mod] = catchError(() => __require("node:async_hooks"));
3052
- if (error || typeof mod?.AsyncLocalStorage !== "function") {
3053
- return {
3054
- getStore: () => {
3055
- return;
3056
- },
3057
- run: (_store, fn) => fn()
3058
- };
3266
+ // ../common/src/output-codecs.ts
3267
+ var yamlSlot = singleton("YamlCodec");
3268
+ var jmespathSlot = singleton("JmespathCodec");
3269
+ async function loadOutputCodecsAsync(needed) {
3270
+ const loads = [];
3271
+ if (needed.yaml && yamlSlot.get() === undefined) {
3272
+ loads.push(import("./js-yaml-88tdqrtd.js").then((mod) => {
3273
+ yamlSlot.set(mod);
3274
+ }));
3059
3275
  }
3060
- return new mod.AsyncLocalStorage;
3061
- }
3062
- var storageSingleton = singleton("OutputStorage");
3063
- var sinkSlot = singleton("OutputSink");
3064
- var outputStorage = storageSingleton.getOrInit(createStorage, (v) => ("getStore" in v));
3065
- var CONSOLE_FALLBACK = {
3066
- writeOut: (str) => process.stdout.write(str),
3067
- writeErr: (str) => process.stderr.write(str),
3068
- writeLog: (str) => process.stdout.write(str),
3069
- capabilities: {
3070
- isInteractive: false,
3071
- canReadInput: false,
3072
- supportsColor: false,
3073
- outputWidth: 80
3074
- }
3075
- };
3076
- function getOutputSink() {
3077
- return outputStorage.getStore() ?? sinkSlot.get() ?? CONSOLE_FALLBACK;
3078
- }
3079
-
3080
- // ../common/src/logger.ts
3081
- var logFilePathSlot = singleton("logFilePath");
3082
- function setGlobalLogFilePath(path) {
3083
- logFilePathSlot.set(path);
3084
- }
3085
- function getGlobalLogFilePath() {
3086
- return logFilePathSlot.get("");
3087
- }
3088
- var DEFAULT_LOG_LEVEL = 3 /* ERROR */;
3089
-
3090
- class SimpleLogger {
3091
- __brand = "SimpleLogger";
3092
- level;
3093
- logFilePath;
3094
- fileLoggingEnabled;
3095
- pendingWrites = Promise.resolve();
3096
- pendingInit = Promise.resolve();
3097
- constructor() {
3098
- this.level = SimpleLogger.resolveLevel();
3099
- this.logFilePath = "";
3100
- this.fileLoggingEnabled = false;
3101
- }
3102
- static getInstance() {
3103
- return loggerSingleton.getOrInit(() => new SimpleLogger, (v) => ("__brand" in v) && v.__brand === "SimpleLogger");
3104
- }
3105
- static resetInstance() {
3106
- loggerSingleton.clear();
3107
- }
3108
- static isNode = typeof process !== "undefined" && !!process.versions?.node;
3109
- static resolveLevel() {
3110
- if (SimpleLogger.isNode) {
3111
- const explicitLevel = SimpleLogger.parseLevel(process.env?.UIP_LOG_LEVEL ?? "");
3112
- if (explicitLevel !== undefined)
3113
- return explicitLevel;
3114
- const debugVal = process.env?.DEBUG;
3115
- if (debugVal === "true" || debugVal === "1") {
3116
- return 0 /* DEBUG */;
3117
- }
3118
- return DEFAULT_LOG_LEVEL;
3119
- }
3120
- const [localStorageError, hasDebug] = catchError(() => typeof localStorage !== "undefined" && !!localStorage.getItem("debug"));
3121
- if (!localStorageError && hasDebug) {
3122
- return 0 /* DEBUG */;
3123
- }
3124
- return DEFAULT_LOG_LEVEL;
3125
- }
3126
- static parseLevel(value) {
3127
- switch (value.toLowerCase()) {
3128
- case "debug":
3129
- return 0 /* DEBUG */;
3130
- case "info":
3131
- return 1 /* INFO */;
3132
- case "warn":
3133
- return 2 /* WARN */;
3134
- case "error":
3135
- return 3 /* ERROR */;
3136
- default:
3137
- return;
3138
- }
3139
- }
3140
- format(message, args) {
3141
- if (args.length === 0)
3142
- return `${message}
3143
- `;
3144
- return `${message} ${args.map(String).join(" ")}
3145
- `;
3146
- }
3147
- isFileLoggingActive() {
3148
- return this.fileLoggingEnabled || !!getGlobalLogFilePath();
3149
- }
3150
- writeToFile(formatted) {
3151
- const path = this.logFilePath || getGlobalLogFilePath();
3152
- if (!path)
3153
- return;
3154
- const timestamp = new Date().toISOString();
3155
- this.pendingWrites = Promise.all([
3156
- this.pendingWrites,
3157
- this.pendingInit
3158
- ]).then(() => getFileSystem().appendFile(path, `${timestamp} ${formatted}`).catch(() => {}));
3159
- }
3160
- write(formatted) {
3161
- if (this.isFileLoggingActive()) {
3162
- this.writeToFile(formatted);
3163
- } else {
3164
- getOutputSink().writeErr(formatted);
3165
- }
3166
- }
3167
- debug(message, ...args) {
3168
- if (this.level > 0 /* DEBUG */)
3169
- return;
3170
- const formatted = this.format(`[DEBUG] ${message}`, args);
3171
- this.write(formatted);
3172
- }
3173
- info(message, ...args) {
3174
- if (this.level > 1 /* INFO */)
3175
- return;
3176
- const formatted = this.format(message, args);
3177
- this.write(formatted);
3178
- }
3179
- warn(message, ...args) {
3180
- if (this.level > 2 /* WARN */)
3181
- return;
3182
- const formatted = this.format(`[WARN] ${message}`, args);
3183
- this.write(formatted);
3184
- }
3185
- error(message, ...args) {
3186
- if (this.level > 3 /* ERROR */)
3187
- return;
3188
- const formatted = this.format(`[ERROR] ${message}`, args);
3189
- this.write(formatted);
3190
- }
3191
- report(message) {
3192
- const formatted = this.format(message, []);
3193
- this.write(formatted);
3194
- }
3195
- getLevel() {
3196
- return this.level;
3197
- }
3198
- setLevel(level) {
3199
- this.level = level;
3200
- }
3201
- setFileLogging(enabled) {
3202
- this.fileLoggingEnabled = enabled;
3203
- if (!enabled) {
3204
- this.logFilePath = "";
3205
- setGlobalLogFilePath("");
3206
- }
3207
- }
3208
- setLogFile(path) {
3209
- this.logFilePath = path;
3210
- setGlobalLogFilePath(path);
3211
- if (!path)
3212
- return;
3213
- this.fileLoggingEnabled = true;
3214
- const fs = getFileSystem();
3215
- this.pendingInit = (async () => {
3216
- const [error] = await catchError((async () => {
3217
- await fs.mkdir(fs.path.dirname(path));
3218
- await fs.writeFile(path, "");
3219
- })());
3220
- if (error)
3221
- this.fileLoggingEnabled = false;
3222
- })();
3223
- }
3224
- async flushFile() {
3225
- await this.pendingInit;
3226
- await this.pendingWrites;
3227
- }
3228
- getLogFilePath() {
3229
- return this.logFilePath || getGlobalLogFilePath();
3230
- }
3231
- handleLog = (logMessage) => {
3232
- const parts = [];
3233
- if (logMessage.source) {
3234
- parts.push(`[${logMessage.source}]`);
3235
- }
3236
- if (logMessage.sourceTarget) {
3237
- parts.push(`[${logMessage.sourceTarget}]`);
3238
- }
3239
- parts.push(logMessage.message);
3240
- const msg = parts.join(" ");
3241
- switch (logMessage.logLevel) {
3242
- case "Debug":
3243
- this.debug(msg);
3244
- break;
3245
- case "Information":
3246
- this.info(msg);
3247
- break;
3248
- case "Warning":
3249
- this.warn(msg);
3250
- break;
3251
- case "Error":
3252
- this.error(msg);
3253
- break;
3254
- default:
3255
- this.info(msg);
3256
- break;
3257
- }
3258
- };
3259
- }
3260
- var loggerSingleton = singleton(SimpleLogger);
3261
- var logger = SimpleLogger.getInstance();
3262
- function getLogFilePath() {
3263
- return logger.getLogFilePath();
3264
- }
3265
-
3266
- // ../common/src/output-codecs.ts
3267
- var yamlSlot = singleton("YamlCodec");
3268
- var jmespathSlot = singleton("JmespathCodec");
3269
- async function loadOutputCodecsAsync(needed) {
3270
- const loads = [];
3271
- if (needed.yaml && yamlSlot.get() === undefined) {
3272
- loads.push(import("./js-yaml-88tdqrtd.js").then((mod) => {
3273
- yamlSlot.set(mod);
3274
- }));
3275
- }
3276
- if (needed.filter && jmespathSlot.get() === undefined) {
3277
- loads.push(import("./jmespath-231m3hyn.js").then((m)=>__toESM(m.default,1)).then((mod) => {
3278
- jmespathSlot.set(mod);
3279
- }));
3276
+ if (needed.filter && jmespathSlot.get() === undefined) {
3277
+ loads.push(import("./jmespath-231m3hyn.js").then((m)=>__toESM(m.default,1)).then((mod) => {
3278
+ jmespathSlot.set(mod);
3279
+ }));
3280
3280
  }
3281
3281
  await Promise.all(loads);
3282
3282
  }
@@ -3352,7 +3352,9 @@ var ErrorDimensions = {
3352
3352
  Result: "Result",
3353
3353
  ErrorCode: "ErrorCode",
3354
3354
  Retry: "Retry",
3355
- ErrorMessage: "ErrorMessage"
3355
+ ErrorMessage: "ErrorMessage",
3356
+ HttpStatus: "HttpStatus",
3357
+ UpstreamErrorCode: "UpstreamErrorCode"
3356
3358
  };
3357
3359
  var AuthDimensions = {
3358
3360
  AuthenticationMethod: "AuthenticationMethod",
@@ -4334,7 +4336,9 @@ var CLI_ERROR_CODES = [
4334
4336
  "timeout",
4335
4337
  "server_error",
4336
4338
  "method_not_allowed",
4339
+ "not_supported",
4337
4340
  "configuration_error",
4341
+ "execution_failed",
4338
4342
  "unknown_error"
4339
4343
  ];
4340
4344
  var RETRY_HINTS = [
@@ -5291,7 +5295,9 @@ var OutputFormatter;
5291
5295
  [ErrorDimensions.Result]: data.Result,
5292
5296
  [ErrorDimensions.ErrorCode]: data.ErrorCode,
5293
5297
  [ErrorDimensions.Retry]: data.Retry,
5294
- [ErrorDimensions.ErrorMessage]: data.Message
5298
+ [ErrorDimensions.ErrorMessage]: data.Message,
5299
+ [ErrorDimensions.HttpStatus]: data.Context?.httpStatus?.toString(),
5300
+ [ErrorDimensions.UpstreamErrorCode]: data.Context?.errorCode
5295
5301
  });
5296
5302
  }
5297
5303
  logOutput(normalizeOutputKeys(envelope), getOutputFormat());
@@ -6051,6 +6057,16 @@ var HOST_GLOBAL_FLAGS = [
6051
6057
  ];
6052
6058
  var VALUE_OPTIONS = new Set(HOST_GLOBAL_OPTIONS_WITH_VALUE);
6053
6059
  var BOOLEAN_FLAGS = new Set(HOST_GLOBAL_FLAGS);
6060
+ // ../common/src/http-status.ts
6061
+ function httpStatusOf(error) {
6062
+ if (!error || typeof error !== "object") {
6063
+ return;
6064
+ }
6065
+ if ("response" in error && error.response && typeof error.response === "object" && "status" in error.response && typeof error.response.status === "number") {
6066
+ return error.response.status;
6067
+ }
6068
+ return "status" in error && typeof error.status === "number" ? error.status : undefined;
6069
+ }
6054
6070
  // ../common/src/interactivity-context.ts
6055
6071
  var modeSlot = singleton("InteractivityMode");
6056
6072
  var interactiveFlagSlot = singleton("InteractiveFlag");
@@ -6206,6 +6222,10 @@ function installRequestHeaderForwarding(BaseApiClass, patchKey, forward) {
6206
6222
  function installSdkUserAgentHeader(BaseApiClass, userAgent) {
6207
6223
  installRequestHeaderForwarding(BaseApiClass, userAgentPatchKey(userAgent), (headers) => addSdkUserAgentHeader(headers, userAgent));
6208
6224
  }
6225
+ // ../common/src/shell-quote.ts
6226
+ function quoteForShell(value) {
6227
+ return `'${value.replace(/'/g, "'\\''")}'`;
6228
+ }
6209
6229
  // ../common/src/solution-project-types.ts
6210
6230
  var LIBRARY_NOT_A_PROJECT = "A library cannot be a project inside a solution — it is a reusable .nupkg that other projects consume as a NuGet dependency, not a deployable unit. Build and publish it on its own ('uip rpa pack <project-dir> <output-path>', then 'uip or libraries upload --file <nupkg-path>'), and reference it from a project's dependencies. To make the published library part of this solution, add it as a resource instead: 'uip solution resources add --source remote --kind Library --name <library-name>'.";
6211
6231
  function unsupportedSolutionProjectType(projectType) {
@@ -6218,1180 +6238,6 @@ function unsupportedSolutionProjectType(projectType) {
6218
6238
  var shippedKeysSlot = singleton("ShipSucceededDedupeKeys");
6219
6239
  // ../common/src/tool-provider.ts
6220
6240
  var factorySlot = singleton("PackagerFactoryProvider");
6221
- // src/solution-file.ts
6222
- var STUDIO_WEB_PROJECT_TYPE_OVERRIDES = {
6223
- ProcessOrchestration: "processOrchestration"
6224
- };
6225
- function normalizeProjectType(projectType) {
6226
- return STUDIO_WEB_PROJECT_TYPE_OVERRIDES[projectType] ?? projectType;
6227
- }
6228
- function toPortableRelativePath(relativePath) {
6229
- return relativePath.replace(/\\/g, "/");
6230
- }
6231
- async function readUipxFile(fs, solutionDir) {
6232
- const dirEntries = await fs.readdir(solutionDir);
6233
- const uipxFileName = dirEntries.find((f) => f.endsWith(".uipx"));
6234
- if (!uipxFileName) {
6235
- throw new Error(`No .uipx file found in ${solutionDir}. Run 'uip solution init' first.`);
6236
- }
6237
- const uipxContent = await fs.readFile(fs.path.join(solutionDir, uipxFileName), "utf-8");
6238
- if (!uipxContent) {
6239
- throw new Error(`Could not read .uipx file: ${uipxFileName} is empty or missing.`);
6240
- }
6241
- const [parseError, parsed] = catchError(() => JSON.parse(uipxContent));
6242
- if (parseError) {
6243
- throw new Error(`Invalid .uipx file: could not parse JSON in ${uipxFileName}.`);
6244
- }
6245
- const uipx = validateUipxFile(parsed, uipxFileName);
6246
- return { uipx, uipxFileName };
6247
- }
6248
- function validateUipxFile(parsed, uipxFileName) {
6249
- if (!isRecord2(parsed)) {
6250
- throw new Error(`Invalid .uipx file: ${uipxFileName} must contain a JSON object.`);
6251
- }
6252
- if (typeof parsed.SolutionId !== "string" || !parsed.SolutionId.trim()) {
6253
- throw new Error("Invalid .uipx file: missing SolutionId.");
6254
- }
6255
- if (!Array.isArray(parsed.Projects) || parsed.Projects.length === 0) {
6256
- throw new Error("Invalid .uipx file: missing Projects.");
6257
- }
6258
- for (const [index, project] of parsed.Projects.entries()) {
6259
- if (!isRecord2(project)) {
6260
- throw new Error(`Invalid .uipx file: Projects[${index}] must be an object.`);
6261
- }
6262
- if (typeof project.ProjectRelativePath !== "string" || !project.ProjectRelativePath.trim()) {
6263
- const pathHint = typeof project.Path === "string" ? " Found Path, but .uipx uses ProjectRelativePath." : "";
6264
- throw new Error(`Invalid .uipx file: Projects[${index}] is missing ProjectRelativePath.${pathHint} Use 'uip solution projects add' to add projects, or set ProjectRelativePath to the project file path, for example "Foo/project.uiproj".`);
6265
- }
6266
- }
6267
- return parsed;
6268
- }
6269
- function isRecord2(value) {
6270
- return typeof value === "object" && value !== null && !Array.isArray(value);
6271
- }
6272
- async function createSolutionManifest(fs, solutionDir, solutionName, options = {}) {
6273
- const resolvedDir = fs.path.resolve(solutionDir);
6274
- if (!(options.allowExistingDir && await fs.exists(resolvedDir))) {
6275
- await fs.mkdir(resolvedDir);
6276
- }
6277
- const solutionId = crypto.randomUUID();
6278
- const manifest = {
6279
- DocVersion: "1.0.0",
6280
- StudioMinVersion: "2025.10.0",
6281
- SolutionId: solutionId,
6282
- Projects: []
6283
- };
6284
- const solutionFile = fs.path.join(resolvedDir, `${solutionName}.uipx`);
6285
- await fs.writeFile(solutionFile, `${JSON.stringify(manifest, null, 2)}
6286
- `);
6287
- return {
6288
- solutionDir: resolvedDir,
6289
- solutionFile,
6290
- solutionId
6291
- };
6292
- }
6293
- var AUTO_SOLUTION_SUFFIX = "Solution";
6294
- async function autoScaffoldSolution(fs, baseDir, projectName) {
6295
- const solutionName = `${projectName}${AUTO_SOLUTION_SUFFIX}`;
6296
- const solutionDir = fs.path.resolve(baseDir, solutionName);
6297
- const expectedSolutionFile = fs.path.join(solutionDir, `${solutionName}.uipx`);
6298
- if (await fs.exists(expectedSolutionFile)) {
6299
- return {
6300
- Name: solutionName,
6301
- Path: solutionDir,
6302
- SolutionFile: expectedSolutionFile
6303
- };
6304
- }
6305
- const { solutionFile } = await createSolutionManifest(fs, solutionDir, solutionName, { allowExistingDir: true });
6306
- return {
6307
- Name: solutionName,
6308
- Path: solutionDir,
6309
- SolutionFile: solutionFile
6310
- };
6311
- }
6312
- async function prepareProjectLocation(fs, candidateProjectDir, projectName, options = {}) {
6313
- const resolved = fs.path.resolve(candidateProjectDir);
6314
- if (options.skipRegistration) {
6315
- return { projectDir: resolved };
6316
- }
6317
- const discovery = await findNearestParentUipxFile(fs, resolved);
6318
- if (discovery.status !== "notFound") {
6319
- return { projectDir: resolved };
6320
- }
6321
- const baseDir = fs.path.dirname(resolved);
6322
- const autoCreatedSolution = await autoScaffoldSolution(fs, baseDir, projectName);
6323
- const projectDir = fs.path.join(autoCreatedSolution.Path, projectName);
6324
- await warnIfCandidateDirShadowed(fs, resolved, projectDir);
6325
- return { projectDir, autoCreatedSolution };
6326
- }
6327
- async function warnIfCandidateDirShadowed(fs, candidateDir, projectDir) {
6328
- const [, exists] = await catchError(fs.exists(candidateDir));
6329
- if (!exists) {
6330
- return;
6331
- }
6332
- const [, entries] = await catchError(fs.readdir(candidateDir));
6333
- if (!entries || entries.length === 0) {
6334
- return;
6335
- }
6336
- logger.warn(`An existing directory "${candidateDir}" was left untouched. ` + `The project was created inside the auto-created solution at "${projectDir}". ` + "Run init from inside an existing solution, or pass --skip-solution-registration, if you meant to use the existing directory.");
6337
- }
6338
- function resolveSolutionDir(fs, inputPath) {
6339
- const resolved = fs.path.resolve(inputPath);
6340
- if (resolved.endsWith(".uipx")) {
6341
- return fs.path.dirname(resolved);
6342
- }
6343
- return resolved;
6344
- }
6345
- async function updateUipxSolutionId(fs, uipxPath, newSolutionId) {
6346
- const [readError, content] = await catchError(fs.readFile(uipxPath, "utf-8"));
6347
- if (readError || !content) {
6348
- logger.error(`Could not read .uipx file for update: ${readError?.message ?? "empty file"}`);
6349
- return;
6350
- }
6351
- const [parseError, parsed] = catchError(() => JSON.parse(content));
6352
- if (parseError) {
6353
- logger.error(`Could not parse .uipx file for update: ${parseError.message}`);
6354
- return;
6355
- }
6356
- parsed.SolutionId = newSolutionId;
6357
- const [writeError] = await catchError(fs.writeFile(uipxPath, JSON.stringify(parsed, null, 4)));
6358
- if (writeError) {
6359
- logger.error(`Could not update .uipx with new SolutionId: ${writeError.message}`);
6360
- } else {
6361
- logger.info(`Updated .uipx with Studio Web SolutionId: ${newSolutionId}`);
6362
- }
6363
- }
6364
- async function findSolutionFile(fs, projectPath) {
6365
- const parentDir = fs.path.resolve(projectPath, "..");
6366
- const [dirError, entries] = await catchError(fs.readdir(parentDir));
6367
- if (dirError) {
6368
- logger.error(`Could not read parent directory for .uipx file: ${dirError.message}`);
6369
- return;
6370
- }
6371
- const uipxFile = entries.find((entry) => entry.endsWith(".uipx"));
6372
- if (!uipxFile) {
6373
- logger.info("No .uipx solution file found in parent directory.");
6374
- return;
6375
- }
6376
- const uipxPath = fs.path.join(parentDir, uipxFile);
6377
- const [readError, content] = await catchError(fs.readFile(uipxPath, "utf-8"));
6378
- if (readError || content === null) {
6379
- logger.error(`Could not read .uipx file: ${readError?.message ?? "file returned null"}`);
6380
- return;
6381
- }
6382
- const [parseError, parsed] = catchError(() => JSON.parse(content));
6383
- if (parseError) {
6384
- logger.error(`Could not parse .uipx file: ${parseError.message}`);
6385
- return;
6386
- }
6387
- const solutionId = parsed.SolutionId;
6388
- const projectId = parsed.Projects?.[0]?.Id;
6389
- if (!solutionId) {
6390
- logger.info("No SolutionId found in .uipx file.");
6391
- return;
6392
- }
6393
- logger.info(`Found solution file: ${uipxFile} (SolutionId: ${solutionId})`);
6394
- return {
6395
- solutionId,
6396
- projectId: projectId ?? crypto.randomUUID()
6397
- };
6398
- }
6399
- async function updateSolutionFile(fs, projectPath, newSolutionId) {
6400
- const parentDir = fs.path.resolve(projectPath, "..");
6401
- const [dirError, entries] = await catchError(fs.readdir(parentDir));
6402
- if (dirError)
6403
- return;
6404
- const uipxFile = entries.find((entry) => entry.endsWith(".uipx"));
6405
- if (!uipxFile)
6406
- return;
6407
- const uipxPath = fs.path.join(parentDir, uipxFile);
6408
- await updateUipxSolutionId(fs, uipxPath, newSolutionId);
6409
- }
6410
- async function tryRegisterProjectInParentSolution(fs, projectDir, options) {
6411
- if (options?.skipRegistration) {
6412
- return {
6413
- Status: "OptedOut",
6414
- Message: "Solution auto-registration skipped (--skip-solution-registration).",
6415
- Instructions: buildOptedOutInstructions(fs.path.resolve(projectDir))
6416
- };
6417
- }
6418
- const [registrationError, registration] = await catchError(registerProjectInParentSolution(fs, projectDir));
6419
- if (registrationError) {
6420
- return {
6421
- Status: "Failed",
6422
- Message: "Project registration failed.",
6423
- Instructions: buildRegistrationFailureInstructions(projectDir, registrationError.message)
6424
- };
6425
- }
6426
- return registration;
6427
- }
6428
- async function registerProjectInParentSolution(fs, projectDir) {
6429
- const resolvedProjectDir = fs.path.resolve(projectDir);
6430
- const discovery = await findNearestParentUipxFile(fs, resolvedProjectDir);
6431
- if (discovery.status === "notFound") {
6432
- return {
6433
- Status: "NotInSolution",
6434
- Message: "Project created in standalone mode; no parent .uipx solution found.",
6435
- Instructions: buildStandaloneInstructions(resolvedProjectDir)
6436
- };
6437
- }
6438
- if (discovery.status === "skipped") {
6439
- return discovery.registration;
6440
- }
6441
- const solutionFile = discovery.solutionFile;
6442
- const solutionDir = fs.path.dirname(solutionFile);
6443
- const relativeProjectDir = fs.path.relative(solutionDir, resolvedProjectDir);
6444
- if (relativeProjectDir === "" || relativeProjectDir.startsWith("..") || fs.path.isAbsolute(relativeProjectDir)) {
6445
- return {
6446
- Status: "Skipped",
6447
- Message: "Project registration skipped.",
6448
- Solution: solutionFile,
6449
- Instructions: `Project must reside within the solution folder.
6450
- Solution: ${solutionDir}
6451
- Project: ${resolvedProjectDir}`
6452
- };
6453
- }
6454
- const [projectFileError, projectFile] = await findProjectFile(fs, resolvedProjectDir);
6455
- if (projectFileError) {
6456
- return {
6457
- Status: "Failed",
6458
- Message: "Project registration failed.",
6459
- Solution: solutionFile,
6460
- Instructions: buildRegistrationFailureInstructions(resolvedProjectDir, projectFileError.message)
6461
- };
6462
- }
6463
- const [projectManifestError, projectManifest] = await readProjectManifest(fs, projectFile.filePath, projectFile.useProjectJson);
6464
- if (projectManifestError) {
6465
- return {
6466
- Status: "Failed",
6467
- Message: "Project registration failed.",
6468
- Solution: solutionFile,
6469
- Instructions: buildRegistrationFailureInstructions(resolvedProjectDir, projectManifestError.message)
6470
- };
6471
- }
6472
- const unsupportedReason = unsupportedSolutionProjectType(projectManifest.projectType);
6473
- if (unsupportedReason) {
6474
- return {
6475
- Status: "Skipped",
6476
- Message: "Project registration skipped.",
6477
- Solution: solutionFile,
6478
- Instructions: unsupportedReason
6479
- };
6480
- }
6481
- const projectRelativePath = toPortableRelativePath(fs.path.join(relativeProjectDir, projectFile.fileName));
6482
- const [solutionError, solution] = await readSolutionManifest(fs, solutionFile);
6483
- if (solutionError) {
6484
- return {
6485
- Status: "Failed",
6486
- Message: "Project registration failed.",
6487
- Solution: solutionFile,
6488
- Project: projectRelativePath,
6489
- Instructions: buildRegistrationFailureInstructions(resolvedProjectDir, solutionError.message)
6490
- };
6491
- }
6492
- const existingProject = solution.projects.find((project) => toPortableRelativePath(project.ProjectRelativePath) === projectRelativePath);
6493
- if (existingProject) {
6494
- return {
6495
- Status: "AlreadyRegistered",
6496
- Message: "Project already registered in solution.",
6497
- Solution: solutionFile,
6498
- Project: projectRelativePath,
6499
- ProjectId: typeof existingProject.Id === "string" ? existingProject.Id : undefined,
6500
- Instructions: buildRegistrationSuccessInstructions(solutionDir)
6501
- };
6502
- }
6503
- const projectId = crypto.randomUUID();
6504
- solution.projects.push({
6505
- Type: normalizeProjectType(projectManifest.projectType),
6506
- ProjectRelativePath: projectRelativePath,
6507
- Id: projectId
6508
- });
6509
- solution.content.Projects = solution.projects;
6510
- const [writeError] = await catchError(fs.writeFile(solutionFile, `${JSON.stringify(solution.content, null, 2)}
6511
- `));
6512
- if (writeError) {
6513
- return {
6514
- Status: "Failed",
6515
- Message: "Project registration failed.",
6516
- Solution: solutionFile,
6517
- Project: projectRelativePath,
6518
- Instructions: buildRegistrationFailureInstructions(resolvedProjectDir, writeError.message)
6519
- };
6520
- }
6521
- return {
6522
- Status: "Registered",
6523
- Message: "Project registered in parent solution.",
6524
- Solution: solutionFile,
6525
- Project: projectRelativePath,
6526
- ProjectId: projectId,
6527
- Instructions: buildRegistrationSuccessInstructions(solutionDir)
6528
- };
6529
- }
6530
- async function findNearestParentUipxFile(fs, projectDir) {
6531
- let currentDir = fs.path.dirname(fs.path.resolve(projectDir));
6532
- while (true) {
6533
- const [readDirError, entries] = await catchError(fs.readdir(currentDir));
6534
- if (readDirError) {
6535
- return {
6536
- status: "skipped",
6537
- registration: {
6538
- Status: "Failed",
6539
- Message: "Project registration failed.",
6540
- Instructions: buildRegistrationFailureInstructions(projectDir, `Could not inspect parent directory for a solution: ${currentDir}
6541
- ${readDirError.message}`)
6542
- }
6543
- };
6544
- }
6545
- const solutionFiles = entries.filter((entry) => entry.endsWith(".uipx"));
6546
- if (solutionFiles.length > 1) {
6547
- return {
6548
- status: "skipped",
6549
- registration: {
6550
- Status: "Skipped",
6551
- Message: "Project registration skipped.",
6552
- Instructions: `Found multiple .uipx files in ${currentDir}: ${solutionFiles.join(", ")}. Run 'uip solution projects add "${projectDir}" <solution.uipx>' to choose one.`
6553
- }
6554
- };
6555
- }
6556
- if (solutionFiles.length === 1) {
6557
- return {
6558
- status: "found",
6559
- solutionFile: fs.path.join(currentDir, solutionFiles[0])
6560
- };
6561
- }
6562
- const parentDir = fs.path.dirname(currentDir);
6563
- if (parentDir === currentDir) {
6564
- return { status: "notFound" };
6565
- }
6566
- currentDir = parentDir;
6567
- }
6568
- }
6569
- async function findProjectFile(fs, projectDir) {
6570
- const uiprojPath = fs.path.join(projectDir, "project.uiproj");
6571
- if (await fs.exists(uiprojPath)) {
6572
- return [
6573
- null,
6574
- {
6575
- filePath: uiprojPath,
6576
- fileName: "project.uiproj",
6577
- useProjectJson: false
6578
- }
6579
- ];
6580
- }
6581
- const jsonProjectPath = fs.path.join(projectDir, "project.json");
6582
- if (await fs.exists(jsonProjectPath)) {
6583
- return [
6584
- null,
6585
- {
6586
- filePath: jsonProjectPath,
6587
- fileName: "project.json",
6588
- useProjectJson: true
6589
- }
6590
- ];
6591
- }
6592
- return [
6593
- new Error(`No project file found in ${projectDir}. Expected project.uiproj or project.json.`),
6594
- null
6595
- ];
6596
- }
6597
- async function readProjectManifest(fs, filePath, useProjectJson) {
6598
- const [readError, rawContent] = await catchError(fs.readFile(filePath, "utf-8"));
6599
- if (readError || !rawContent) {
6600
- return [readError ?? new Error(`Unable to read ${filePath}.`), null];
6601
- }
6602
- const [parseError, parsed] = catchError(() => JSON.parse(rawContent));
6603
- if (parseError) {
6604
- return [
6605
- new Error(`Invalid JSON in project file: ${parseError.message}`),
6606
- null
6607
- ];
6608
- }
6609
- if (!isRecord2(parsed)) {
6610
- return [new Error(`Invalid project file: ${filePath}`), null];
6611
- }
6612
- const designOptions = parsed.designOptions;
6613
- const outputType = useProjectJson && isRecord2(designOptions) ? readString(designOptions.outputType) : undefined;
6614
- const projectType = outputType ?? readString(parsed.ProjectType);
6615
- if (!projectType) {
6616
- return [new Error(`ProjectType not found in ${filePath}`), null];
6617
- }
6618
- return [
6619
- null,
6620
- {
6621
- projectType
6622
- }
6623
- ];
6624
- }
6625
- async function readSolutionManifest(fs, solutionFile) {
6626
- const [readError, rawContent] = await catchError(fs.readFile(solutionFile, "utf-8"));
6627
- if (readError || !rawContent) {
6628
- return [
6629
- readError ?? new Error(`Unable to read solution file: ${solutionFile}`),
6630
- null
6631
- ];
6632
- }
6633
- const [parseError, parsed] = catchError(() => JSON.parse(rawContent));
6634
- if (parseError) {
6635
- return [
6636
- new Error(`Invalid JSON in solution file: ${parseError.message}`),
6637
- null
6638
- ];
6639
- }
6640
- if (!isRecord2(parsed)) {
6641
- return [
6642
- new Error(`Invalid solution file: ${solutionFile} must contain a JSON object.`),
6643
- null
6644
- ];
6645
- }
6646
- if (!Array.isArray(parsed.Projects)) {
6647
- return [
6648
- new Error(`Invalid solution file: ${solutionFile} must contain a Projects array.`),
6649
- null
6650
- ];
6651
- }
6652
- const projects = [];
6653
- for (const [index, project] of parsed.Projects.entries()) {
6654
- if (!isRecord2(project)) {
6655
- return [
6656
- new Error(`Invalid solution file: Projects[${index}] must be an object.`),
6657
- null
6658
- ];
6659
- }
6660
- const projectRelativePath = readString(project.ProjectRelativePath);
6661
- if (!projectRelativePath) {
6662
- return [
6663
- new Error(`Invalid solution file: Projects[${index}] is missing ProjectRelativePath. Use 'uip solution projects add' to repair the manifest.`),
6664
- null
6665
- ];
6666
- }
6667
- projects.push({
6668
- ...project,
6669
- Type: readString(project.Type) ?? "",
6670
- ProjectRelativePath: projectRelativePath,
6671
- Id: readString(project.Id) ?? ""
6672
- });
6673
- }
6674
- return [null, { content: parsed, projects }];
6675
- }
6676
- function readString(value) {
6677
- return typeof value === "string" && value.length > 0 ? value : undefined;
6678
- }
6679
- function buildRegistrationSuccessInstructions(solutionDir) {
6680
- return [
6681
- "The project is listed in the parent solution manifest.",
6682
- "Packing or uploading the solution will sync solution resources automatically.",
6683
- `To sync resources before packaging, run 'uip solution resources refresh --solution-folder "${solutionDir}"'.`
6684
- ].join(`
6685
- `);
6686
- }
6687
- function buildRegistrationFailureInstructions(projectDir, details) {
6688
- return [
6689
- "Automatic solution registration could not complete.",
6690
- `Run 'uip solution projects add "${projectDir}" <solution.uipx>' after checking the project and solution files.`,
6691
- `Details: ${details}`
6692
- ].join(`
6693
- `);
6694
- }
6695
- function buildStandaloneInstructions(projectDir) {
6696
- return [
6697
- "No parent solution was found by walking ancestor directories.",
6698
- "Studio Web upload, `flow debug`, and packaging require an enclosing solution.",
6699
- `To link this project to a solution, run 'uip solution init "<SolutionName>"' then 'uip solution projects add "${projectDir}" <SolutionName>.uipx'.`
6700
- ].join(`
6701
- `);
6702
- }
6703
- function buildOptedOutInstructions(projectDir) {
6704
- return [
6705
- "Automatic solution registration was skipped because --skip-solution-registration was passed.",
6706
- `To register this project later, run 'uip solution projects add "${projectDir}" <SolutionName>.uipx' from within the solution.`
6707
- ].join(`
6708
- `);
6709
- }
6710
- async function isProjectRegisteredInSolution(fs, projectDir, solutionFile) {
6711
- const [readErr, manifest] = await readSolutionManifest(fs, solutionFile);
6712
- if (readErr) {
6713
- throw readErr;
6714
- }
6715
- if (!manifest) {
6716
- throw new Error(`Unable to read solution manifest: ${solutionFile}`);
6717
- }
6718
- const solutionDir = fs.path.dirname(solutionFile);
6719
- const projectDirReal = await canonicalizePath(fs, projectDir);
6720
- for (const project of manifest.projects) {
6721
- const candidateDir = fs.path.resolve(solutionDir, fs.path.dirname(toPortableRelativePath(project.ProjectRelativePath)));
6722
- const candidateReal = await canonicalizePath(fs, candidateDir);
6723
- if (candidateReal === projectDirReal) {
6724
- return true;
6725
- }
6726
- }
6727
- return false;
6728
- }
6729
- async function canonicalizePath(fs, p) {
6730
- const [err, real] = await catchError(fs.realpath(p));
6731
- return err || !real ? p : real;
6732
- }
6733
- async function findSolutionFileUpward(fs, startDir) {
6734
- let dir = startDir;
6735
- while (true) {
6736
- const entries = await fs.readdir(dir);
6737
- const files = entries.filter((f) => f.endsWith(".uipx"));
6738
- if (files.length === 1) {
6739
- return fs.path.join(dir, files[0]);
6740
- }
6741
- if (files.length > 1) {
6742
- throw new Error(`Multiple .uipx files found in ${dir}. Please specify which solution file to use.`);
6743
- }
6744
- const parent = fs.path.dirname(dir);
6745
- if (parent === dir) {
6746
- throw new Error(`No .uipx solution file found (searched from ${startDir} to filesystem root)`);
6747
- }
6748
- dir = parent;
6749
- }
6750
- }
6751
-
6752
- // ../../node_modules/fflate/esm/index.mjs
6753
- import { createRequire } from "module";
6754
- var require2 = createRequire("/");
6755
- var _a;
6756
- var Worker;
6757
- var isMarkedAsUntransferable;
6758
- try {
6759
- _a = require2("worker_threads"), Worker = _a.Worker, isMarkedAsUntransferable = _a.isMarkedAsUntransferable;
6760
- } catch (e) {}
6761
- var u8 = Uint8Array;
6762
- var u16 = Uint16Array;
6763
- var i32 = Int32Array;
6764
- var fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0]);
6765
- var fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0]);
6766
- var clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
6767
- var freb = function(eb, start) {
6768
- var b = new u16(31);
6769
- for (var i = 0;i < 31; ++i) {
6770
- b[i] = start += 1 << eb[i - 1];
6771
- }
6772
- var r = new i32(b[30]);
6773
- for (var i = 1;i < 30; ++i) {
6774
- for (var j = b[i];j < b[i + 1]; ++j) {
6775
- r[j] = j - b[i] << 5 | i;
6776
- }
6777
- }
6778
- return { b, r };
6779
- };
6780
- var _a = freb(fleb, 2);
6781
- var fl = _a.b;
6782
- var revfl = _a.r;
6783
- fl[28] = 258, revfl[258] = 28;
6784
- var _b = freb(fdeb, 0);
6785
- var fd = _b.b;
6786
- var revfd = _b.r;
6787
- var rev = new u16(32768);
6788
- for (i = 0;i < 32768; ++i) {
6789
- x = (i & 43690) >> 1 | (i & 21845) << 1;
6790
- x = (x & 52428) >> 2 | (x & 13107) << 2;
6791
- x = (x & 61680) >> 4 | (x & 3855) << 4;
6792
- rev[i] = ((x & 65280) >> 8 | (x & 255) << 8) >> 1;
6793
- }
6794
- var x;
6795
- var i;
6796
- var hMap = function(cd, mb, r) {
6797
- var s = cd.length;
6798
- var i2 = 0;
6799
- var l = new u16(mb);
6800
- for (;i2 < s; ++i2) {
6801
- if (cd[i2])
6802
- ++l[cd[i2] - 1];
6803
- }
6804
- var le = new u16(mb);
6805
- for (i2 = 1;i2 < mb; ++i2) {
6806
- le[i2] = le[i2 - 1] + l[i2 - 1] << 1;
6807
- }
6808
- var co;
6809
- if (r) {
6810
- co = new u16(1 << mb);
6811
- var rvb = 15 - mb;
6812
- for (i2 = 0;i2 < s; ++i2) {
6813
- if (cd[i2]) {
6814
- var sv = i2 << 4 | cd[i2];
6815
- var r_1 = mb - cd[i2];
6816
- var v = le[cd[i2] - 1]++ << r_1;
6817
- for (var m = v | (1 << r_1) - 1;v <= m; ++v) {
6818
- co[rev[v] >> rvb] = sv;
6819
- }
6820
- }
6821
- }
6822
- } else {
6823
- co = new u16(s);
6824
- for (i2 = 0;i2 < s; ++i2) {
6825
- if (cd[i2]) {
6826
- co[i2] = rev[le[cd[i2] - 1]++] >> 15 - cd[i2];
6827
- }
6828
- }
6829
- }
6830
- return co;
6831
- };
6832
- var flt = new u8(288);
6833
- for (i = 0;i < 144; ++i)
6834
- flt[i] = 8;
6835
- var i;
6836
- for (i = 144;i < 256; ++i)
6837
- flt[i] = 9;
6838
- var i;
6839
- for (i = 256;i < 280; ++i)
6840
- flt[i] = 7;
6841
- var i;
6842
- for (i = 280;i < 288; ++i)
6843
- flt[i] = 8;
6844
- var i;
6845
- var fdt = new u8(32);
6846
- for (i = 0;i < 32; ++i)
6847
- fdt[i] = 5;
6848
- var i;
6849
- var flm = /* @__PURE__ */ hMap(flt, 9, 0);
6850
- var fdm = /* @__PURE__ */ hMap(fdt, 5, 0);
6851
- var shft = function(p) {
6852
- return (p + 7) / 8 | 0;
6853
- };
6854
- var slc = function(v, s, e) {
6855
- if (s == null || s < 0)
6856
- s = 0;
6857
- if (e == null || e > v.length)
6858
- e = v.length;
6859
- return new u8(v.subarray(s, e));
6860
- };
6861
- var ec = [
6862
- "unexpected EOF",
6863
- "invalid block type",
6864
- "invalid length/literal",
6865
- "invalid distance",
6866
- "stream finished",
6867
- "no stream handler",
6868
- ,
6869
- "no callback",
6870
- "invalid UTF-8 data",
6871
- "extra field too long",
6872
- "date not in range 1980-2099",
6873
- "filename too long",
6874
- "stream finishing",
6875
- "invalid zip data"
6876
- ];
6877
- var err = function(ind, msg, nt) {
6878
- var e = new Error(msg || ec[ind]);
6879
- e.code = ind;
6880
- if (Error.captureStackTrace)
6881
- Error.captureStackTrace(e, err);
6882
- if (!nt)
6883
- throw e;
6884
- return e;
6885
- };
6886
- var wbits = function(d, p, v) {
6887
- v <<= p & 7;
6888
- var o = p / 8 | 0;
6889
- d[o] |= v;
6890
- d[o + 1] |= v >> 8;
6891
- };
6892
- var wbits16 = function(d, p, v) {
6893
- v <<= p & 7;
6894
- var o = p / 8 | 0;
6895
- d[o] |= v;
6896
- d[o + 1] |= v >> 8;
6897
- d[o + 2] |= v >> 16;
6898
- };
6899
- var hTree = function(d, mb) {
6900
- var t = [];
6901
- for (var i2 = 0;i2 < d.length; ++i2) {
6902
- if (d[i2])
6903
- t.push({ s: i2, f: d[i2] });
6904
- }
6905
- var s = t.length;
6906
- var t2 = t.slice();
6907
- if (!s)
6908
- return { t: et, l: 0 };
6909
- if (s == 1) {
6910
- var v = new u8(t[0].s + 1);
6911
- v[t[0].s] = 1;
6912
- return { t: v, l: 1 };
6913
- }
6914
- t.sort(function(a, b) {
6915
- return a.f - b.f;
6916
- });
6917
- t.push({ s: -1, f: 25001 });
6918
- var l = t[0], r = t[1], i0 = 0, i1 = 1, i22 = 2;
6919
- t[0] = { s: -1, f: l.f + r.f, l, r };
6920
- while (i1 != s - 1) {
6921
- l = t[t[i0].f < t[i22].f ? i0++ : i22++];
6922
- r = t[i0 != i1 && t[i0].f < t[i22].f ? i0++ : i22++];
6923
- t[i1++] = { s: -1, f: l.f + r.f, l, r };
6924
- }
6925
- var maxSym = t2[0].s;
6926
- for (var i2 = 1;i2 < s; ++i2) {
6927
- if (t2[i2].s > maxSym)
6928
- maxSym = t2[i2].s;
6929
- }
6930
- var tr = new u16(maxSym + 1);
6931
- var mbt = ln(t[i1 - 1], tr, 0);
6932
- if (mbt > mb) {
6933
- var i2 = 0, dt = 0;
6934
- var lft = mbt - mb, cst = 1 << lft;
6935
- t2.sort(function(a, b) {
6936
- return tr[b.s] - tr[a.s] || a.f - b.f;
6937
- });
6938
- for (;i2 < s; ++i2) {
6939
- var i2_1 = t2[i2].s;
6940
- if (tr[i2_1] > mb) {
6941
- dt += cst - (1 << mbt - tr[i2_1]);
6942
- tr[i2_1] = mb;
6943
- } else
6944
- break;
6945
- }
6946
- dt >>= lft;
6947
- while (dt > 0) {
6948
- var i2_2 = t2[i2].s;
6949
- if (tr[i2_2] < mb)
6950
- dt -= 1 << mb - tr[i2_2]++ - 1;
6951
- else
6952
- ++i2;
6953
- }
6954
- for (;i2 >= 0 && dt; --i2) {
6955
- var i2_3 = t2[i2].s;
6956
- if (tr[i2_3] == mb) {
6957
- --tr[i2_3];
6958
- ++dt;
6959
- }
6960
- }
6961
- mbt = mb;
6962
- }
6963
- return { t: new u8(tr), l: mbt };
6964
- };
6965
- var ln = function(n, l, d) {
6966
- return n.s == -1 ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1)) : l[n.s] = d;
6967
- };
6968
- var lc = function(c) {
6969
- var s = c.length;
6970
- while (s && !c[--s])
6971
- ;
6972
- var cl = new u16(++s);
6973
- var cli = 0, cln = c[0], cls = 1;
6974
- var w = function(v) {
6975
- cl[cli++] = v;
6976
- };
6977
- for (var i2 = 1;i2 <= s; ++i2) {
6978
- if (c[i2] == cln && i2 != s)
6979
- ++cls;
6980
- else {
6981
- if (!cln && cls > 2) {
6982
- for (;cls > 138; cls -= 138)
6983
- w(32754);
6984
- if (cls > 2) {
6985
- w(cls > 10 ? cls - 11 << 5 | 28690 : cls - 3 << 5 | 12305);
6986
- cls = 0;
6987
- }
6988
- } else if (cls > 3) {
6989
- w(cln), --cls;
6990
- for (;cls > 6; cls -= 6)
6991
- w(8304);
6992
- if (cls > 2)
6993
- w(cls - 3 << 5 | 8208), cls = 0;
6994
- }
6995
- while (cls--)
6996
- w(cln);
6997
- cls = 1;
6998
- cln = c[i2];
6999
- }
7000
- }
7001
- return { c: cl.subarray(0, cli), n: s };
7002
- };
7003
- var clen = function(cf, cl) {
7004
- var l = 0;
7005
- for (var i2 = 0;i2 < cl.length; ++i2)
7006
- l += cf[i2] * cl[i2];
7007
- return l;
7008
- };
7009
- var wfblk = function(out, pos, dat) {
7010
- var s = dat.length;
7011
- var o = shft(pos + 2);
7012
- out[o] = s & 255;
7013
- out[o + 1] = s >> 8;
7014
- out[o + 2] = out[o] ^ 255;
7015
- out[o + 3] = out[o + 1] ^ 255;
7016
- for (var i2 = 0;i2 < s; ++i2)
7017
- out[o + i2 + 4] = dat[i2];
7018
- return (o + 4 + s) * 8;
7019
- };
7020
- var wblk = function(dat, out, final, syms, lf, df, eb, li, bs, bl, p) {
7021
- wbits(out, p++, final);
7022
- ++lf[256];
7023
- var _a2 = hTree(lf, 15), dlt = _a2.t, mlb = _a2.l;
7024
- var _b2 = hTree(df, 15), ddt = _b2.t, mdb = _b2.l;
7025
- var _c = lc(dlt), lclt = _c.c, nlc = _c.n;
7026
- var _d = lc(ddt), lcdt = _d.c, ndc = _d.n;
7027
- var lcfreq = new u16(19);
7028
- for (var i2 = 0;i2 < lclt.length; ++i2)
7029
- ++lcfreq[lclt[i2] & 31];
7030
- for (var i2 = 0;i2 < lcdt.length; ++i2)
7031
- ++lcfreq[lcdt[i2] & 31];
7032
- var _e = hTree(lcfreq, 7), lct = _e.t, mlcb = _e.l;
7033
- var nlcc = 19;
7034
- for (;nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)
7035
- ;
7036
- var flen = bl + 5 << 3;
7037
- var ftlen = clen(lf, flt) + clen(df, fdt) + eb;
7038
- var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + 2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18];
7039
- if (bs >= 0 && flen <= ftlen && flen <= dtlen)
7040
- return wfblk(out, p, dat.subarray(bs, bs + bl));
7041
- var lm, ll, dm, dl;
7042
- wbits(out, p, 1 + (dtlen < ftlen)), p += 2;
7043
- if (dtlen < ftlen) {
7044
- lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;
7045
- var llm = hMap(lct, mlcb, 0);
7046
- wbits(out, p, nlc - 257);
7047
- wbits(out, p + 5, ndc - 1);
7048
- wbits(out, p + 10, nlcc - 4);
7049
- p += 14;
7050
- for (var i2 = 0;i2 < nlcc; ++i2)
7051
- wbits(out, p + 3 * i2, lct[clim[i2]]);
7052
- p += 3 * nlcc;
7053
- var lcts = [lclt, lcdt];
7054
- for (var it = 0;it < 2; ++it) {
7055
- var clct = lcts[it];
7056
- for (var i2 = 0;i2 < clct.length; ++i2) {
7057
- var len = clct[i2] & 31;
7058
- wbits(out, p, llm[len]), p += lct[len];
7059
- if (len > 15)
7060
- wbits(out, p, clct[i2] >> 5 & 127), p += clct[i2] >> 12;
7061
- }
7062
- }
7063
- } else {
7064
- lm = flm, ll = flt, dm = fdm, dl = fdt;
7065
- }
7066
- for (var i2 = 0;i2 < li; ++i2) {
7067
- var sym = syms[i2];
7068
- if (sym > 255) {
7069
- var len = sym >> 18 & 31;
7070
- wbits16(out, p, lm[len + 257]), p += ll[len + 257];
7071
- if (len > 7)
7072
- wbits(out, p, sym >> 23 & 31), p += fleb[len];
7073
- var dst = sym & 31;
7074
- wbits16(out, p, dm[dst]), p += dl[dst];
7075
- if (dst > 3)
7076
- wbits16(out, p, sym >> 5 & 8191), p += fdeb[dst];
7077
- } else {
7078
- wbits16(out, p, lm[sym]), p += ll[sym];
7079
- }
7080
- }
7081
- wbits16(out, p, lm[256]);
7082
- return p + ll[256];
7083
- };
7084
- var deo = /* @__PURE__ */ new i32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);
7085
- var et = /* @__PURE__ */ new u8(0);
7086
- var dflt = function(dat, lvl, plvl, pre, post, st) {
7087
- var s = st.z || dat.length;
7088
- var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);
7089
- var w = o.subarray(pre, o.length - post);
7090
- var lst = st.l;
7091
- var pos = (st.r || 0) & 7;
7092
- if (lvl) {
7093
- if (pos)
7094
- w[0] = st.r >> 3;
7095
- var opt = deo[lvl - 1];
7096
- var n = opt >> 13, c = opt & 8191;
7097
- var msk_1 = (1 << plvl) - 1;
7098
- var prev = st.p || new u16(32768), head = st.h || new u16(msk_1 + 1);
7099
- var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;
7100
- var hsh = function(i3) {
7101
- return (dat[i3] ^ dat[i3 + 1] << bs1_1 ^ dat[i3 + 2] << bs2_1) & msk_1;
7102
- };
7103
- var syms = new i32(25000);
7104
- var lf = new u16(288), df = new u16(32);
7105
- var lc_1 = 0, eb = 0, i2 = st.i || 0, li = 0, wi = st.w || 0, bs = 0;
7106
- for (;i2 + 2 < s; ++i2) {
7107
- var hv = hsh(i2);
7108
- var imod = i2 & 32767, pimod = head[hv];
7109
- prev[imod] = pimod;
7110
- head[hv] = imod;
7111
- if (wi <= i2) {
7112
- var rem = s - i2;
7113
- if ((lc_1 > 7000 || li > 24576) && (rem > 423 || !lst)) {
7114
- pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i2 - bs, pos);
7115
- li = lc_1 = eb = 0, bs = i2;
7116
- for (var j = 0;j < 286; ++j)
7117
- lf[j] = 0;
7118
- for (var j = 0;j < 30; ++j)
7119
- df[j] = 0;
7120
- }
7121
- var l = 2, d = 0, ch_1 = c, dif = imod - pimod & 32767;
7122
- if (rem > 2 && hv == hsh(i2 - dif)) {
7123
- var maxn = Math.min(n, rem) - 1;
7124
- var maxd = Math.min(32767, i2);
7125
- var ml = Math.min(258, rem);
7126
- while (dif <= maxd && --ch_1 && imod != pimod) {
7127
- if (dat[i2 + l] == dat[i2 + l - dif]) {
7128
- var nl = 0;
7129
- for (;nl < ml && dat[i2 + nl] == dat[i2 + nl - dif]; ++nl)
7130
- ;
7131
- if (nl > l) {
7132
- l = nl, d = dif;
7133
- if (nl > maxn)
7134
- break;
7135
- var mmd = Math.min(dif, nl - 2);
7136
- var md = 0;
7137
- for (var j = 0;j < mmd; ++j) {
7138
- var ti = i2 - dif + j & 32767;
7139
- var pti = prev[ti];
7140
- var cd = ti - pti & 32767;
7141
- if (cd > md)
7142
- md = cd, pimod = ti;
7143
- }
7144
- }
7145
- }
7146
- imod = pimod, pimod = prev[imod];
7147
- dif += imod - pimod & 32767;
7148
- }
7149
- }
7150
- if (d) {
7151
- syms[li++] = 268435456 | revfl[l] << 18 | revfd[d];
7152
- var lin = revfl[l] & 31, din = revfd[d] & 31;
7153
- eb += fleb[lin] + fdeb[din];
7154
- ++lf[257 + lin];
7155
- ++df[din];
7156
- wi = i2 + l;
7157
- ++lc_1;
7158
- } else {
7159
- syms[li++] = dat[i2];
7160
- ++lf[dat[i2]];
7161
- }
7162
- }
7163
- }
7164
- for (i2 = Math.max(i2, wi);i2 < s; ++i2) {
7165
- syms[li++] = dat[i2];
7166
- ++lf[dat[i2]];
7167
- }
7168
- pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i2 - bs, pos);
7169
- if (!lst) {
7170
- st.r = pos & 7 | w[pos / 8 | 0] << 3;
7171
- pos -= 7;
7172
- st.h = head, st.p = prev, st.i = i2, st.w = wi;
7173
- }
7174
- } else {
7175
- for (var i2 = st.w || 0;i2 < s + lst; i2 += 65535) {
7176
- var e = i2 + 65535;
7177
- if (e >= s) {
7178
- w[pos / 8 | 0] = lst;
7179
- e = s;
7180
- }
7181
- pos = wfblk(w, pos + 1, dat.subarray(i2, e));
7182
- }
7183
- st.i = s;
7184
- }
7185
- return slc(o, 0, pre + shft(pos) + post);
7186
- };
7187
- var crct = /* @__PURE__ */ function() {
7188
- var t = new Int32Array(256);
7189
- for (var i2 = 0;i2 < 256; ++i2) {
7190
- var c = i2, k = 9;
7191
- while (--k)
7192
- c = (c & 1 && -306674912) ^ c >>> 1;
7193
- t[i2] = c;
7194
- }
7195
- return t;
7196
- }();
7197
- var crc = function() {
7198
- var c = -1;
7199
- return {
7200
- p: function(d) {
7201
- var cr = c;
7202
- for (var i2 = 0;i2 < d.length; ++i2)
7203
- cr = crct[cr & 255 ^ d[i2]] ^ cr >>> 8;
7204
- c = cr;
7205
- },
7206
- d: function() {
7207
- return ~c;
7208
- }
7209
- };
7210
- };
7211
- var dopt = function(dat, opt, pre, post, st) {
7212
- if (!st) {
7213
- st = { l: 1 };
7214
- if (opt.dictionary) {
7215
- var dict = opt.dictionary.subarray(-32768);
7216
- var newDat = new u8(dict.length + dat.length);
7217
- newDat.set(dict);
7218
- newDat.set(dat, dict.length);
7219
- dat = newDat;
7220
- st.w = dict.length;
7221
- }
7222
- }
7223
- return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? st.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : 20 : 12 + opt.mem, pre, post, st);
7224
- };
7225
- var mrg = function(a, b) {
7226
- var o = {};
7227
- for (var k in a)
7228
- o[k] = a[k];
7229
- for (var k in b)
7230
- o[k] = b[k];
7231
- return o;
7232
- };
7233
- var wbytes = function(d, b, v) {
7234
- for (;v; ++b)
7235
- d[b] = v, v >>>= 8;
7236
- };
7237
- function deflateSync(data, opts) {
7238
- return dopt(data, opts || {}, 0, 0);
7239
- }
7240
- var fltn = function(d, p, t, o) {
7241
- for (var k in d) {
7242
- var val = d[k], n = p + k, op = o;
7243
- if (Array.isArray(val))
7244
- op = mrg(o, val[1]), val = val[0];
7245
- if (ArrayBuffer.isView(val))
7246
- t[n] = [val, op];
7247
- else {
7248
- t[n += "/"] = [new u8(0), op];
7249
- fltn(val, n, t, o);
7250
- }
7251
- }
7252
- };
7253
- var te = typeof TextEncoder != "undefined" && /* @__PURE__ */ new TextEncoder;
7254
- var td = typeof TextDecoder != "undefined" && /* @__PURE__ */ new TextDecoder;
7255
- var tds = 0;
7256
- try {
7257
- td.decode(et, { stream: true });
7258
- tds = 1;
7259
- } catch (e) {}
7260
- function strToU8(str, latin1) {
7261
- if (latin1) {
7262
- var ar_1 = new u8(str.length);
7263
- for (var i2 = 0;i2 < str.length; ++i2)
7264
- ar_1[i2] = str.charCodeAt(i2);
7265
- return ar_1;
7266
- }
7267
- if (te)
7268
- return te.encode(str);
7269
- var l = str.length;
7270
- var ar = new u8(str.length + (str.length >> 1));
7271
- var ai = 0;
7272
- var w = function(v) {
7273
- ar[ai++] = v;
7274
- };
7275
- for (var i2 = 0;i2 < l; ++i2) {
7276
- if (ai + 5 > ar.length) {
7277
- var n = new u8(ai + 8 + (l - i2 << 1));
7278
- n.set(ar);
7279
- ar = n;
7280
- }
7281
- var c = str.charCodeAt(i2);
7282
- if (c < 128 || latin1)
7283
- w(c);
7284
- else if (c < 2048)
7285
- w(192 | c >> 6), w(128 | c & 63);
7286
- else if (c > 55295 && c < 57344)
7287
- c = 65536 + (c & 1023 << 10) | str.charCodeAt(++i2) & 1023, w(240 | c >> 18), w(128 | c >> 12 & 63), w(128 | c >> 6 & 63), w(128 | c & 63);
7288
- else
7289
- w(224 | c >> 12), w(128 | c >> 6 & 63), w(128 | c & 63);
7290
- }
7291
- return slc(ar, 0, ai);
7292
- }
7293
- var exfl = function(ex) {
7294
- var le = 0;
7295
- if (ex) {
7296
- for (var k in ex) {
7297
- var l = ex[k].length;
7298
- if (l > 65535)
7299
- err(9);
7300
- le += l + 4;
7301
- }
7302
- }
7303
- return le;
7304
- };
7305
- var wzh = function(d, b, f, fn, u, c, ce, co) {
7306
- var fl2 = fn.length, ex = f.extra, col = co && co.length;
7307
- var exl = exfl(ex);
7308
- wbytes(d, b, ce != null ? 33639248 : 67324752), b += 4;
7309
- if (ce != null)
7310
- d[b++] = 20, d[b++] = f.os;
7311
- d[b] = 20, b += 2;
7312
- d[b++] = f.flag << 1 | (c < 0 && 8), d[b++] = u && 8;
7313
- d[b++] = f.compression & 255, d[b++] = f.compression >> 8;
7314
- var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;
7315
- if (y < 0 || y > 119)
7316
- err(10);
7317
- wbytes(d, b, y << 25 | dt.getMonth() + 1 << 21 | dt.getDate() << 16 | dt.getHours() << 11 | dt.getMinutes() << 5 | dt.getSeconds() >> 1), b += 4;
7318
- if (c != -1) {
7319
- wbytes(d, b, f.crc);
7320
- wbytes(d, b + 4, c < 0 ? -c - 2 : c);
7321
- wbytes(d, b + 8, f.size);
7322
- }
7323
- wbytes(d, b + 12, fl2);
7324
- wbytes(d, b + 14, exl), b += 16;
7325
- if (ce != null) {
7326
- wbytes(d, b, col);
7327
- wbytes(d, b + 6, f.attrs);
7328
- wbytes(d, b + 10, ce), b += 14;
7329
- }
7330
- d.set(fn, b);
7331
- b += fl2;
7332
- if (exl) {
7333
- for (var k in ex) {
7334
- var exf = ex[k], l = exf.length;
7335
- wbytes(d, b, +k);
7336
- wbytes(d, b + 2, l);
7337
- d.set(exf, b + 4), b += 4 + l;
7338
- }
7339
- }
7340
- if (col)
7341
- d.set(co, b), b += col;
7342
- return b;
7343
- };
7344
- var wzf = function(o, b, c, d, e) {
7345
- wbytes(o, b, 101010256);
7346
- wbytes(o, b + 8, c);
7347
- wbytes(o, b + 10, c);
7348
- wbytes(o, b + 12, d);
7349
- wbytes(o, b + 16, e);
7350
- };
7351
- function zipSync(data, opts) {
7352
- if (!opts)
7353
- opts = {};
7354
- var r = {};
7355
- var files = [];
7356
- fltn(data, "", r, opts);
7357
- var o = 0;
7358
- var tot = 0;
7359
- for (var fn in r) {
7360
- var _a2 = r[fn], file = _a2[0], p = _a2[1];
7361
- var compression = p.level == 0 ? 0 : 8;
7362
- var f = strToU8(fn), s = f.length;
7363
- var com = p.comment, m = com && strToU8(com), ms = m && m.length;
7364
- var exl = exfl(p.extra);
7365
- if (s > 65535)
7366
- err(11);
7367
- var d = compression ? deflateSync(file, p) : file, l = d.length;
7368
- var c = crc();
7369
- c.p(file);
7370
- files.push(mrg(p, {
7371
- size: file.length,
7372
- crc: c.d(),
7373
- c: d,
7374
- f,
7375
- m,
7376
- u: s != fn.length || m && com.length != ms,
7377
- o,
7378
- compression
7379
- }));
7380
- o += 30 + s + exl + l;
7381
- tot += 76 + 2 * (s + exl) + (ms || 0) + l;
7382
- }
7383
- var out = new u8(tot + 22), oe = o, cdl = tot - o;
7384
- for (var i2 = 0;i2 < files.length; ++i2) {
7385
- var f = files[i2];
7386
- wzh(out, f.o, f, f.f, f.u, f.c.length);
7387
- var badd = 30 + f.f.length + exfl(f.extra);
7388
- out.set(f.c, f.o + badd);
7389
- wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);
7390
- }
7391
- wzf(out, o, files.length, cdl, oe);
7392
- return out;
7393
- }
7394
-
7395
- export { getSdkUserAgentToken, addSdkUserAgentHeader, installSdkUserAgentHeader, catchError, extractErrorMessage, logger, RESULTS, summarizePlatformBody, isGuid, normalizeProjectType, toPortableRelativePath, readUipxFile, createSolutionManifest, autoScaffoldSolution, prepareProjectLocation, resolveSolutionDir, updateUipxSolutionId, findSolutionFile, updateSolutionFile, tryRegisterProjectInParentSolution, findNearestParentUipxFile, readSolutionManifest, isProjectRegisteredInSolution, findSolutionFileUpward, zipSync };
6241
+ export { getSdkUserAgentToken, addSdkUserAgentHeader, installSdkUserAgentHeader, catchError, extractErrorMessage, logger, RESULTS, summarizePlatformBody, isGuid, httpStatusOf, quoteForShell, unsupportedSolutionProjectType };
7396
6242
 
7397
- //# debugId=9CD4D12A4CC5B02664756E2164756E21
6243
+ //# debugId=AFBD7517FAF4685764756E2164756E21