2
0

compatibility.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711
  1. /**
  2. * @licstart The following is the entire license notice for the
  3. * Javascript code in this page
  4. *
  5. * Copyright 2017 Mozilla Foundation
  6. *
  7. * Licensed under the Apache License, Version 2.0 (the "License");
  8. * you may not use this file except in compliance with the License.
  9. * You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS,
  15. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. * See the License for the specific language governing permissions and
  17. * limitations under the License.
  18. *
  19. * @licend The above is the entire license notice for the
  20. * Javascript code in this page
  21. */
  22. 'use strict';
  23. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  24. if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
  25. var globalScope = require('./global_scope');
  26. var isNodeJS = require('./is_node');
  27. var userAgent = typeof navigator !== 'undefined' && navigator.userAgent || '';
  28. var isAndroid = /Android/.test(userAgent);
  29. var isIOSChrome = userAgent.indexOf('CriOS') >= 0;
  30. var isIE = userAgent.indexOf('Trident') >= 0;
  31. var isIOS = /\b(iPad|iPhone|iPod)(?=;)/.test(userAgent);
  32. var isSafari = /Safari\//.test(userAgent) && !/(Chrome\/|Android\s)/.test(userAgent);
  33. var hasDOM = (typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && (typeof document === 'undefined' ? 'undefined' : _typeof(document)) === 'object';
  34. if (typeof PDFJS === 'undefined') {
  35. globalScope.PDFJS = {};
  36. }
  37. PDFJS.compatibilityChecked = true;
  38. (function checkNodeBtoa() {
  39. if (globalScope.btoa || !isNodeJS()) {
  40. return;
  41. }
  42. globalScope.btoa = function (chars) {
  43. return Buffer.from(chars, 'binary').toString('base64');
  44. };
  45. })();
  46. (function checkNodeAtob() {
  47. if (globalScope.atob || !isNodeJS()) {
  48. return;
  49. }
  50. globalScope.atob = function (input) {
  51. return Buffer.from(input, 'base64').toString('binary');
  52. };
  53. })();
  54. (function checkOnBlobSupport() {
  55. if (isIE || isIOSChrome) {
  56. PDFJS.disableCreateObjectURL = true;
  57. }
  58. })();
  59. (function checkNavigatorLanguage() {
  60. if (typeof navigator === 'undefined') {
  61. return;
  62. }
  63. if ('language' in navigator) {
  64. return;
  65. }
  66. PDFJS.locale = navigator.userLanguage || 'en-US';
  67. })();
  68. (function checkRangeRequests() {
  69. if (isSafari || isIOS) {
  70. PDFJS.disableRange = true;
  71. PDFJS.disableStream = true;
  72. }
  73. })();
  74. (function checkCanvasSizeLimitation() {
  75. if (isIOS || isAndroid) {
  76. PDFJS.maxCanvasPixels = 5242880;
  77. }
  78. })();
  79. (function checkFullscreenSupport() {
  80. if (!hasDOM) {
  81. return;
  82. }
  83. if (isIE && window.parent !== window) {
  84. PDFJS.disableFullscreen = true;
  85. }
  86. })();
  87. (function checkCurrentScript() {
  88. if (!hasDOM) {
  89. return;
  90. }
  91. if ('currentScript' in document) {
  92. return;
  93. }
  94. Object.defineProperty(document, 'currentScript', {
  95. get: function get() {
  96. var scripts = document.getElementsByTagName('script');
  97. return scripts[scripts.length - 1];
  98. },
  99. enumerable: true,
  100. configurable: true
  101. });
  102. })();
  103. (function checkChildNodeRemove() {
  104. if (!hasDOM) {
  105. return;
  106. }
  107. if (typeof Element.prototype.remove !== 'undefined') {
  108. return;
  109. }
  110. Element.prototype.remove = function () {
  111. if (this.parentNode) {
  112. this.parentNode.removeChild(this);
  113. }
  114. };
  115. })();
  116. (function checkArrayIncludes() {
  117. if (Array.prototype.includes) {
  118. return;
  119. }
  120. Array.prototype.includes = require('core-js/fn/array/includes');
  121. })();
  122. (function checkMathLog2() {
  123. if (Math.log2) {
  124. return;
  125. }
  126. Math.log2 = require('core-js/fn/math/log2');
  127. })();
  128. (function checkNumberIsNaN() {
  129. if (Number.isNaN) {
  130. return;
  131. }
  132. Number.isNaN = require('core-js/fn/number/is-nan');
  133. })();
  134. (function checkNumberIsInteger() {
  135. if (Number.isInteger) {
  136. return;
  137. }
  138. Number.isInteger = require('core-js/fn/number/is-integer');
  139. })();
  140. (function checkPromise() {
  141. if (globalScope.Promise) {
  142. return;
  143. }
  144. globalScope.Promise = require('core-js/fn/promise');
  145. })();
  146. (function checkWeakMap() {
  147. if (globalScope.WeakMap) {
  148. return;
  149. }
  150. globalScope.WeakMap = require('core-js/fn/weak-map');
  151. })();
  152. (function checkURLConstructor() {
  153. var hasWorkingUrl = false;
  154. try {
  155. if (typeof URL === 'function' && _typeof(URL.prototype) === 'object' && 'origin' in URL.prototype) {
  156. var u = new URL('b', 'http://a');
  157. u.pathname = 'c%20d';
  158. hasWorkingUrl = u.href === 'http://a/c%20d';
  159. }
  160. } catch (e) {}
  161. if (hasWorkingUrl) {
  162. return;
  163. }
  164. var relative = Object.create(null);
  165. relative['ftp'] = 21;
  166. relative['file'] = 0;
  167. relative['gopher'] = 70;
  168. relative['http'] = 80;
  169. relative['https'] = 443;
  170. relative['ws'] = 80;
  171. relative['wss'] = 443;
  172. var relativePathDotMapping = Object.create(null);
  173. relativePathDotMapping['%2e'] = '.';
  174. relativePathDotMapping['.%2e'] = '..';
  175. relativePathDotMapping['%2e.'] = '..';
  176. relativePathDotMapping['%2e%2e'] = '..';
  177. function isRelativeScheme(scheme) {
  178. return relative[scheme] !== undefined;
  179. }
  180. function invalid() {
  181. clear.call(this);
  182. this._isInvalid = true;
  183. }
  184. function IDNAToASCII(h) {
  185. if (h === '') {
  186. invalid.call(this);
  187. }
  188. return h.toLowerCase();
  189. }
  190. function percentEscape(c) {
  191. var unicode = c.charCodeAt(0);
  192. if (unicode > 0x20 && unicode < 0x7F && [0x22, 0x23, 0x3C, 0x3E, 0x3F, 0x60].indexOf(unicode) === -1) {
  193. return c;
  194. }
  195. return encodeURIComponent(c);
  196. }
  197. function percentEscapeQuery(c) {
  198. var unicode = c.charCodeAt(0);
  199. if (unicode > 0x20 && unicode < 0x7F && [0x22, 0x23, 0x3C, 0x3E, 0x60].indexOf(unicode) === -1) {
  200. return c;
  201. }
  202. return encodeURIComponent(c);
  203. }
  204. var EOF,
  205. ALPHA = /[a-zA-Z]/,
  206. ALPHANUMERIC = /[a-zA-Z0-9\+\-\.]/;
  207. function parse(input, stateOverride, base) {
  208. function err(message) {
  209. errors.push(message);
  210. }
  211. var state = stateOverride || 'scheme start',
  212. cursor = 0,
  213. buffer = '',
  214. seenAt = false,
  215. seenBracket = false,
  216. errors = [];
  217. loop: while ((input[cursor - 1] !== EOF || cursor === 0) && !this._isInvalid) {
  218. var c = input[cursor];
  219. switch (state) {
  220. case 'scheme start':
  221. if (c && ALPHA.test(c)) {
  222. buffer += c.toLowerCase();
  223. state = 'scheme';
  224. } else if (!stateOverride) {
  225. buffer = '';
  226. state = 'no scheme';
  227. continue;
  228. } else {
  229. err('Invalid scheme.');
  230. break loop;
  231. }
  232. break;
  233. case 'scheme':
  234. if (c && ALPHANUMERIC.test(c)) {
  235. buffer += c.toLowerCase();
  236. } else if (c === ':') {
  237. this._scheme = buffer;
  238. buffer = '';
  239. if (stateOverride) {
  240. break loop;
  241. }
  242. if (isRelativeScheme(this._scheme)) {
  243. this._isRelative = true;
  244. }
  245. if (this._scheme === 'file') {
  246. state = 'relative';
  247. } else if (this._isRelative && base && base._scheme === this._scheme) {
  248. state = 'relative or authority';
  249. } else if (this._isRelative) {
  250. state = 'authority first slash';
  251. } else {
  252. state = 'scheme data';
  253. }
  254. } else if (!stateOverride) {
  255. buffer = '';
  256. cursor = 0;
  257. state = 'no scheme';
  258. continue;
  259. } else if (c === EOF) {
  260. break loop;
  261. } else {
  262. err('Code point not allowed in scheme: ' + c);
  263. break loop;
  264. }
  265. break;
  266. case 'scheme data':
  267. if (c === '?') {
  268. this._query = '?';
  269. state = 'query';
  270. } else if (c === '#') {
  271. this._fragment = '#';
  272. state = 'fragment';
  273. } else {
  274. if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') {
  275. this._schemeData += percentEscape(c);
  276. }
  277. }
  278. break;
  279. case 'no scheme':
  280. if (!base || !isRelativeScheme(base._scheme)) {
  281. err('Missing scheme.');
  282. invalid.call(this);
  283. } else {
  284. state = 'relative';
  285. continue;
  286. }
  287. break;
  288. case 'relative or authority':
  289. if (c === '/' && input[cursor + 1] === '/') {
  290. state = 'authority ignore slashes';
  291. } else {
  292. err('Expected /, got: ' + c);
  293. state = 'relative';
  294. continue;
  295. }
  296. break;
  297. case 'relative':
  298. this._isRelative = true;
  299. if (this._scheme !== 'file') {
  300. this._scheme = base._scheme;
  301. }
  302. if (c === EOF) {
  303. this._host = base._host;
  304. this._port = base._port;
  305. this._path = base._path.slice();
  306. this._query = base._query;
  307. this._username = base._username;
  308. this._password = base._password;
  309. break loop;
  310. } else if (c === '/' || c === '\\') {
  311. if (c === '\\') {
  312. err('\\ is an invalid code point.');
  313. }
  314. state = 'relative slash';
  315. } else if (c === '?') {
  316. this._host = base._host;
  317. this._port = base._port;
  318. this._path = base._path.slice();
  319. this._query = '?';
  320. this._username = base._username;
  321. this._password = base._password;
  322. state = 'query';
  323. } else if (c === '#') {
  324. this._host = base._host;
  325. this._port = base._port;
  326. this._path = base._path.slice();
  327. this._query = base._query;
  328. this._fragment = '#';
  329. this._username = base._username;
  330. this._password = base._password;
  331. state = 'fragment';
  332. } else {
  333. var nextC = input[cursor + 1];
  334. var nextNextC = input[cursor + 2];
  335. if (this._scheme !== 'file' || !ALPHA.test(c) || nextC !== ':' && nextC !== '|' || nextNextC !== EOF && nextNextC !== '/' && nextNextC !== '\\' && nextNextC !== '?' && nextNextC !== '#') {
  336. this._host = base._host;
  337. this._port = base._port;
  338. this._username = base._username;
  339. this._password = base._password;
  340. this._path = base._path.slice();
  341. this._path.pop();
  342. }
  343. state = 'relative path';
  344. continue;
  345. }
  346. break;
  347. case 'relative slash':
  348. if (c === '/' || c === '\\') {
  349. if (c === '\\') {
  350. err('\\ is an invalid code point.');
  351. }
  352. if (this._scheme === 'file') {
  353. state = 'file host';
  354. } else {
  355. state = 'authority ignore slashes';
  356. }
  357. } else {
  358. if (this._scheme !== 'file') {
  359. this._host = base._host;
  360. this._port = base._port;
  361. this._username = base._username;
  362. this._password = base._password;
  363. }
  364. state = 'relative path';
  365. continue;
  366. }
  367. break;
  368. case 'authority first slash':
  369. if (c === '/') {
  370. state = 'authority second slash';
  371. } else {
  372. err('Expected \'/\', got: ' + c);
  373. state = 'authority ignore slashes';
  374. continue;
  375. }
  376. break;
  377. case 'authority second slash':
  378. state = 'authority ignore slashes';
  379. if (c !== '/') {
  380. err('Expected \'/\', got: ' + c);
  381. continue;
  382. }
  383. break;
  384. case 'authority ignore slashes':
  385. if (c !== '/' && c !== '\\') {
  386. state = 'authority';
  387. continue;
  388. } else {
  389. err('Expected authority, got: ' + c);
  390. }
  391. break;
  392. case 'authority':
  393. if (c === '@') {
  394. if (seenAt) {
  395. err('@ already seen.');
  396. buffer += '%40';
  397. }
  398. seenAt = true;
  399. for (var i = 0; i < buffer.length; i++) {
  400. var cp = buffer[i];
  401. if (cp === '\t' || cp === '\n' || cp === '\r') {
  402. err('Invalid whitespace in authority.');
  403. continue;
  404. }
  405. if (cp === ':' && this._password === null) {
  406. this._password = '';
  407. continue;
  408. }
  409. var tempC = percentEscape(cp);
  410. if (this._password !== null) {
  411. this._password += tempC;
  412. } else {
  413. this._username += tempC;
  414. }
  415. }
  416. buffer = '';
  417. } else if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#') {
  418. cursor -= buffer.length;
  419. buffer = '';
  420. state = 'host';
  421. continue;
  422. } else {
  423. buffer += c;
  424. }
  425. break;
  426. case 'file host':
  427. if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#') {
  428. if (buffer.length === 2 && ALPHA.test(buffer[0]) && (buffer[1] === ':' || buffer[1] === '|')) {
  429. state = 'relative path';
  430. } else if (buffer.length === 0) {
  431. state = 'relative path start';
  432. } else {
  433. this._host = IDNAToASCII.call(this, buffer);
  434. buffer = '';
  435. state = 'relative path start';
  436. }
  437. continue;
  438. } else if (c === '\t' || c === '\n' || c === '\r') {
  439. err('Invalid whitespace in file host.');
  440. } else {
  441. buffer += c;
  442. }
  443. break;
  444. case 'host':
  445. case 'hostname':
  446. if (c === ':' && !seenBracket) {
  447. this._host = IDNAToASCII.call(this, buffer);
  448. buffer = '';
  449. state = 'port';
  450. if (stateOverride === 'hostname') {
  451. break loop;
  452. }
  453. } else if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#') {
  454. this._host = IDNAToASCII.call(this, buffer);
  455. buffer = '';
  456. state = 'relative path start';
  457. if (stateOverride) {
  458. break loop;
  459. }
  460. continue;
  461. } else if (c !== '\t' && c !== '\n' && c !== '\r') {
  462. if (c === '[') {
  463. seenBracket = true;
  464. } else if (c === ']') {
  465. seenBracket = false;
  466. }
  467. buffer += c;
  468. } else {
  469. err('Invalid code point in host/hostname: ' + c);
  470. }
  471. break;
  472. case 'port':
  473. if (/[0-9]/.test(c)) {
  474. buffer += c;
  475. } else if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#' || stateOverride) {
  476. if (buffer !== '') {
  477. var temp = parseInt(buffer, 10);
  478. if (temp !== relative[this._scheme]) {
  479. this._port = temp + '';
  480. }
  481. buffer = '';
  482. }
  483. if (stateOverride) {
  484. break loop;
  485. }
  486. state = 'relative path start';
  487. continue;
  488. } else if (c === '\t' || c === '\n' || c === '\r') {
  489. err('Invalid code point in port: ' + c);
  490. } else {
  491. invalid.call(this);
  492. }
  493. break;
  494. case 'relative path start':
  495. if (c === '\\') {
  496. err('\'\\\' not allowed in path.');
  497. }
  498. state = 'relative path';
  499. if (c !== '/' && c !== '\\') {
  500. continue;
  501. }
  502. break;
  503. case 'relative path':
  504. if (c === EOF || c === '/' || c === '\\' || !stateOverride && (c === '?' || c === '#')) {
  505. if (c === '\\') {
  506. err('\\ not allowed in relative path.');
  507. }
  508. var tmp;
  509. if (tmp = relativePathDotMapping[buffer.toLowerCase()]) {
  510. buffer = tmp;
  511. }
  512. if (buffer === '..') {
  513. this._path.pop();
  514. if (c !== '/' && c !== '\\') {
  515. this._path.push('');
  516. }
  517. } else if (buffer === '.' && c !== '/' && c !== '\\') {
  518. this._path.push('');
  519. } else if (buffer !== '.') {
  520. if (this._scheme === 'file' && this._path.length === 0 && buffer.length === 2 && ALPHA.test(buffer[0]) && buffer[1] === '|') {
  521. buffer = buffer[0] + ':';
  522. }
  523. this._path.push(buffer);
  524. }
  525. buffer = '';
  526. if (c === '?') {
  527. this._query = '?';
  528. state = 'query';
  529. } else if (c === '#') {
  530. this._fragment = '#';
  531. state = 'fragment';
  532. }
  533. } else if (c !== '\t' && c !== '\n' && c !== '\r') {
  534. buffer += percentEscape(c);
  535. }
  536. break;
  537. case 'query':
  538. if (!stateOverride && c === '#') {
  539. this._fragment = '#';
  540. state = 'fragment';
  541. } else if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') {
  542. this._query += percentEscapeQuery(c);
  543. }
  544. break;
  545. case 'fragment':
  546. if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') {
  547. this._fragment += c;
  548. }
  549. break;
  550. }
  551. cursor++;
  552. }
  553. }
  554. function clear() {
  555. this._scheme = '';
  556. this._schemeData = '';
  557. this._username = '';
  558. this._password = null;
  559. this._host = '';
  560. this._port = '';
  561. this._path = [];
  562. this._query = '';
  563. this._fragment = '';
  564. this._isInvalid = false;
  565. this._isRelative = false;
  566. }
  567. function JURL(url, base) {
  568. if (base !== undefined && !(base instanceof JURL)) {
  569. base = new JURL(String(base));
  570. }
  571. this._url = url;
  572. clear.call(this);
  573. var input = url.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g, '');
  574. parse.call(this, input, null, base);
  575. }
  576. JURL.prototype = {
  577. toString: function toString() {
  578. return this.href;
  579. },
  580. get href() {
  581. if (this._isInvalid) {
  582. return this._url;
  583. }
  584. var authority = '';
  585. if (this._username !== '' || this._password !== null) {
  586. authority = this._username + (this._password !== null ? ':' + this._password : '') + '@';
  587. }
  588. return this.protocol + (this._isRelative ? '//' + authority + this.host : '') + this.pathname + this._query + this._fragment;
  589. },
  590. set href(value) {
  591. clear.call(this);
  592. parse.call(this, value);
  593. },
  594. get protocol() {
  595. return this._scheme + ':';
  596. },
  597. set protocol(value) {
  598. if (this._isInvalid) {
  599. return;
  600. }
  601. parse.call(this, value + ':', 'scheme start');
  602. },
  603. get host() {
  604. return this._isInvalid ? '' : this._port ? this._host + ':' + this._port : this._host;
  605. },
  606. set host(value) {
  607. if (this._isInvalid || !this._isRelative) {
  608. return;
  609. }
  610. parse.call(this, value, 'host');
  611. },
  612. get hostname() {
  613. return this._host;
  614. },
  615. set hostname(value) {
  616. if (this._isInvalid || !this._isRelative) {
  617. return;
  618. }
  619. parse.call(this, value, 'hostname');
  620. },
  621. get port() {
  622. return this._port;
  623. },
  624. set port(value) {
  625. if (this._isInvalid || !this._isRelative) {
  626. return;
  627. }
  628. parse.call(this, value, 'port');
  629. },
  630. get pathname() {
  631. return this._isInvalid ? '' : this._isRelative ? '/' + this._path.join('/') : this._schemeData;
  632. },
  633. set pathname(value) {
  634. if (this._isInvalid || !this._isRelative) {
  635. return;
  636. }
  637. this._path = [];
  638. parse.call(this, value, 'relative path start');
  639. },
  640. get search() {
  641. return this._isInvalid || !this._query || this._query === '?' ? '' : this._query;
  642. },
  643. set search(value) {
  644. if (this._isInvalid || !this._isRelative) {
  645. return;
  646. }
  647. this._query = '?';
  648. if (value[0] === '?') {
  649. value = value.slice(1);
  650. }
  651. parse.call(this, value, 'query');
  652. },
  653. get hash() {
  654. return this._isInvalid || !this._fragment || this._fragment === '#' ? '' : this._fragment;
  655. },
  656. set hash(value) {
  657. if (this._isInvalid) {
  658. return;
  659. }
  660. this._fragment = '#';
  661. if (value[0] === '#') {
  662. value = value.slice(1);
  663. }
  664. parse.call(this, value, 'fragment');
  665. },
  666. get origin() {
  667. var host;
  668. if (this._isInvalid || !this._scheme) {
  669. return '';
  670. }
  671. switch (this._scheme) {
  672. case 'data':
  673. case 'file':
  674. case 'javascript':
  675. case 'mailto':
  676. return 'null';
  677. case 'blob':
  678. try {
  679. return new JURL(this._schemeData).origin || 'null';
  680. } catch (_) {}
  681. return 'null';
  682. }
  683. host = this.host;
  684. if (!host) {
  685. return '';
  686. }
  687. return this._scheme + '://' + host;
  688. }
  689. };
  690. var OriginalURL = globalScope.URL;
  691. if (OriginalURL) {
  692. JURL.createObjectURL = function (blob) {
  693. return OriginalURL.createObjectURL.apply(OriginalURL, arguments);
  694. };
  695. JURL.revokeObjectURL = function (url) {
  696. OriginalURL.revokeObjectURL(url);
  697. };
  698. }
  699. globalScope.URL = JURL;
  700. })();
  701. (function checkObjectValues() {
  702. if (Object.values) {
  703. return;
  704. }
  705. Object.values = require('core-js/fn/object/values');
  706. })();
  707. }