@sheetxl/studio-vanilla 0.4.11 → 0.4.12

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 (96) hide show
  1. package/browser/cjs/{BlSFY6zLlebuejdV.cjs → B35OZ0mE8aINQPP9.cjs} +2 -2
  2. package/browser/cjs/{DiBy6-IxLscyMW2y.cjs → BPzEQNENF-gEBkg9.cjs} +2 -2
  3. package/browser/cjs/{C7EZCTczsC-gkRcq.cjs → BUokV6yuzE-_8MyK.cjs} +2 -2
  4. package/browser/cjs/{T4SHYo66xDT3l9JN.cjs → BeZHmOKfa37mFNAu.cjs} +2 -2
  5. package/browser/cjs/{BplA5pDzOJpfTZuA.cjs → BflJ_0gT9lQtDvY_.cjs} +2 -2
  6. package/browser/cjs/{DFspSkki779xN-Ey.cjs → BwN8vKi5o3-PbIMo.cjs} +2 -2
  7. package/browser/cjs/{D3iOk-Q2tRdUeTcn.cjs → C3OizZPVuxO2fjSG.cjs} +1 -1
  8. package/browser/cjs/{BshvMtUxTJHj3JQN.cjs → CBL6KkiWI2RPflEN.cjs} +2 -2
  9. package/browser/cjs/CN6-6xpZMpFqSS8M.cjs +7 -0
  10. package/browser/cjs/{vfUix5Di0Ro8tEID.cjs → CTrEV_UpxC0W6cZZ.cjs} +2 -2
  11. package/browser/cjs/{CFcjX5-nVsgzdZ4F.cjs → CU30GVjjFXl44vEU.cjs} +1 -1
  12. package/browser/cjs/{DgBn3aW39yjgm0X_.cjs → CZWBxvUXzfpn_zmc.cjs} +2 -2
  13. package/browser/cjs/{DrlS1oz9Nea8Pm3j.cjs → Ccs2ouvlLekaLGH0.cjs} +2 -2
  14. package/browser/cjs/{B0rdyyttE2Aibsag.cjs → Ce-8L4Viq3I_6j0i.cjs} +2 -2
  15. package/browser/cjs/{SzxJv7OUs5ojl8gx.cjs → CtNjLzIHB8WX63Bl.cjs} +2 -2
  16. package/browser/cjs/{Dx-jp_LJxWbAScyA.cjs → DAHpsyykuPBkoh-Z.cjs} +1 -1
  17. package/browser/cjs/{B2e7dDI-zKoqXpIW.cjs → DJbKKxeeTEHHA1gR.cjs} +20 -20
  18. package/browser/cjs/{CjZbhk41S1qO_74G.cjs → D_VQzwC1zzTJyKtG.cjs} +1 -1
  19. package/browser/cjs/{Db_Ew1r6yOMYylvA.cjs → GrsZZ_mEdsM5dEMA.cjs} +2 -2
  20. package/browser/cjs/{BPTHTRDvNOVkUJGa.cjs → JKEGlXjMwGnXk_Gv.cjs} +2 -2
  21. package/browser/cjs/{C5FXOMLhAu_KTjVe.cjs → L1iE_VcelYZIy0wI.cjs} +1 -1
  22. package/browser/cjs/{DFtyXc7YFh9dIp74.cjs → Q_VvA-yUQx3xFKiJ.cjs} +1 -1
  23. package/browser/cjs/{BAyEOOtO-9sHQQRW.cjs → fTGpiXzFm3K_u2Fm.cjs} +2 -2
  24. package/browser/cjs/{CuTW2Pt-L5n-hNxV.cjs → hwDUzorB6aCvH1eL.cjs} +1 -1
  25. package/browser/cjs/index.cjs +2 -2
  26. package/browser/cjs/{BuWtGFX0HiBezGjw.cjs → no5c2H18QD2qmOH6.cjs} +2 -2
  27. package/browser/esm/{BALnKy2Fp7fyk-lc.mjs → B4Mm5gczpI_k2zzN.mjs} +2 -2
  28. package/browser/esm/{BXUGsC1Mo3FP8vnW.mjs → B8ISUdOxsJMYWzNN.mjs} +2 -2
  29. package/browser/esm/{BGpv6Kq7eBlJy43T.mjs → BnJiF38TGudjoHzT.mjs} +1 -1
  30. package/browser/esm/Bts4nCgfCAUpTfxz.mjs +7 -0
  31. package/browser/esm/{DtmE60AvstK9u0Ta.mjs → C3cyAbIH8Qc8MIFN.mjs} +20 -20
  32. package/browser/esm/C4jlaVv8bELgiHyE.mjs +7 -0
  33. package/browser/esm/{CFFC0SNc24a0Dxnh.mjs → CYIhGb86r-kKOrP5.mjs} +2 -2
  34. package/browser/esm/{B905wKzTtod-jbsD.mjs → CcpskguvlvemArQn.mjs} +2 -2
  35. package/browser/esm/CeRfALx1iU5fqOUg.mjs +7 -0
  36. package/browser/esm/CfYWmP_Hots5f0f6.mjs +7 -0
  37. package/browser/esm/CkarbqNx_lhlBnw7.mjs +7 -0
  38. package/browser/esm/D2PlWNQjrTgf6GuR.mjs +7 -0
  39. package/browser/esm/{Cc_VWd0wF5-39LsI.mjs → D3KNxvnrwR6_fTJE.mjs} +1 -1
  40. package/browser/esm/{Bo_ZPRrOQrqOVHAF.mjs → DIJyH94oCzUnlcNZ.mjs} +2 -2
  41. package/browser/esm/{De6RPxc4p_jXLlT5.mjs → DVAG1NxFe3cMjLE1.mjs} +1 -1
  42. package/browser/esm/DVqga7g7j0FUiM6p.mjs +7 -0
  43. package/browser/esm/{PS0cqYnlMVEGOQpI.mjs → DcX8yGEBX6qi9RCe.mjs} +2 -2
  44. package/browser/esm/{BUSR_OK5Qi6hRPfw.mjs → DeXfOSxGE_Ez7DZq.mjs} +1 -1
  45. package/browser/esm/{Cq8D_M0jeHLcnRjg.mjs → DzgM_rkwyIHsCb6I.mjs} +1 -1
  46. package/browser/esm/{BDVJ7eOPpW5FnEAP.mjs → M4hZ25330e96seUM.mjs} +1 -1
  47. package/browser/esm/Qp2Toeh_EbJH_f_6.mjs +7 -0
  48. package/browser/esm/SAyRTPVprOHZ8Up8.mjs +7 -0
  49. package/browser/esm/_ft7JYO6QdDbIu3d.mjs +7 -0
  50. package/browser/esm/{BlGoi1_x9rUMpWMd.mjs → dpdy0BU4GGI5lZrX.mjs} +1 -1
  51. package/browser/esm/index.mjs +2 -2
  52. package/browser/esm/{tFhROdVSw9KLQfUN.mjs → oLCocGFRAwsVsOSE.mjs} +2 -2
  53. package/cdn/assets/7_O6nILzn1fSVvkO.js +13449 -0
  54. package/cdn/assets/B3kbBB6oxKBErwzn.js +27 -0
  55. package/cdn/assets/BB66NDz7S3ocEfRB.js +150 -0
  56. package/cdn/assets/BCK7yhx9JfzU2rF0.js +22 -0
  57. package/cdn/assets/BSAH88RG1oubICau.js +84 -0
  58. package/cdn/assets/BT5EcMEFBsphczwC.js +1469 -0
  59. package/cdn/assets/BcWoqhD_sX85c7Mh.js +1701 -0
  60. package/cdn/assets/BoOefjrM4kZ-YXxa.js +90 -0
  61. package/cdn/assets/BtweFYnoj_aEfydW.js +1371 -0
  62. package/cdn/assets/Bv0Xb6DdcQbPYJKo.js +24 -0
  63. package/cdn/assets/CC-S4NMYhLg3WgqO.js +3875 -0
  64. package/cdn/assets/CJhyHcQcrhbtC33r.js +50 -0
  65. package/cdn/assets/CUc6gRjjRGTFWSHD.js +50 -0
  66. package/cdn/assets/CfObTzh8pGdd8D23.js +2183 -0
  67. package/cdn/assets/CiY3HumGDc_5bMtR.js +58 -0
  68. package/cdn/assets/CpPLN0-hDsTIFHZV.js +46 -0
  69. package/cdn/assets/Cq94woVmlxhjWVRI.js +21 -0
  70. package/cdn/assets/CsjftXmSYQRHNKdq.js +41 -0
  71. package/cdn/assets/DBL4jY0AVc53RGNm.js +637 -0
  72. package/cdn/assets/DDW1WJ2IM_9ZUfKm.js +36 -0
  73. package/cdn/assets/DJQOS9qxVAlpgDMt.js +1704 -0
  74. package/cdn/assets/DWJE3K3jMKMTCi3o.js +393 -0
  75. package/cdn/assets/D_5RgqgwXsoqLJDR.js +241 -0
  76. package/cdn/assets/DfmaL8DmDaFAv8M_.js +6481 -0
  77. package/cdn/assets/DgLPO_EQ9DYoGgec.js +423 -0
  78. package/cdn/assets/DkS6quwH1okWaho6.js +46 -0
  79. package/cdn/assets/DxMu6URURFWj9aXM.js +2373 -0
  80. package/cdn/assets/Jhm2DAcrfAqiM-Y-.js +26490 -0
  81. package/cdn/assets/MRBi3juXAW0lA_mj.js +1358 -0
  82. package/cdn/assets/dk2teWHDODYNarJY.js +27 -0
  83. package/cdn/assets/phYz0vGgqIEQ2hco.js +12 -0
  84. package/cdn/assets/qA23x9VVBL9R4qxN.js +43 -0
  85. package/cdn/index.js +41 -37
  86. package/cdn/loader.js +1 -1
  87. package/package.json +3 -3
  88. package/browser/esm/B5kkStdEkTczERyM.mjs +0 -7
  89. package/browser/esm/BuURCm92KsyGHG9e.mjs +0 -7
  90. package/browser/esm/CGZ5MX7afzMxDkCe.mjs +0 -7
  91. package/browser/esm/CzmNwV9tfFYUp_gS.mjs +0 -7
  92. package/browser/esm/DlVZFM9ZR5jGyG0_.mjs +0 -7
  93. package/browser/esm/DqXxZP6yKF4U1YfY.mjs +0 -7
  94. package/browser/esm/Dz2OVgq3kxi1TkfX.mjs +0 -7
  95. package/browser/esm/QBGUD1XS5_pysBLL.mjs +0 -7
  96. package/browser/esm/uGDCdtqxjqRCo4Xn.mjs +0 -7
@@ -0,0 +1,1371 @@
1
+ /**
2
+ * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.12
3
+ *
4
+ * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
+ * License: The license can be found at https://www.sheetxl.com/license.
6
+ */
7
+ var K, $, W = {}, G = {}, A = {}, X = {}, U = {};
8
+ function me() {
9
+ if ($) return U;
10
+ $ = 1;
11
+ var _ = U && U.__awaiter || function(o, c, p, u) {
12
+ return new (p || (p = Promise))(function(a, f) {
13
+ function l(m) {
14
+ try {
15
+ y(u.next(m));
16
+ } catch (g) {
17
+ f(g);
18
+ }
19
+ }
20
+ function s(m) {
21
+ try {
22
+ y(u.throw(m));
23
+ } catch (g) {
24
+ f(g);
25
+ }
26
+ }
27
+ function y(m) {
28
+ var g;
29
+ m.done ? a(m.value) : (g = m.value, g instanceof p ? g : new p(function(i) {
30
+ i(g);
31
+ })).then(l, s);
32
+ }
33
+ y((u = u.apply(o, c || [])).next());
34
+ });
35
+ }, j = U && U.__generator || function(o, c) {
36
+ var p, u, a, f, l = { label: 0, sent: function() {
37
+ if (1 & a[0]) throw a[1];
38
+ return a[1];
39
+ }, trys: [], ops: [] };
40
+ return f = { next: s(0), throw: s(1), return: s(2) }, typeof Symbol == "function" && (f[Symbol.iterator] = function() {
41
+ return this;
42
+ }), f;
43
+ function s(y) {
44
+ return function(m) {
45
+ return function(g) {
46
+ if (p) throw new TypeError("Generator is already executing.");
47
+ for (; l; ) try {
48
+ if (p = 1, u && (a = 2 & g[0] ? u.return : g[0] ? u.throw || ((a = u.return) && a.call(u), 0) : u.next) && !(a = a.call(u, g[1])).done) return a;
49
+ switch (u = 0, a && (g = [2 & g[0], a.value]), g[0]) {
50
+ case 0:
51
+ case 1:
52
+ a = g;
53
+ break;
54
+ case 4:
55
+ return l.label++, { value: g[1], done: !1 };
56
+ case 5:
57
+ l.label++, u = g[1], g = [0];
58
+ continue;
59
+ case 7:
60
+ g = l.ops.pop(), l.trys.pop();
61
+ continue;
62
+ default:
63
+ if (!((a = (a = l.trys).length > 0 && a[a.length - 1]) || g[0] !== 6 && g[0] !== 2)) {
64
+ l = 0;
65
+ continue;
66
+ }
67
+ if (g[0] === 3 && (!a || g[1] > a[0] && g[1] < a[3])) {
68
+ l.label = g[1];
69
+ break;
70
+ }
71
+ if (g[0] === 6 && l.label < a[1]) {
72
+ l.label = a[1], a = g;
73
+ break;
74
+ }
75
+ if (a && l.label < a[2]) {
76
+ l.label = a[2], l.ops.push(g);
77
+ break;
78
+ }
79
+ a[2] && l.ops.pop(), l.trys.pop();
80
+ continue;
81
+ }
82
+ g = c.call(o, l);
83
+ } catch (i) {
84
+ g = [6, i], u = 0;
85
+ } finally {
86
+ p = a = 0;
87
+ }
88
+ if (5 & g[0]) throw g[1];
89
+ return { value: g[0] ? g[1] : void 0, done: !0 };
90
+ }([y, m]);
91
+ };
92
+ }
93
+ };
94
+ Object.defineProperty(U, "__esModule", { value: !0 }), U.JsDelivrSourceResolver = void 0;
95
+ var O = function() {
96
+ function o() {
97
+ }
98
+ return o.prototype.resolvePackageJson = function(c, p, u) {
99
+ return _(this, void 0, void 0, function() {
100
+ return j(this, function(a) {
101
+ switch (a.label) {
102
+ case 0:
103
+ return [4, this.resolveFile("https://cdn.jsdelivr.net/npm/".concat(c).concat(p ? "@".concat(p) : "").concat(u ? "/".concat(u) : "", "/package.json"))];
104
+ case 1:
105
+ return [2, a.sent()];
106
+ }
107
+ });
108
+ });
109
+ }, o.prototype.resolveSourceFile = function(c, p, u) {
110
+ return _(this, void 0, void 0, function() {
111
+ return j(this, function(a) {
112
+ switch (a.label) {
113
+ case 0:
114
+ return [4, this.resolveFile("https://cdn.jsdelivr.net/npm/".concat(c).concat(p ? "@".concat(p) : "", "/").concat(u))];
115
+ case 1:
116
+ return [2, a.sent()];
117
+ }
118
+ });
119
+ });
120
+ }, o.prototype.resolveFile = function(c) {
121
+ return _(this, void 0, void 0, function() {
122
+ var p;
123
+ return j(this, function(u) {
124
+ switch (u.label) {
125
+ case 0:
126
+ return [4, fetch(c, { method: "GET" })];
127
+ case 1:
128
+ return (p = u.sent()).ok ? [4, p.text()] : [3, 3];
129
+ case 2:
130
+ return [2, u.sent()];
131
+ case 3:
132
+ if (p.status === 404) return [2, ""];
133
+ throw Error("Error other than 404 while fetching from Unpkg at ".concat(c));
134
+ case 4:
135
+ return [2];
136
+ }
137
+ });
138
+ });
139
+ }, o;
140
+ }();
141
+ return U.JsDelivrSourceResolver = O, U;
142
+ }
143
+ var H, Q, Y, C = {}, F = {};
144
+ function q() {
145
+ if (Q) return H;
146
+ function _(o) {
147
+ if (typeof o != "string") throw new TypeError("Path must be a string. Received " + JSON.stringify(o));
148
+ }
149
+ function j(o, c) {
150
+ for (var p, u = "", a = 0, f = -1, l = 0, s = 0; s <= o.length; ++s) {
151
+ if (s < o.length) p = o.charCodeAt(s);
152
+ else {
153
+ if (p === 47) break;
154
+ p = 47;
155
+ }
156
+ if (p === 47) {
157
+ if (!(f === s - 1 || l === 1)) if (f !== s - 1 && l === 2) {
158
+ if (u.length < 2 || a !== 2 || u.charCodeAt(u.length - 1) !== 46 || u.charCodeAt(u.length - 2) !== 46) {
159
+ if (u.length > 2) {
160
+ var y = u.lastIndexOf("/");
161
+ if (y !== u.length - 1) {
162
+ y === -1 ? (u = "", a = 0) : a = (u = u.slice(0, y)).length - 1 - u.lastIndexOf("/"), f = s, l = 0;
163
+ continue;
164
+ }
165
+ } else if (u.length === 2 || u.length === 1) {
166
+ u = "", a = 0, f = s, l = 0;
167
+ continue;
168
+ }
169
+ }
170
+ c && (u.length > 0 ? u += "/.." : u = "..", a = 2);
171
+ } else u.length > 0 ? u += "/" + o.slice(f + 1, s) : u = o.slice(f + 1, s), a = s - f - 1;
172
+ f = s, l = 0;
173
+ } else p === 46 && l !== -1 ? ++l : l = -1;
174
+ }
175
+ return u;
176
+ }
177
+ Q = 1;
178
+ var O = { resolve: function() {
179
+ for (var o, c = "", p = !1, u = arguments.length - 1; u >= -1 && !p; u--) {
180
+ var a;
181
+ u >= 0 ? a = arguments[u] : (o === void 0 && (o = process.cwd()), a = o), _(a), a.length !== 0 && (c = a + "/" + c, p = a.charCodeAt(0) === 47);
182
+ }
183
+ return c = j(c, !p), p ? c.length > 0 ? "/" + c : "/" : c.length > 0 ? c : ".";
184
+ }, normalize: function(o) {
185
+ if (_(o), o.length === 0) return ".";
186
+ var c = o.charCodeAt(0) === 47, p = o.charCodeAt(o.length - 1) === 47;
187
+ return (o = j(o, !c)).length !== 0 || c || (o = "."), o.length > 0 && p && (o += "/"), c ? "/" + o : o;
188
+ }, isAbsolute: function(o) {
189
+ return _(o), o.length > 0 && o.charCodeAt(0) === 47;
190
+ }, join: function() {
191
+ if (arguments.length === 0) return ".";
192
+ for (var o, c = 0; c < arguments.length; ++c) {
193
+ var p = arguments[c];
194
+ _(p), p.length > 0 && (o === void 0 ? o = p : o += "/" + p);
195
+ }
196
+ return o === void 0 ? "." : O.normalize(o);
197
+ }, relative: function(o, c) {
198
+ if (_(o), _(c), o === c || (o = O.resolve(o)) === (c = O.resolve(c))) return "";
199
+ for (var p = 1; p < o.length && o.charCodeAt(p) === 47; ++p) ;
200
+ for (var u = o.length, a = u - p, f = 1; f < c.length && c.charCodeAt(f) === 47; ++f) ;
201
+ for (var l = c.length - f, s = a < l ? a : l, y = -1, m = 0; m <= s; ++m) {
202
+ if (m === s) {
203
+ if (l > s) {
204
+ if (c.charCodeAt(f + m) === 47) return c.slice(f + m + 1);
205
+ if (m === 0) return c.slice(f + m);
206
+ } else a > s && (o.charCodeAt(p + m) === 47 ? y = m : m === 0 && (y = 0));
207
+ break;
208
+ }
209
+ var g = o.charCodeAt(p + m);
210
+ if (g !== c.charCodeAt(f + m)) break;
211
+ g === 47 && (y = m);
212
+ }
213
+ var i = "";
214
+ for (m = p + y + 1; m <= u; ++m) m !== u && o.charCodeAt(m) !== 47 || (i.length === 0 ? i += ".." : i += "/..");
215
+ return i.length > 0 ? i + c.slice(f + y) : (f += y, c.charCodeAt(f) === 47 && ++f, c.slice(f));
216
+ }, _makeLong: function(o) {
217
+ return o;
218
+ }, dirname: function(o) {
219
+ if (_(o), o.length === 0) return ".";
220
+ for (var c = o.charCodeAt(0), p = c === 47, u = -1, a = !0, f = o.length - 1; f >= 1; --f) if ((c = o.charCodeAt(f)) === 47) {
221
+ if (!a) {
222
+ u = f;
223
+ break;
224
+ }
225
+ } else a = !1;
226
+ return u === -1 ? p ? "/" : "." : p && u === 1 ? "//" : o.slice(0, u);
227
+ }, basename: function(o, c) {
228
+ if (c !== void 0 && typeof c != "string") throw new TypeError('"ext" argument must be a string');
229
+ _(o);
230
+ var p, u = 0, a = -1, f = !0;
231
+ if (c !== void 0 && c.length > 0 && c.length <= o.length) {
232
+ if (c.length === o.length && c === o) return "";
233
+ var l = c.length - 1, s = -1;
234
+ for (p = o.length - 1; p >= 0; --p) {
235
+ var y = o.charCodeAt(p);
236
+ if (y === 47) {
237
+ if (!f) {
238
+ u = p + 1;
239
+ break;
240
+ }
241
+ } else s === -1 && (f = !1, s = p + 1), l >= 0 && (y === c.charCodeAt(l) ? --l === -1 && (a = p) : (l = -1, a = s));
242
+ }
243
+ return u === a ? a = s : a === -1 && (a = o.length), o.slice(u, a);
244
+ }
245
+ for (p = o.length - 1; p >= 0; --p) if (o.charCodeAt(p) === 47) {
246
+ if (!f) {
247
+ u = p + 1;
248
+ break;
249
+ }
250
+ } else a === -1 && (f = !1, a = p + 1);
251
+ return a === -1 ? "" : o.slice(u, a);
252
+ }, extname: function(o) {
253
+ _(o);
254
+ for (var c = -1, p = 0, u = -1, a = !0, f = 0, l = o.length - 1; l >= 0; --l) {
255
+ var s = o.charCodeAt(l);
256
+ if (s !== 47) u === -1 && (a = !1, u = l + 1), s === 46 ? c === -1 ? c = l : f !== 1 && (f = 1) : c !== -1 && (f = -1);
257
+ else if (!a) {
258
+ p = l + 1;
259
+ break;
260
+ }
261
+ }
262
+ return c === -1 || u === -1 || f === 0 || f === 1 && c === u - 1 && c === p + 1 ? "" : o.slice(c, u);
263
+ }, format: function(o) {
264
+ if (o === null || typeof o != "object") throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof o);
265
+ return function(c, p) {
266
+ var u = p.dir || p.root, a = p.base || (p.name || "") + (p.ext || "");
267
+ return u ? u === p.root ? u + a : u + "/" + a : a;
268
+ }(0, o);
269
+ }, parse: function(o) {
270
+ _(o);
271
+ var c = { root: "", dir: "", base: "", ext: "", name: "" };
272
+ if (o.length === 0) return c;
273
+ var p, u = o.charCodeAt(0), a = u === 47;
274
+ a ? (c.root = "/", p = 1) : p = 0;
275
+ for (var f = -1, l = 0, s = -1, y = !0, m = o.length - 1, g = 0; m >= p; --m) if ((u = o.charCodeAt(m)) !== 47) s === -1 && (y = !1, s = m + 1), u === 46 ? f === -1 ? f = m : g !== 1 && (g = 1) : f !== -1 && (g = -1);
276
+ else if (!y) {
277
+ l = m + 1;
278
+ break;
279
+ }
280
+ return f === -1 || s === -1 || g === 0 || g === 1 && f === s - 1 && f === l + 1 ? s !== -1 && (c.base = c.name = l === 0 && a ? o.slice(1, s) : o.slice(l, s)) : (l === 0 && a ? (c.name = o.slice(1, f), c.base = o.slice(1, s)) : (c.name = o.slice(l, f), c.base = o.slice(l, s)), c.ext = o.slice(f, s)), l > 0 ? c.dir = o.slice(0, l - 1) : a && (c.dir = "/"), c;
281
+ }, sep: "/", delimiter: ":", win32: null, posix: null };
282
+ return O.posix = O, H = O;
283
+ }
284
+ var Z, J = {};
285
+ function be() {
286
+ if (Z) return J;
287
+ Z = 1;
288
+ var _ = J && J.__importDefault || function(O) {
289
+ return O && O.__esModule ? O : { default: O };
290
+ };
291
+ Object.defineProperty(J, "__esModule", { value: !0 }), J.importResourcePathToString = void 0;
292
+ var j = _(q());
293
+ return J.importResourcePathToString = function(O) {
294
+ var o;
295
+ switch (O.kind) {
296
+ case "package":
297
+ return j.default.join(O.packageName, (o = O.importPath) !== null && o !== void 0 ? o : "", "package.json");
298
+ case "relative":
299
+ return j.default.join(O.sourcePath, O.importPath);
300
+ case "relative-in-package":
301
+ return j.default.join(O.packageName, O.sourcePath, O.importPath);
302
+ }
303
+ }, J;
304
+ }
305
+ var ee, z = {};
306
+ function ke() {
307
+ return ee || (ee = 1, Object.defineProperty(z, "__esModule", { value: !0 }), z.invokeUpdate = void 0, z.invokeUpdate = function(_, j) {
308
+ var O, o = "".concat(_.type, ": ");
309
+ switch (_.type) {
310
+ case "CodeChanged":
311
+ case "ResolveNewImports":
312
+ o += "";
313
+ break;
314
+ case "LookedUpTypeFile":
315
+ o += '"'.concat(_.path, '" was ').concat(_.success ? "sucessfully" : "not sucessfully", " looked up");
316
+ break;
317
+ case "AttemptedLookUpFile":
318
+ o += '"'.concat(_.path, '" was ').concat(_.success ? "sucessfully" : "not sucessfully", " attempted to looked up");
319
+ break;
320
+ case "LookedUpPackage":
321
+ o += 'package.json for package "'.concat(_.package, '" was ').concat(_.success ? "sucessfully" : "not sucessfully", " looked up").concat(_.definitelyTyped ? " (found in definitely typed repo)" : "");
322
+ break;
323
+ case "LoadedFromCache":
324
+ o += '"'.concat(_.importPath, '" was loaded from cache');
325
+ break;
326
+ case "StoredToCache":
327
+ o += '"'.concat(_.importPath, '" was stored to cache');
328
+ }
329
+ o.endsWith(": ") && (o = o.slice(void 0, -2)), (O = j.onUpdate) === null || O === void 0 || O.call(j, _, o);
330
+ }), z;
331
+ }
332
+ var te, re, ne, oe, B = {};
333
+ function we() {
334
+ if (te) return B;
335
+ te = 1, Object.defineProperty(B, "__esModule", { value: !0 }), B.RecursionDepth = void 0;
336
+ var _ = function() {
337
+ function j(O, o, c) {
338
+ o === void 0 && (o = 0), c === void 0 && (c = 0), this.options = O, this.fileRecursionDepth = o, this.packageRecursionDepth = c;
339
+ }
340
+ return j.prototype.nextPackage = function() {
341
+ return new j(this.options, this.fileRecursionDepth, this.packageRecursionDepth + 1);
342
+ }, j.prototype.nextFile = function() {
343
+ return new j(this.options, this.fileRecursionDepth + 1, this.packageRecursionDepth);
344
+ }, j.prototype.same = function() {
345
+ return new j(this.options, this.fileRecursionDepth, this.packageRecursionDepth);
346
+ }, j.prototype.shouldStop = function() {
347
+ return this.options.fileRecursionDepth > 0 && this.fileRecursionDepth >= this.options.fileRecursionDepth || this.options.packageRecursionDepth > 0 && this.packageRecursionDepth >= this.options.packageRecursionDepth;
348
+ }, j;
349
+ }();
350
+ return B.RecursionDepth = _, B;
351
+ }
352
+ function _e() {
353
+ if (re) return C;
354
+ re = 1;
355
+ var _ = C && C.__assign || function() {
356
+ return _ = Object.assign || function(i) {
357
+ for (var t, e = 1, r = arguments.length; e < r; e++) for (var n in t = arguments[e]) Object.prototype.hasOwnProperty.call(t, n) && (i[n] = t[n]);
358
+ return i;
359
+ }, _.apply(this, arguments);
360
+ }, j = C && C.__createBinding || (Object.create ? function(i, t, e, r) {
361
+ r === void 0 && (r = e);
362
+ var n = Object.getOwnPropertyDescriptor(t, e);
363
+ n && !("get" in n ? !t.__esModule : n.writable || n.configurable) || (n = { enumerable: !0, get: function() {
364
+ return t[e];
365
+ } }), Object.defineProperty(i, r, n);
366
+ } : function(i, t, e, r) {
367
+ r === void 0 && (r = e), i[r] = t[e];
368
+ }), O = C && C.__setModuleDefault || (Object.create ? function(i, t) {
369
+ Object.defineProperty(i, "default", { enumerable: !0, value: t });
370
+ } : function(i, t) {
371
+ i.default = t;
372
+ }), o = C && C.__importStar || function(i) {
373
+ if (i && i.__esModule) return i;
374
+ var t = {};
375
+ if (i != null) for (var e in i) e !== "default" && Object.prototype.hasOwnProperty.call(i, e) && j(t, i, e);
376
+ return O(t, i), t;
377
+ }, c = C && C.__awaiter || function(i, t, e, r) {
378
+ return new (e || (e = Promise))(function(n, b) {
379
+ function d(w) {
380
+ try {
381
+ v(r.next(w));
382
+ } catch (h) {
383
+ b(h);
384
+ }
385
+ }
386
+ function k(w) {
387
+ try {
388
+ v(r.throw(w));
389
+ } catch (h) {
390
+ b(h);
391
+ }
392
+ }
393
+ function v(w) {
394
+ var h;
395
+ w.done ? n(w.value) : (h = w.value, h instanceof e ? h : new e(function(P) {
396
+ P(h);
397
+ })).then(d, k);
398
+ }
399
+ v((r = r.apply(i, t || [])).next());
400
+ });
401
+ }, p = C && C.__generator || function(i, t) {
402
+ var e, r, n, b, d = { label: 0, sent: function() {
403
+ if (1 & n[0]) throw n[1];
404
+ return n[1];
405
+ }, trys: [], ops: [] };
406
+ return b = { next: k(0), throw: k(1), return: k(2) }, typeof Symbol == "function" && (b[Symbol.iterator] = function() {
407
+ return this;
408
+ }), b;
409
+ function k(v) {
410
+ return function(w) {
411
+ return function(h) {
412
+ if (e) throw new TypeError("Generator is already executing.");
413
+ for (; d; ) try {
414
+ if (e = 1, r && (n = 2 & h[0] ? r.return : h[0] ? r.throw || ((n = r.return) && n.call(r), 0) : r.next) && !(n = n.call(r, h[1])).done) return n;
415
+ switch (r = 0, n && (h = [2 & h[0], n.value]), h[0]) {
416
+ case 0:
417
+ case 1:
418
+ n = h;
419
+ break;
420
+ case 4:
421
+ return d.label++, { value: h[1], done: !1 };
422
+ case 5:
423
+ d.label++, r = h[1], h = [0];
424
+ continue;
425
+ case 7:
426
+ h = d.ops.pop(), d.trys.pop();
427
+ continue;
428
+ default:
429
+ if (!((n = (n = d.trys).length > 0 && n[n.length - 1]) || h[0] !== 6 && h[0] !== 2)) {
430
+ d = 0;
431
+ continue;
432
+ }
433
+ if (h[0] === 3 && (!n || h[1] > n[0] && h[1] < n[3])) {
434
+ d.label = h[1];
435
+ break;
436
+ }
437
+ if (h[0] === 6 && d.label < n[1]) {
438
+ d.label = n[1], n = h;
439
+ break;
440
+ }
441
+ if (n && d.label < n[2]) {
442
+ d.label = n[2], d.ops.push(h);
443
+ break;
444
+ }
445
+ n[2] && d.ops.pop(), d.trys.pop();
446
+ continue;
447
+ }
448
+ h = t.call(i, d);
449
+ } catch (P) {
450
+ h = [6, P], r = 0;
451
+ } finally {
452
+ e = n = 0;
453
+ }
454
+ if (5 & h[0]) throw h[1];
455
+ return { value: h[0] ? h[1] : void 0, done: !0 };
456
+ }([v, w]);
457
+ };
458
+ }
459
+ }, u = C && C.__values || function(i) {
460
+ var t = typeof Symbol == "function" && Symbol.iterator, e = t && i[t], r = 0;
461
+ if (e) return e.call(i);
462
+ if (i && typeof i.length == "number") return { next: function() {
463
+ return i && r >= i.length && (i = void 0), { value: i && i[r++], done: !i };
464
+ } };
465
+ throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
466
+ }, a = C && C.__read || function(i, t) {
467
+ var e = typeof Symbol == "function" && i[Symbol.iterator];
468
+ if (!e) return i;
469
+ var r, n, b = e.call(i), d = [];
470
+ try {
471
+ for (; (t === void 0 || t-- > 0) && !(r = b.next()).done; ) d.push(r.value);
472
+ } catch (k) {
473
+ n = { error: k };
474
+ } finally {
475
+ try {
476
+ r && !r.done && (e = b.return) && e.call(b);
477
+ } finally {
478
+ if (n) throw n.error;
479
+ }
480
+ }
481
+ return d;
482
+ };
483
+ Object.defineProperty(C, "__esModule", { value: !0 }), C.ImportResolver = void 0;
484
+ var f = function() {
485
+ if (Y) return F;
486
+ Y = 1;
487
+ var i = F && F.__createBinding || (Object.create ? function(k, v, w, h) {
488
+ h === void 0 && (h = w);
489
+ var P = Object.getOwnPropertyDescriptor(v, w);
490
+ P && !("get" in P ? !v.__esModule : P.writable || P.configurable) || (P = { enumerable: !0, get: function() {
491
+ return v[w];
492
+ } }), Object.defineProperty(k, h, P);
493
+ } : function(k, v, w, h) {
494
+ h === void 0 && (h = w), k[h] = v[w];
495
+ }), t = F && F.__setModuleDefault || (Object.create ? function(k, v) {
496
+ Object.defineProperty(k, "default", { enumerable: !0, value: v });
497
+ } : function(k, v) {
498
+ k.default = v;
499
+ }), e = F && F.__importStar || function(k) {
500
+ if (k && k.__esModule) return k;
501
+ var v = {};
502
+ if (k != null) for (var w in k) w !== "default" && Object.prototype.hasOwnProperty.call(k, w) && i(v, k, w);
503
+ return t(v, k), v;
504
+ }, r = F && F.__read || function(k, v) {
505
+ var w = typeof Symbol == "function" && k[Symbol.iterator];
506
+ if (!w) return k;
507
+ var h, P, S = w.call(k), D = [];
508
+ try {
509
+ for (; (v === void 0 || v-- > 0) && !(h = S.next()).done; ) D.push(h.value);
510
+ } catch (x) {
511
+ P = { error: x };
512
+ } finally {
513
+ try {
514
+ h && !h.done && (w = S.return) && w.call(S);
515
+ } finally {
516
+ if (P) throw P.error;
517
+ }
518
+ }
519
+ return D;
520
+ }, n = F && F.__spreadArray || function(k, v, w) {
521
+ if (w || arguments.length === 2) for (var h, P = 0, S = v.length; P < S; P++) !h && P in v || (h || (h = Array.prototype.slice.call(v, 0, P)), h[P] = v[P]);
522
+ return k.concat(h || Array.prototype.slice.call(v));
523
+ };
524
+ Object.defineProperty(F, "__esModule", { value: !0 }), F.DependencyParser = void 0;
525
+ var b = e(q()), d = function() {
526
+ function k() {
527
+ this.REGEX_CLEAN = /[\n|\r]/g, this.REGEX_DETECT_IMPORT = /(?:(?:(?:import)|(?:export))(?:.)*?from\s+["']([^"']+)["'])|(?:((?:require|import))(?:\s+)?\(["']([^"']+)["']\))|(?:\/+\s+<reference\s+path=["']([^"']+)["']\s+\/>)/g, this.REGEX_NODE_MODULE = /^node:([\w\W\/]+)$/;
528
+ }
529
+ return k.prototype.parseDependencies = function(v, w) {
530
+ var h = this;
531
+ return n([], r(v.matchAll(this.REGEX_DETECT_IMPORT)), !1).map(function(P) {
532
+ var S, D;
533
+ return (D = (S = P[1]) !== null && S !== void 0 ? S : P[2]) !== null && D !== void 0 ? D : P[3];
534
+ }).filter(function(P) {
535
+ return !!P;
536
+ }).map(function(P) {
537
+ return h.resolvePath(P, w);
538
+ });
539
+ }, k.prototype.resolvePath = function(v, w) {
540
+ var h = v.match(this.REGEX_NODE_MODULE);
541
+ if (h) return { kind: "relative-in-package", packageName: "@types/node", importPath: "".concat(h[1], ".d.ts"), sourcePath: "" };
542
+ if (typeof w == "string") {
543
+ if (v.startsWith(".")) return { kind: "relative", importPath: v, sourcePath: w };
544
+ if (v.startsWith("@")) {
545
+ var P = v.split("/");
546
+ return { kind: "package", packageName: "".concat(P[0], "/").concat(P[1]), importPath: P.slice(2).join("/") };
547
+ }
548
+ return { kind: "package", packageName: (P = v.split("/"))[0], importPath: P.slice(1).join("/") };
549
+ }
550
+ switch (w.kind) {
551
+ case "package":
552
+ throw Error("TODO?");
553
+ case "relative":
554
+ throw Error("TODO2?");
555
+ case "relative-in-package":
556
+ return v.startsWith(".") ? { kind: "relative-in-package", packageName: w.packageName, sourcePath: b.join(w.sourcePath, w.importPath), importPath: v } : v.startsWith("@") ? (P = v.split("/"), { kind: "package", packageName: "".concat(P[0], "/").concat(P[1]), importPath: P.slice(2).join("/") }) : { kind: "package", packageName: (P = v.split("/"))[0], importPath: P.slice(1).join("/") };
557
+ }
558
+ }, k;
559
+ }();
560
+ return F.DependencyParser = d, F;
561
+ }(), l = be(), s = o(q()), y = ke(), m = we(), g = function() {
562
+ function i(t) {
563
+ var e, r;
564
+ if (this.options = t, this.loadedFiles = [], this.dependencyParser = new f.DependencyParser(), this.cache = t.sourceCache, this.sourceResolver = t.sourceResolver, this.newImportsResolved = !1, this.monaco = t.monaco, t.preloadPackages && t.versions) {
565
+ this.versions = t.versions;
566
+ try {
567
+ for (var n = u(Object.entries(t.versions)), b = n.next(); !b.done; b = n.next()) {
568
+ var d = a(b.value, 2), k = d[0];
569
+ d[1], this.resolveImport({ kind: "package", packageName: k, importPath: "" }, new m.RecursionDepth(this.options)).catch(function(v) {
570
+ console.error(v);
571
+ });
572
+ }
573
+ } catch (v) {
574
+ e = { error: v };
575
+ } finally {
576
+ try {
577
+ b && !b.done && (r = n.return) && r.call(n);
578
+ } finally {
579
+ if (e) throw e.error;
580
+ }
581
+ }
582
+ }
583
+ }
584
+ return i.prototype.wereNewImportsResolved = function() {
585
+ return this.newImportsResolved;
586
+ }, i.prototype.resetNewImportsResolved = function() {
587
+ this.newImportsResolved = !1;
588
+ }, i.prototype.resolveImportsInFile = function(t, e, r) {
589
+ var n, b, d;
590
+ return c(this, void 0, void 0, function() {
591
+ var k, v, w, h, P, S, D, x;
592
+ return p(this, function(R) {
593
+ switch (R.label) {
594
+ case 0:
595
+ if (r.shouldStop()) return [2];
596
+ k = this.dependencyParser.parseDependencies(t, e), R.label = 1;
597
+ case 1:
598
+ R.trys.push([1, 8, 9, 10]), v = u(k), w = v.next(), R.label = 2;
599
+ case 2:
600
+ if (w.done) return [3, 7];
601
+ h = w.value, R.label = 3;
602
+ case 3:
603
+ return R.trys.push([3, 5, , 6]), [4, this.resolveImport(h, r)];
604
+ case 4:
605
+ return R.sent(), [3, 6];
606
+ case 5:
607
+ return P = R.sent(), this.options.onError ? (b = (n = this.options).onError) === null || b === void 0 || b.call(n, (d = P.message) !== null && d !== void 0 ? d : P) : console.error(P), [3, 6];
608
+ case 6:
609
+ return w = v.next(), [3, 2];
610
+ case 7:
611
+ return [3, 10];
612
+ case 8:
613
+ return S = R.sent(), D = { error: S }, [3, 10];
614
+ case 9:
615
+ try {
616
+ w && !w.done && (x = v.return) && x.call(v);
617
+ } finally {
618
+ if (D) throw D.error;
619
+ }
620
+ return [7];
621
+ case 10:
622
+ return [2];
623
+ }
624
+ });
625
+ });
626
+ }, i.prototype.resolveImport = function(t, e) {
627
+ return c(this, void 0, void 0, function() {
628
+ var r, n;
629
+ return p(this, function(b) {
630
+ switch (b.label) {
631
+ case 0:
632
+ if (r = this.hashImportResourcePath(t), this.loadedFiles.includes(r)) return [2];
633
+ switch (this.loadedFiles.push(r), t.kind) {
634
+ case "package":
635
+ return [3, 1];
636
+ case "relative":
637
+ return [3, 5];
638
+ case "relative-in-package":
639
+ return [3, 6];
640
+ }
641
+ return [3, 8];
642
+ case 1:
643
+ return [4, this.resolveImportFromPackageRoot(t)];
644
+ case 2:
645
+ return (n = b.sent()) ? [4, this.resolveImportInPackage(n, e.nextPackage().nextFile())] : [3, 4];
646
+ case 3:
647
+ case 7:
648
+ return [2, b.sent()];
649
+ case 4:
650
+ return [3, 8];
651
+ case 5:
652
+ throw Error("Not implemented yet");
653
+ case 6:
654
+ return [4, this.resolveImportInPackage(t, e.nextFile())];
655
+ case 8:
656
+ return [2];
657
+ }
658
+ });
659
+ });
660
+ }, i.prototype.resolveImportInPackage = function(t, e) {
661
+ return c(this, void 0, void 0, function() {
662
+ var r, n, b;
663
+ return p(this, function(d) {
664
+ switch (d.label) {
665
+ case 0:
666
+ return [4, this.loadSourceFileContents(t)];
667
+ case 1:
668
+ return (r = d.sent()) ? (n = r.source, b = r.at, this.createModel(n, this.monaco.Uri.parse(this.options.fileRootPath + s.join("node_modules/".concat(t.packageName), b))), [4, this.resolveImportsInFile(n, { kind: "relative-in-package", packageName: t.packageName, sourcePath: s.dirname(b), importPath: "" }, e)]) : [3, 3];
669
+ case 2:
670
+ d.sent(), d.label = 3;
671
+ case 3:
672
+ return [2];
673
+ }
674
+ });
675
+ });
676
+ }, i.prototype.resolveImportFromPackageRoot = function(t) {
677
+ var e, r, n, b, d, k, v, w, h;
678
+ return c(this, void 0, void 0, function() {
679
+ var P, S, D, x, R, N, V, E, T;
680
+ return p(this, function(M) {
681
+ switch (M.label) {
682
+ case 0:
683
+ return P = { type: "LookedUpPackage", package: t.packageName, definitelyTyped: !1, success: !1 }, !this.options.onlySpecifiedPackages || !((e = this.versions) === null || e === void 0) && e[t.packageName] || !((r = this.versions) === null || r === void 0) && r["@types/" + t.packageName] ? (S = (b = (n = t.importPath) === null || n === void 0 ? void 0 : n.length) !== null && b !== void 0 && b, D = S ? "/".concat(t.importPath) : "", [4, this.resolvePackageJson(t.packageName, (d = this.versions) === null || d === void 0 ? void 0 : d[t.packageName], S ? t.importPath : void 0)]) : ((0, y.invokeUpdate)(P, this.options), [2]);
684
+ case 1:
685
+ return (x = M.sent()) || !S ? [3, 3] : [4, this.resolvePackageJson(t.packageName, (k = this.versions) === null || k === void 0 ? void 0 : k[t.packageName])];
686
+ case 2:
687
+ x = M.sent(), D = "", M.label = 3;
688
+ case 3:
689
+ return x ? (R = JSON.parse(x)).typings || R.types ? (T = R.typings || R.types, this.createModel(x, this.monaco.Uri.parse("".concat(this.options.fileRootPath, "node_modules/").concat(t.packageName).concat(D, "/package.json"))), (0, y.invokeUpdate)({ type: "LookedUpPackage", package: t.packageName, definitelyTyped: !1, success: !0 }, this.options), this.setVersion(t.packageName, R.version), [2, { kind: "relative-in-package", packageName: t.packageName, sourcePath: "", importPath: s.join((v = t.importPath) !== null && v !== void 0 ? v : "", T.startsWith("./") ? T.slice(2) : T) }]) : [3, 4] : [3, 7];
690
+ case 4:
691
+ return N = "@types/".concat(t.packageName.startsWith("@") ? t.packageName.slice(1).replace(/\//, "__") : t.packageName), [4, this.resolvePackageJson(N, (w = this.versions) === null || w === void 0 ? void 0 : w[N])];
692
+ case 5:
693
+ if (V = M.sent()) {
694
+ if ((E = JSON.parse(V)).typings || E.types) return T = E.typings || E.types, this.createModel(V, this.monaco.Uri.parse("".concat(this.options.fileRootPath, "node_modules/").concat(N, "/package.json"))), (0, y.invokeUpdate)({ type: "LookedUpPackage", package: N, definitelyTyped: !0, success: !0 }, this.options), this.setVersion(N, E.version), [2, { kind: "relative-in-package", packageName: N, sourcePath: "", importPath: s.join((h = t.importPath) !== null && h !== void 0 ? h : "", T.startsWith("./") ? T.slice(2) : T) }];
695
+ (0, y.invokeUpdate)(P, this.options);
696
+ } else (0, y.invokeUpdate)(P, this.options);
697
+ M.label = 6;
698
+ case 6:
699
+ return [3, 8];
700
+ case 7:
701
+ (0, y.invokeUpdate)(P, this.options), M.label = 8;
702
+ case 8:
703
+ return [2];
704
+ }
705
+ });
706
+ });
707
+ }, i.prototype.loadSourceFileContents = function(t) {
708
+ return c(this, void 0, void 0, function() {
709
+ var e, r, n, b, d, k, v, w, h, P, S, D, x, R, N, V;
710
+ return p(this, function(E) {
711
+ switch (E.label) {
712
+ case 0:
713
+ return e = s.join(t.packageName, t.sourcePath, t.importPath), r = { type: "LookedUpTypeFile", path: e, definitelyTyped: !1, success: !1 }, n = t.packageName, b = this.getVersion(t.packageName), (d = [".d.ts", "/index.d.ts", ".ts", ".tsx", "/index.ts", "/index.tsx"]).map(function(T) {
714
+ return t.importPath.endsWith(T);
715
+ }).reduce(function(T, M) {
716
+ return T || M;
717
+ }, !1) ? [4, this.resolveSourceFile(n, b, s.join(t.sourcePath, t.importPath))] : [3, 2];
718
+ case 1:
719
+ return (R = E.sent()) ? [2, { source: R, at: s.join(t.sourcePath, t.importPath) }] : [3, 9];
720
+ case 2:
721
+ E.trys.push([2, 7, 8, 9]), k = u(d), v = k.next(), E.label = 3;
722
+ case 3:
723
+ return v.done ? [3, 6] : (w = v.value, h = s.join(t.sourcePath, t.importPath), x = (w === ".d.ts" && h.endsWith(".js") ? h.slice(0, -3) : h) + w, [4, this.resolveSourceFile(n, b, x)]);
724
+ case 4:
725
+ if (R = E.sent(), (0, y.invokeUpdate)({ type: "AttemptedLookUpFile", path: s.join(n, x), success: !!R }, this.options), R) return (0, y.invokeUpdate)({ type: "LookedUpTypeFile", path: s.join(n, x), success: !0 }, this.options), [2, { source: R, at: x }];
726
+ E.label = 5;
727
+ case 5:
728
+ return v = k.next(), [3, 3];
729
+ case 6:
730
+ return [3, 9];
731
+ case 7:
732
+ return P = E.sent(), N = { error: P }, [3, 9];
733
+ case 8:
734
+ try {
735
+ v && !v.done && (V = k.return) && V.call(k);
736
+ } finally {
737
+ if (N) throw N.error;
738
+ }
739
+ return [7];
740
+ case 9:
741
+ return [4, this.resolvePackageJson(n, b, s.join(t.sourcePath, t.importPath))];
742
+ case 10:
743
+ return (S = E.sent()) && (D = JSON.parse(S).types) ? (x = s.join(t.sourcePath, t.importPath, D), [4, this.resolveSourceFile(n, b, x)]) : [3, 12];
744
+ case 11:
745
+ if (R = E.sent()) return (0, y.invokeUpdate)({ type: "LookedUpTypeFile", path: s.join(n, x), success: !0 }, this.options), [2, { source: R, at: x }];
746
+ E.label = 12;
747
+ case 12:
748
+ return (0, y.invokeUpdate)(r, this.options), [2, null];
749
+ }
750
+ });
751
+ });
752
+ }, i.prototype.getVersion = function(t) {
753
+ var e;
754
+ return (e = this.versions) === null || e === void 0 ? void 0 : e[t];
755
+ }, i.prototype.setVersions = function(t) {
756
+ var e, r;
757
+ this.versions = t, (r = (e = this.options).onUpdateVersions) === null || r === void 0 || r.call(e, t);
758
+ }, i.prototype.setVersion = function(t, e) {
759
+ var r;
760
+ this.setVersions(_(_({}, this.versions), ((r = {})[t] = e, r)));
761
+ }, i.prototype.createModel = function(t, e) {
762
+ e = e.with({ path: e.path.replace("@types/", "") }), this.monaco.editor.getModel(e) || (this.monaco.editor.createModel(t, "typescript", e), this.newImportsResolved = !0);
763
+ }, i.prototype.hashImportResourcePath = function(t) {
764
+ return (0, l.importResourcePathToString)(t);
765
+ }, i.prototype.resolvePackageJson = function(t, e, r) {
766
+ return c(this, void 0, void 0, function() {
767
+ var n, b, d, k;
768
+ return p(this, function(v) {
769
+ switch (v.label) {
770
+ case 0:
771
+ return n = s.join(t + (e ? "@".concat(e) : ""), r ?? "", "package.json"), b = !1, d = void 0, this.cache.isFileAvailable ? [4, this.cache.isFileAvailable(n)] : [3, 2];
772
+ case 1:
773
+ return b = v.sent(), [3, 4];
774
+ case 2:
775
+ return [4, this.cache.getFile(n)];
776
+ case 3:
777
+ d = v.sent(), b = d !== void 0, v.label = 4;
778
+ case 4:
779
+ return b ? d == null ? [3, 5] : (k = d, [3, 7]) : [3, 8];
780
+ case 5:
781
+ return [4, this.cache.getFile(n)];
782
+ case 6:
783
+ k = v.sent(), v.label = 7;
784
+ case 7:
785
+ return [2, k];
786
+ case 8:
787
+ return [4, this.sourceResolver.resolvePackageJson(t, e, r)];
788
+ case 9:
789
+ return (d = v.sent()) && this.cache.storeFile(n, d), [2, d];
790
+ }
791
+ });
792
+ });
793
+ }, i.prototype.resolveSourceFile = function(t, e, r) {
794
+ return c(this, void 0, void 0, function() {
795
+ var n, b, d, k;
796
+ return p(this, function(v) {
797
+ switch (v.label) {
798
+ case 0:
799
+ return n = s.join(t + (e ? "@".concat(e) : ""), r), b = !1, d = void 0, this.cache.isFileAvailable ? [4, this.cache.isFileAvailable(n)] : [3, 2];
800
+ case 1:
801
+ return b = v.sent(), [3, 4];
802
+ case 2:
803
+ return [4, this.cache.getFile(n)];
804
+ case 3:
805
+ d = v.sent(), b = d !== void 0, v.label = 4;
806
+ case 4:
807
+ return b ? ((0, y.invokeUpdate)({ type: "LoadedFromCache", importPath: n }, this.options), d == null ? [3, 5] : (k = d, [3, 7])) : [3, 8];
808
+ case 5:
809
+ return [4, this.cache.getFile(n)];
810
+ case 6:
811
+ k = v.sent(), v.label = 7;
812
+ case 7:
813
+ return [2, k];
814
+ case 8:
815
+ return [4, this.sourceResolver.resolveSourceFile(t, e, r)];
816
+ case 9:
817
+ return (d = v.sent()) && ((0, y.invokeUpdate)({ type: "StoredToCache", importPath: n }, this.options), this.cache.storeFile(n, d)), [2, d];
818
+ }
819
+ });
820
+ });
821
+ }, i;
822
+ }();
823
+ return C.ImportResolver = g, C;
824
+ }
825
+ function Pe() {
826
+ if (ne) return A;
827
+ ne = 1;
828
+ var _ = A && A.__assign || function() {
829
+ return _ = Object.assign || function(i) {
830
+ for (var t, e = 1, r = arguments.length; e < r; e++) for (var n in t = arguments[e]) Object.prototype.hasOwnProperty.call(t, n) && (i[n] = t[n]);
831
+ return i;
832
+ }, _.apply(this, arguments);
833
+ }, j = A && A.__createBinding || (Object.create ? function(i, t, e, r) {
834
+ r === void 0 && (r = e);
835
+ var n = Object.getOwnPropertyDescriptor(t, e);
836
+ n && !("get" in n ? !t.__esModule : n.writable || n.configurable) || (n = { enumerable: !0, get: function() {
837
+ return t[e];
838
+ } }), Object.defineProperty(i, r, n);
839
+ } : function(i, t, e, r) {
840
+ r === void 0 && (r = e), i[r] = t[e];
841
+ }), O = A && A.__setModuleDefault || (Object.create ? function(i, t) {
842
+ Object.defineProperty(i, "default", { enumerable: !0, value: t });
843
+ } : function(i, t) {
844
+ i.default = t;
845
+ }), o = A && A.__importStar || function(i) {
846
+ if (i && i.__esModule) return i;
847
+ var t = {};
848
+ if (i != null) for (var e in i) e !== "default" && Object.prototype.hasOwnProperty.call(i, e) && j(t, i, e);
849
+ return O(t, i), t;
850
+ }, c = A && A.__awaiter || function(i, t, e, r) {
851
+ return new (e || (e = Promise))(function(n, b) {
852
+ function d(w) {
853
+ try {
854
+ v(r.next(w));
855
+ } catch (h) {
856
+ b(h);
857
+ }
858
+ }
859
+ function k(w) {
860
+ try {
861
+ v(r.throw(w));
862
+ } catch (h) {
863
+ b(h);
864
+ }
865
+ }
866
+ function v(w) {
867
+ var h;
868
+ w.done ? n(w.value) : (h = w.value, h instanceof e ? h : new e(function(P) {
869
+ P(h);
870
+ })).then(d, k);
871
+ }
872
+ v((r = r.apply(i, t || [])).next());
873
+ });
874
+ }, p = A && A.__generator || function(i, t) {
875
+ var e, r, n, b, d = { label: 0, sent: function() {
876
+ if (1 & n[0]) throw n[1];
877
+ return n[1];
878
+ }, trys: [], ops: [] };
879
+ return b = { next: k(0), throw: k(1), return: k(2) }, typeof Symbol == "function" && (b[Symbol.iterator] = function() {
880
+ return this;
881
+ }), b;
882
+ function k(v) {
883
+ return function(w) {
884
+ return function(h) {
885
+ if (e) throw new TypeError("Generator is already executing.");
886
+ for (; d; ) try {
887
+ if (e = 1, r && (n = 2 & h[0] ? r.return : h[0] ? r.throw || ((n = r.return) && n.call(r), 0) : r.next) && !(n = n.call(r, h[1])).done) return n;
888
+ switch (r = 0, n && (h = [2 & h[0], n.value]), h[0]) {
889
+ case 0:
890
+ case 1:
891
+ n = h;
892
+ break;
893
+ case 4:
894
+ return d.label++, { value: h[1], done: !1 };
895
+ case 5:
896
+ d.label++, r = h[1], h = [0];
897
+ continue;
898
+ case 7:
899
+ h = d.ops.pop(), d.trys.pop();
900
+ continue;
901
+ default:
902
+ if (!((n = (n = d.trys).length > 0 && n[n.length - 1]) || h[0] !== 6 && h[0] !== 2)) {
903
+ d = 0;
904
+ continue;
905
+ }
906
+ if (h[0] === 3 && (!n || h[1] > n[0] && h[1] < n[3])) {
907
+ d.label = h[1];
908
+ break;
909
+ }
910
+ if (h[0] === 6 && d.label < n[1]) {
911
+ d.label = n[1], n = h;
912
+ break;
913
+ }
914
+ if (n && d.label < n[2]) {
915
+ d.label = n[2], d.ops.push(h);
916
+ break;
917
+ }
918
+ n[2] && d.ops.pop(), d.trys.pop();
919
+ continue;
920
+ }
921
+ h = t.call(i, d);
922
+ } catch (P) {
923
+ h = [6, P], r = 0;
924
+ } finally {
925
+ e = n = 0;
926
+ }
927
+ if (5 & h[0]) throw h[1];
928
+ return { value: h[0] ? h[1] : void 0, done: !0 };
929
+ }([v, w]);
930
+ };
931
+ }
932
+ }, u = A && A.__values || function(i) {
933
+ var t = typeof Symbol == "function" && Symbol.iterator, e = t && i[t], r = 0;
934
+ if (e) return e.call(i);
935
+ if (i && typeof i.length == "number") return { next: function() {
936
+ return i && r >= i.length && (i = void 0), { value: i && i[r++], done: !i };
937
+ } };
938
+ throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
939
+ };
940
+ Object.defineProperty(A, "__esModule", { value: !0 }), A.AutoTypingsCore = void 0;
941
+ var a = function() {
942
+ if (K) return X;
943
+ K = 1, Object.defineProperty(X, "__esModule", { value: !0 }), X.DummySourceCache = void 0;
944
+ var i = function() {
945
+ function t() {
946
+ }
947
+ return t.prototype.getFile = function(e) {
948
+ return Promise.resolve(void 0);
949
+ }, t.prototype.isFileAvailable = function(e) {
950
+ return Promise.resolve(!1);
951
+ }, t.prototype.storeFile = function(e, r) {
952
+ return Promise.resolve(void 0);
953
+ }, t.prototype.clear = function() {
954
+ return Promise.resolve(void 0);
955
+ }, t;
956
+ }();
957
+ return X.DummySourceCache = i, X;
958
+ }(), f = me(), l = _e(), s = o(q()), y = ke(), m = we(), g = function() {
959
+ function i(t, e) {
960
+ var r = this;
961
+ this.editor = t, this.options = e, this.disposables = [], this.importResolver = new l.ImportResolver(e);
962
+ var n = t.onDidChangeModelContent(function(b) {
963
+ r.debouncedResolveContents();
964
+ });
965
+ this.disposables.push(n), this.resolveContents(), e.dontAdaptEditorOptions || e.monaco.languages.typescript.typescriptDefaults.setCompilerOptions(_(_({}, e.monaco.languages.typescript.typescriptDefaults.getCompilerOptions()), { moduleResolution: e.monaco.languages.typescript.ModuleResolutionKind.NodeJs, allowSyntheticDefaultImports: !0, rootDir: e.fileRootPath }));
966
+ }
967
+ return i.create = function(t, e) {
968
+ var r, n;
969
+ return c(this, void 0, void 0, function() {
970
+ var b;
971
+ return p(this, function(d) {
972
+ if (e?.shareCache && e.sourceCache && !i.sharedCache && (i.sharedCache = e.sourceCache), !(b = e?.monaco)) throw new Error("monacoInstance not found, you can specify the monaco instance via options.monaco");
973
+ return [2, new i(t, _(_({ fileRootPath: "inmemory://model/", onlySpecifiedPackages: !1, preloadPackages: !1, shareCache: !1, dontAdaptEditorOptions: !1, dontRefreshModelValueAfterResolvement: !1, sourceCache: (r = i.sharedCache) !== null && r !== void 0 ? r : new a.DummySourceCache(), sourceResolver: (n = e?.sourceResolver) !== null && n !== void 0 ? n : new f.JsDelivrSourceResolver(), debounceDuration: 4e3, fileRecursionDepth: 10, packageRecursionDepth: 3 }, e), { monaco: b }))];
974
+ });
975
+ });
976
+ }, i.prototype.dispose = function() {
977
+ var t, e;
978
+ try {
979
+ for (var r = u(this.disposables), n = r.next(); !n.done; n = r.next()) n.value.dispose();
980
+ } catch (b) {
981
+ t = { error: b };
982
+ } finally {
983
+ try {
984
+ n && !n.done && (e = r.return) && e.call(r);
985
+ } finally {
986
+ if (t) throw t.error;
987
+ }
988
+ }
989
+ }, i.prototype.setVersions = function(t) {
990
+ this.importResolver.setVersions(t), this.options.versions = t;
991
+ }, i.prototype.clearCache = function() {
992
+ return c(this, void 0, void 0, function() {
993
+ return p(this, function(t) {
994
+ switch (t.label) {
995
+ case 0:
996
+ return [4, this.options.sourceCache.clear()];
997
+ case 1:
998
+ return t.sent(), [2];
999
+ }
1000
+ });
1001
+ });
1002
+ }, i.prototype.debouncedResolveContents = function() {
1003
+ var t = this;
1004
+ this.isResolving || ((0, y.invokeUpdate)({ type: "CodeChanged" }, this.options), this.options.debounceDuration <= 0 ? this.resolveContents() : (this.debounceTimer !== void 0 && clearTimeout(this.debounceTimer), this.debounceTimer = setTimeout(function() {
1005
+ return c(t, void 0, void 0, function() {
1006
+ return p(this, function(e) {
1007
+ switch (e.label) {
1008
+ case 0:
1009
+ return [4, this.resolveContents()];
1010
+ case 1:
1011
+ return e.sent(), this.debounceTimer = void 0, [2];
1012
+ }
1013
+ });
1014
+ });
1015
+ }, this.options.debounceDuration)));
1016
+ }, i.prototype.resolveContents = function() {
1017
+ var t;
1018
+ return c(this, void 0, void 0, function() {
1019
+ var e, r, n, b;
1020
+ return p(this, function(d) {
1021
+ switch (d.label) {
1022
+ case 0:
1023
+ if (this.isResolving = !0, (0, y.invokeUpdate)({ type: "ResolveNewImports" }, this.options), !(e = this.editor.getModel())) throw Error("No model");
1024
+ r = e.getLinesContent(), d.label = 1;
1025
+ case 1:
1026
+ return d.trys.push([1, 3, , 4]), [4, this.importResolver.resolveImportsInFile(r.join(`
1027
+ `), s.dirname(e.uri.toString()), new m.RecursionDepth(this.options))];
1028
+ case 2:
1029
+ return d.sent(), [3, 4];
1030
+ case 3:
1031
+ if (n = d.sent(), !this.options.onError) throw n;
1032
+ return this.options.onError((t = n.message) !== null && t !== void 0 ? t : n), [3, 4];
1033
+ case 4:
1034
+ return this.importResolver.wereNewImportsResolved() && (this.options.dontRefreshModelValueAfterResolvement || (b = this.editor.getPosition(), e.setValue(e.getValue()), b && this.editor.setPosition(b)), this.importResolver.resetNewImportsResolved()), this.isResolving = !1, [2];
1035
+ }
1036
+ });
1037
+ });
1038
+ }, i;
1039
+ }();
1040
+ return A.AutoTypingsCore = g, A;
1041
+ }
1042
+ var ae, ie, se, ce, ue, le, pe, he, fe, I = {}, de = {}, ve = {}, ye = {}, ge = {}, L = {};
1043
+ const Oe = function(_, j) {
1044
+ for (var O = 0; O < j.length; O++) {
1045
+ const o = j[O];
1046
+ if (typeof o != "string" && !Array.isArray(o)) {
1047
+ for (const c in o) if (c !== "default" && !(c in _)) {
1048
+ const p = Object.getOwnPropertyDescriptor(o, c);
1049
+ p && Object.defineProperty(_, c, p.get ? p : { enumerable: !0, get: () => o[c] });
1050
+ }
1051
+ }
1052
+ }
1053
+ return Object.freeze(Object.defineProperty(_, Symbol.toStringTag, { value: "Module" }));
1054
+ }({ __proto__: null }, [fe ? he : (fe = 1, he = function() {
1055
+ return pe || (pe = 1, _ = W, j = W && W.__createBinding || (Object.create ? function(o, c, p, u) {
1056
+ u === void 0 && (u = p);
1057
+ var a = Object.getOwnPropertyDescriptor(c, p);
1058
+ a && !("get" in a ? !c.__esModule : a.writable || a.configurable) || (a = { enumerable: !0, get: function() {
1059
+ return c[p];
1060
+ } }), Object.defineProperty(o, u, a);
1061
+ } : function(o, c, p, u) {
1062
+ u === void 0 && (u = p), o[u] = c[p];
1063
+ }), O = W && W.__exportStar || function(o, c) {
1064
+ for (var p in o) p === "default" || Object.prototype.hasOwnProperty.call(c, p) || j(c, o, p);
1065
+ }, Object.defineProperty(_, "__esModule", { value: !0 }), O(function() {
1066
+ if (oe) return G;
1067
+ oe = 1;
1068
+ var o, c = G && G.__extends || (o = function(u, a) {
1069
+ return o = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(f, l) {
1070
+ f.__proto__ = l;
1071
+ } || function(f, l) {
1072
+ for (var s in l) Object.prototype.hasOwnProperty.call(l, s) && (f[s] = l[s]);
1073
+ }, o(u, a);
1074
+ }, function(u, a) {
1075
+ if (typeof a != "function" && a !== null) throw new TypeError("Class extends value " + String(a) + " is not a constructor or null");
1076
+ function f() {
1077
+ this.constructor = u;
1078
+ }
1079
+ o(u, a), u.prototype = a === null ? Object.create(a) : (f.prototype = a.prototype, new f());
1080
+ });
1081
+ Object.defineProperty(G, "__esModule", { value: !0 }), G.AutoTypings = void 0;
1082
+ var p = function(u) {
1083
+ function a(f, l) {
1084
+ return u.call(this, f, l) || this;
1085
+ }
1086
+ return c(a, u), a;
1087
+ }(Pe().AutoTypingsCore);
1088
+ return G.AutoTypings = p, G;
1089
+ }(), _), O(be(), _), O(function() {
1090
+ if (ae) return I;
1091
+ ae = 1;
1092
+ var o = I && I.__awaiter || function(a, f, l, s) {
1093
+ return new (l || (l = Promise))(function(y, m) {
1094
+ function g(e) {
1095
+ try {
1096
+ t(s.next(e));
1097
+ } catch (r) {
1098
+ m(r);
1099
+ }
1100
+ }
1101
+ function i(e) {
1102
+ try {
1103
+ t(s.throw(e));
1104
+ } catch (r) {
1105
+ m(r);
1106
+ }
1107
+ }
1108
+ function t(e) {
1109
+ var r;
1110
+ e.done ? y(e.value) : (r = e.value, r instanceof l ? r : new l(function(n) {
1111
+ n(r);
1112
+ })).then(g, i);
1113
+ }
1114
+ t((s = s.apply(a, f || [])).next());
1115
+ });
1116
+ }, c = I && I.__generator || function(a, f) {
1117
+ var l, s, y, m, g = { label: 0, sent: function() {
1118
+ if (1 & y[0]) throw y[1];
1119
+ return y[1];
1120
+ }, trys: [], ops: [] };
1121
+ return m = { next: i(0), throw: i(1), return: i(2) }, typeof Symbol == "function" && (m[Symbol.iterator] = function() {
1122
+ return this;
1123
+ }), m;
1124
+ function i(t) {
1125
+ return function(e) {
1126
+ return function(r) {
1127
+ if (l) throw new TypeError("Generator is already executing.");
1128
+ for (; g; ) try {
1129
+ if (l = 1, s && (y = 2 & r[0] ? s.return : r[0] ? s.throw || ((y = s.return) && y.call(s), 0) : s.next) && !(y = y.call(s, r[1])).done) return y;
1130
+ switch (s = 0, y && (r = [2 & r[0], y.value]), r[0]) {
1131
+ case 0:
1132
+ case 1:
1133
+ y = r;
1134
+ break;
1135
+ case 4:
1136
+ return g.label++, { value: r[1], done: !1 };
1137
+ case 5:
1138
+ g.label++, s = r[1], r = [0];
1139
+ continue;
1140
+ case 7:
1141
+ r = g.ops.pop(), g.trys.pop();
1142
+ continue;
1143
+ default:
1144
+ if (!((y = (y = g.trys).length > 0 && y[y.length - 1]) || r[0] !== 6 && r[0] !== 2)) {
1145
+ g = 0;
1146
+ continue;
1147
+ }
1148
+ if (r[0] === 3 && (!y || r[1] > y[0] && r[1] < y[3])) {
1149
+ g.label = r[1];
1150
+ break;
1151
+ }
1152
+ if (r[0] === 6 && g.label < y[1]) {
1153
+ g.label = y[1], y = r;
1154
+ break;
1155
+ }
1156
+ if (y && g.label < y[2]) {
1157
+ g.label = y[2], g.ops.push(r);
1158
+ break;
1159
+ }
1160
+ y[2] && g.ops.pop(), g.trys.pop();
1161
+ continue;
1162
+ }
1163
+ r = f.call(a, g);
1164
+ } catch (n) {
1165
+ r = [6, n], s = 0;
1166
+ } finally {
1167
+ l = y = 0;
1168
+ }
1169
+ if (5 & r[0]) throw r[1];
1170
+ return { value: r[0] ? r[1] : void 0, done: !0 };
1171
+ }([t, e]);
1172
+ };
1173
+ }
1174
+ }, p = I && I.__values || function(a) {
1175
+ var f = typeof Symbol == "function" && Symbol.iterator, l = f && a[f], s = 0;
1176
+ if (l) return l.call(a);
1177
+ if (a && typeof a.length == "number") return { next: function() {
1178
+ return a && s >= a.length && (a = void 0), { value: a && a[s++], done: !a };
1179
+ } };
1180
+ throw new TypeError(f ? "Object is not iterable." : "Symbol.iterator is not defined.");
1181
+ };
1182
+ Object.defineProperty(I, "__esModule", { value: !0 }), I.LocalStorageCache = void 0;
1183
+ var u = function() {
1184
+ function a() {
1185
+ this.localCache = {};
1186
+ }
1187
+ return a.prototype.getFile = function(f) {
1188
+ var l;
1189
+ return o(this, void 0, void 0, function() {
1190
+ return c(this, function(s) {
1191
+ try {
1192
+ return [2, (l = localStorage.getItem(a.LOCALSTORAGE_PREFIX + f)) !== null && l !== void 0 ? l : void 0];
1193
+ } catch {
1194
+ return [2, this.localCache[f]];
1195
+ }
1196
+ return [2];
1197
+ });
1198
+ });
1199
+ }, a.prototype.storeFile = function(f, l) {
1200
+ return o(this, void 0, void 0, function() {
1201
+ return c(this, function(s) {
1202
+ this.localCache[f] = l;
1203
+ try {
1204
+ localStorage.setItem(a.LOCALSTORAGE_PREFIX + f, l);
1205
+ } catch {
1206
+ }
1207
+ return [2];
1208
+ });
1209
+ });
1210
+ }, a.prototype.clear = function() {
1211
+ return o(this, void 0, void 0, function() {
1212
+ var f, l, s, y, m, g, i;
1213
+ return c(this, function(t) {
1214
+ for (this.localCache = {}, f = [], l = 0; l < localStorage.length; l++) (m = localStorage.key(l)) != null && m.startsWith(a.LOCALSTORAGE_PREFIX) && f.push(m);
1215
+ try {
1216
+ for (s = p(f), y = s.next(); !y.done; y = s.next()) m = y.value, localStorage.removeItem(m);
1217
+ } catch (e) {
1218
+ g = { error: e };
1219
+ } finally {
1220
+ try {
1221
+ y && !y.done && (i = s.return) && i.call(s);
1222
+ } finally {
1223
+ if (g) throw g.error;
1224
+ }
1225
+ }
1226
+ return [2];
1227
+ });
1228
+ });
1229
+ }, a.LOCALSTORAGE_PREFIX = "__autotyper_cache_", a;
1230
+ }();
1231
+ return I.LocalStorageCache = u, I;
1232
+ }(), _), O((ie || (ie = 1, Object.defineProperty(de, "__esModule", { value: !0 })), de), _), O((se || (se = 1, Object.defineProperty(ve, "__esModule", { value: !0 })), ve), _), O((ce || (ce = 1, Object.defineProperty(ye, "__esModule", { value: !0 })), ye), _), O((ue || (ue = 1, Object.defineProperty(ge, "__esModule", { value: !0 })), ge), _), O(function() {
1233
+ if (le) return L;
1234
+ le = 1;
1235
+ var o = L && L.__awaiter || function(u, a, f, l) {
1236
+ return new (f || (f = Promise))(function(s, y) {
1237
+ function m(t) {
1238
+ try {
1239
+ i(l.next(t));
1240
+ } catch (e) {
1241
+ y(e);
1242
+ }
1243
+ }
1244
+ function g(t) {
1245
+ try {
1246
+ i(l.throw(t));
1247
+ } catch (e) {
1248
+ y(e);
1249
+ }
1250
+ }
1251
+ function i(t) {
1252
+ var e;
1253
+ t.done ? s(t.value) : (e = t.value, e instanceof f ? e : new f(function(r) {
1254
+ r(e);
1255
+ })).then(m, g);
1256
+ }
1257
+ i((l = l.apply(u, a || [])).next());
1258
+ });
1259
+ }, c = L && L.__generator || function(u, a) {
1260
+ var f, l, s, y, m = { label: 0, sent: function() {
1261
+ if (1 & s[0]) throw s[1];
1262
+ return s[1];
1263
+ }, trys: [], ops: [] };
1264
+ return y = { next: g(0), throw: g(1), return: g(2) }, typeof Symbol == "function" && (y[Symbol.iterator] = function() {
1265
+ return this;
1266
+ }), y;
1267
+ function g(i) {
1268
+ return function(t) {
1269
+ return function(e) {
1270
+ if (f) throw new TypeError("Generator is already executing.");
1271
+ for (; m; ) try {
1272
+ if (f = 1, l && (s = 2 & e[0] ? l.return : e[0] ? l.throw || ((s = l.return) && s.call(l), 0) : l.next) && !(s = s.call(l, e[1])).done) return s;
1273
+ switch (l = 0, s && (e = [2 & e[0], s.value]), e[0]) {
1274
+ case 0:
1275
+ case 1:
1276
+ s = e;
1277
+ break;
1278
+ case 4:
1279
+ return m.label++, { value: e[1], done: !1 };
1280
+ case 5:
1281
+ m.label++, l = e[1], e = [0];
1282
+ continue;
1283
+ case 7:
1284
+ e = m.ops.pop(), m.trys.pop();
1285
+ continue;
1286
+ default:
1287
+ if (!((s = (s = m.trys).length > 0 && s[s.length - 1]) || e[0] !== 6 && e[0] !== 2)) {
1288
+ m = 0;
1289
+ continue;
1290
+ }
1291
+ if (e[0] === 3 && (!s || e[1] > s[0] && e[1] < s[3])) {
1292
+ m.label = e[1];
1293
+ break;
1294
+ }
1295
+ if (e[0] === 6 && m.label < s[1]) {
1296
+ m.label = s[1], s = e;
1297
+ break;
1298
+ }
1299
+ if (s && m.label < s[2]) {
1300
+ m.label = s[2], m.ops.push(e);
1301
+ break;
1302
+ }
1303
+ s[2] && m.ops.pop(), m.trys.pop();
1304
+ continue;
1305
+ }
1306
+ e = a.call(u, m);
1307
+ } catch (r) {
1308
+ e = [6, r], l = 0;
1309
+ } finally {
1310
+ f = s = 0;
1311
+ }
1312
+ if (5 & e[0]) throw e[1];
1313
+ return { value: e[0] ? e[1] : void 0, done: !0 };
1314
+ }([i, t]);
1315
+ };
1316
+ }
1317
+ };
1318
+ Object.defineProperty(L, "__esModule", { value: !0 }), L.UnpkgSourceResolver = void 0;
1319
+ var p = function() {
1320
+ function u() {
1321
+ }
1322
+ return u.prototype.resolvePackageJson = function(a, f, l) {
1323
+ return o(this, void 0, void 0, function() {
1324
+ return c(this, function(s) {
1325
+ switch (s.label) {
1326
+ case 0:
1327
+ return [4, this.resolveFile("https://unpkg.com/".concat(a).concat(f ? "@".concat(f) : "").concat(l ? "/".concat(l) : "", "/package.json"))];
1328
+ case 1:
1329
+ return [2, s.sent()];
1330
+ }
1331
+ });
1332
+ });
1333
+ }, u.prototype.resolveSourceFile = function(a, f, l) {
1334
+ return o(this, void 0, void 0, function() {
1335
+ return c(this, function(s) {
1336
+ switch (s.label) {
1337
+ case 0:
1338
+ return [4, this.resolveFile("https://unpkg.com/".concat(a).concat(f ? "@".concat(f) : "", "/").concat(l))];
1339
+ case 1:
1340
+ return [2, s.sent()];
1341
+ }
1342
+ });
1343
+ });
1344
+ }, u.prototype.resolveFile = function(a) {
1345
+ return o(this, void 0, void 0, function() {
1346
+ var f;
1347
+ return c(this, function(l) {
1348
+ switch (l.label) {
1349
+ case 0:
1350
+ return [4, fetch(a, { method: "GET" })];
1351
+ case 1:
1352
+ return (f = l.sent()).ok ? [4, f.text()] : [3, 3];
1353
+ case 2:
1354
+ return [2, l.sent()];
1355
+ case 3:
1356
+ if (f.status === 404) return [2, ""];
1357
+ throw Error("Error other than 404 while fetching from Unpkg at ".concat(a));
1358
+ case 4:
1359
+ return [2];
1360
+ }
1361
+ });
1362
+ });
1363
+ }, u;
1364
+ }();
1365
+ return L.UnpkgSourceResolver = p, L;
1366
+ }(), _), O(me(), _)), W;
1367
+ var _, j, O;
1368
+ }())]);
1369
+ export {
1370
+ Oe as c
1371
+ };