@sheetxl/studio-vanilla 0.4.10 → 0.4.11

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