loader.js 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365
  1. 'use strict'
  2. /*!-----------------------------------------------------------
  3. * Copyright (c) Microsoft Corporation. All rights reserved.
  4. * Version: 0.37.0(20c3f8ff1e9176c954b34c052b2a84358d41a030)
  5. * Released under the MIT license
  6. * https://github.com/microsoft/vscode/blob/main/LICENSE.txt
  7. *-----------------------------------------------------------*/ const _amdLoaderGlobal = this,
  8. _commonjsGlobal = typeof global == 'object' ? global : {}
  9. var AMDLoader
  10. ;(function (u) {
  11. u.global = _amdLoaderGlobal
  12. class y {
  13. get isWindows() {
  14. return this._detect(), this._isWindows
  15. }
  16. get isNode() {
  17. return this._detect(), this._isNode
  18. }
  19. get isElectronRenderer() {
  20. return this._detect(), this._isElectronRenderer
  21. }
  22. get isWebWorker() {
  23. return this._detect(), this._isWebWorker
  24. }
  25. get isElectronNodeIntegrationWebWorker() {
  26. return this._detect(), this._isElectronNodeIntegrationWebWorker
  27. }
  28. constructor() {
  29. ;(this._detected = !1),
  30. (this._isWindows = !1),
  31. (this._isNode = !1),
  32. (this._isElectronRenderer = !1),
  33. (this._isWebWorker = !1),
  34. (this._isElectronNodeIntegrationWebWorker = !1)
  35. }
  36. _detect() {
  37. this._detected ||
  38. ((this._detected = !0),
  39. (this._isWindows = y._isWindows()),
  40. (this._isNode = typeof module < 'u' && !!module.exports),
  41. (this._isElectronRenderer =
  42. typeof process < 'u' &&
  43. typeof process.versions < 'u' &&
  44. typeof process.versions.electron < 'u' &&
  45. process.type === 'renderer'),
  46. (this._isWebWorker = typeof u.global.importScripts == 'function'),
  47. (this._isElectronNodeIntegrationWebWorker =
  48. this._isWebWorker &&
  49. typeof process < 'u' &&
  50. typeof process.versions < 'u' &&
  51. typeof process.versions.electron < 'u' &&
  52. process.type === 'worker'))
  53. }
  54. static _isWindows() {
  55. return typeof navigator < 'u' &&
  56. navigator.userAgent &&
  57. navigator.userAgent.indexOf('Windows') >= 0
  58. ? !0
  59. : typeof process < 'u'
  60. ? process.platform === 'win32'
  61. : !1
  62. }
  63. }
  64. u.Environment = y
  65. })(AMDLoader || (AMDLoader = {}))
  66. var AMDLoader
  67. ;(function (u) {
  68. class y {
  69. constructor(r, c, a) {
  70. ;(this.type = r), (this.detail = c), (this.timestamp = a)
  71. }
  72. }
  73. u.LoaderEvent = y
  74. class m {
  75. constructor(r) {
  76. this._events = [new y(1, '', r)]
  77. }
  78. record(r, c) {
  79. this._events.push(new y(r, c, u.Utilities.getHighPerformanceTimestamp()))
  80. }
  81. getEvents() {
  82. return this._events
  83. }
  84. }
  85. u.LoaderEventRecorder = m
  86. class p {
  87. record(r, c) {}
  88. getEvents() {
  89. return []
  90. }
  91. }
  92. ;(p.INSTANCE = new p()), (u.NullLoaderEventRecorder = p)
  93. })(AMDLoader || (AMDLoader = {}))
  94. var AMDLoader
  95. ;(function (u) {
  96. class y {
  97. static fileUriToFilePath(p, h) {
  98. if (((h = decodeURI(h).replace(/%23/g, '#')), p)) {
  99. if (/^file:\/\/\//.test(h)) return h.substr(8)
  100. if (/^file:\/\//.test(h)) return h.substr(5)
  101. } else if (/^file:\/\//.test(h)) return h.substr(7)
  102. return h
  103. }
  104. static startsWith(p, h) {
  105. return p.length >= h.length && p.substr(0, h.length) === h
  106. }
  107. static endsWith(p, h) {
  108. return p.length >= h.length && p.substr(p.length - h.length) === h
  109. }
  110. static containsQueryString(p) {
  111. return /^[^\#]*\?/gi.test(p)
  112. }
  113. static isAbsolutePath(p) {
  114. return /^((http:\/\/)|(https:\/\/)|(file:\/\/)|(\/))/.test(p)
  115. }
  116. static forEachProperty(p, h) {
  117. if (p) {
  118. let r
  119. for (r in p) p.hasOwnProperty(r) && h(r, p[r])
  120. }
  121. }
  122. static isEmpty(p) {
  123. let h = !0
  124. return (
  125. y.forEachProperty(p, () => {
  126. h = !1
  127. }),
  128. h
  129. )
  130. }
  131. static recursiveClone(p) {
  132. if (
  133. !p ||
  134. typeof p != 'object' ||
  135. p instanceof RegExp ||
  136. (!Array.isArray(p) && Object.getPrototypeOf(p) !== Object.prototype)
  137. )
  138. return p
  139. let h = Array.isArray(p) ? [] : {}
  140. return (
  141. y.forEachProperty(p, (r, c) => {
  142. c && typeof c == 'object' ? (h[r] = y.recursiveClone(c)) : (h[r] = c)
  143. }),
  144. h
  145. )
  146. }
  147. static generateAnonymousModule() {
  148. return '===anonymous' + y.NEXT_ANONYMOUS_ID++ + '==='
  149. }
  150. static isAnonymousModule(p) {
  151. return y.startsWith(p, '===anonymous')
  152. }
  153. static getHighPerformanceTimestamp() {
  154. return (
  155. this.PERFORMANCE_NOW_PROBED ||
  156. ((this.PERFORMANCE_NOW_PROBED = !0),
  157. (this.HAS_PERFORMANCE_NOW =
  158. u.global.performance && typeof u.global.performance.now == 'function')),
  159. this.HAS_PERFORMANCE_NOW ? u.global.performance.now() : Date.now()
  160. )
  161. }
  162. }
  163. ;(y.NEXT_ANONYMOUS_ID = 1),
  164. (y.PERFORMANCE_NOW_PROBED = !1),
  165. (y.HAS_PERFORMANCE_NOW = !1),
  166. (u.Utilities = y)
  167. })(AMDLoader || (AMDLoader = {}))
  168. var AMDLoader
  169. ;(function (u) {
  170. function y(h) {
  171. if (h instanceof Error) return h
  172. const r = new Error(h.message || String(h) || 'Unknown Error')
  173. return h.stack && (r.stack = h.stack), r
  174. }
  175. u.ensureError = y
  176. class m {
  177. static validateConfigurationOptions(r) {
  178. function c(a) {
  179. if (a.phase === 'loading') {
  180. console.error('Loading "' + a.moduleId + '" failed'),
  181. console.error(a),
  182. console.error('Here are the modules that depend on it:'),
  183. console.error(a.neededBy)
  184. return
  185. }
  186. if (a.phase === 'factory') {
  187. console.error('The factory function of "' + a.moduleId + '" has thrown an exception'),
  188. console.error(a),
  189. console.error('Here are the modules that depend on it:'),
  190. console.error(a.neededBy)
  191. return
  192. }
  193. }
  194. if (
  195. ((r = r || {}),
  196. typeof r.baseUrl != 'string' && (r.baseUrl = ''),
  197. typeof r.isBuild != 'boolean' && (r.isBuild = !1),
  198. typeof r.paths != 'object' && (r.paths = {}),
  199. typeof r.config != 'object' && (r.config = {}),
  200. typeof r.catchError > 'u' && (r.catchError = !1),
  201. typeof r.recordStats > 'u' && (r.recordStats = !1),
  202. typeof r.urlArgs != 'string' && (r.urlArgs = ''),
  203. typeof r.onError != 'function' && (r.onError = c),
  204. Array.isArray(r.ignoreDuplicateModules) || (r.ignoreDuplicateModules = []),
  205. r.baseUrl.length > 0 && (u.Utilities.endsWith(r.baseUrl, '/') || (r.baseUrl += '/')),
  206. typeof r.cspNonce != 'string' && (r.cspNonce = ''),
  207. typeof r.preferScriptTags > 'u' && (r.preferScriptTags = !1),
  208. r.nodeCachedData &&
  209. typeof r.nodeCachedData == 'object' &&
  210. (typeof r.nodeCachedData.seed != 'string' && (r.nodeCachedData.seed = 'seed'),
  211. (typeof r.nodeCachedData.writeDelay != 'number' || r.nodeCachedData.writeDelay < 0) &&
  212. (r.nodeCachedData.writeDelay = 1e3 * 7),
  213. !r.nodeCachedData.path || typeof r.nodeCachedData.path != 'string'))
  214. ) {
  215. const a = y(new Error("INVALID cached data configuration, 'path' MUST be set"))
  216. ;(a.phase = 'configuration'), r.onError(a), (r.nodeCachedData = void 0)
  217. }
  218. return r
  219. }
  220. static mergeConfigurationOptions(r = null, c = null) {
  221. let a = u.Utilities.recursiveClone(c || {})
  222. return (
  223. u.Utilities.forEachProperty(r, (t, e) => {
  224. t === 'ignoreDuplicateModules' && typeof a.ignoreDuplicateModules < 'u'
  225. ? (a.ignoreDuplicateModules = a.ignoreDuplicateModules.concat(e))
  226. : t === 'paths' && typeof a.paths < 'u'
  227. ? u.Utilities.forEachProperty(e, (i, s) => (a.paths[i] = s))
  228. : t === 'config' && typeof a.config < 'u'
  229. ? u.Utilities.forEachProperty(e, (i, s) => (a.config[i] = s))
  230. : (a[t] = u.Utilities.recursiveClone(e))
  231. }),
  232. m.validateConfigurationOptions(a)
  233. )
  234. }
  235. }
  236. u.ConfigurationOptionsUtil = m
  237. class p {
  238. constructor(r, c) {
  239. if (
  240. ((this._env = r),
  241. (this.options = m.mergeConfigurationOptions(c)),
  242. this._createIgnoreDuplicateModulesMap(),
  243. this._createSortedPathsRules(),
  244. this.options.baseUrl === '' &&
  245. this.options.nodeRequire &&
  246. this.options.nodeRequire.main &&
  247. this.options.nodeRequire.main.filename &&
  248. this._env.isNode)
  249. ) {
  250. let a = this.options.nodeRequire.main.filename,
  251. t = Math.max(a.lastIndexOf('/'), a.lastIndexOf('\\'))
  252. this.options.baseUrl = a.substring(0, t + 1)
  253. }
  254. }
  255. _createIgnoreDuplicateModulesMap() {
  256. this.ignoreDuplicateModulesMap = {}
  257. for (let r = 0; r < this.options.ignoreDuplicateModules.length; r++)
  258. this.ignoreDuplicateModulesMap[this.options.ignoreDuplicateModules[r]] = !0
  259. }
  260. _createSortedPathsRules() {
  261. ;(this.sortedPathsRules = []),
  262. u.Utilities.forEachProperty(this.options.paths, (r, c) => {
  263. Array.isArray(c)
  264. ? this.sortedPathsRules.push({ from: r, to: c })
  265. : this.sortedPathsRules.push({ from: r, to: [c] })
  266. }),
  267. this.sortedPathsRules.sort((r, c) => c.from.length - r.from.length)
  268. }
  269. cloneAndMerge(r) {
  270. return new p(this._env, m.mergeConfigurationOptions(r, this.options))
  271. }
  272. getOptionsLiteral() {
  273. return this.options
  274. }
  275. _applyPaths(r) {
  276. let c
  277. for (let a = 0, t = this.sortedPathsRules.length; a < t; a++)
  278. if (((c = this.sortedPathsRules[a]), u.Utilities.startsWith(r, c.from))) {
  279. let e = []
  280. for (let i = 0, s = c.to.length; i < s; i++) e.push(c.to[i] + r.substr(c.from.length))
  281. return e
  282. }
  283. return [r]
  284. }
  285. _addUrlArgsToUrl(r) {
  286. return u.Utilities.containsQueryString(r)
  287. ? r + '&' + this.options.urlArgs
  288. : r + '?' + this.options.urlArgs
  289. }
  290. _addUrlArgsIfNecessaryToUrl(r) {
  291. return this.options.urlArgs ? this._addUrlArgsToUrl(r) : r
  292. }
  293. _addUrlArgsIfNecessaryToUrls(r) {
  294. if (this.options.urlArgs)
  295. for (let c = 0, a = r.length; c < a; c++) r[c] = this._addUrlArgsToUrl(r[c])
  296. return r
  297. }
  298. moduleIdToPaths(r) {
  299. if (
  300. this._env.isNode &&
  301. this.options.amdModulesPattern instanceof RegExp &&
  302. !this.options.amdModulesPattern.test(r)
  303. )
  304. return this.isBuild() ? ['empty:'] : ['node|' + r]
  305. let c = r,
  306. a
  307. if (!u.Utilities.endsWith(c, '.js') && !u.Utilities.isAbsolutePath(c)) {
  308. a = this._applyPaths(c)
  309. for (let t = 0, e = a.length; t < e; t++)
  310. (this.isBuild() && a[t] === 'empty:') ||
  311. (u.Utilities.isAbsolutePath(a[t]) || (a[t] = this.options.baseUrl + a[t]),
  312. !u.Utilities.endsWith(a[t], '.js') &&
  313. !u.Utilities.containsQueryString(a[t]) &&
  314. (a[t] = a[t] + '.js'))
  315. } else
  316. !u.Utilities.endsWith(c, '.js') && !u.Utilities.containsQueryString(c) && (c = c + '.js'),
  317. (a = [c])
  318. return this._addUrlArgsIfNecessaryToUrls(a)
  319. }
  320. requireToUrl(r) {
  321. let c = r
  322. return (
  323. u.Utilities.isAbsolutePath(c) ||
  324. ((c = this._applyPaths(c)[0]),
  325. u.Utilities.isAbsolutePath(c) || (c = this.options.baseUrl + c)),
  326. this._addUrlArgsIfNecessaryToUrl(c)
  327. )
  328. }
  329. isBuild() {
  330. return this.options.isBuild
  331. }
  332. shouldInvokeFactory(r) {
  333. return !!(
  334. !this.options.isBuild ||
  335. u.Utilities.isAnonymousModule(r) ||
  336. (this.options.buildForceInvokeFactory && this.options.buildForceInvokeFactory[r])
  337. )
  338. }
  339. isDuplicateMessageIgnoredFor(r) {
  340. return this.ignoreDuplicateModulesMap.hasOwnProperty(r)
  341. }
  342. getConfigForModule(r) {
  343. if (this.options.config) return this.options.config[r]
  344. }
  345. shouldCatchError() {
  346. return this.options.catchError
  347. }
  348. shouldRecordStats() {
  349. return this.options.recordStats
  350. }
  351. onError(r) {
  352. this.options.onError(r)
  353. }
  354. }
  355. u.Configuration = p
  356. })(AMDLoader || (AMDLoader = {}))
  357. var AMDLoader
  358. ;(function (u) {
  359. class y {
  360. constructor(e) {
  361. ;(this._env = e), (this._scriptLoader = null), (this._callbackMap = {})
  362. }
  363. load(e, i, s, n) {
  364. if (!this._scriptLoader)
  365. if (this._env.isWebWorker) this._scriptLoader = new h()
  366. else if (this._env.isElectronRenderer) {
  367. const { preferScriptTags: d } = e.getConfig().getOptionsLiteral()
  368. d ? (this._scriptLoader = new m()) : (this._scriptLoader = new r(this._env))
  369. } else
  370. this._env.isNode
  371. ? (this._scriptLoader = new r(this._env))
  372. : (this._scriptLoader = new m())
  373. let l = { callback: s, errorback: n }
  374. if (this._callbackMap.hasOwnProperty(i)) {
  375. this._callbackMap[i].push(l)
  376. return
  377. }
  378. ;(this._callbackMap[i] = [l]),
  379. this._scriptLoader.load(
  380. e,
  381. i,
  382. () => this.triggerCallback(i),
  383. (d) => this.triggerErrorback(i, d)
  384. )
  385. }
  386. triggerCallback(e) {
  387. let i = this._callbackMap[e]
  388. delete this._callbackMap[e]
  389. for (let s = 0; s < i.length; s++) i[s].callback()
  390. }
  391. triggerErrorback(e, i) {
  392. let s = this._callbackMap[e]
  393. delete this._callbackMap[e]
  394. for (let n = 0; n < s.length; n++) s[n].errorback(i)
  395. }
  396. }
  397. class m {
  398. attachListeners(e, i, s) {
  399. let n = () => {
  400. e.removeEventListener('load', l), e.removeEventListener('error', d)
  401. },
  402. l = (o) => {
  403. n(), i()
  404. },
  405. d = (o) => {
  406. n(), s(o)
  407. }
  408. e.addEventListener('load', l), e.addEventListener('error', d)
  409. }
  410. load(e, i, s, n) {
  411. if (/^node\|/.test(i)) {
  412. let l = e.getConfig().getOptionsLiteral(),
  413. d = c(e.getRecorder(), l.nodeRequire || u.global.nodeRequire),
  414. o = i.split('|'),
  415. _ = null
  416. try {
  417. _ = d(o[1])
  418. } catch (f) {
  419. n(f)
  420. return
  421. }
  422. e.enqueueDefineAnonymousModule([], () => _), s()
  423. } else {
  424. let l = document.createElement('script')
  425. l.setAttribute('async', 'async'),
  426. l.setAttribute('type', 'text/javascript'),
  427. this.attachListeners(l, s, n)
  428. const { trustedTypesPolicy: d } = e.getConfig().getOptionsLiteral()
  429. d && (i = d.createScriptURL(i)), l.setAttribute('src', i)
  430. const { cspNonce: o } = e.getConfig().getOptionsLiteral()
  431. o && l.setAttribute('nonce', o), document.getElementsByTagName('head')[0].appendChild(l)
  432. }
  433. }
  434. }
  435. function p(t) {
  436. const { trustedTypesPolicy: e } = t.getConfig().getOptionsLiteral()
  437. try {
  438. return (e ? self.eval(e.createScript('', 'true')) : new Function('true')).call(self), !0
  439. } catch {
  440. return !1
  441. }
  442. }
  443. class h {
  444. constructor() {
  445. this._cachedCanUseEval = null
  446. }
  447. _canUseEval(e) {
  448. return (
  449. this._cachedCanUseEval === null && (this._cachedCanUseEval = p(e)), this._cachedCanUseEval
  450. )
  451. }
  452. load(e, i, s, n) {
  453. if (/^node\|/.test(i)) {
  454. const l = e.getConfig().getOptionsLiteral(),
  455. d = c(e.getRecorder(), l.nodeRequire || u.global.nodeRequire),
  456. o = i.split('|')
  457. let _ = null
  458. try {
  459. _ = d(o[1])
  460. } catch (f) {
  461. n(f)
  462. return
  463. }
  464. e.enqueueDefineAnonymousModule([], function () {
  465. return _
  466. }),
  467. s()
  468. } else {
  469. const { trustedTypesPolicy: l } = e.getConfig().getOptionsLiteral()
  470. if (
  471. !(
  472. /^((http:)|(https:)|(file:))/.test(i) &&
  473. i.substring(0, self.origin.length) !== self.origin
  474. ) &&
  475. this._canUseEval(e)
  476. ) {
  477. fetch(i)
  478. .then((o) => {
  479. if (o.status !== 200) throw new Error(o.statusText)
  480. return o.text()
  481. })
  482. .then((o) => {
  483. ;(o = `${o}
  484. //# sourceURL=${i}`),
  485. (l ? self.eval(l.createScript('', o)) : new Function(o)).call(self),
  486. s()
  487. })
  488. .then(void 0, n)
  489. return
  490. }
  491. try {
  492. l && (i = l.createScriptURL(i)), importScripts(i), s()
  493. } catch (o) {
  494. n(o)
  495. }
  496. }
  497. }
  498. }
  499. class r {
  500. constructor(e) {
  501. ;(this._env = e), (this._didInitialize = !1), (this._didPatchNodeRequire = !1)
  502. }
  503. _init(e) {
  504. this._didInitialize ||
  505. ((this._didInitialize = !0),
  506. (this._fs = e('fs')),
  507. (this._vm = e('vm')),
  508. (this._path = e('path')),
  509. (this._crypto = e('crypto')))
  510. }
  511. _initNodeRequire(e, i) {
  512. const { nodeCachedData: s } = i.getConfig().getOptionsLiteral()
  513. if (!s || this._didPatchNodeRequire) return
  514. this._didPatchNodeRequire = !0
  515. const n = this,
  516. l = e('module')
  517. function d(o) {
  518. const _ = o.constructor
  519. let f = function (v) {
  520. try {
  521. return o.require(v)
  522. } finally {
  523. }
  524. }
  525. return (
  526. (f.resolve = function (v, E) {
  527. return _._resolveFilename(v, o, !1, E)
  528. }),
  529. (f.resolve.paths = function (v) {
  530. return _._resolveLookupPaths(v, o)
  531. }),
  532. (f.main = process.mainModule),
  533. (f.extensions = _._extensions),
  534. (f.cache = _._cache),
  535. f
  536. )
  537. }
  538. l.prototype._compile = function (o, _) {
  539. const f = l.wrap(o.replace(/^#!.*/, '')),
  540. g = i.getRecorder(),
  541. v = n._getCachedDataPath(s, _),
  542. E = { filename: _ }
  543. let I
  544. try {
  545. const D = n._fs.readFileSync(v)
  546. ;(I = D.slice(0, 16)), (E.cachedData = D.slice(16)), g.record(60, v)
  547. } catch {
  548. g.record(61, v)
  549. }
  550. const C = new n._vm.Script(f, E),
  551. P = C.runInThisContext(E),
  552. w = n._path.dirname(_),
  553. R = d(this),
  554. U = [this.exports, R, this, _, w, process, _commonjsGlobal, Buffer],
  555. b = P.apply(this.exports, U)
  556. return n._handleCachedData(C, f, v, !E.cachedData, i), n._verifyCachedData(C, f, v, I, i), b
  557. }
  558. }
  559. load(e, i, s, n) {
  560. const l = e.getConfig().getOptionsLiteral(),
  561. d = c(e.getRecorder(), l.nodeRequire || u.global.nodeRequire),
  562. o =
  563. l.nodeInstrumenter ||
  564. function (f) {
  565. return f
  566. }
  567. this._init(d), this._initNodeRequire(d, e)
  568. let _ = e.getRecorder()
  569. if (/^node\|/.test(i)) {
  570. let f = i.split('|'),
  571. g = null
  572. try {
  573. g = d(f[1])
  574. } catch (v) {
  575. n(v)
  576. return
  577. }
  578. e.enqueueDefineAnonymousModule([], () => g), s()
  579. } else {
  580. i = u.Utilities.fileUriToFilePath(this._env.isWindows, i)
  581. const f = this._path.normalize(i),
  582. g = this._getElectronRendererScriptPathOrUri(f),
  583. v = Boolean(l.nodeCachedData),
  584. E = v ? this._getCachedDataPath(l.nodeCachedData, i) : void 0
  585. this._readSourceAndCachedData(f, E, _, (I, C, P, w) => {
  586. if (I) {
  587. n(I)
  588. return
  589. }
  590. let R
  591. C.charCodeAt(0) === r._BOM
  592. ? (R = r._PREFIX + C.substring(1) + r._SUFFIX)
  593. : (R = r._PREFIX + C + r._SUFFIX),
  594. (R = o(R, f))
  595. const U = { filename: g, cachedData: P },
  596. b = this._createAndEvalScript(e, R, U, s, n)
  597. this._handleCachedData(b, R, E, v && !P, e), this._verifyCachedData(b, R, E, w, e)
  598. })
  599. }
  600. }
  601. _createAndEvalScript(e, i, s, n, l) {
  602. const d = e.getRecorder()
  603. d.record(31, s.filename)
  604. const o = new this._vm.Script(i, s),
  605. _ = o.runInThisContext(s),
  606. f = e.getGlobalAMDDefineFunc()
  607. let g = !1
  608. const v = function () {
  609. return (g = !0), f.apply(null, arguments)
  610. }
  611. return (
  612. (v.amd = f.amd),
  613. _.call(
  614. u.global,
  615. e.getGlobalAMDRequireFunc(),
  616. v,
  617. s.filename,
  618. this._path.dirname(s.filename)
  619. ),
  620. d.record(32, s.filename),
  621. g ? n() : l(new Error(`Didn't receive define call in ${s.filename}!`)),
  622. o
  623. )
  624. }
  625. _getElectronRendererScriptPathOrUri(e) {
  626. if (!this._env.isElectronRenderer) return e
  627. let i = e.match(/^([a-z])\:(.*)/i)
  628. return i ? `file:///${(i[1].toUpperCase() + ':' + i[2]).replace(/\\/g, '/')}` : `file://${e}`
  629. }
  630. _getCachedDataPath(e, i) {
  631. const s = this._crypto
  632. .createHash('md5')
  633. .update(i, 'utf8')
  634. .update(e.seed, 'utf8')
  635. .update(process.arch, '')
  636. .digest('hex'),
  637. n = this._path.basename(i).replace(/\.js$/, '')
  638. return this._path.join(e.path, `${n}-${s}.code`)
  639. }
  640. _handleCachedData(e, i, s, n, l) {
  641. e.cachedDataRejected
  642. ? this._fs.unlink(s, (d) => {
  643. l.getRecorder().record(62, s),
  644. this._createAndWriteCachedData(e, i, s, l),
  645. d && l.getConfig().onError(d)
  646. })
  647. : n && this._createAndWriteCachedData(e, i, s, l)
  648. }
  649. _createAndWriteCachedData(e, i, s, n) {
  650. let l = Math.ceil(
  651. n.getConfig().getOptionsLiteral().nodeCachedData.writeDelay * (1 + Math.random())
  652. ),
  653. d = -1,
  654. o = 0,
  655. _
  656. const f = () => {
  657. setTimeout(() => {
  658. _ || (_ = this._crypto.createHash('md5').update(i, 'utf8').digest())
  659. const g = e.createCachedData()
  660. if (!(g.length === 0 || g.length === d || o >= 5)) {
  661. if (g.length < d) {
  662. f()
  663. return
  664. }
  665. ;(d = g.length),
  666. this._fs.writeFile(s, Buffer.concat([_, g]), (v) => {
  667. v && n.getConfig().onError(v), n.getRecorder().record(63, s), f()
  668. })
  669. }
  670. }, l * Math.pow(4, o++))
  671. }
  672. f()
  673. }
  674. _readSourceAndCachedData(e, i, s, n) {
  675. if (!i) this._fs.readFile(e, { encoding: 'utf8' }, n)
  676. else {
  677. let l,
  678. d,
  679. o,
  680. _ = 2
  681. const f = (g) => {
  682. g ? n(g) : --_ === 0 && n(void 0, l, d, o)
  683. }
  684. this._fs.readFile(e, { encoding: 'utf8' }, (g, v) => {
  685. ;(l = v), f(g)
  686. }),
  687. this._fs.readFile(i, (g, v) => {
  688. !g && v && v.length > 0
  689. ? ((o = v.slice(0, 16)), (d = v.slice(16)), s.record(60, i))
  690. : s.record(61, i),
  691. f()
  692. })
  693. }
  694. }
  695. _verifyCachedData(e, i, s, n, l) {
  696. !n ||
  697. e.cachedDataRejected ||
  698. setTimeout(() => {
  699. const d = this._crypto.createHash('md5').update(i, 'utf8').digest()
  700. n.equals(d) ||
  701. (l
  702. .getConfig()
  703. .onError(
  704. new Error(
  705. `FAILED TO VERIFY CACHED DATA, deleting stale '${s}' now, but a RESTART IS REQUIRED`
  706. )
  707. ),
  708. this._fs.unlink(s, (o) => {
  709. o && l.getConfig().onError(o)
  710. }))
  711. }, Math.ceil(5e3 * (1 + Math.random())))
  712. }
  713. }
  714. ;(r._BOM = 65279),
  715. (r._PREFIX = '(function (require, define, __filename, __dirname) { '),
  716. (r._SUFFIX = `
  717. });`)
  718. function c(t, e) {
  719. if (e.__$__isRecorded) return e
  720. const i = function (n) {
  721. t.record(33, n)
  722. try {
  723. return e(n)
  724. } finally {
  725. t.record(34, n)
  726. }
  727. }
  728. return (i.__$__isRecorded = !0), i
  729. }
  730. u.ensureRecordedNodeRequire = c
  731. function a(t) {
  732. return new y(t)
  733. }
  734. u.createScriptLoader = a
  735. })(AMDLoader || (AMDLoader = {}))
  736. var AMDLoader
  737. ;(function (u) {
  738. class y {
  739. constructor(t) {
  740. let e = t.lastIndexOf('/')
  741. e !== -1 ? (this.fromModulePath = t.substr(0, e + 1)) : (this.fromModulePath = '')
  742. }
  743. static _normalizeModuleId(t) {
  744. let e = t,
  745. i
  746. for (i = /\/\.\//; i.test(e); ) e = e.replace(i, '/')
  747. for (
  748. e = e.replace(/^\.\//g, ''),
  749. i = /\/(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//;
  750. i.test(e);
  751. )
  752. e = e.replace(i, '/')
  753. return (
  754. (e = e.replace(/^(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//, '')),
  755. e
  756. )
  757. }
  758. resolveModule(t) {
  759. let e = t
  760. return (
  761. u.Utilities.isAbsolutePath(e) ||
  762. ((u.Utilities.startsWith(e, './') || u.Utilities.startsWith(e, '../')) &&
  763. (e = y._normalizeModuleId(this.fromModulePath + e))),
  764. e
  765. )
  766. }
  767. }
  768. ;(y.ROOT = new y('')), (u.ModuleIdResolver = y)
  769. class m {
  770. constructor(t, e, i, s, n, l) {
  771. ;(this.id = t),
  772. (this.strId = e),
  773. (this.dependencies = i),
  774. (this._callback = s),
  775. (this._errorback = n),
  776. (this.moduleIdResolver = l),
  777. (this.exports = {}),
  778. (this.error = null),
  779. (this.exportsPassedIn = !1),
  780. (this.unresolvedDependenciesCount = this.dependencies.length),
  781. (this._isComplete = !1)
  782. }
  783. static _safeInvokeFunction(t, e) {
  784. try {
  785. return { returnedValue: t.apply(u.global, e), producedError: null }
  786. } catch (i) {
  787. return { returnedValue: null, producedError: i }
  788. }
  789. }
  790. static _invokeFactory(t, e, i, s) {
  791. return t.shouldInvokeFactory(e)
  792. ? t.shouldCatchError()
  793. ? this._safeInvokeFunction(i, s)
  794. : { returnedValue: i.apply(u.global, s), producedError: null }
  795. : { returnedValue: null, producedError: null }
  796. }
  797. complete(t, e, i, s) {
  798. this._isComplete = !0
  799. let n = null
  800. if (this._callback)
  801. if (typeof this._callback == 'function') {
  802. t.record(21, this.strId)
  803. let l = m._invokeFactory(e, this.strId, this._callback, i)
  804. ;(n = l.producedError),
  805. t.record(22, this.strId),
  806. !n &&
  807. typeof l.returnedValue < 'u' &&
  808. (!this.exportsPassedIn || u.Utilities.isEmpty(this.exports)) &&
  809. (this.exports = l.returnedValue)
  810. } else this.exports = this._callback
  811. if (n) {
  812. let l = u.ensureError(n)
  813. ;(l.phase = 'factory'),
  814. (l.moduleId = this.strId),
  815. (l.neededBy = s(this.id)),
  816. (this.error = l),
  817. e.onError(l)
  818. }
  819. ;(this.dependencies = null),
  820. (this._callback = null),
  821. (this._errorback = null),
  822. (this.moduleIdResolver = null)
  823. }
  824. onDependencyError(t) {
  825. return (
  826. (this._isComplete = !0), (this.error = t), this._errorback ? (this._errorback(t), !0) : !1
  827. )
  828. }
  829. isComplete() {
  830. return this._isComplete
  831. }
  832. }
  833. u.Module = m
  834. class p {
  835. constructor() {
  836. ;(this._nextId = 0),
  837. (this._strModuleIdToIntModuleId = new Map()),
  838. (this._intModuleIdToStrModuleId = []),
  839. this.getModuleId('exports'),
  840. this.getModuleId('module'),
  841. this.getModuleId('require')
  842. }
  843. getMaxModuleId() {
  844. return this._nextId
  845. }
  846. getModuleId(t) {
  847. let e = this._strModuleIdToIntModuleId.get(t)
  848. return (
  849. typeof e > 'u' &&
  850. ((e = this._nextId++),
  851. this._strModuleIdToIntModuleId.set(t, e),
  852. (this._intModuleIdToStrModuleId[e] = t)),
  853. e
  854. )
  855. }
  856. getStrModuleId(t) {
  857. return this._intModuleIdToStrModuleId[t]
  858. }
  859. }
  860. class h {
  861. constructor(t) {
  862. this.id = t
  863. }
  864. }
  865. ;(h.EXPORTS = new h(0)), (h.MODULE = new h(1)), (h.REQUIRE = new h(2)), (u.RegularDependency = h)
  866. class r {
  867. constructor(t, e, i) {
  868. ;(this.id = t), (this.pluginId = e), (this.pluginParam = i)
  869. }
  870. }
  871. u.PluginDependency = r
  872. class c {
  873. constructor(t, e, i, s, n = 0) {
  874. ;(this._env = t),
  875. (this._scriptLoader = e),
  876. (this._loaderAvailableTimestamp = n),
  877. (this._defineFunc = i),
  878. (this._requireFunc = s),
  879. (this._moduleIdProvider = new p()),
  880. (this._config = new u.Configuration(this._env)),
  881. (this._hasDependencyCycle = !1),
  882. (this._modules2 = []),
  883. (this._knownModules2 = []),
  884. (this._inverseDependencies2 = []),
  885. (this._inversePluginDependencies2 = new Map()),
  886. (this._currentAnonymousDefineCall = null),
  887. (this._recorder = null),
  888. (this._buildInfoPath = []),
  889. (this._buildInfoDefineStack = []),
  890. (this._buildInfoDependencies = [])
  891. }
  892. reset() {
  893. return new c(
  894. this._env,
  895. this._scriptLoader,
  896. this._defineFunc,
  897. this._requireFunc,
  898. this._loaderAvailableTimestamp
  899. )
  900. }
  901. getGlobalAMDDefineFunc() {
  902. return this._defineFunc
  903. }
  904. getGlobalAMDRequireFunc() {
  905. return this._requireFunc
  906. }
  907. static _findRelevantLocationInStack(t, e) {
  908. let i = (l) => l.replace(/\\/g, '/'),
  909. s = i(t),
  910. n = e.split(/\n/)
  911. for (let l = 0; l < n.length; l++) {
  912. let d = n[l].match(/(.*):(\d+):(\d+)\)?$/)
  913. if (d) {
  914. let o = d[1],
  915. _ = d[2],
  916. f = d[3],
  917. g = Math.max(o.lastIndexOf(' ') + 1, o.lastIndexOf('(') + 1)
  918. if (((o = o.substr(g)), (o = i(o)), o === s)) {
  919. let v = { line: parseInt(_, 10), col: parseInt(f, 10) }
  920. return v.line === 1 && (v.col -= 53), v
  921. }
  922. }
  923. }
  924. throw new Error('Could not correlate define call site for needle ' + t)
  925. }
  926. getBuildInfo() {
  927. if (!this._config.isBuild()) return null
  928. let t = [],
  929. e = 0
  930. for (let i = 0, s = this._modules2.length; i < s; i++) {
  931. let n = this._modules2[i]
  932. if (!n) continue
  933. let l = this._buildInfoPath[n.id] || null,
  934. d = this._buildInfoDefineStack[n.id] || null,
  935. o = this._buildInfoDependencies[n.id]
  936. t[e++] = {
  937. id: n.strId,
  938. path: l,
  939. defineLocation: l && d ? c._findRelevantLocationInStack(l, d) : null,
  940. dependencies: o,
  941. shim: null,
  942. exports: n.exports,
  943. }
  944. }
  945. return t
  946. }
  947. getRecorder() {
  948. return (
  949. this._recorder ||
  950. (this._config.shouldRecordStats()
  951. ? (this._recorder = new u.LoaderEventRecorder(this._loaderAvailableTimestamp))
  952. : (this._recorder = u.NullLoaderEventRecorder.INSTANCE)),
  953. this._recorder
  954. )
  955. }
  956. getLoaderEvents() {
  957. return this.getRecorder().getEvents()
  958. }
  959. enqueueDefineAnonymousModule(t, e) {
  960. if (this._currentAnonymousDefineCall !== null)
  961. throw new Error('Can only have one anonymous define call per script file')
  962. let i = null
  963. this._config.isBuild() && (i = new Error('StackLocation').stack || null),
  964. (this._currentAnonymousDefineCall = { stack: i, dependencies: t, callback: e })
  965. }
  966. defineModule(t, e, i, s, n, l = new y(t)) {
  967. let d = this._moduleIdProvider.getModuleId(t)
  968. if (this._modules2[d]) {
  969. this._config.isDuplicateMessageIgnoredFor(t) ||
  970. console.warn("Duplicate definition of module '" + t + "'")
  971. return
  972. }
  973. let o = new m(d, t, this._normalizeDependencies(e, l), i, s, l)
  974. ;(this._modules2[d] = o),
  975. this._config.isBuild() &&
  976. ((this._buildInfoDefineStack[d] = n),
  977. (this._buildInfoDependencies[d] = (o.dependencies || []).map((_) =>
  978. this._moduleIdProvider.getStrModuleId(_.id)
  979. ))),
  980. this._resolve(o)
  981. }
  982. _normalizeDependency(t, e) {
  983. if (t === 'exports') return h.EXPORTS
  984. if (t === 'module') return h.MODULE
  985. if (t === 'require') return h.REQUIRE
  986. let i = t.indexOf('!')
  987. if (i >= 0) {
  988. let s = e.resolveModule(t.substr(0, i)),
  989. n = e.resolveModule(t.substr(i + 1)),
  990. l = this._moduleIdProvider.getModuleId(s + '!' + n),
  991. d = this._moduleIdProvider.getModuleId(s)
  992. return new r(l, d, n)
  993. }
  994. return new h(this._moduleIdProvider.getModuleId(e.resolveModule(t)))
  995. }
  996. _normalizeDependencies(t, e) {
  997. let i = [],
  998. s = 0
  999. for (let n = 0, l = t.length; n < l; n++) i[s++] = this._normalizeDependency(t[n], e)
  1000. return i
  1001. }
  1002. _relativeRequire(t, e, i, s) {
  1003. if (typeof e == 'string') return this.synchronousRequire(e, t)
  1004. this.defineModule(u.Utilities.generateAnonymousModule(), e, i, s, null, t)
  1005. }
  1006. synchronousRequire(t, e = new y(t)) {
  1007. let i = this._normalizeDependency(t, e),
  1008. s = this._modules2[i.id]
  1009. if (!s)
  1010. throw new Error(
  1011. "Check dependency list! Synchronous require cannot resolve module '" +
  1012. t +
  1013. "'. This is the first mention of this module!"
  1014. )
  1015. if (!s.isComplete())
  1016. throw new Error(
  1017. "Check dependency list! Synchronous require cannot resolve module '" +
  1018. t +
  1019. "'. This module has not been resolved completely yet."
  1020. )
  1021. if (s.error) throw s.error
  1022. return s.exports
  1023. }
  1024. configure(t, e) {
  1025. let i = this._config.shouldRecordStats()
  1026. e
  1027. ? (this._config = new u.Configuration(this._env, t))
  1028. : (this._config = this._config.cloneAndMerge(t)),
  1029. this._config.shouldRecordStats() && !i && (this._recorder = null)
  1030. }
  1031. getConfig() {
  1032. return this._config
  1033. }
  1034. _onLoad(t) {
  1035. if (this._currentAnonymousDefineCall !== null) {
  1036. let e = this._currentAnonymousDefineCall
  1037. ;(this._currentAnonymousDefineCall = null),
  1038. this.defineModule(
  1039. this._moduleIdProvider.getStrModuleId(t),
  1040. e.dependencies,
  1041. e.callback,
  1042. null,
  1043. e.stack
  1044. )
  1045. }
  1046. }
  1047. _createLoadError(t, e) {
  1048. let i = this._moduleIdProvider.getStrModuleId(t),
  1049. s = (this._inverseDependencies2[t] || []).map((l) =>
  1050. this._moduleIdProvider.getStrModuleId(l)
  1051. )
  1052. const n = u.ensureError(e)
  1053. return (n.phase = 'loading'), (n.moduleId = i), (n.neededBy = s), n
  1054. }
  1055. _onLoadError(t, e) {
  1056. const i = this._createLoadError(t, e)
  1057. this._modules2[t] ||
  1058. (this._modules2[t] = new m(
  1059. t,
  1060. this._moduleIdProvider.getStrModuleId(t),
  1061. [],
  1062. () => {},
  1063. null,
  1064. null
  1065. ))
  1066. let s = []
  1067. for (let d = 0, o = this._moduleIdProvider.getMaxModuleId(); d < o; d++) s[d] = !1
  1068. let n = !1,
  1069. l = []
  1070. for (l.push(t), s[t] = !0; l.length > 0; ) {
  1071. let d = l.shift(),
  1072. o = this._modules2[d]
  1073. o && (n = o.onDependencyError(i) || n)
  1074. let _ = this._inverseDependencies2[d]
  1075. if (_)
  1076. for (let f = 0, g = _.length; f < g; f++) {
  1077. let v = _[f]
  1078. s[v] || (l.push(v), (s[v] = !0))
  1079. }
  1080. }
  1081. n || this._config.onError(i)
  1082. }
  1083. _hasDependencyPath(t, e) {
  1084. let i = this._modules2[t]
  1085. if (!i) return !1
  1086. let s = []
  1087. for (let l = 0, d = this._moduleIdProvider.getMaxModuleId(); l < d; l++) s[l] = !1
  1088. let n = []
  1089. for (n.push(i), s[t] = !0; n.length > 0; ) {
  1090. let d = n.shift().dependencies
  1091. if (d)
  1092. for (let o = 0, _ = d.length; o < _; o++) {
  1093. let f = d[o]
  1094. if (f.id === e) return !0
  1095. let g = this._modules2[f.id]
  1096. g && !s[f.id] && ((s[f.id] = !0), n.push(g))
  1097. }
  1098. }
  1099. return !1
  1100. }
  1101. _findCyclePath(t, e, i) {
  1102. if (t === e || i === 50) return [t]
  1103. let s = this._modules2[t]
  1104. if (!s) return null
  1105. let n = s.dependencies
  1106. if (n)
  1107. for (let l = 0, d = n.length; l < d; l++) {
  1108. let o = this._findCyclePath(n[l].id, e, i + 1)
  1109. if (o !== null) return o.push(t), o
  1110. }
  1111. return null
  1112. }
  1113. _createRequire(t) {
  1114. let e = (i, s, n) => this._relativeRequire(t, i, s, n)
  1115. return (
  1116. (e.toUrl = (i) => this._config.requireToUrl(t.resolveModule(i))),
  1117. (e.getStats = () => this.getLoaderEvents()),
  1118. (e.hasDependencyCycle = () => this._hasDependencyCycle),
  1119. (e.config = (i, s = !1) => {
  1120. this.configure(i, s)
  1121. }),
  1122. (e.__$__nodeRequire = u.global.nodeRequire),
  1123. e
  1124. )
  1125. }
  1126. _loadModule(t) {
  1127. if (this._modules2[t] || this._knownModules2[t]) return
  1128. this._knownModules2[t] = !0
  1129. let e = this._moduleIdProvider.getStrModuleId(t),
  1130. i = this._config.moduleIdToPaths(e),
  1131. s = /^@[^\/]+\/[^\/]+$/
  1132. this._env.isNode && (e.indexOf('/') === -1 || s.test(e)) && i.push('node|' + e)
  1133. let n = -1,
  1134. l = (d) => {
  1135. if ((n++, n >= i.length)) this._onLoadError(t, d)
  1136. else {
  1137. let o = i[n],
  1138. _ = this.getRecorder()
  1139. if (this._config.isBuild() && o === 'empty:') {
  1140. ;(this._buildInfoPath[t] = o),
  1141. this.defineModule(this._moduleIdProvider.getStrModuleId(t), [], null, null, null),
  1142. this._onLoad(t)
  1143. return
  1144. }
  1145. _.record(10, o),
  1146. this._scriptLoader.load(
  1147. this,
  1148. o,
  1149. () => {
  1150. this._config.isBuild() && (this._buildInfoPath[t] = o),
  1151. _.record(11, o),
  1152. this._onLoad(t)
  1153. },
  1154. (f) => {
  1155. _.record(12, o), l(f)
  1156. }
  1157. )
  1158. }
  1159. }
  1160. l(null)
  1161. }
  1162. _loadPluginDependency(t, e) {
  1163. if (this._modules2[e.id] || this._knownModules2[e.id]) return
  1164. this._knownModules2[e.id] = !0
  1165. let i = (s) => {
  1166. this.defineModule(this._moduleIdProvider.getStrModuleId(e.id), [], s, null, null)
  1167. }
  1168. ;(i.error = (s) => {
  1169. this._config.onError(this._createLoadError(e.id, s))
  1170. }),
  1171. t.load(e.pluginParam, this._createRequire(y.ROOT), i, this._config.getOptionsLiteral())
  1172. }
  1173. _resolve(t) {
  1174. let e = t.dependencies
  1175. if (e)
  1176. for (let i = 0, s = e.length; i < s; i++) {
  1177. let n = e[i]
  1178. if (n === h.EXPORTS) {
  1179. ;(t.exportsPassedIn = !0), t.unresolvedDependenciesCount--
  1180. continue
  1181. }
  1182. if (n === h.MODULE) {
  1183. t.unresolvedDependenciesCount--
  1184. continue
  1185. }
  1186. if (n === h.REQUIRE) {
  1187. t.unresolvedDependenciesCount--
  1188. continue
  1189. }
  1190. let l = this._modules2[n.id]
  1191. if (l && l.isComplete()) {
  1192. if (l.error) {
  1193. t.onDependencyError(l.error)
  1194. return
  1195. }
  1196. t.unresolvedDependenciesCount--
  1197. continue
  1198. }
  1199. if (this._hasDependencyPath(n.id, t.id)) {
  1200. ;(this._hasDependencyCycle = !0),
  1201. console.warn(
  1202. "There is a dependency cycle between '" +
  1203. this._moduleIdProvider.getStrModuleId(n.id) +
  1204. "' and '" +
  1205. this._moduleIdProvider.getStrModuleId(t.id) +
  1206. "'. The cyclic path follows:"
  1207. )
  1208. let d = this._findCyclePath(n.id, t.id, 0) || []
  1209. d.reverse(),
  1210. d.push(n.id),
  1211. console.warn(
  1212. d.map((o) => this._moduleIdProvider.getStrModuleId(o)).join(` =>
  1213. `)
  1214. ),
  1215. t.unresolvedDependenciesCount--
  1216. continue
  1217. }
  1218. if (
  1219. ((this._inverseDependencies2[n.id] = this._inverseDependencies2[n.id] || []),
  1220. this._inverseDependencies2[n.id].push(t.id),
  1221. n instanceof r)
  1222. ) {
  1223. let d = this._modules2[n.pluginId]
  1224. if (d && d.isComplete()) {
  1225. this._loadPluginDependency(d.exports, n)
  1226. continue
  1227. }
  1228. let o = this._inversePluginDependencies2.get(n.pluginId)
  1229. o || ((o = []), this._inversePluginDependencies2.set(n.pluginId, o)),
  1230. o.push(n),
  1231. this._loadModule(n.pluginId)
  1232. continue
  1233. }
  1234. this._loadModule(n.id)
  1235. }
  1236. t.unresolvedDependenciesCount === 0 && this._onModuleComplete(t)
  1237. }
  1238. _onModuleComplete(t) {
  1239. let e = this.getRecorder()
  1240. if (t.isComplete()) return
  1241. let i = t.dependencies,
  1242. s = []
  1243. if (i)
  1244. for (let o = 0, _ = i.length; o < _; o++) {
  1245. let f = i[o]
  1246. if (f === h.EXPORTS) {
  1247. s[o] = t.exports
  1248. continue
  1249. }
  1250. if (f === h.MODULE) {
  1251. s[o] = { id: t.strId, config: () => this._config.getConfigForModule(t.strId) }
  1252. continue
  1253. }
  1254. if (f === h.REQUIRE) {
  1255. s[o] = this._createRequire(t.moduleIdResolver)
  1256. continue
  1257. }
  1258. let g = this._modules2[f.id]
  1259. if (g) {
  1260. s[o] = g.exports
  1261. continue
  1262. }
  1263. s[o] = null
  1264. }
  1265. const n = (o) =>
  1266. (this._inverseDependencies2[o] || []).map((_) => this._moduleIdProvider.getStrModuleId(_))
  1267. t.complete(e, this._config, s, n)
  1268. let l = this._inverseDependencies2[t.id]
  1269. if (((this._inverseDependencies2[t.id] = null), l))
  1270. for (let o = 0, _ = l.length; o < _; o++) {
  1271. let f = l[o],
  1272. g = this._modules2[f]
  1273. g.unresolvedDependenciesCount--,
  1274. g.unresolvedDependenciesCount === 0 && this._onModuleComplete(g)
  1275. }
  1276. let d = this._inversePluginDependencies2.get(t.id)
  1277. if (d) {
  1278. this._inversePluginDependencies2.delete(t.id)
  1279. for (let o = 0, _ = d.length; o < _; o++) this._loadPluginDependency(t.exports, d[o])
  1280. }
  1281. }
  1282. }
  1283. u.ModuleManager = c
  1284. })(AMDLoader || (AMDLoader = {}))
  1285. var define, AMDLoader
  1286. ;(function (u) {
  1287. const y = new u.Environment()
  1288. let m = null
  1289. const p = function (a, t, e) {
  1290. typeof a != 'string' && ((e = t), (t = a), (a = null)),
  1291. (typeof t != 'object' || !Array.isArray(t)) && ((e = t), (t = null)),
  1292. t || (t = ['require', 'exports', 'module']),
  1293. a ? m.defineModule(a, t, e, null, null) : m.enqueueDefineAnonymousModule(t, e)
  1294. }
  1295. p.amd = { jQuery: !0 }
  1296. const h = function (a, t = !1) {
  1297. m.configure(a, t)
  1298. },
  1299. r = function () {
  1300. if (arguments.length === 1) {
  1301. if (arguments[0] instanceof Object && !Array.isArray(arguments[0])) {
  1302. h(arguments[0])
  1303. return
  1304. }
  1305. if (typeof arguments[0] == 'string') return m.synchronousRequire(arguments[0])
  1306. }
  1307. if ((arguments.length === 2 || arguments.length === 3) && Array.isArray(arguments[0])) {
  1308. m.defineModule(
  1309. u.Utilities.generateAnonymousModule(),
  1310. arguments[0],
  1311. arguments[1],
  1312. arguments[2],
  1313. null
  1314. )
  1315. return
  1316. }
  1317. throw new Error('Unrecognized require call')
  1318. }
  1319. ;(r.config = h),
  1320. (r.getConfig = function () {
  1321. return m.getConfig().getOptionsLiteral()
  1322. }),
  1323. (r.reset = function () {
  1324. m = m.reset()
  1325. }),
  1326. (r.getBuildInfo = function () {
  1327. return m.getBuildInfo()
  1328. }),
  1329. (r.getStats = function () {
  1330. return m.getLoaderEvents()
  1331. }),
  1332. (r.define = p)
  1333. function c() {
  1334. if (typeof u.global.require < 'u' || typeof require < 'u') {
  1335. const a = u.global.require || require
  1336. if (typeof a == 'function' && typeof a.resolve == 'function') {
  1337. const t = u.ensureRecordedNodeRequire(m.getRecorder(), a)
  1338. ;(u.global.nodeRequire = t), (r.nodeRequire = t), (r.__$__nodeRequire = t)
  1339. }
  1340. }
  1341. y.isNode && !y.isElectronRenderer && !y.isElectronNodeIntegrationWebWorker
  1342. ? (module.exports = r)
  1343. : (y.isElectronRenderer || (u.global.define = p), (u.global.require = r))
  1344. }
  1345. ;(u.init = c),
  1346. (typeof u.global.define != 'function' || !u.global.define.amd) &&
  1347. ((m = new u.ModuleManager(
  1348. y,
  1349. u.createScriptLoader(y),
  1350. p,
  1351. r,
  1352. u.Utilities.getHighPerformanceTimestamp()
  1353. )),
  1354. typeof u.global.require < 'u' &&
  1355. typeof u.global.require != 'function' &&
  1356. r.config(u.global.require),
  1357. (define = function () {
  1358. return p.apply(null, arguments)
  1359. }),
  1360. (define.amd = p.amd),
  1361. typeof doNotInitLoader > 'u' && c())
  1362. })(AMDLoader || (AMDLoader = {}))
  1363. //# sourceMappingURL=../../min-maps/vs/loader.js.map